about summary refs log tree commit diff
path: root/tests/ui/traits/incoherent-impl-ambiguity.rs
blob: b5fed95e11c44a4892e8049143dc47617c423869 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Make sure that an invalid inherent impl doesn't totally clobber all of the
// other inherent impls, which lead to mysterious method/assoc-item probing errors.

impl () {}
//~^ ERROR cannot define inherent `impl` for primitive types

struct W;
impl W {
    const CONST: u32 = 0;
}

fn main() {
    let _ = W::CONST;
}