about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-01-03 09:02:02 +0000
committerbors <bors@rust-lang.org>2024-01-03 09:02:02 +0000
commit2eb13d3a7cb19372c40d3db1b45274e126a8dbf2 (patch)
tree065757311cb2e207a1f908a3eb293bd38be427ed /compiler/rustc_llvm/llvm-wrapper
parent9eb2b225f8fe7c8066adb261635fbece9f356ea3 (diff)
parentc2b3f5c767e69a3788efb01633ae53f6adfcd6dd (diff)
downloadrust-2eb13d3a7cb19372c40d3db1b45274e126a8dbf2.tar.gz
rust-2eb13d3a7cb19372c40d3db1b45274e126a8dbf2.zip
Auto merge of #12056 - PartiallyTyped:12050, r=xFrednet
Fixes: #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: #12050
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
0 files changed, 0 insertions, 0 deletions