rust/src
Guillaume Gomez 71cef76894
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:
- 1ead4761e9/src/tools/clippy/clippy_utils/src/ty.rs (L286-L288)
- 1ead4761e9/compiler/rustc_middle/src/ty/util.rs (L834)
- 1ead4761e9/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``
2024-01-20 20:06:34 +01:00
..
bootstrap Rollup merge of #120096 - onur-ozkan:rustc_bootstrap, r=dtolnay 2024-01-18 20:56:21 +01:00
ci Add debug info for macOS CI actions 2024-01-10 10:54:46 -08:00
doc Auto merge of #118708 - davidtwco:target-tier-assembly-test, r=Mark-Simulacrum 2024-01-17 16:18:28 +00:00
etc Auto merge of #119654 - onur-ozkan:bump-dependencies, r=clubby789 2024-01-11 10:46:43 +00:00
librustdoc Fix impl stripped in rustdoc HTML whereas it should not be in case the impl is implemented on a type alias 2024-01-20 12:38:13 +01:00
llvm-project@700fbf978e Update LLVM submodule 2024-01-10 09:35:29 +01:00
rustdoc-json-types Add is_object_safe information for traits in JSON output 2023-12-23 11:43:31 +01:00
tools Rollup merge of #120000 - smoelius:fix-clippy, r=fee1-dead 2024-01-20 20:06:34 +01:00
README.md Remove stale reference to the test suite location 2023-01-13 11:49:06 +00:00
stage0.json bump stage0 2023-12-22 11:04:31 +01:00
version bump version number to 1.77.0 2023-12-21 10:58:56 +01:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.