We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
fn test(foo: u32) -> u32 { let a = 10; foo * 6 } fn main() { let a = 7; let res = test(a); assert!(res == 42); }
Inlining results in:
let a = 7; let res = { let a = 10; a * 6 // <-- incorrectly refers to the local }; assert!(res == 42);
which fails the assert. A correct inlining would be:
let a = 7; let res = { let foo = a; let a = 10; foo * 6 }; assert!(res == 42);
rust-analyzer version: 0.0.0 (366bd72 2022-06-12)
The text was updated successfully, but these errors were encountered:
I'm going to try and work on this
Sorry, something went wrong.
addressed rust-lang#12536
e4ef0e5
I think i got it!
df38770
Successfully merging a pull request may close this issue.
Inlining results in:
which fails the assert. A correct inlining would be:
rust-analyzer version: 0.0.0 (366bd72 2022-06-12)
The text was updated successfully, but these errors were encountered: