summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs')
-rw-r--r--tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs b/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs
new file mode 100644
index 000000000..028e526b5
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs
@@ -0,0 +1,32 @@
+// edition:2021
+
+#![feature(async_fn_in_trait, return_type_notation)]
+//~^ WARN the feature `return_type_notation` is incomplete
+
+trait Super1<'a> {
+ async fn test();
+}
+impl Super1<'_> for () {
+ async fn test() {}
+}
+
+trait Super2 {
+ async fn test();
+}
+impl Super2 for () {
+ async fn test() {}
+}
+
+trait Foo: for<'a> Super1<'a> + Super2 {}
+impl Foo for () {}
+
+fn test<T>()
+where
+ T: Foo<test(): Send>,
+ //~^ ERROR ambiguous associated function `test` for `Foo`
+{
+}
+
+fn main() {
+ test::<()>();
+}