about summary refs log tree commit diff
path: root/tests/ui/macros/auxiliary
AgeCommit message (Collapse)AuthorLines
2025-06-12Detect when attribute is provided by missing `derive` macroEsteban Küber-0/+19
``` 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-02add test for 141764Jana Dönszelmann-0/+10
2025-05-04Auto merge of #140580 - jdonszelmann:variables-external-macros, r=m-ou-sebors-0/+11
Don't name variables from external macros in borrow errors. This came up as part of the expansion of format_args. However, it's a more general problem (and now solution). I noticed that this does change another test, moving out of fields in derives on packed struct. However, I think this is a better error simply because it used to refer to `other.0` which is an implementation detail which doesn't really make sense. cc `@m-ou-se`
2025-05-03Move some tests out of tests/uimejrs-0/+9
2025-05-02Test that names of variables in external macros are not shown on a borrow errorJana Dönszelmann-0/+11
2025-04-17tests: use `//@ ignore-auxiliary` with backlinked primary test fileJieyou Xu-4/+0
2024-11-27Update tests to use new proc-macro headerEric Huss-16/+0
2024-09-17Add coverage for pat tooEric Holk-2/+4
In 2021 pat was changed to recognize `|` at the top level, with pat_param added to retain the old behavior. This means pat is subject to the same cross-edition behavior as expr will be in 2024. Co-authored-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2024-09-17test: cross-edition metavar fragment specifiersVincenzo Palazzo-0/+12
There's a subtle interaction between macros with metavar expressions and the edition-dependent fragment matching behavior. This test illustrates the current behavior when using macro-generating-macros across crate boundaries with different editions. Co-Authored-By: Vincenzo Palazzo <vincenzopalazzodev@gmail.com> Co-Authored-By: Eric Holk <eric@theincredibleholk.org>
2024-06-19Add a test demonstrating the problemMichael Goulet-0/+9
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-9/+9
2024-02-09Move some testsCaio-0/+21
2023-06-20Fix testsJacob Pratt-5/+0
2023-01-11Move /src/test to /testsAlbert Larsan-0/+254