rust/tests/ui/specialization/issue-68830-spurious-diagnostics.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
429 B
Rust
Raw Normal View History

2021-03-31 04:48:28 -05:00
// 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() {}