summaryrefslogtreecommitdiffstats
path: root/tests/ui/error-codes/E0746.fixed
blob: ca8319aa020dceea3f35a462540de4f30b896ec1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// run-rustfix
#![allow(dead_code)]
struct Struct;
trait Trait {}
impl Trait for Struct {}
impl Trait for u32 {}

fn foo() -> impl Trait { Struct }
//~^ ERROR E0746

fn bar() -> impl Trait { //~ ERROR E0746
    if true {
        return 0;
    }
    42
}

fn main() {}