]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0746.fixed
Merge commit '1411a98352ba6bee8ba3b0131c9243e5db1e6a2e' into sync_cg_clif-2021-12-31
[rust.git] / src / test / ui / error-codes / E0746.fixed
1 // run-rustfix
2 #![allow(dead_code)]
3 struct Struct;
4 trait Trait {}
5 impl Trait for Struct {}
6 impl Trait for u32 {}
7
8 fn foo() -> impl Trait { Struct }
9 //~^ ERROR E0746
10
11 fn bar() -> impl Trait { //~ ERROR E0746
12     if true {
13         return 0;
14     }
15     42
16 }
17
18 fn main() {}