rust/src/test/run-fail/panic-parens.rs

18 lines
293 B
Rust
Raw Normal View History

// Fail macros without arguments need to be disambiguated in
// certain positions
2012-11-16 03:50:53 +00:00
// error-pattern:oops
fn bigpanic() {
2016-05-27 02:39:36 +00:00
while (panic!("oops")) {
if (panic!()) {
match (panic!()) {
() => {}
}
2012-11-16 03:50:53 +00:00
}
2016-05-27 02:39:36 +00:00
}
}
2016-05-27 02:39:36 +00:00
fn main() {
bigpanic();
}