diff options
Diffstat (limited to 'tests/ui/async-await/in-trait/early-bound-2.rs')
-rw-r--r-- | tests/ui/async-await/in-trait/early-bound-2.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/async-await/in-trait/early-bound-2.rs b/tests/ui/async-await/in-trait/early-bound-2.rs new file mode 100644 index 000000000..270443229 --- /dev/null +++ b/tests/ui/async-await/in-trait/early-bound-2.rs @@ -0,0 +1,15 @@ +// check-pass +// edition:2021 + +#![feature(async_fn_in_trait)] +#![allow(incomplete_features)] + +pub trait Foo { + async fn foo(&mut self); +} + +impl<T: Foo> Foo for &mut T { + async fn foo(&mut self) {} +} + +fn main() {} |