rust/tests/ui/rust-2018
Esteban Küber f80e3ac4ed Use cfg_attr AST placeholder AST cfg_attr_trace for diagnostics
PR 138515, we insert a placeholder attribute so that checks for attributes can still know about the placement of `cfg` attributes. When we suggest removing items with `cfg_attr`s (fix Issue 56328) and make them verbose. We tweak the wording of the existing "unused `extern crate`" lint.

```
warning: unused extern crate
  --> $DIR/removing-extern-crate.rs:9:1
   |
LL | extern crate removing_extern_crate as foo;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unused
   |
note: the lint level is defined here
  --> $DIR/removing-extern-crate.rs:6:9
   |
LL | #![warn(rust_2018_idioms)]
   |         ^^^^^^^^^^^^^^^^
   = note: `#[warn(unused_extern_crates)]` implied by `#[warn(rust_2018_idioms)]`
help: remove the unused `extern crate`
   |
LL - #[cfg_attr(test, macro_use)]
LL - extern crate removing_extern_crate as foo;
LL +
   |
```
2025-05-29 10:24:23 +00:00
..
auxiliary Move tests from /ui directory 2025-04-29 18:19:26 +02:00
edition-lint-inter-outlives diagnostics: do not warn when a lifetime bound infers itself 2024-08-09 16:16:16 -07:00
uniform-paths
async-ident-allowed.rs
async-ident-allowed.stderr
async-ident.fixed
async-ident.rs
async-ident.stderr
dyn-keyword.fixed
dyn-keyword.rs
dyn-keyword.stderr
dyn-trait-compatibility.rs
dyn-trait-compatibility.stderr
edition-lint-fully-qualified-paths.fixed
edition-lint-fully-qualified-paths.rs
edition-lint-fully-qualified-paths.stderr
edition-lint-nested-empty-paths.fixed
edition-lint-nested-empty-paths.rs
edition-lint-nested-empty-paths.stderr
edition-lint-nested-paths.fixed UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
edition-lint-nested-paths.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
edition-lint-nested-paths.stderr
edition-lint-paths-2018.rs
edition-lint-paths.fixed
edition-lint-paths.rs
edition-lint-paths.stderr
edition-lint-uninferable-outlives.rs
extern-crate-idiomatic-in-2018.fixed
extern-crate-idiomatic-in-2018.rs
extern-crate-idiomatic-in-2018.stderr Use cfg_attr AST placeholder AST cfg_attr_trace for diagnostics 2025-05-29 10:24:23 +00:00
extern-crate-idiomatic.fixed
extern-crate-idiomatic.rs
extern-crate-referenced-by-self-path.fixed
extern-crate-referenced-by-self-path.rs
extern-crate-rename.fixed
extern-crate-rename.rs
extern-crate-rename.stderr
extern-crate-submod.fixed
extern-crate-submod.rs
extern-crate-submod.stderr
future-proofing-locals.rs
future-proofing-locals.stderr
issue-51008-1.rs
issue-51008.rs
issue-52202-use-suggestions.rs
issue-52202-use-suggestions.stderr Tweak output of import suggestions 2024-06-13 20:22:21 +00:00
issue-54006.rs
issue-54006.stderr
issue-54400-unused-extern-crate-attr-span.fixed
issue-54400-unused-extern-crate-attr-span.rs Use cfg_attr AST placeholder AST cfg_attr_trace for diagnostics 2025-05-29 10:24:23 +00:00
issue-54400-unused-extern-crate-attr-span.stderr Use cfg_attr AST placeholder AST cfg_attr_trace for diagnostics 2025-05-29 10:24:23 +00:00
local-path-suggestions-2015.rs
local-path-suggestions-2015.stderr
local-path-suggestions-2018.rs
local-path-suggestions-2018.stderr
macro-use-warned-against.rs Spruce up the diagnostics of some early lints 2024-06-03 07:25:32 +02:00
macro-use-warned-against.stderr Spruce up the diagnostics of some early lints 2024-06-03 07:25:32 +02:00
proc-macro-crate-in-paths.rs
remove-extern-crate.fixed
remove-extern-crate.rs
remove-extern-crate.stderr Use cfg_attr AST placeholder AST cfg_attr_trace for diagnostics 2025-05-29 10:24:23 +00:00
removing-extern-crate-malformed-cfg.fixed Use cfg_attr AST placeholder AST cfg_attr_trace for diagnostics 2025-05-29 10:24:23 +00:00
removing-extern-crate-malformed-cfg.rs Use cfg_attr AST placeholder AST cfg_attr_trace for diagnostics 2025-05-29 10:24:23 +00:00
removing-extern-crate-malformed-cfg.stderr Use cfg_attr AST placeholder AST cfg_attr_trace for diagnostics 2025-05-29 10:24:23 +00:00
removing-extern-crate.fixed Move tests from /ui directory 2025-04-29 18:19:26 +02:00
removing-extern-crate.rs Move tests from /ui directory 2025-04-29 18:19:26 +02:00
removing-extern-crate.stderr Use cfg_attr AST placeholder AST cfg_attr_trace for diagnostics 2025-05-29 10:24:23 +00:00
suggestions-not-always-applicable.fixed Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
suggestions-not-always-applicable.rs Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
trait-import-suggestions.rs
trait-import-suggestions.stderr Trim suggestion parts to the subset that is purely additive 2025-02-14 00:44:10 -08:00
try-ident.fixed
try-ident.rs
try-ident.stderr
try-macro.fixed
try-macro.rs
try-macro.stderr
unresolved-asterisk-imports.rs
unresolved-asterisk-imports.stderr Reword "crate not found" resolve message 2025-01-24 01:19:50 +00:00