You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnfoo() -> u32{let bar = 1 + 1;println!("{bar}");
bar + 2}
Request code actions in any reference of bar and select "Inline variable".
Notice how the refactoring will remove the declaration of bar and update the return statement, but it won't change the print statement, causing an error because bar isn't there anymore.
Also, changing the print statement to println!("{}", bar) does fix the issue, so it seems to be the reference inside the format string that's problematic.
The text was updated successfully, but these errors were encountered:
rust-analyzer version: 0.4.1509-standalone (b7cdd93 2023-05-09)
rustc version: 1.68.0 (2c8cc3432 2023-03-06)
To reproduce the bug:
bar
and select "Inline variable".bar
and update the return statement, but it won't change the print statement, causing an error becausebar
isn't there anymore.Also, changing the print statement to
println!("{}", bar)
does fix the issue, so it seems to be the reference inside the format string that's problematic.The text was updated successfully, but these errors were encountered: