Skip to content

"Remove dbg! in selection" does not remove nested ones #13901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TonalidadeHidrica opened this issue Jan 6, 2023 · 1 comment · Fixed by #14225
Closed

"Remove dbg! in selection" does not remove nested ones #13901

TonalidadeHidrica opened this issue Jan 6, 2023 · 1 comment · Fixed by #14225
Labels
A-assists C-bug Category: bug E-has-instructions Issue has some instructions and pointers to code to get started S-actionable Someone could pick this issue up and work on it right now

Comments

@TonalidadeHidrica
Copy link
Contributor

TonalidadeHidrica commented Jan 6, 2023

Removing all dbg!() macros in the selection was implemented in #13629 , but it does not remove nested dbg!() .

Minimal repro:

fn main() {
  let x = dbg!(dbg!(0) + 1) + 2; // Select this line and run the code action
}

Expected result:

fn main() {
  let x = (0 + 1) + 2;
}

Actual result:

fn main() {
  let x = (dbg!(0) + 1) + 2;
}

Running the action once more yields the desired result.

rust-analyzer version [coc.nvim] rust-analyzer 0.3.1348-standalone
rustc version: (eg. output of rustc -V)

rustc 1.65.0 (897e37553 2022-11-02)

relevant settings: Nothing shuold be relevant.

@Veykril Veykril added A-assists C-bug Category: bug labels Jan 6, 2023
@lnicola lnicola added the S-actionable Someone could pick this issue up and work on it right now label Jan 7, 2023
@Veykril
Copy link
Member

Veykril commented Jan 30, 2023

@Veykril Veykril added the E-has-instructions Issue has some instructions and pointers to code to get started label Jan 30, 2023
@bors bors closed this as completed in d1fd635 Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-assists C-bug Category: bug E-has-instructions Issue has some instructions and pointers to code to get started S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants