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 local var cause incorrect rename in constructor #9115

Closed
StarOrpheus opened this issue Jul 26, 2022 · 0 comments · Fixed by #9117
Closed

rename local var cause incorrect rename in constructor #9115

StarOrpheus opened this issue Jul 26, 2022 · 0 comments · Fixed by #9117
Assignees
Labels
bug subsystem::refactoring Issues related to refactorings

Comments

@StarOrpheus
Copy link

StarOrpheus commented Jul 26, 2022

Environment

  • IntelliJ Rust plugin version: 0.4.175.4772-222
  • Rust toolchain version: 1.64.0-nightly
  • IDE name and version: CLion CL-223.1697
  • Operating system: Manjaro

Problem description

rust-rename.webm
Rename refactoring does smth strange and incorrect - it misses field name and local var name in constructor.

Reproducer

struct Foo {
    pub bar: f32
}

fn foobar() -> Foo {
    static bar: f32 = 0.;
    Foo {
        bar
    }
}

Static constant bar should have an upper case name such as BAR
rename to BAR

@dima74 dima74 added the bug label Jul 26, 2022
@dima74 dima74 self-assigned this Jul 26, 2022
@Undin Undin added the subsystem::refactoring Issues related to refactorings label Jul 27, 2022
@bors bors bot closed this as completed in 89cc3b3 Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug subsystem::refactoring Issues related to refactorings
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants