fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
268 B18 linesraw
1// run-rustfix
2#![allow(dead_code)]
3struct Struct;
4trait Trait {}
5impl Trait for Struct {}
6impl Trait for u32 {}
7
8fn foo() -> impl Trait { Struct }
9//~^ ERROR E0746
10
11fn bar() -> impl Trait { //~ ERROR E0746
12    if true {
13        return 0;
14    }
15    42
16}
17
18fn main() {}