about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper
diff options
context:
space:
mode:
authorQuinn Sinclair <me@partiallytyped.dev>2023-12-30 13:25:33 +0200
committerPartiallyTyped <me@partiallytyped.dev>2023-12-30 13:31:32 +0200
commitc2b3f5c767e69a3788efb01633ae53f6adfcd6dd (patch)
tree54119406f9d11fb50b4aacb44e527188d551acaa /compiler/rustc_llvm/llvm-wrapper
parent174a0d7be6f18bf6470a46d107e4b3f0b870c315 (diff)
downloadrust-c2b3f5c767e69a3788efb01633ae53f6adfcd6dd.tar.gz
rust-c2b3f5c767e69a3788efb01633ae53f6adfcd6dd.zip
`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: #12050
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
0 files changed, 0 insertions, 0 deletions