about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorJason Newcomb <jsnewcomb@pm.me>2025-07-09 15:04:39 +0000
committerGitHub <noreply@github.com>2025-07-09 15:04:39 +0000
commita24fb386b14b4fe9812b033b9c960a9126175486 (patch)
tree69e0ae3564e68dabcdeb6913dcf876c4c8f9b784 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentdcc790620a9feaa75dda52f819362f608722e29a (diff)
parentc69905a995dad100185ef38fffcb1ec3079ec66a (diff)
downloadrust-a24fb386b14b4fe9812b033b9c960a9126175486.tar.gz
rust-a24fb386b14b4fe9812b033b9c960a9126175486.zip
Do not remove method call if type is adjusted (#15181)
Propose to replace `x.map_or(false, |y| y == z)` by `x == Some(z)` only
if `x` is not adjusted. Otherwise, the type of `x` in the comparaison
may not be the expected one, as it may be the product of an auto-deref.

changelog: [`unnecessary_map_or`]: do not propose to replace the
`map_or` call by a comparaison if types wouldn't be correct

Fixes rust-lang/rust-clippy#15180
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions