rust/tests/ui/macros/auxiliary
Esteban Küber 92a798dac0 Detect when attribute is provided by missing derive macro
```
error: cannot find attribute `empty_helper` in this scope
  --> $DIR/derive-helper-legacy-limits.rs:17:3
   |
LL | #[empty_helper]
   |   ^^^^^^^^^^^^
   |
help: `empty_helper` is an attribute that can be used by the derive macro `Empty`, you might be missing a `derive` attribute
   |
LL + #[derive(Empty)]
LL | struct S2;
   |
```

Look at proc-macro attributes when encountering unknown attribute

```
error: cannot find attribute `sede` in this scope
  --> src/main.rs:18:7
   |
18 |     #[sede(untagged)]
   |       ^^^^
   |
help: the derive macros `Serialize` and `Deserialize` accept the similarly named `serde` attribute
   |
18 |     #[serde(untagged)]
   |       ~~~~~

error: cannot find attribute `serde` in this scope
  --> src/main.rs:12:7
   |
12 |     #[serde(untagged)]
   |       ^^^^^
   |
   = note: `serde` is in scope, but it is a crate, not an attribute
help: `serde` is an attribute that can be used by the derive macros `Serialize` and `Deserialize`, you might be missing a `derive` attribute
   |
10 | #[derive(Serialize, Deserialize)]
   |
```
2025-06-12 21:28:49 +00:00
..
attr-from-macro.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowck-error-in-macro.rs add test for 141764 2025-06-02 11:29:27 +02:00
define-macro.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
deprecated-macros.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dollar-crate-nested-encoding.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
expr_2021_implicit.rs Add a test demonstrating the problem 2024-06-19 12:37:32 -04:00
fancy-panic.rs Move some tests out of tests/ui 2025-05-03 17:22:52 +02:00
foreign-crate-macro-pat.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
hello_macro.rs Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
issue-19163.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-40469.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-75982.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-100199.rs Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
macro-comma-support.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
macro-def-site-super.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
macro-in-other-crate.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
macro-include-items-expr.rs tests: use //@ ignore-auxiliary with backlinked primary test file 2025-04-17 19:45:28 +08:00
macro-include-items-item.rs tests: use //@ ignore-auxiliary with backlinked primary test file 2025-04-17 19:45:28 +08:00
macro_crate_def_only.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
macro_crate_nonterminal.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
macro_export_inner_module.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
macro_with_super_1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
metavar_2018.rs Add coverage for pat too 2024-09-17 11:08:52 -07:00
or-pattern.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
proc_macro_def.rs Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
proc_macro_sequence.rs Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
return_from_external_macro.rs Test that names of variables in external macros are not shown on a borrow error 2025-05-02 18:09:25 +02:00
serde.rs Detect when attribute is provided by missing derive macro 2025-06-12 21:28:49 +00:00
two_macros-rpass.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
two_macros.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unstable-macros.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
use-macro-self.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00