about summary refs log tree commit diff
path: root/tests/ui/macros/macros-nonfatal-errors.rs
AgeCommit message (Collapse)AuthorLines
2025-06-24Remove the deprecated `concat_idents!` macroTrevor Gross-4/+1
In [137653], the lang and libs-API teams did a joint FCP to deprecate and eventually remove the long-unstable `concat_idents!` macro. The deprecation is landing in 1.88, so do the removal here (target version 1.90). This macro has been superseded by the more recent `${concat(...)}` metavariable expression language feature, which avoids some of the limitations of `concat_idents!`. The metavar expression is unstably available under the [`macro_metavar_expr_concat`] feature. History is mildly interesting here: `concat_idents!` goes back to 2011 when it was introduced with 513276e595f8 ("Add #concat_idents[] and about the same: let asdf_fdsa = "<.<"; assert(#concat_idents[asd,f_f,dsa] == "<.<"); assert(#ident_to_str[use_mention_distinction] == "use_mention_distinction"); (That test existed from introduction until its removal here.) Closes: https://www.github.com/rust-lang/rust/issues/29599 [137653]: https://www.github.com/rust-lang/rust/pull/137653 [`macro_metavar_expr_concat`]: https://www.github.com/rust-lang/rust/issues/124225
2025-04-24Deprecate the unstable `concat_idents!`Trevor Gross-0/+1
`concat_idents` has been around unstably for a long time, but there is now a better (but still unstable) way to join identifiers using `${concat(...)}` syntax with `macro_metavar_expr_concat`. This resolves a lot of the problems with `concat_idents` and is on a better track toward stabilization, so there is no need to keep both versions around. `concat_idents!` still has a lot of use in the ecosystem so deprecate it before removing, as discussed in [1]. Link: https://github.com/rust-lang/rust/issues/124225 [1]: https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Removing.20.60concat_idents.60
2024-12-27Remove the `-test` suffix from normalize directivesZalathar-1/+1
2024-12-21Use E0665 for missing `#[default]` errorEsteban Küber-1/+7
Use orphaned error code for the same error it belonged to before. ``` error[E0665]: `#[derive(Default)]` on enum with no `#[default]` --> $DIR/macros-nonfatal-errors.rs:42:10 | LL | #[derive(Default)] | ^^^^^^^ LL | / enum NoDeclaredDefault { LL | | Foo, LL | | Bar, LL | | } | |_- this enum needs a unit variant marked with `#[default]` | = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info) help: make this unit variant default by placing `#[default]` on it | LL | #[default] Foo, | ~~~~~~~~~~~~~~ help: make this unit variant default by placing `#[default]` on it | LL | #[default] Bar, | ~~~~~~~~~~~~~~ ```
2024-03-27Suggest correct path in include_bytes!Kornel-1/+1
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-1/+1
2023-01-11Move /src/test to /testsAlbert Larsan-0/+139