about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2020-08-14 21:41:20 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2020-10-06 11:19:32 +0100
commitd08ab945de8ede93366c6ffc12ed58068a73b4a0 (patch)
treea191de6382fe2087e54fd59527b94c5019880e46 /src
parente29765250b84809dc11fc26220dfcc544680d582 (diff)
downloadrust-d08ab945de8ede93366c6ffc12ed58068a73b4a0.tar.gz
rust-d08ab945de8ede93366c6ffc12ed58068a73b4a0.zip
Fix rebase
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/associated-type-bounds/bounds-on-assoc-in-trait.stderr4
-rw-r--r--src/test/ui/associated-types/defaults-suitability.rs3
-rw-r--r--src/test/ui/associated-types/defaults-suitability.stderr26
-rw-r--r--src/test/ui/associated-types/defaults-wf.stderr2
-rw-r--r--src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr2
-rw-r--r--src/test/ui/feature-gates/feature-gate-generic_associated_types.rs1
-rw-r--r--src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr20
-rw-r--r--src/test/ui/generator/sized-yield.stderr2
-rw-r--r--src/test/ui/generic-associated-types/generic-associated-types-where.rs3
-rw-r--r--src/test/ui/generic-associated-types/generic-associated-types-where.stderr19
-rw-r--r--src/test/ui/generic-associated-types/impl_bounds.rs1
-rw-r--r--src/test/ui/generic-associated-types/impl_bounds.stderr2
-rw-r--r--src/test/ui/generic-associated-types/impl_bounds_ok.rs5
-rw-r--r--src/test/ui/generic-associated-types/unsatisfied-outlives-bound.rs4
-rw-r--r--src/test/ui/generic-associated-types/unsatisfied-outlives-bound.stderr20
-rw-r--r--src/test/ui/issues/issue-60283.stderr2
-rw-r--r--src/test/ui/regions/regions-assoc-type-region-bound-in-trait-not-met.rs10
-rw-r--r--src/test/ui/regions/regions-assoc-type-region-bound-in-trait-not-met.stderr26
-rw-r--r--src/test/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.rs6
-rw-r--r--src/test/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr11
20 files changed, 80 insertions, 89 deletions
diff --git a/src/test/ui/associated-type-bounds/bounds-on-assoc-in-trait.stderr b/src/test/ui/associated-type-bounds/bounds-on-assoc-in-trait.stderr
index 2be37285e29..cc0b58188e6 100644
--- a/src/test/ui/associated-type-bounds/bounds-on-assoc-in-trait.stderr
+++ b/src/test/ui/associated-type-bounds/bounds-on-assoc-in-trait.stderr
@@ -4,7 +4,7 @@ error[E0277]: `<<Self as Case1>::A as std::iter::Iterator>::Item` doesn't implem
 LL |     type A: Iterator<Item: Debug>;
    |                            ^^^^^ `<<Self as Case1>::A as std::iter::Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
    | 
-  ::: $SRC_DIR/libcore/fmt/mod.rs:LL:COL
+  ::: $SRC_DIR/core/src/fmt/mod.rs:LL:COL
    |
 LL | pub trait Debug {
    | --------------- required by this bound in `std::fmt::Debug`
@@ -21,7 +21,7 @@ error[E0277]: the trait bound `<<Self as Foo>::Out as Baz>::Assoc: std::default:
 LL | pub trait Foo { type Out: Baz<Assoc: Default>; }
    |                                      ^^^^^^^ the trait `std::default::Default` is not implemented for `<<Self as Foo>::Out as Baz>::Assoc`
    | 
