Merge pull request #18264 from ChayimFriedman2/semi-transparent

fix: Implement mixed site hygiene
This commit is contained in:
Lukas Wirth 2024-10-23 12:33:50 +00:00 committed by GitHub
commit f9935be013
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 671 additions and 164 deletions

View file

@ -2999,6 +2999,26 @@ mod bar {
mod m {}
use foo::m;
"#,
);
}
#[test]
fn macro_label_hygiene() {
check(
r#"
macro_rules! m {
($x:stmt) => {
'bar: loop { $x }
};
}
fn foo() {
'bar: loop {
// ^^^^
m!(continue 'bar$0);
}
}
"#,
);
}