]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0201.rs
Sync rust-lang/portable-simd@5f49d4c8435a25d804b2f375e949cb25479f5be9
[rust.git] / src / test / ui / error-codes / E0201.rs
1 struct Foo(u8);
2
3 impl Foo {
4     fn bar(&self) -> bool { self.0 > 5 }
5     fn bar() {} //~ ERROR E0201
6 }
7
8 trait Baz {
9     type Quux;
10     fn baz(&self) -> bool;
11 }
12
13 impl Baz for Foo {
14     type Quux = u32;
15
16     fn baz(&self) -> bool { true }
17     fn baz(&self) -> bool { self.0 > 5 } //~ ERROR E0201
18     type Quux = u32; //~ ERROR E0201
19 }
20
21 fn main() {
22 }