summaryrefslogtreecommitdiffstats
path: root/src/test/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs')
-rw-r--r--src/test/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs b/src/test/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs
new file mode 100644
index 000000000..aaf0f7eae
--- /dev/null
+++ b/src/test/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs
@@ -0,0 +1,20 @@
+// edition:2018
+
+async fn free(); //~ ERROR without a body
+
+struct A;
+impl A {
+ async fn inherent(); //~ ERROR without body
+}
+
+trait B {
+ async fn associated();
+ //~^ ERROR cannot be declared `async`
+}
+impl B for A {
+ async fn associated(); //~ ERROR without body
+ //~^ ERROR cannot be declared `async`
+ //~| ERROR has an incompatible type for trait
+}
+
+fn main() {}