diff options
Diffstat (limited to 'src/test/ui/match/match-no-arms-unreachable-after.rs')
-rw-r--r-- | src/test/ui/match/match-no-arms-unreachable-after.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/match/match-no-arms-unreachable-after.rs b/src/test/ui/match/match-no-arms-unreachable-after.rs new file mode 100644 index 000000000..8f83fd1a3 --- /dev/null +++ b/src/test/ui/match/match-no-arms-unreachable-after.rs @@ -0,0 +1,12 @@ +#![allow(warnings)] +#![deny(unreachable_code)] + +enum Void { } + +fn foo(v: Void) { + match v { } + let x = 2; //~ ERROR unreachable +} + +fn main() { +} |