Skip to content

Commit 9252925

Browse files
committed
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.
1 parent 61c777b commit 9252925

7 files changed

+14
-13
lines changed

src/test/compile-fail/issue-14853.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ struct X { data: u32 }
2020

2121
impl Something for X {
2222
fn yay<T: Str>(_:Option<X>, thing: &[T]) {
23-
//~^ ERROR the requirement `T: Str` appears on the impl method
23+
//~^ ERROR E0276
2424
}
2525
}
2626

src/test/compile-fail/issue-18937.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ trait A<'a> {
2828
}
2929

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

src/test/compile-fail/issue-2611-4.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct E {
2121

2222
impl A for E {
2323
fn b<F: Sync, G>(&self, _x: F) -> F { panic!() }
24-
//~^ ERROR `F: std::marker::Sync` appears on the impl method
24+
//~^ ERROR E0276
2525
}
2626

2727
fn main() {}

src/test/compile-fail/region-bound-extra-bound-in-impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ trait Tr<'a, T> {
1717

1818
impl<'a, T> Tr<'a, T> for &'a mut [T] {
1919
fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b {
20-
//~^ ERROR lifetime bound not satisfied
20+
//~^ ERROR E0276
2121
&mut self[..]
2222
}
2323
}

src/test/compile-fail/regions-bound-missing-bound-in-impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl<'a, 't> Foo<'a, 't> for &'a isize {
5252
}
5353

5454
fn another_bound<'x: 't>(self, x: Inv<'x>, y: Inv<'t>) {
55-
//~^ ERROR lifetime bound not satisfied
55+
//~^ ERROR E0276
5656
}
5757
}
5858

src/test/compile-fail/trait-bounds-impl-comparison-1.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ trait Foo {
3434
impl Foo for isize {
3535
// invalid bound for T, was defined as Eq in trait
3636
fn test_error1_fn<T: Ord>(&self) {}
37-
//~^ ERROR the requirement `T: std::cmp::Ord` appears on the impl
37+
//~^ ERROR E0276
3838

3939
// invalid bound for T, was defined as Eq + Ord in trait
4040
fn test_error2_fn<T: Eq + B>(&self) {}
41-
//~^ ERROR the requirement `T: B` appears on the impl
41+
//~^ ERROR E0276
4242

4343
// invalid bound for T, was defined as Eq + Ord in trait
4444
fn test_error3_fn<T: B + Eq>(&self) {}
45-
//~^ ERROR the requirement `T: B` appears on the impl
45+
//~^ ERROR E0276
4646

4747
// multiple bounds, same order as in trait
4848
fn test3_fn<T: Ord + Eq>(&self) {}
@@ -52,16 +52,16 @@ impl Foo for isize {
5252

5353
// parameters in impls must be equal or more general than in the defining trait
5454
fn test_error5_fn<T: B>(&self) {}
55-
//~^ ERROR the requirement `T: B` appears on the impl
55+
//~^ ERROR E0276
5656

5757
// bound `std::cmp::Eq` not enforced by this implementation, but this is OK
5858
fn test6_fn<T: A>(&self) {}
5959

6060
fn test_error7_fn<T: A + Eq>(&self) {}
61-
//~^ ERROR the requirement `T: std::cmp::Eq` appears on the impl
61+
//~^ ERROR E0276
6262

6363
fn test_error8_fn<T: C>(&self) {}
64-
//~^ ERROR the requirement `T: C` appears on the impl
64+
//~^ ERROR E0276
6565
}
6666

6767
trait Getter<T> {
@@ -74,7 +74,7 @@ trait Trait {
7474

7575
impl Trait for usize {
7676
fn method<G: Getter<usize>>(&self) {}
77-
//~^ ERROR `G: Getter<usize>` appears on the impl method
77+
//~^ ERROR E0276
7878
}
7979

8080
fn main() {}

src/test/compile-fail/trait-bounds-impl-comparison-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ trait IteratorUtil<A>: Sized
2121

2222
impl<A, T: Iterator<A>> IteratorUtil<A> for T {
2323
fn zip<B, U: Iterator<B>>(self, other: U) -> ZipIterator<T, U> {
24-
//~^ ERROR the requirement `U: Iterator<B>` appears on the impl method
24+
//~^ ERROR E0276
2525
ZipIterator{a: self, b: other}
2626
}
2727
}

0 commit comments

Comments
 (0)