macro_legacy_warnings -> error
This commit is contained in:
parent
2e6eaceede
commit
cec2a9fad0
7 changed files with 35 additions and 97 deletions
8
src/test/ui/parser/missing-semicolon.rs
Normal file
8
src/test/ui/parser/missing-semicolon.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
macro_rules! m {
|
||||
($($e1:expr),*; $($e2:expr),*) => {
|
||||
$( let x = $e1 )*; //~ ERROR expected one of `.`, `;`, `?`, or
|
||||
$( println!("{}", $e2) )*;
|
||||
}
|
||||
}
|
||||
|
||||
fn main() { m!(0, 0; 0, 0); }
|
||||
13
src/test/ui/parser/missing-semicolon.stderr
Normal file
13
src/test/ui/parser/missing-semicolon.stderr
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
error: expected one of `.`, `;`, `?`, or an operator, found keyword `let`
|
||||
--> $DIR/missing-semicolon.rs:3:12
|
||||
|
|
||||
LL | $( let x = $e1 )*;
|
||||
| ^^^ expected one of `.`, `;`, `?`, or an operator
|
||||
...
|
||||
LL | fn main() { m!(0, 0; 0, 0); }
|
||||
| --------------- in this macro invocation
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue