diff options
| author | Michael Goulet <michael@errs.io> | 2024-01-26 17:33:42 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-01-31 16:59:19 +0000 |
| commit | 3913c9a0cacf4bacb4ca1c6255271d54ec995f02 (patch) | |
| tree | e86c1e10d0db17e1ca359b3e4a7887eb04562394 /tests/ui/async-await/async-fn/wrong-trait.rs | |
| parent | 54db272cc972f232cc50a7c6dff30140f904738a (diff) | |
| download | rust-3913c9a0cacf4bacb4ca1c6255271d54ec995f02.tar.gz rust-3913c9a0cacf4bacb4ca1c6255271d54ec995f02.zip | |
Error on incorrect item kind in async bound
Diffstat (limited to 'tests/ui/async-await/async-fn/wrong-trait.rs')
| -rw-r--r-- | tests/ui/async-await/async-fn/wrong-trait.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/async-await/async-fn/wrong-trait.rs b/tests/ui/async-await/async-fn/wrong-trait.rs new file mode 100644 index 00000000000..c431a362b1e --- /dev/null +++ b/tests/ui/async-await/async-fn/wrong-trait.rs @@ -0,0 +1,10 @@ +// edition:2018 + +#![feature(async_closure)] + +trait Foo {} + +fn test(x: impl async Foo) {} +//~^ ERROR `async` bound modifier only allowed on `Fn`/`FnMut`/`FnOnce` traits + +fn main() {} |
