diff options
Diffstat (limited to 'tests/ui/reachable/unreachable-code-ret.rs')
-rw-r--r-- | tests/ui/reachable/unreachable-code-ret.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/reachable/unreachable-code-ret.rs b/tests/ui/reachable/unreachable-code-ret.rs new file mode 100644 index 000000000..fad35794f --- /dev/null +++ b/tests/ui/reachable/unreachable-code-ret.rs @@ -0,0 +1,8 @@ +// error-pattern: unreachable statement + +#![deny(unreachable_code)] + +fn main() { + return; + println!("Paul is dead"); +} |