diff options
Diffstat (limited to 'tests/ui/async-await/return-type-notation/super-method-bound.rs')
-rw-r--r-- | tests/ui/async-await/return-type-notation/super-method-bound.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/ui/async-await/return-type-notation/super-method-bound.rs b/tests/ui/async-await/return-type-notation/super-method-bound.rs new file mode 100644 index 000000000..58ea3578d --- /dev/null +++ b/tests/ui/async-await/return-type-notation/super-method-bound.rs @@ -0,0 +1,25 @@ +// edition:2021 +// check-pass + +#![feature(async_fn_in_trait, return_type_notation)] +//~^ WARN the feature `return_type_notation` is incomplete + +trait Super<'a> { + async fn test(); +} +impl Super<'_> for () { + async fn test() {} +} + +trait Foo: for<'a> Super<'a> {} +impl Foo for () {} + +fn test<T>() +where + T: Foo<test(): Send>, +{ +} + +fn main() { + test::<()>(); +} |