diff options
Diffstat (limited to 'tests/ui/associated-type-bounds/return-type-notation/equality.rs')
-rw-r--r-- | tests/ui/associated-type-bounds/return-type-notation/equality.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.rs b/tests/ui/associated-type-bounds/return-type-notation/equality.rs new file mode 100644 index 000000000..75f757e90 --- /dev/null +++ b/tests/ui/associated-type-bounds/return-type-notation/equality.rs @@ -0,0 +1,16 @@ +// edition: 2021 + +#![feature(return_type_notation, async_fn_in_trait)] +//~^ WARN the feature `return_type_notation` is incomplete +//~| WARN the feature `async_fn_in_trait` is incomplete + +use std::future::Future; + +trait Trait { + async fn method() {} +} + +fn test<T: Trait<method() = Box<dyn Future<Output = ()>>>>() {} +//~^ ERROR return type notation is not allowed to use type equality + +fn main() {} |