2020-12-06 14:30:07 -06:00
|
|
|
impl u8 {
|
2022-03-15 10:32:52 -05:00
|
|
|
//~^ error: cannot define inherent `impl` for primitive types
|
2020-12-06 14:30:07 -06:00
|
|
|
pub const B: u8 = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl str {
|
2022-03-15 10:32:52 -05:00
|
|
|
//~^ error: cannot define inherent `impl` for primitive types
|
2020-12-06 14:30:07 -06:00
|
|
|
fn foo() {}
|
|
|
|
fn bar(self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl char {
|
2022-03-15 10:32:52 -05:00
|
|
|
//~^ error: cannot define inherent `impl` for primitive types
|
2020-12-06 14:30:07 -06:00
|
|
|
pub const B: u8 = 0;
|
|
|
|
pub const C: u8 = 0;
|
|
|
|
fn foo() {}
|
|
|
|
fn bar(self) {}
|
|
|
|
}
|
|
|
|
|
2022-03-29 02:47:32 -05:00
|
|
|
struct MyType;
|
|
|
|
impl &MyType {
|
|
|
|
//~^ error: cannot define inherent `impl` for primitive types
|
|
|
|
pub fn for_ref(self) {}
|
|
|
|
}
|
|
|
|
|
2020-12-06 14:30:07 -06:00
|
|
|
fn main() {}
|