You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our convention for error messages is that the first letter should be lowercase; subsequent sentences in error massages begin with uppercase. Our diagnostics are not consistent in this though and there are a number that begin with capital letters. Find them and destroy them.
The text was updated successfully, but these errors were encountered:
When `identity_op` identifies a `no_op`, provides a suggestion, it also
checks the type of the type of the variable. If the variable is
a reference that's been coerced into a value, e.g.
```
let x = &0i32;
let _ = x + 0;
```
the suggestion will now use a derefence. This is done by identifying
whether the variable is a reference to an integral value, and then
whether it gets dereferenced.
changelog: false positive: [`identity_op`]: corrected suggestion for
reference coerced to value.
fixes: rust-lang#12050
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Jan 11, 2024
Fixes: rust-lang#12050 - `identity_op` correctly suggests a deference for coerced references
When `identity_op` identifies a `no_op`, provides a suggestion, it also checks the type of the type of the variable. If the variable is a reference that's been coerced into a value, e.g.
```
let x = &0i32;
let _ = x + 0;
```
the suggestion will now use a derefence. This is done by identifying whether the variable is a reference to an integral value, and then whether it gets dereferenced.
changelog: false positive: [`identity_op`]: corrected suggestion for reference coerced to value.
fixes: rust-lang#12050
Our convention for error messages is that the first letter should be lowercase; subsequent sentences in error massages begin with uppercase. Our diagnostics are not consistent in this though and there are a number that begin with capital letters. Find them and destroy them.
The text was updated successfully, but these errors were encountered: