diff options
Diffstat (limited to 'tests/ui/macros/die-macro.rs')
-rw-r--r-- | tests/ui/macros/die-macro.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/macros/die-macro.rs b/tests/ui/macros/die-macro.rs new file mode 100644 index 000000000..2a726efe8 --- /dev/null +++ b/tests/ui/macros/die-macro.rs @@ -0,0 +1,16 @@ +// run-pass +#![allow(dead_code)] +// Just testing that panic!() type checks in statement or expr + + +#![allow(unreachable_code)] + +fn f() { + panic!(); + + let _x: isize = panic!(); +} + +pub fn main() { + +} |