summaryrefslogtreecommitdiffstats
path: root/src/test/ui/error-codes/E0201.rs
blob: 04b37091b2f16cd1a520bf06ae46b4eb8ba6ca7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
struct Foo(u8);

impl Foo {
    fn bar(&self) -> bool { self.0 > 5 }
    fn bar() {} //~ ERROR E0592
}

trait Baz {
    type Quux;
    fn baz(&self) -> bool;
}

impl Baz for Foo {
    type Quux = u32;

    fn baz(&self) -> bool { true }
    fn baz(&self) -> bool { self.0 > 5 } //~ ERROR E0201
    type Quux = u32; //~ ERROR E0201
}

fn main() {
}