diff options
| author | Jason Newcomb <jsnewcomb@pm.me> | 2025-07-09 15:04:39 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-09 15:04:39 +0000 |
| commit | a24fb386b14b4fe9812b033b9c960a9126175486 (patch) | |
| tree | 69e0ae3564e68dabcdeb6913dcf876c4c8f9b784 /compiler/rustc_codegen_llvm/src | |
| parent | dcc790620a9feaa75dda52f819362f608722e29a (diff) | |
| parent | c69905a995dad100185ef38fffcb1ec3079ec66a (diff) | |
| download | rust-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_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
