Open
Description
In the lang call on 2024-09-04, we agreed that the span of the token used to fill in the fragment specifier should be used for deciding the behavior.
That is, if we have code like this in a Rust 2021 crate:
#[macro_export]
macro_rules! make_matcher {
($name:ident, $fragment_type:ident, $d:tt) => {
#[macro_export]
macro_rules! $name {
($d _:$fragment_type) => { true };
(const { 0 }) => { false };
}
};
}
make_matcher!(is_expr_from_2021, expr, $);
And code like this in a Rust 2024 crate:
make_matcher!(is_expr_from_2024, expr, $);
We would expect that is_expr_from_2024
would exhibit the Rust 2024 behavior.
We'd also like to fix this for pat
, pending of course a crater run.
cc #129755
cc @eholk @vincenzopalazzo @compiler-errors
Tracking: