diff options
Diffstat (limited to 'tests/ui/async-await/unreachable-lint.rs')
| -rw-r--r-- | tests/ui/async-await/unreachable-lint.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/async-await/unreachable-lint.rs b/tests/ui/async-await/unreachable-lint.rs new file mode 100644 index 00000000000..ca18cfde4f2 --- /dev/null +++ b/tests/ui/async-await/unreachable-lint.rs @@ -0,0 +1,13 @@ +// check-pass +// edition:2018 +#![deny(unreachable_code)] + +async fn foo() { + endless().await; +} + +async fn endless() -> ! { + loop {} +} + +fn main() { } |
