about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-07-19 10:48:05 +0200
committerGitHub <noreply@github.com>2024-07-19 10:48:05 +0200
commit98fdfcb11bd11990b0fcd66daeb3667ddae3d0ff (patch)
tree1f5c79072e791e190b61fd821516c25830ff3edc /compiler/rustc_mir_transform/src
parent7161e2dc98687dab427f94b99f960927bed10d82 (diff)
parentcf09cba20c317c1d2cfa78820a699ac5ee684bf2 (diff)
downloadrust-98fdfcb11bd11990b0fcd66daeb3667ddae3d0ff.tar.gz
rust-98fdfcb11bd11990b0fcd66daeb3667ddae3d0ff.zip
Rollup merge of #127662 - estebank:gate-span, r=TaKO8Ki
When finding item gated behind a `cfg` flag, point at it

Previously we would only mention that the item was gated out, and opportunisitically mention the feature flag name when possible. We now point to the place where the item was gated, which can be behind layers of macro indirection, or in different modules.

```
error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner`
  --> $DIR/diagnostics-cross-crate.rs:18:23
   |
LL |     cfged_out::inner::doesnt_exist::hello();
   |                       ^^^^^^^^^^^^ could not find `doesnt_exist` in `inner`
   |
note: found an item that was configured out
  --> $DIR/auxiliary/cfged_out.rs:6:13
   |
LL |     pub mod doesnt_exist {
   |             ^^^^^^^^^^^^
note: the item is gated here
  --> $DIR/auxiliary/cfged_out.rs:5:5
   |
LL |     #[cfg(FALSE)]
   |     ^^^^^^^^^^^^^
```
Diffstat (limited to 'compiler/rustc_mir_transform/src')
0 files changed, 0 insertions, 0 deletions