Check concrete type in impls with no trait

closes #16955
This commit is contained in:
Nick Cameron 2014-09-05 14:38:37 +12:00
parent e024017f60
commit 2df3a5b0d1
3 changed files with 21 additions and 13 deletions

View file

@ -28,7 +28,8 @@ fn kaboom(y: Bar<f32>) {}
//~^ ERROR failed to find an implementation
//~^^ ERROR instantiating a type parameter with an incompatible type
impl<T> Foo<T> {
impl<T> Foo<T> { //~ ERROR failed to find an implementation
//~^ ERROR instantiating a type parameter with an incompatible type
fn uhoh() {}
}

View file

@ -76,6 +76,8 @@ trait T3<Sized? Z> {
struct S4<Y>;
impl<Sized? X> T3<X> for S4<X> { //~ ERROR instantiating a type parameter with an incompatible type
}
impl<Sized? X> S4<X> { //~ ERROR instantiating a type parameter with an incompatible type
}
pub fn main() {