-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
warning for assignment to temporary #4497
Comments
FYI, this is |
The rust issue only looks at correctness lints. So this is valid rust code, that does not have any influence on the correctness of your program. So this doesn't qualify for a rustc lint, because for such cases Clippy exists. * This seems that it may cause errors, but if you would try to use |
I very much disagree in that Rust's standard |
I agree, that rust has lints, that aren't really correctness concerns (most of them are As a site note: let similar_name1 = 10;
let similar_nameI = 11; // unused_variable
assert_eq!(similar_name1, 11); // panic That is a very constructed example, but it does happen in actual code. (BTW, Clippy has a lint for this: https://rust-lang.github.io/rust-clippy/master/index.html#similar_names) |
For simple useless code:
Compiler not generate any warnings/errors, but clippy generate one warning:
I think this warning need to implement in compiler too.
The text was updated successfully, but these errors were encountered: