`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
6 lines
181 B
Rust
6 lines
181 B
Rust
#![feature(concat_idents)]
|
|
#![expect(deprecated)] // concat_idents is deprecated
|
|
|
|
fn main() {
|
|
let x = concat_idents!(); //~ ERROR `concat_idents!()` takes 1 or more arguments
|
|
}
|