about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/debug.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-08-17 14:41:46 +0000
committerbors <bors@rust-lang.org>2023-08-17 14:41:46 +0000
commit701e77c87f488155e621211126afe56ea0c1de7f (patch)
tree39352f423094560824bef017e4770daf64c12516 /compiler/rustc_mir_transform/src/coverage/debug.rs
parentd43486dc8cf2447e69a29ba0d9a9a9dda2d0181e (diff)
parentf47165c703c1f2819bb0f0aef1be1136457b2f9a (diff)
downloadrust-701e77c87f488155e621211126afe56ea0c1de7f.tar.gz
rust-701e77c87f488155e621211126afe56ea0c1de7f.zip
Auto merge of #11070 - y21:issue11065, r=flip1995
[`useless_conversion`]: only lint on paths to fn items and fix FP in macro

Fixes #11065 (which is actually two issues: an ICE and a false positive)

It now makes sure that the function call path points to a function-like item (and not e.g. a `const` like in the linked issue), so that calling `TyCtxt::fn_sig` later in the lint does not ICE (fixes https://github.com/rust-lang/rust-clippy/issues/11065#issuecomment-1616836099).
It *also* makes sure that the expression is not part of a macro call (fixes https://github.com/rust-lang/rust-clippy/issues/11065#issuecomment-1616919639). ~~I'm not sure if there's a better way to check this other than to walk the parent expr chain and see if any of them are expansions.~~ (edit: it doesn't do this anymore)

changelog: [`useless_conversion`]: fix ICE when call receiver is a non-fn item
changelog: [`useless_conversion`]: don't lint if argument is a macro argument (fixes a FP)

r? `@llogiq` (reviewed #10814, which introduced these issues)
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions