Fix expression scope calculation when within macro expansions

This commit is contained in:
Lukas Wirth 2024-06-30 13:26:17 +02:00
parent 882ae7105d
commit bfb187aacd
7 changed files with 99 additions and 33 deletions

View file

@ -102,10 +102,20 @@ macro without_args {
}
}
macro_rules! id {
($($tt:tt)*) => {
$($tt)*
};
}
include!(concat!("foo/", "foo.rs"));
struct S<T>(T);
fn main() {
struct TestLocal;
// regression test, TestLocal here used to not resolve
let _: S<id![TestLocal]>;
format_args!("Hello, {}!", (92,).0);
dont_color_me_braces!();
noop!(noop!(1));