mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-19 11:35:16 +00:00
Escape raw names in labels properly
This commit is contained in:
parent
5ff4ba347d
commit
d781d02cf4
2 changed files with 26 additions and 5 deletions
|
|
@ -2110,3 +2110,19 @@ fn foo() {
|
|||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn escaped_label() {
|
||||
check(
|
||||
r#"
|
||||
fn main() {
|
||||
'r#break: {
|
||||
break '$0;
|
||||
}
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
lb 'r#break
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue