]> git.lizzy.rs Git - rust.git/blob - tests/ui/kinds-of-primitive-impl.rs
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / ui / kinds-of-primitive-impl.rs
1 impl u8 {
2 //~^ error: cannot define inherent `impl` for primitive types
3     pub const B: u8 = 0;
4 }
5
6 impl str {
7 //~^ error: cannot define inherent `impl` for primitive types
8     fn foo() {}
9     fn bar(self) {}
10 }
11
12 impl char {
13 //~^ error: cannot define inherent `impl` for primitive types
14     pub const B: u8 = 0;
15     pub const C: u8 = 0;
16     fn foo() {}
17     fn bar(self) {}
18 }
19
20 struct MyType;
21 impl &MyType {
22 //~^ error: cannot define inherent `impl` for primitive types
23     pub fn for_ref(self) {}
24 }
25
26 fn main() {}