Old error output: = note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) help: wrap this expression in parentheses | 4 | break '_l $f(;) | ^ ^ New error output: = note: this warning originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) help: wrap this expression in parentheses | 4 | break '_l ($f); | ^ ^
13 lines
192 B
Rust
13 lines
192 B
Rust
#![deny(break_with_label_and_loop)]
|
|
|
|
macro_rules! foo {
|
|
( $f:block ) => {
|
|
'_l: loop {
|
|
break '_l $f; //~ERROR
|
|
}
|
|
};
|
|
}
|
|
|
|
fn main() {
|
|
let x = foo!({ 3 });
|
|
}
|