rust/tests/ui/cfg
Nilstrieb a647ba250a Remember names of cfg-ed out items to mention them in diagnostics
`#[cfg]`s are frequently used to gate crate content behind cargo
features. This can lead to very confusing errors when features are
missing. For example, `serde` doesn't have the `derive` feature by
default. Therefore, `serde::Serialize` fails to resolve with a generic
error, even though the macro is present in the docs.

This commit adds a list of all stripped item names to metadata. This is
filled during macro expansion and then, through a fed query, persisted
in metadata. The downstream resolver can then access the metadata to
look at possible candidates for mentioning in the errors.

This slightly increases metadata (800k->809k for the feature-heavy
windows crate), but not enough to really matter.
2023-06-01 19:17:19 +02:00
..
assume-incomplete-release Change src/test to tests in source files, fix tidy and tests 2023-01-11 09:32:13 +00:00
auxiliary Remember names of cfg-ed out items to mention them in diagnostics 2023-06-01 19:17:19 +02:00
cfg-attr-cfg.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-attr-crate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-false-feature.rs Add some tests for the current #![cfg(FALSE)] crate behavior 2023-03-23 14:21:02 +04:00
cfg-false-feature.stderr Add some tests for the current #![cfg(FALSE)] crate behavior 2023-03-23 14:21:02 +04:00
cfg-family.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-in-crate-1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-macros-foo.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-macros-notfoo.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-match-arm.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-method-receiver-ok.rs Move /src/test to /tests 2023-01-11 09:32:08 +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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-panic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-path-error.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-path-error.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00: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 Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-target-compact-errors.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-target-compact-errors.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-target-compact.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-target-family.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg-target-vendor.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg_attr.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg_false_no_std.rs Add some tests for the current #![cfg(FALSE)] crate behavior 2023-03-23 14:21:02 +04:00
cfg_inner_static.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfg_stmt_expr.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cfgs-on-items.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
conditional-compile-arch.rs tests: Add tests for LoongArch64 2023-04-30 00:06:26 +08:00
conditional-compile.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
crt-static-off-works.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
crt-static-on-works.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
diagnostics-cross-crate.rs Remember names of cfg-ed out items to mention them in diagnostics 2023-06-01 19:17:19 +02:00
diagnostics-cross-crate.stderr Remember names of cfg-ed out items to mention them in diagnostics 2023-06-01 19:17:19 +02:00
diagnostics-not-a-def.rs Remember names of cfg-ed out items to mention them in diagnostics 2023-06-01 19:17:19 +02:00
diagnostics-not-a-def.stderr Remember names of cfg-ed out items to mention them in diagnostics 2023-06-01 19:17:19 +02:00
diagnostics-reexport.rs Remember names of cfg-ed out items to mention them in diagnostics 2023-06-01 19:17:19 +02:00
diagnostics-reexport.stderr Remember names of cfg-ed out items to mention them in diagnostics 2023-06-01 19:17:19 +02:00
diagnostics-same-crate.rs Remember names of cfg-ed out items to mention them in diagnostics 2023-06-01 19:17:19 +02:00
diagnostics-same-crate.stderr Remember names of cfg-ed out items to mention them in diagnostics 2023-06-01 19:17:19 +02:00
expanded-cfg.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
future-compat-crate-attributes-using-cfg_attr.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
future-compat-crate-attributes-using-cfg_attr.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00