about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-01-20 20:06:34 +0100
committerGitHub <noreply@github.com>2024-01-20 20:06:34 +0100
commit8b0931a2ba7bc5a4705ffba485a76c34ff02fc49 (patch)
treef9133b2dd8b946b586b840d721e5ee90a80e8c50 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent21d719d90c6bf2a3a61aadab2f3e6020a5cac7f7 (diff)
parent6a331e37fbe85cf69fa783bfc2fb2aba90d20bf6 (diff)
downloadrust-8b0931a2ba7bc5a4705ffba485a76c34ff02fc49.tar.gz
rust-8b0931a2ba7bc5a4705ffba485a76c34ff02fc49.zip
Rollup merge of #120000 - smoelius:fix-clippy, r=fee1-dead
Ensure `callee_id`s are body owners

This PR makes the `callee_id` argument of Clippy's `implements_trait_with_env` optional, and when it is passed, ensures it is a body owner.

#118661 added the `callee_id` parameter to alleviate an ICE. Specifically, the `callee_id` is used to determine an "effect arg" in certain situations.

Frankly, I [do not completely understand](https://github.com/rust-lang/rust/pull/118661#discussion_r1449013176) what an "effect arg" is. But the code that determines it seems to require that `callee_id` is a body owner:
- https://github.com/rust-lang/rust/blob/1ead4761e9e2f056385768614c23ffa7acb6a19e/src/tools/clippy/clippy_utils/src/ty.rs#L286-L288
- https://github.com/rust-lang/rust/blob/1ead4761e9e2f056385768614c23ffa7acb6a19e/compiler/rustc_middle/src/ty/util.rs#L834
- https://github.com/rust-lang/rust/blob/1ead4761e9e2f056385768614c23ffa7acb6a19e/compiler/rustc_middle/src/hir/map/mod.rs#L372

In the current head, some def ids passed as `callee_id`s are not body owners. This PR fixes that.

cc ``@rust-lang/clippy``

r? ``@fee1-dead``
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions