diff options
Diffstat (limited to 'tests/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs')
-rw-r--r-- | tests/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs b/tests/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs new file mode 100644 index 000000000..49462f52f --- /dev/null +++ b/tests/ui/resolve/issue-70736-async-fn-no-body-def-collector.rs @@ -0,0 +1,19 @@ +// 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` +} + +fn main() {} |