rust/tests/ui/cfg
Esteban Küber cf09cba20c When finding item gated behind a cfg flat, 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)]
   |     ^^^^^^^^^^^^^
```
2024-07-12 18:52:52 +00:00
..
assume-incomplete-release [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
auxiliary [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cfg_attr.rs compiletest: add enable-by-default check-cfg 2024-05-04 11:30:38 +02:00
cfg_false_no_std-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cfg_false_no_std-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cfg_false_no_std.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cfg_inner_static.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cfg_stmt_expr.rs Unify all the always-false cfgs under the FALSE cfg 2024-04-07 01:16:45 +02:00
cfg-attr-cfg.rs Unify all the always-false cfgs under the FALSE cfg 2024-04-07 01:16:45 +02:00
cfg-attr-crate.rs Unify all the always-false cfgs under the FALSE cfg 2024-04-07 01:16:45 +02:00
cfg-false-feature.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cfg-false-feature.stderr Add barest-bones deref patterns 2024-03-20 22:30:27 +01:00
cfg-family.rs Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
cfg-in-crate-1.rs compiletest: add enable-by-default check-cfg 2024-05-04 11:30:38 +02:00
cfg-macros-foo.rs compiletest: add enable-by-default check-cfg 2024-05-04 11:30:38 +02:00
cfg-macros-notfoo.rs Unify all the always-false cfgs under the FALSE cfg 2024-04-07 01:16:45 +02:00
cfg-match-arm.rs Unify all the always-false cfgs under the FALSE cfg 2024-04-07 01:16:45 +02:00
cfg-method-receiver-ok.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cfg-method-receiver.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-method-receiver.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-panic-abort.rs Remove useless configs in tests 2024-04-07 01:16:45 +02:00
cfg-panic.rs Remove useless configs in tests 2024-04-07 01:16:45 +02:00
cfg-path-error.rs compiletest: add enable-by-default check-cfg 2024-05-04 11:30:38 +02:00
cfg-path-error.stderr compiletest: add enable-by-default check-cfg 2024-05-04 11:30:38 +02:00
cfg-stmt-recovery.rs Do not recover when parsing stmt in cfg-eval. 2023-05-01 08:51:47 +00:00
cfg-stmt-recovery.stderr Do not recover when parsing stmt in cfg-eval. 2023-05-01 08:51:47 +00:00
cfg-target-abi.rs Stabilize cfg_target_abi 2024-02-24 17:52:03 -03:00
cfg-target-compact-errors.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cfg-target-compact-errors.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-target-compact.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cfg-target-family.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cfg-target-vendor.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cfgs-on-items.rs compiletest: add enable-by-default check-cfg 2024-05-04 11:30:38 +02:00
conditional-compile-arch.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
conditional-compile.rs Unify all the always-false cfgs under the FALSE cfg 2024-04-07 01:16:45 +02:00
crt-static-off-works.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
crt-static-on-works.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
diagnostics-cross-crate.rs When finding item gated behind a cfg flat, point at it 2024-07-12 18:52:52 +00:00
diagnostics-cross-crate.stderr When finding item gated behind a cfg flat, point at it 2024-07-12 18:52:52 +00:00
diagnostics-not-a-def.rs RFC 2383: Stabilize lint_reasons 🎉 2024-06-25 17:22:22 +02:00
diagnostics-not-a-def.stderr RFC 2383: Stabilize lint_reasons 🎉 2024-06-25 17:22:22 +02:00
diagnostics-reexport.rs When finding item gated behind a cfg flat, point at it 2024-07-12 18:52:52 +00:00
diagnostics-reexport.stderr When finding item gated behind a cfg flat, point at it 2024-07-12 18:52:52 +00:00
diagnostics-same-crate.rs When finding item gated behind a cfg flat, point at it 2024-07-12 18:52:52 +00:00
diagnostics-same-crate.stderr When finding item gated behind a cfg flat, point at it 2024-07-12 18:52:52 +00:00
expanded-cfg.rs compiletest: add enable-by-default check-cfg 2024-05-04 11:30:38 +02:00
future-compat-crate-attributes-using-cfg_attr.rs compiletest: add enable-by-default check-cfg 2024-05-04 11:30:38 +02:00
future-compat-crate-attributes-using-cfg_attr.stderr Fix typo in deprecation lint message 2024-05-21 20:16:39 +00:00