summaryrefslogtreecommitdiffstats
path: root/tests/ui/specialization/issue-68830-spurious-diagnostics.rs
blob: d11ec79833217060bcdee1b827b613456618041b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// A regression test for #68830. This checks we don't emit
// a verbose `conflicting implementations` error.

#![feature(specialization)]
#![allow(incomplete_features)]

struct BadStruct {
    err: MissingType //~ ERROR: cannot find type `MissingType` in this scope
}

trait MyTrait<T> {
    fn foo();
}

impl<T, D> MyTrait<T> for D {
    default fn foo() {}
}

impl<T> MyTrait<T> for BadStruct {
    fn foo() {}
}

fn main() {}