summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/issue-101465.rs
blob: 8e42e2c22243464c7d4aaaff8f1e28422427f9b8 (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
#![feature(trait_alias)]

struct B;
struct C;

trait Tr {}

impl Tr for B {}
impl Tr for C {}

trait Tr2<S> = Into<S>;

fn foo2<T: Tr2<()>>() {}

fn foo() -> impl Tr {
    let x = foo2::<_>();

    match true {
        true => B,
        false => C,
        //~^ `match` arms have incompatible types
    }
}

fn main() {}