mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Merge pull request #18264 from ChayimFriedman2/semi-transparent
fix: Implement mixed site hygiene
This commit is contained in:
commit
f9935be013
27 changed files with 671 additions and 164 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue