summaryrefslogtreecommitdiffstats
path: root/src/test/ui/error-codes/E0201.rs
blob: adefd4bcd46001b3fefa64f9ed273851508bf449 (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 E0201
}

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() {
}