mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-03 10:47:16 +00:00

Remove the deprecated unstable `concat_idents!` macro In [rust-lang/rust#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 #ident_to_str[]"). The syntax looks a bit different but it still works 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://github.com/rust-lang/rust/issues/29599 [rust-lang/rust#137653]: https://github.com/rust-lang/rust/pull/137653 [`macro_metavar_expr_concat`]: https://github.com/rust-lang/rust/issues/124225