summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs
blob: 73c085315990c8bec321751a30bf3808316d579d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// edition:2021

#![feature(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` in bounds of `Foo`
{
}

fn main() {
    test::<()>();
}