summaryrefslogtreecommitdiffstats
path: root/src/test/ui/async-await/no-const-async.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/async-await/no-const-async.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/async-await/no-const-async.rs b/src/test/ui/async-await/no-const-async.rs
new file mode 100644
index 000000000..cfb0ef1b3
--- /dev/null
+++ b/src/test/ui/async-await/no-const-async.rs
@@ -0,0 +1,6 @@
+// edition:2018
+// compile-flags: --crate-type lib
+
+pub const async fn x() {}
+//~^ ERROR functions cannot be both `const` and `async`
+//~| ERROR cycle detected