]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/issue-101465.rs
Tweak use of trimmed paths
[rust.git] / tests / ui / suggestions / issue-101465.rs
1 #![feature(trait_alias)]
2
3 struct B;
4 struct C;
5
6 trait Tr {}
7
8 impl Tr for B {}
9 impl Tr for C {}
10
11 trait Tr2<S> = Into<S>;
12
13 fn foo2<T: Tr2<()>>() {}
14
15 fn foo() -> impl Tr {
16     let x = foo2::<_>();
17
18     match true {
19         true => B,
20         false => C,
21         //~^ `match` arms have incompatible types
22     }
23 }
24
25 fn main() {}