Skip to content

Local var renaming strips mut away #230

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
aochagavia opened this issue Nov 16, 2018 · 1 comment
Closed

Local var renaming strips mut away #230

aochagavia opened this issue Nov 16, 2018 · 1 comment

Comments

@aochagavia
Copy link
Contributor

Before:

fn test() {
    let mut x = 42;
    let y = x;
}

After (rename x to foo):

fn test() {
    let foo = 42;
    let y = foo;
}
@aochagavia
Copy link
Contributor Author

@kjeremy mentioned in #135 (comment) that we probably need to massage the value passed into DeclarationDescriptor::new before hand to solve that (or adjust the node passed in to that function which is more likely).

kjeremy added a commit to kjeremy/rust-analyzer that referenced this issue Nov 20, 2018
bors bot added a commit that referenced this issue Dec 30, 2018
375: Move renames into ra_analysis and rename the correct range r=DJMcNab a=DJMcNab

Fixes #230. Supersedes #235.

TODO: add some tests for this

Co-authored-by: DJMcNab <[email protected]>
@bors bors bot closed this as completed in #375 Dec 30, 2018
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

1 participant