diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/async-await/in-trait/bad-signatures.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/async-await/in-trait/bad-signatures.rs b/tests/ui/async-await/in-trait/bad-signatures.rs new file mode 100644 index 000000000..b86f1d1c1 --- /dev/null +++ b/tests/ui/async-await/in-trait/bad-signatures.rs @@ -0,0 +1,16 @@ +// edition:2021 + +#![feature(async_fn_in_trait)] +//~^ WARN the feature `async_fn_in_trait` is incomplete + +trait MyTrait { + async fn bar(&abc self); + //~^ ERROR expected identifier, found keyword `self` + //~| ERROR expected one of `:`, `@`, or `|`, found keyword `self` +} + +impl MyTrait for () { + async fn bar(&self) {} +} + +fn main() {} |