mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
parse empty statemet as statemetn
This commit is contained in:
parent
841cd30b45
commit
b5369927d7
4 changed files with 15 additions and 20 deletions
|
@ -85,17 +85,21 @@ fn stmt_boundaries() {
|
|||
check(
|
||||
r#"
|
||||
macro_rules! m {
|
||||
($($s:stmt)*) => (stringify!($($s |)*))
|
||||
($($s:stmt)*) => (stringify!($($s |)*);)
|
||||
}
|
||||
// +errors
|
||||
m!(;;92;let x = 92; loop {};);
|
||||
"#,
|
||||
expect![[r#"
|
||||
macro_rules! m {
|
||||
($($s:stmt)*) => (stringify!($($s |)*))
|
||||
($($s:stmt)*) => (stringify!($($s |)*);)
|
||||
}
|
||||
/* error: expected Stmt *//* parse error: expected SEMICOLON */
|
||||
stringify!()
|
||||
stringify!(;
|
||||
|;
|
||||
|92|;
|
||||
|let x = 92|;
|
||||
|loop {}
|
||||
|;
|
||||
|);
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue