update test error messages

We've got a new revised message for E0273; just drop back to the error
code, since the ui tests check for the full appearance now.
This commit is contained in:
Niko Matsakis 2016-10-14 10:10:22 -04:00
parent 61c777baec
commit 92529255c5
7 changed files with 14 additions and 13 deletions

View File

@ -20,7 +20,7 @@ struct X { data: u32 }
impl Something for X {
fn yay<T: Str>(_:Option<X>, thing: &[T]) {
//~^ ERROR the requirement `T: Str` appears on the impl method
//~^ ERROR E0276
}
}

View File

@ -28,7 +28,8 @@ trait A<'a> {
}
impl<'a> A<'a> for B {
fn foo<F>(&mut self, f: F) //~ ERROR parameter type `F` may not live long enough
fn foo<F>(&mut self, f: F) //~ ERROR E0276
//~^ WARNING future release
where F: fmt::Debug + 'static,
{
self.list.push(Box::new(f));

View File

@ -21,7 +21,7 @@ struct E {
impl A for E {
fn b<F: Sync, G>(&self, _x: F) -> F { panic!() }
//~^ ERROR `F: std::marker::Sync` appears on the impl method
//~^ ERROR E0276
}
fn main() {}

View File

@ -17,7 +17,7 @@ trait Tr<'a, T> {
impl<'a, T> Tr<'a, T> for &'a mut [T] {
fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b {
//~^ ERROR lifetime bound not satisfied
//~^ ERROR E0276
&mut self[..]
}
}

View File

@ -52,7 +52,7 @@ impl<'a, 't> Foo<'a, 't> for &'a isize {
}
fn another_bound<'x: 't>(self, x: Inv<'x>, y: Inv<'t>) {
//~^ ERROR lifetime bound not satisfied
//~^ ERROR E0276
}
}

View File

@ -34,15 +34,15 @@ trait Foo {
impl Foo for isize {
// invalid bound for T, was defined as Eq in trait
fn test_error1_fn<T: Ord>(&self) {}
//~^ ERROR the requirement `T: std::cmp::Ord` appears on the impl
//~^ ERROR E0276
// invalid bound for T, was defined as Eq + Ord in trait
fn test_error2_fn<T: Eq + B>(&self) {}
//~^ ERROR the requirement `T: B` appears on the impl
//~^ ERROR E0276
// invalid bound for T, was defined as Eq + Ord in trait
fn test_error3_fn<T: B + Eq>(&self) {}
//~^ ERROR the requirement `T: B` appears on the impl
//~^ ERROR E0276
// multiple bounds, same order as in trait
fn test3_fn<T: Ord + Eq>(&self) {}
@ -52,16 +52,16 @@ impl Foo for isize {
// parameters in impls must be equal or more general than in the defining trait
fn test_error5_fn<T: B>(&self) {}
//~^ ERROR the requirement `T: B` appears on the impl
//~^ ERROR E0276
// bound `std::cmp::Eq` not enforced by this implementation, but this is OK
fn test6_fn<T: A>(&self) {}
fn test_error7_fn<T: A + Eq>(&self) {}
//~^ ERROR the requirement `T: std::cmp::Eq` appears on the impl
//~^ ERROR E0276
fn test_error8_fn<T: C>(&self) {}
//~^ ERROR the requirement `T: C` appears on the impl
//~^ ERROR E0276
}
trait Getter<T> {
@ -74,7 +74,7 @@ trait Trait {
impl Trait for usize {
fn method<G: Getter<usize>>(&self) {}
//~^ ERROR `G: Getter<usize>` appears on the impl method
//~^ ERROR E0276
}
fn main() {}

View File

@ -21,7 +21,7 @@ trait IteratorUtil<A>: Sized
impl<A, T: Iterator<A>> IteratorUtil<A> for T {
fn zip<B, U: Iterator<B>>(self, other: U) -> ZipIterator<T, U> {
//~^ ERROR the requirement `U: Iterator<B>` appears on the impl method
//~^ ERROR E0276
ZipIterator{a: self, b: other}
}
}