summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/no-const-async.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/no-const-async.rs')
-rw-r--r--tests/ui/async-await/no-const-async.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/async-await/no-const-async.rs b/tests/ui/async-await/no-const-async.rs
new file mode 100644
index 000000000..cfb0ef1b3
--- /dev/null
+++ b/tests/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