summary refs log tree commit diff
path: root/src/test/ui/kinds-of-primitive-impl.rs
blob: cbd4d7ae904fdc72918dde26458231cac6ae05bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// ignore-tidy-linelength


impl u8 {
//~^ error: only a single inherent implementation marked with `#[lang = "u8"]` is allowed for the `u8` primitive
    pub const B: u8 = 0;
}

impl str {
//~^ error: only a single inherent implementation marked with `#[lang = "str"]` is allowed for the `str` primitive
    fn foo() {}
    fn bar(self) {}
}

impl char {
//~^ error: only a single inherent implementation marked with `#[lang = "char"]` is allowed for the `char` primitive
    pub const B: u8 = 0;
    pub const C: u8 = 0;
    fn foo() {}
    fn bar(self) {}
}

fn main() {}