Skip to content
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

Rename refactoring in async fn main not function correctly #14172

Closed
c5soft opened this issue Feb 18, 2023 · 1 comment
Closed

Rename refactoring in async fn main not function correctly #14172

c5soft opened this issue Feb 18, 2023 · 1 comment
Labels
C-bug Category: bug

Comments

@c5soft
Copy link

c5soft commented Feb 18, 2023

rust-analyzer version: rust-analyzer version: 0.3.1402
rustc version: rustc 1.67.1
relevant settings: N/A

Consider following code:

#[tokio::main]
async fn main() {
    let word ="world";
    println!("hello {}", word);
}

If I'm trying to rename local variable "word" to "word1" in line 3, we expect the variable referenced in line 4 should be renamed, but nothing happened .

code that we expected:

#[tokio::main]
async fn main() {
    let word1 ="world";
    println!("hello {}", word1);
}

but code that we got:

#[tokio::main]
async fn main() {
    let word1 ="world";
    println!("hello {}", word);
}
@c5soft c5soft added the C-bug Category: bug label Feb 18, 2023
@Veykril
Copy link
Member

Veykril commented Feb 18, 2023

Duplicate of #13388

@Veykril Veykril marked this as a duplicate of #13388 Feb 18, 2023
@Veykril Veykril closed this as completed Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants