summaryrefslogtreecommitdiffstats
path: root/src/test/ui/async-await/unreachable-lint.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/async-await/unreachable-lint.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/async-await/unreachable-lint.rs b/src/test/ui/async-await/unreachable-lint.rs
new file mode 100644
index 000000000..ca18cfde4
--- /dev/null
+++ b/src/test/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() { }