Skip to content

println!() inline variables don't work with 'rename symbol' #11503

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
1Dragoon opened this issue Feb 19, 2022 · 1 comment
Closed

println!() inline variables don't work with 'rename symbol' #11503

1Dragoon opened this issue Feb 19, 2022 · 1 comment

Comments

@1Dragoon
Copy link

1Dragoon commented Feb 19, 2022

The new inline variable references for println!() and format!() do not appear to show up as symbols in vscode, so when you right click on the variable name elsewhere and click 'rename symbol', it doesn't rename it inside of the println line. For example:

let hello_world = "Hello World";
println!("{hello_world}");

Renaming hello_world to hello ends up like this:

let hello = "Hello World";
println!("{hello_world}");

Where it should end up like this:

let hello = "Hello World";
println!("{hello}");

rust-analyzer version: (eg. output of "Rust Analyzer: Show RA Version" command)
rust-analyzer version: 02904e9 2022-02-14 stable

rustc version: (eg. output of rustc -V)
rustc 1.58.1 (db9d1b20b 2022-01-20)

relevant settings: (eg. client settings, or environment variables like CARGO, RUSTUP_HOME or CARGO_HOME)
N/A

@jhgg
Copy link
Contributor

jhgg commented Feb 19, 2022

Dupe of #11296

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants