Skip to content

Renaming a symbol does not change references to that symbol in named parameters in format!-esque macros #12653

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
alexander-novo opened this issue Jun 28, 2022 · 1 comment

Comments

@alexander-novo
Copy link

alexander-novo commented Jun 28, 2022

rust-analyzer version: rust-analyzer version: 0.0.0 (9eaf96c 2022-06-27)

rustc version: rustc 1.61.0 (fe5b13d68 2022-05-18)

relevant settings: N/A

As an example:

let x = "blah";
println!("{x}");

Rust-analyzer correctly determines that x in the format string is a named parameter that isn't specified in the function arguments, but renaming symbol x doesn't change it in the string. However, rust-analyzer then picks up that the identifier x doesn't exist anymore. If rust-analyzer is checking the named parameters for format strings and making sure they exist (and type check them to make sure they impl Display), I would expect it to also be able to rename it properly.

@flodiebold
Copy link
Member

Duplicate of #11260.

@flodiebold flodiebold closed this as not planned Won't fix, can't repro, duplicate, stale Jun 29, 2022
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

2 participants