Escape raw names in labels properly

This commit is contained in:
Chayim Refael Friedman 2025-04-26 21:10:43 +03:00
parent 5ff4ba347d
commit d781d02cf4
2 changed files with 26 additions and 5 deletions

View file

@ -2110,3 +2110,19 @@ fn foo() {
"#]],
);
}
#[test]
fn escaped_label() {
check(
r#"
fn main() {
'r#break: {
break '$0;
}
}
"#,
expect![[r#"
lb 'r#break
"#]],
);
}