-  ::: $SRC_DIR/libcore/default.rs:LL:COL
+  ::: $SRC_DIR/core/src/default.rs:LL:COL
    |
 LL | pub trait Default: Sized {
    | ------------------------ required by this bound in `std::default::Default`
diff --git a/src/test/ui/associated-types/defaults-suitability.rs b/src/test/ui/associated-types/defaults-suitability.rs
index 69be300b16f..44cc7738d7e 100644
--- a/src/test/ui/associated-types/defaults-suitability.rs
+++ b/src/test/ui/associated-types/defaults-suitability.rs
@@ -45,7 +45,6 @@ trait C where
     bool: IsU8<Self::Assoc>,
 {
     type Assoc = u8;
-    //~^ ERROR the trait bound `u8: IsU8<<Self as C>::Assoc>` is not satisfied
 }
 
 // Test that we get all expected errors if that default is unsuitable
@@ -55,7 +54,7 @@ trait D where
     bool: IsU8<Self::Assoc>,
 {
     type Assoc = NotClone;
-    //~^ ERROR the trait bound `NotClone: IsU8<<Self as D>::Assoc>` is not satisfied
+    //~^ ERROR the trait bound `NotClone: IsU8<NotClone>` is not satisfied
 }
 
 // Test behavior of the check when defaults refer to other defaults:
diff --git a/src/test/ui/associated-types/defaults-suitability.stderr b/src/test/ui/associated-types/defaults-suitability.stderr
index 4d8e6f1584d..5ee800e1913 100644
--- a/src/test/ui/associated-types/defaults-suitability.stderr
+++ b/src/test/ui/associated-types/defaults-suitability.stderr
@@ -42,20 +42,8 @@ LL |     type Assoc: Foo<Self> = ();
    |     |           required by this bound in `Bar::Assoc`
    |     the trait `Foo<Self>` is not implemented for `()`
 
-error[E0277]: the trait bound `u8: IsU8<<Self as C>::Assoc>` is not satisfied
-  --> $DIR/defaults-suitability.rs:44:5
-   |
-LL |     Self::Assoc: IsU8<Self::Assoc>,
-   |                  ----------------- required by this bound in `C::Assoc`
-...
-LL |     type Assoc = u8;
-   |     ^^^^^-----^^^^^^
-   |     |    |
-   |     |    required by a bound in this
-   |     the trait `IsU8<<Self as C>::Assoc>` is not implemented for `u8`
-
-error[E0277]: the trait bound `NotClone: IsU8<<Self as D>::Assoc>` is not satisfied
-  --> $DIR/defaults-suitability.rs:54:5
+error[E0277]: the trait bound `NotClone: IsU8<NotClone>` is not satisfied
+  --> $DIR/defaults-suitability.rs:53:5
    |
 LL |     Self::Assoc: IsU8<Self::Assoc>,
    |                  ----------------- required by this bound in `D::Assoc`
@@ -64,10 +52,10 @@ LL |     type Assoc = NotClone;
    |     ^^^^^-----^^^^^^^^^^^^
    |     |    |
    |     |    required by a bound in this
-   |     the trait `IsU8<<Self as D>::Assoc>` is not implemented for `NotClone`
+   |     the trait `IsU8<NotClone>` is not implemented for `NotClone`
 
 error[E0277]: the trait bound `<Self as Foo2<T>>::Baz: std::clone::Clone` is not satisfied
-  --> $DIR/defaults-suitability.rs:63:5
+  --> $DIR/defaults-suitability.rs:62:5
    |
 LL |     type Bar: Clone = Vec<Self::Baz>;
    |     ^^^^^^^^^^-----^^^^^^^^^^^^^^^^^^
@@ -82,7 +70,7 @@ LL | trait Foo2<T> where <Self as Foo2<T>>::Baz: Clone {
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0277]: the trait bound `<Self as Foo25<T>>::Baz: std::clone::Clone` is not satisfied
-  --> $DIR/defaults-suitability.rs:72:5
+  --> $DIR/defaults-suitability.rs:71:5
    |
 LL |     type Bar: Clone = Vec<Self::Baz>;
    |     ^^^^^^^^^^-----^^^^^^^^^^^^^^^^^^
@@ -97,7 +85,7 @@ LL | trait Foo25<T: Clone> where <Self as Foo25<T>>::Baz: Clone {
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied
-  --> $DIR/defaults-suitability.rs:84:5
+  --> $DIR/defaults-suitability.rs:83:5
    |
 LL |     Self::Baz: Clone,
    |                ----- required by this bound in `Foo3::Baz`
@@ -113,6 +101,6 @@ help: consider further restricting type parameter `T`
 LL |     Self::Baz: Clone, T: Clone
    |                     ^^^^^^^^^^
 
-error: aborting due to 9 previous errors
+error: aborting due to 8 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/associated-types/defaults-wf.stderr b/src/test/ui/associated-types/defaults-wf.stderr
index aeb7b6cae19..d1832cdbc0c 100644
--- a/src/test/ui/associated-types/defaults-wf.stderr
+++ b/src/test/ui/associated-types/defaults-wf.stderr
@@ -4,7 +4,7 @@ error[E0277]: the size for values of type `[u8]` cannot be known at compilation
 LL |     type Ty = Vec<[u8]>;
    |     ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    | 
-  ::: $SRC_DIR/liballoc/vec.rs:LL:COL
+  ::: $SRC_DIR/alloc/src/vec.rs:LL:COL
    |
 LL | pub struct Vec<T> {
    |                - required by this bound in `std::vec::Vec`
diff --git a/src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr b/src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr
index 03011bd1e32..987b6787581 100644
--- a/src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr
+++ b/src/test/ui/feature-gates/feature-gate-associated_type_bounds.stderr
@@ -145,7 +145,7 @@ error[E0277]: the trait bound `<<Self as _Tr3>::A as std::iter::Iterator>::Item:
 LL |     type A: Iterator<Item: Copy>;
    |                            ^^^^ the trait `std::marker::Copy` is not implemented for `<<Self as _Tr3>::A as std::iter::Iterator>::Item`
    | 
-  ::: $SRC_DIR/libcore/marker.rs:LL:COL
+  ::: $SRC_DIR/core/src/marker.rs:LL:COL
    |
 LL | pub trait Copy: Clone {
    | --------------------- required by this bound in `std::marker::Copy`
diff --git a/src/test/ui/feature-gates/feature-gate-generic_associated_types.rs b/src/test/ui/feature-gates/feature-gate-generic_associated_types.rs
index 17548d7b9e8..34823cbafd3 100644
--- a/src/test/ui/feature-gates/feature-gate-generic_associated_types.rs
+++ b/src/test/ui/feature-gates/feature-gate-generic_associated_types.rs
@@ -15,6 +15,7 @@ impl PointerFamily<u32> for Foo {
     //~^ ERROR generic associated types are unstable
     type Pointer2<U32> = Box<U32>;
     //~^ ERROR generic associated types are unstable
+    //~| ERROR the trait bound `U32: std::clone::Clone` is not satisfied
 }
 
 trait Bar {
diff --git a/src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr b/src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr
index 8499b1ab70f..e04a129dbbb 100644
--- a/src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr
+++ b/src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr
@@ -44,7 +44,7 @@ LL |     type Pointer2<U32> = Box<U32>;
    = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable
 
 error[E0658]: where clauses on associated types are unstable
-  --> $DIR/feature-gate-generic_associated_types.rs:21:5
+  --> $DIR/feature-gate-generic_associated_types.rs:22:5
    |
 LL |     type Assoc where Self: Sized;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -53,7 +53,7 @@ LL |     type Assoc where Self: Sized;
    = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable
 
 error[E0658]: where clauses on associated types are unstable
-  --> $DIR/feature-gate-generic_associated_types.rs:26:5
+  --> $DIR/feature-gate-generic_associated_types.rs:27:5
    |
 LL |     type Assoc where Self: Sized = Foo;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -61,6 +61,18 @@ LL |     type Assoc where Self: Sized = Foo;
    = note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
    = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable
 
-error: aborting due to 7 previous errors
+error[E0277]: the trait bound `U32: std::clone::Clone` is not satisfied
+  --> $DIR/feature-gate-generic_associated_types.rs:16:5
+   |
+LL |     type Pointer2<U32> = Box<U32>;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::clone::Clone` is not implemented for `U32`
+   |
+help: consider restricting type parameter `U32`
+   |
+LL |     type Pointer2<U32: std::clone::Clone> = Box<U32>;
+   |                      ^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 8 previous errors
 
-For more information about this error, try `rustc --explain E0658`.
+Some errors have detailed explanations: E0277, E0658.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/src/test/ui/generator/sized-yield.stderr b/src/test/ui/generator/sized-yield.stderr
index e49dc91ec66..19658528a0b 100644
--- a/src/test/ui/generator/sized-yield.stderr
+++ b/src/test/ui/generator/sized-yield.stderr
@@ -17,7 +17,7 @@ error[E0277]: the size for values of type `str` cannot be known at compilation t
 LL |    Pin::new(&mut gen).resume(());
    |                       ^^^^^^ doesn't have a size known at compile-time
    | 
-  ::: $SRC_DIR/libcore/ops/generator.rs:LL:COL
+  ::: $SRC_DIR/core/src/ops/generator.rs:LL:COL
    |
 LL | pub enum GeneratorState<Y, R> {
    |                         - required by this bound in `std::ops::GeneratorState`
diff --git a/src/test/ui/generic-associated-types/generic-associated-types-where.rs b/src/test/ui/generic-associated-types/generic-associated-types-where.rs
index 1a94796535c..27970b15a41 100644
--- a/src/test/ui/generic-associated-types/generic-associated-types-where.rs
+++ b/src/test/ui/generic-associated-types/generic-associated-types-where.rs
@@ -19,8 +19,9 @@ struct Bar;
 impl Foo for Bar {
     type Assoc = usize;
     type Assoc2<T> = Vec<T>;
+    //~^ ERROR `T` doesn't implement `std::fmt::Display`
     type Assoc3<T> where T: Iterator = Vec<T>;
-    //~^ impl has stricter requirements than trait
+    //~^ ERROR impl has stricter requirements than trait
     type WithDefault<'a, T: Debug + 'a> = &'a dyn Iterator<Item=T>;
     type NoGenerics = ::std::cell::Cell<i32>;
 }
diff --git a/src/test/ui/generic-associated-types/generic-associated-types-where.stderr b/src/test/ui/generic-associated-types/generic-associated-types-where.stderr
index c95765d906c..da8b625ea7f 100644
--- a/src/test/ui/generic-associated-types/generic-associated-types-where.stderr
+++ b/src/test/ui/generic-associated-types/generic-associated-types-where.stderr
@@ -1,5 +1,17 @@
+error[E0277]: `T` doesn't implement `std::fmt::Display`
+  --> $DIR/generic-associated-types-where.rs:21:5
+   |
+LL |     type Assoc2<T> = Vec<T>;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^ `T` cannot be formatted with the default formatter
+   |
+   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
+help: consider restricting type parameter `T`
+   |
+LL |     type Assoc2<T: std::fmt::Display> = Vec<T>;
+   |                  ^^^^^^^^^^^^^^^^^^^
+
 error[E0276]: impl has stricter requirements than trait
-  --> $DIR/generic-associated-types-where.rs:22:5
+  --> $DIR/generic-associated-types-where.rs:23:5
    |
 LL |     type Assoc3<T>;
    |     --------------- definition of `Assoc3` from trait
@@ -7,6 +19,7 @@ LL |     type Assoc3<T>;
 LL |     type Assoc3<T> where T: Iterator = Vec<T>;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Iterator`
 
-error: aborting due to previous error
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0276`.
+Some errors have detailed explanations: E0276, E0277.
+For more information about an error, try `rustc --explain E0276`.
diff --git a/src/test/ui/generic-associated-types/impl_bounds.rs b/src/test/ui/generic-associated-types/impl_bounds.rs
index 77bebc9854a..089a214667e 100644
--- a/src/test/ui/generic-associated-types/impl_bounds.rs
+++ b/src/test/ui/generic-associated-types/impl_bounds.rs
@@ -16,6 +16,7 @@ impl<T> Foo for Fooy<T> {
     //~^ ERROR the parameter type `T` may not live long enough
     type B<'a, 'b> where 'b: 'a = (&'a(), &'b ());
     //~^ ERROR lifetime bound not satisfied
+    //~| ERROR lifetime bound not satisfied
     type C where Self: Copy = String;
     //~^ ERROR the trait bound `T: Copy` is not satisfied
 }
diff --git a/src/test/ui/generic-associated-types/impl_bounds.stderr b/src/test/ui/generic-associated-types/impl_bounds.stderr
index 0546e38a33d..e6f27a45a3c 100644
--- a/src/test/ui/generic-associated-types/impl_bounds.stderr
+++ b/src/test/ui/generic-associated-types/impl_bounds.stderr
@@ -37,7 +37,7 @@ help: consider restricting type parameter `T`
 LL | impl<T: Copy> Foo for Fooy<T> {
    |       ^^^^^^
 
-error: aborting due to 3 previous errors
+error: aborting due to 4 previous errors
 
 Some errors have detailed explanations: E0277, E0310, E0478.
 For more information about an error, try `rustc --explain E0277`.
diff --git a/src/test/ui/generic-associated-types/impl_bounds_ok.rs b/src/test/ui/generic-associated-types/impl_bounds_ok.rs
index 2387b891755..98aa82aba83 100644
--- a/src/test/ui/generic-associated-types/impl_bounds_ok.rs
+++ b/src/test/ui/generic-associated-types/impl_bounds_ok.rs
@@ -10,11 +10,12 @@ trait Foo {
     type C where Self: Clone;
 }
 
+#[derive(Clone)]
 struct Fooy;
 
 impl Foo for Fooy {
     type A<'a> = (&'a ());
-    type B<'a, 'b> = (&'a(), &'b ());
+    type B<'a: 'b, 'b> = (&'a(), &'b ());
     type C = String;
 }
 
@@ -24,7 +25,7 @@ struct Fooer<T>(T);
 impl<T> Foo for Fooer<T> {
     type A<'x> where T: 'x = (&'x ());
     type B<'u, 'v> where 'u: 'v = (&'v &'u ());
-    type C where Self: ToOwned = String;
+    type C where Self: Clone + ToOwned = String;
 }
 
 fn main() {}
diff --git a/src/test/ui/generic-associated-types/unsatisfied-outlives-bound.rs b/src/test/ui/generic-associated-types/unsatisfied-outlives-bound.rs
index d957cae3081..99d5bcf2bac 100644
--- a/src/test/ui/generic-associated-types/unsatisfied-outlives-bound.rs
+++ b/src/test/ui/generic-associated-types/unsatisfied-outlives-bound.rs
@@ -7,7 +7,7 @@ trait ATy {
 
 impl<'b> ATy for &'b () {
     type Item<'a> = &'b ();
-    //~^ ERROR lifetime bound not satisfied
+    //~^ ERROR  the type `&'b ()` does not fulfill the required lifetime
 }
 
 trait StaticTy {
@@ -16,7 +16,7 @@ trait StaticTy {
 
 impl StaticTy for () {
     type Item<'a> = &'a ();
-    //~^ ERROR lifetime bound not satisfied
+    //~^ ERROR  the type `&'a ()` does not fulfill the required lifetime
 }
 
 fn main() {}
diff --git a/src/test/ui/generic-associated-types/unsatisfied-outlives-bound.stderr b/src/test/ui/generic-associated-types/unsatisfied-outlives-bound.stderr
index f8b96ef3b8a..5d612284a21 100644
--- a/src/test/ui/generic-associated-types/unsatisfied-outlives-bound.stderr
+++ b/src/test/ui/generic-associated-types/unsatisfied-outlives-bound.stderr
@@ -1,33 +1,23 @@
-error[E0478]: lifetime bound not satisfied
+error[E0477]: the type `&'b ()` does not fulfill the required lifetime
   --> $DIR/unsatisfied-outlives-bound.rs:9:5
    |
 LL |     type Item<'a> = &'b ();
    |     ^^^^^^^^^^^^^^^^^^^^^^^
    |
-note: lifetime parameter instantiated with the lifetime `'b` as defined on the impl at 8:6
-  --> $DIR/unsatisfied-outlives-bound.rs:8:6
-   |
-LL | impl<'b> ATy for &'b () {
-   |      ^^
-note: but lifetime parameter must outlive the lifetime `'a` as defined on the associated item at 9:15
+note: type must outlive the lifetime `'a` as defined on the associated item at 9:15
   --> $DIR/unsatisfied-outlives-bound.rs:9:15
    |
 LL |     type Item<'a> = &'b ();
    |               ^^
 
-error[E0478]: lifetime bound not satisfied
+error[E0477]: the type `&'a ()` does not fulfill the required lifetime
   --> $DIR/unsatisfied-outlives-bound.rs:18:5
    |
 LL |     type Item<'a> = &'a ();
    |     ^^^^^^^^^^^^^^^^^^^^^^^
    |
-note: lifetime parameter instantiated with the lifetime `'a` as defined on the associated item at 18:15
-  --> $DIR/unsatisfied-outlives-bound.rs:18:15
-   |
-LL |     type Item<'a> = &'a ();
-   |               ^^
-   = note: but lifetime parameter must outlive the static lifetime
+   = note: type must satisfy the static lifetime
 
 error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0478`.
+For more information about this error, try `rustc --explain E0477`.
diff --git a/src/test/ui/issues/issue-60283.stderr b/src/test/ui/issues/issue-60283.stderr
index 2922eb87e82..80f118e12c4 100644
--- a/src/test/ui/issues/issue-60283.stderr
+++ b/src/test/ui/issues/issue-60283.stderr
@@ -19,7 +19,7 @@ error[E0277]: the size for values of type `<() as Trait<'_>>::Item` cannot be kn
 LL |     foo((), drop)
    |             ^^^^ doesn't have a size known at compile-time
    | 
-  ::: $SRC_DIR/libcore/mem/mod.rs:LL:COL
+  ::: $SRC_DIR/core/src/mem/mod.rs:LL:COL
    |
 LL | pub fn drop<T>(_x: T) {}
    |             - required by this bound in `std::mem::drop`
diff --git a/src/test/ui/regions/regions-assoc-type-region-bound-in-trait-not-met.rs b/src/test/ui/regions/regions-assoc-type-region-bound-in-trait-not-met.rs
index 0f86e37b7e5..575dfafe15e 100644
--- a/src/test/ui/regions/regions-assoc-type-region-bound-in-trait-not-met.rs
+++ b/src/test/ui/regions/regions-assoc-type-region-bound-in-trait-not-met.rs
@@ -3,7 +3,7 @@
 
 trait Foo<'a> {
     type Value: 'a;
-    fn dummy(&'a self) { }
+    fn dummy(&'a self) {}
 }
 
 impl<'a> Foo<'a> for &'a i16 {
@@ -13,12 +13,12 @@ impl<'a> Foo<'a> for &'a i16 {
 
 impl<'a> Foo<'static> for &'a i32 {
     type Value = &'a i32;
-    //~^ ERROR lifetime bound not satisfied
+    //~^ ERROR the type `&'a i32` does not fulfill the required lifetime
 }
 
-impl<'a,'b> Foo<'b> for &'a i64 {
+impl<'a, 'b> Foo<'b> for &'a i64 {
     type Value = &'a i32;
-    //~^ ERROR lifetime bound not satisfied
+    //~^ ERROR the type `&'a i32` does not fulfill the required lifetime
 }
 
-fn main() { }
+fn main() {}
diff --git a/src/test/ui/regions/regions-assoc-type-region-bound-in-trait-not-met.stderr b/src/test/ui/regions/regions-assoc-type-region-bound-in-trait-not-met.stderr
index feb9c90bc8f..03da33ae11f 100644
--- a/src/test/ui/regions/regions-assoc-type-region-bound-in-trait-not-met.stderr
+++ b/src/test/ui/regions/regions-assoc-type-region-bound-in-trait-not-met.stderr
@@ -1,33 +1,23 @@
-error[E0478]: lifetime bound not satisfied
+error[E0477]: the type `&'a i32` does not fulfill the required lifetime
   --> $DIR/regions-assoc-type-region-bound-in-trait-not-met.rs:15:5
    |
 LL |     type Value = &'a i32;
    |     ^^^^^^^^^^^^^^^^^^^^^
    |
-note: lifetime parameter instantiated with the lifetime `'a` as defined on the impl at 14:6
-  --> $DIR/regions-assoc-type-region-bound-in-trait-not-met.rs:14:6
-   |
-LL | impl<'a> Foo<'static> for &'a i32 {
-   |      ^^
-   = note: but lifetime parameter must outlive the static lifetime
+   = note: type must satisfy the static lifetime
 
-error[E0478]: lifetime bound not satisfied
+error[E0477]: the type `&'a i32` does not fulfill the required lifetime
   --> $DIR/regions-assoc-type-region-bound-in-trait-not-met.rs:20:5
    |
 LL |     type Value = &'a i32;
    |     ^^^^^^^^^^^^^^^^^^^^^
    |
-note: lifetime parameter instantiated with the lifetime `'a` as defined on the impl at 19:6
-  --> $DIR/regions-assoc-type-region-bound-in-trait-not-met.rs:19:6
-   |
-LL | impl<'a,'b> Foo<'b> for &'a i64 {
-   |      ^^
-note: but lifetime parameter must outlive the lifetime `'b` as defined on the impl at 19:9
-  --> $DIR/regions-assoc-type-region-bound-in-trait-not-met.rs:19:9
+note: type must outlive the lifetime `'b` as defined on the impl at 19:10
+  --> $DIR/regions-assoc-type-region-bound-in-trait-not-met.rs:19:10
    |
-LL | impl<'a,'b> Foo<'b> for &'a i64 {
-   |         ^^
+LL | impl<'a, 'b> Foo<'b> for &'a i64 {
+   |          ^^
 
 error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0478`.
+For more information about this error, try `rustc --explain E0477`.
diff --git a/src/test/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.rs b/src/test/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.rs
index 65b54b45a0a..00100e0e9ea 100644
--- a/src/test/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.rs
+++ b/src/test/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.rs
@@ -3,12 +3,12 @@
 
 trait Foo {
     type Value: 'static;
-    fn dummy(&self) { }
+    fn dummy(&self) {}
 }
 
 impl<'a> Foo for &'a i32 {
     type Value = &'a i32;
-    //~^ ERROR lifetime bound not satisfied
+    //~^ ERROR the type `&'a i32` does not fulfill the required lifetime
 }
 
 impl<'a> Foo for i32 {
@@ -16,4 +16,4 @@ impl<'a> Foo for i32 {
     type Value = i32;
 }
 
-fn main() { }
+fn main() {}
diff --git a/src/test/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr b/src/test/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr
index 9b98d14a978..d8efeac5b8a 100644
--- a/src/test/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr
+++ b/src/test/ui/regions/regions-assoc-type-static-bound-in-trait-not-met.stderr
@@ -1,16 +1,11 @@
-error[E0478]: lifetime bound not satisfied
+error[E0477]: the type `&'a i32` does not fulfill the required lifetime
   --> $DIR/regions-assoc-type-static-bound-in-trait-not-met.rs:10:5
    |
 LL |     type Value = &'a i32;
    |     ^^^^^^^^^^^^^^^^^^^^^
    |
-note: lifetime parameter instantiated with the lifetime `'a` as defined on the impl at 9:6
-  --> $DIR/regions-assoc-type-static-bound-in-trait-not-met.rs:9:6
-   |
-LL | impl<'a> Foo for &'a i32 {
-   |      ^^
-   = note: but lifetime parameter must outlive the static lifetime
+   = note: type must satisfy the static lifetime
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0478`.
+For more information about this error, try `rustc --explain E0477`.