about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--compiler/rustc_typeck/src/check/wfcheck.rs18
-rw-r--r--src/test/ui/associated-types/defaults-cyclic-fail-1.stderr8
-rw-r--r--src/test/ui/associated-types/defaults-cyclic-fail-2.stderr8
-rw-r--r--src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr4
-rw-r--r--src/test/ui/generic-associated-types/projection-bound-cycle.stderr4
-rw-r--r--src/test/ui/issues/issue-21946.stderr4
-rw-r--r--src/test/ui/issues/issue-23122-1.stderr4
-rw-r--r--src/test/ui/issues/issue-23122-2.stderr4
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr4
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr4
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr4
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr4
-rw-r--r--src/test/ui/rfc-2093-infer-outlives/regions-struct-not-wf.stderr12
-rw-r--r--src/test/ui/specialization/issue-51892.stderr4
-rw-r--r--src/test/ui/wf/hir-wf-check-erase-regions.stderr4
-rw-r--r--src/test/ui/wf/wf-impl-associated-type-region.stderr4
-rw-r--r--src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.stderr8
-rw-r--r--src/test/ui/wf/wf-trait-associated-type-region.stderr4
18 files changed, 54 insertions, 52 deletions
diff --git a/compiler/rustc_typeck/src/check/wfcheck.rs b/compiler/rustc_typeck/src/check/wfcheck.rs
index e33cc603b5e..b8243709659 100644
--- a/compiler/rustc_typeck/src/check/wfcheck.rs
+++ b/compiler/rustc_typeck/src/check/wfcheck.rs
@@ -194,12 +194,13 @@ pub fn check_trait_item(tcx: TyCtxt<'_>, def_id: LocalDefId) {
     let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
     let trait_item = tcx.hir().expect_trait_item(hir_id);
 
-    let method_sig = match trait_item.kind {
-        hir::TraitItemKind::Fn(ref sig, _) => Some(sig),
-        _ => None,
+    let (method_sig, span) = match trait_item.kind {
+        hir::TraitItemKind::Fn(ref sig, _) => (Some(sig), trait_item.span),
+        hir::TraitItemKind::Type(_bounds, Some(ty)) => (None, ty.span),
+        _ => (None, trait_item.span),
     };
     check_object_unsafe_self_trait_by_name(tcx, &trait_item);
-    check_associated_item(tcx, trait_item.hir_id(), trait_item.span, method_sig);
+    check_associated_item(tcx, trait_item.hir_id(), span, method_sig);
 }
 
 fn could_be_self(trait_def_id: LocalDefId, ty: &hir::Ty<'_>) -> bool {
@@ -268,12 +269,13 @@ pub fn check_impl_item(tcx: TyCtxt<'_>, def_id: LocalDefId) {
     let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
     let impl_item = tcx.hir().expect_impl_item(hir_id);
 
-    let method_sig = match impl_item.kind {
-        hir::ImplItemKind::Fn(ref sig, _) => Some(sig),
-        _ => None,
+    let (method_sig, span) = match impl_item.kind {
+        hir::ImplItemKind::Fn(ref sig, _) => (Some(sig), impl_item.span),
+        hir::ImplItemKind::TyAlias(ty) => (None, ty.span),
+        _ => (None, impl_item.span),
     };
 
-    check_associated_item(tcx, impl_item.hir_id(), impl_item.span, method_sig);
+    check_associated_item(tcx, impl_item.hir_id(), span, method_sig);
 }
 
 fn check_param_wf(tcx: TyCtxt<'_>, param: &hir::GenericParam<'_>) {
diff --git a/src/test/ui/associated-types/defaults-cyclic-fail-1.stderr b/src/test/ui/associated-types/defaults-cyclic-fail-1.stderr
index 5e98520b411..008eddcb29d 100644
--- a/src/test/ui/associated-types/defaults-cyclic-fail-1.stderr
+++ b/src/test/ui/associated-types/defaults-cyclic-fail-1.stderr
@@ -1,14 +1,14 @@
 error[E0275]: overflow evaluating the requirement `<bool as Tr>::B == _`
-  --> $DIR/defaults-cyclic-fail-1.rs:26:5
+  --> $DIR/defaults-cyclic-fail-1.rs:26:14
    |
 LL |     type A = Box<Self::B>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |              ^^^^^^^^^^^^
 
 error[E0275]: overflow evaluating the requirement `<usize as Tr>::A == _`
-  --> $DIR/defaults-cyclic-fail-1.rs:32:5
+  --> $DIR/defaults-cyclic-fail-1.rs:32:14
    |
 LL |     type B = &'static Self::A;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |              ^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/associated-types/defaults-cyclic-fail-2.stderr b/src/test/ui/associated-types/defaults-cyclic-fail-2.stderr
index c538805f858..d0fbab07715 100644
--- a/src/test/ui/associated-types/defaults-cyclic-fail-2.stderr
+++ b/src/test/ui/associated-types/defaults-cyclic-fail-2.stderr
@@ -1,14 +1,14 @@
 error[E0275]: overflow evaluating the requirement `<bool as Tr>::B == _`
-  --> $DIR/defaults-cyclic-fail-2.rs:27:5
+  --> $DIR/defaults-cyclic-fail-2.rs:27:14
    |
 LL |     type A = Box<Self::B>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |              ^^^^^^^^^^^^
 
 error[E0275]: overflow evaluating the requirement `<usize as Tr>::A == _`
-  --> $DIR/defaults-cyclic-fail-2.rs:33:5
+  --> $DIR/defaults-cyclic-fail-2.rs:33:14
    |
 LL |     type B = &'static Self::A;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |              ^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr b/src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr
index d5e9caf9ecd..345e2b3fcb1 100644
--- a/src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr
+++ b/src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr
@@ -1,11 +1,11 @@
 error[E0275]: overflow evaluating the requirement `<T as Foo>::Item: Sized`
-  --> $DIR/projection-bound-cycle-generic.rs:44:5
+  --> $DIR/projection-bound-cycle-generic.rs:44:18
    |
 LL | struct OnlySized<T> where T: Sized { f: T }
    |                  - required by this bound in `OnlySized`
 ...
 LL |     type Assoc = OnlySized<<T as Foo>::Item>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/generic-associated-types/projection-bound-cycle.stderr b/src/test/ui/generic-associated-types/projection-bound-cycle.stderr
index fac62fef1ec..eefc09fa788 100644
--- a/src/test/ui/generic-associated-types/projection-bound-cycle.stderr
+++ b/src/test/ui/generic-associated-types/projection-bound-cycle.stderr
@@ -1,11 +1,11 @@
 error[E0275]: overflow evaluating the requirement `<T as Foo>::Item: Sized`
-  --> $DIR/projection-bound-cycle.rs:46:5
+  --> $DIR/projection-bound-cycle.rs:46:18
    |
 LL | struct OnlySized<T> where T: Sized { f: T }
    |                  - required by this bound in `OnlySized`
 ...
 LL |     type Assoc = OnlySized<<T as Foo>::Item>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-21946.stderr b/src/test/ui/issues/issue-21946.stderr
index 0497bd20469..67f6b3081bb 100644
--- a/src/test/ui/issues/issue-21946.stderr
+++ b/src/test/ui/issues/issue-21946.stderr
@@ -1,8 +1,8 @@
 error[E0275]: overflow evaluating the requirement `<FooStruct as Foo>::A == _`
-  --> $DIR/issue-21946.rs:8:5
+  --> $DIR/issue-21946.rs:8:14
    |
 LL |     type A = <FooStruct as Foo>::A;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |              ^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-23122-1.stderr b/src/test/ui/issues/issue-23122-1.stderr
index 8613c1ef8c2..0b568b30e08 100644
--- a/src/test/ui/issues/issue-23122-1.stderr
+++ b/src/test/ui/issues/issue-23122-1.stderr
@@ -1,8 +1,8 @@
 error[E0275]: overflow evaluating the requirement `<GetNext<T> as Next>::Next == _`
-  --> $DIR/issue-23122-1.rs:10:5
+  --> $DIR/issue-23122-1.rs:10:17
    |
 LL |     type Next = <GetNext<T> as Next>::Next;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-23122-2.stderr b/src/test/ui/issues/issue-23122-2.stderr
index 5008a499986..68a95dc265e 100644
--- a/src/test/ui/issues/issue-23122-2.stderr
+++ b/src/test/ui/issues/issue-23122-2.stderr
@@ -1,8 +1,8 @@
 error[E0275]: overflow evaluating the requirement `<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: Sized`
-  --> $DIR/issue-23122-2.rs:9:5
+  --> $DIR/issue-23122-2.rs:9:17
    |
 LL |     type Next = <GetNext<T::Next> as Next>::Next;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`issue_23122_2`)
 note: required because of the requirements on the impl of `Next` for `GetNext<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<T as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next>`
diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr
index dfa44008ad7..09b51fe0568 100644
--- a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region-rev.stderr
@@ -1,8 +1,8 @@
 error[E0491]: in type `&'a Foo<'b>`, reference has a longer lifetime than the data it references
-  --> $DIR/regions-outlives-nominal-type-region-rev.rs:17:9
+  --> $DIR/regions-outlives-nominal-type-region-rev.rs:17:20
    |
 LL |         type Out = &'a Foo<'b>;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^
+   |                    ^^^^^^^^^^^
    |
 note: the pointer is valid for the lifetime `'a` as defined on the impl at 16:10
   --> $DIR/regions-outlives-nominal-type-region-rev.rs:16:10
diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr
index 3561379138b..957a9d6dd3c 100644
--- a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-region.stderr
@@ -1,8 +1,8 @@
 error[E0491]: in type `&'a Foo<'b>`, reference has a longer lifetime than the data it references
-  --> $DIR/regions-outlives-nominal-type-region.rs:17:9
+  --> $DIR/regions-outlives-nominal-type-region.rs:17:20
    |
 LL |         type Out = &'a Foo<'b>;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^
+   |                    ^^^^^^^^^^^
    |
 note: the pointer is valid for the lifetime `'a` as defined on the impl at 16:10
   --> $DIR/regions-outlives-nominal-type-region.rs:16:10
diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr
index 207686defa1..1589f93d90c 100644
--- a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type-rev.stderr
@@ -1,8 +1,8 @@
 error[E0491]: in type `&'a Foo<&'b i32>`, reference has a longer lifetime than the data it references
-  --> $DIR/regions-outlives-nominal-type-type-rev.rs:17:9
+  --> $DIR/regions-outlives-nominal-type-type-rev.rs:17:20
    |
 LL |         type Out = &'a Foo<&'b i32>;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                    ^^^^^^^^^^^^^^^^
    |
 note: the pointer is valid for the lifetime `'a` as defined on the impl at 16:10
   --> $DIR/regions-outlives-nominal-type-type-rev.rs:16:10
diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr
index c1c4e78f785..4bfaa1aac78 100644
--- a/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr
@@ -1,8 +1,8 @@
 error[E0491]: in type `&'a Foo<&'b i32>`, reference has a longer lifetime than the data it references
-  --> $DIR/regions-outlives-nominal-type-type.rs:17:9
+  --> $DIR/regions-outlives-nominal-type-type.rs:17:20
    |
 LL |         type Out = &'a Foo<&'b i32>;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                    ^^^^^^^^^^^^^^^^
    |
 note: the pointer is valid for the lifetime `'a` as defined on the impl at 16:10
   --> $DIR/regions-outlives-nominal-type-type.rs:16:10
diff --git a/src/test/ui/rfc-2093-infer-outlives/regions-struct-not-wf.stderr b/src/test/ui/rfc-2093-infer-outlives/regions-struct-not-wf.stderr
index 71caeefabac..1b1a2f7b043 100644
--- a/src/test/ui/rfc-2093-infer-outlives/regions-struct-not-wf.stderr
+++ b/src/test/ui/rfc-2093-infer-outlives/regions-struct-not-wf.stderr
@@ -1,18 +1,18 @@
 error[E0309]: the parameter type `T` may not live long enough
-  --> $DIR/regions-struct-not-wf.rs:13:5
+  --> $DIR/regions-struct-not-wf.rs:13:16
    |
 LL | impl<'a, T> Trait<'a, T> for usize {
    |          - help: consider adding an explicit lifetime bound...: `T: 'a`
 LL |     type Out = &'a T;
-   |     ^^^^^^^^^^^^^^^^^ ...so that the reference type `&'a T` does not outlive the data it points at
+   |                ^^^^^ ...so that the reference type `&'a T` does not outlive the data it points at
 
 error[E0309]: the parameter type `T` may not live long enough
-  --> $DIR/regions-struct-not-wf.rs:21:5
+  --> $DIR/regions-struct-not-wf.rs:21:16
    |
 LL | impl<'a, T> Trait<'a, T> for u32 {
    |          - help: consider adding an explicit lifetime bound...: `T: 'a`
 LL |     type Out = RefOk<'a, T>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds...
+   |                ^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds...
    |
 note: ...that is required by this bound
   --> $DIR/regions-struct-not-wf.rs:16:20
@@ -21,10 +21,10 @@ LL | struct RefOk<'a, T:'a> {
    |                    ^^
 
 error[E0491]: in type `&'a &'b T`, reference has a longer lifetime than the data it references
-  --> $DIR/regions-struct-not-wf.rs:25:5
+  --> $DIR/regions-struct-not-wf.rs:25:16
    |
 LL |     type Out = &'a &'b T;
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |                ^^^^^^^^^
    |
 note: the pointer is valid for the lifetime `'a` as defined on the impl at 24:6
   --> $DIR/regions-struct-not-wf.rs:24:6
diff --git a/src/test/ui/specialization/issue-51892.stderr b/src/test/ui/specialization/issue-51892.stderr
index 2d30164380a..10a39a49147 100644
--- a/src/test/ui/specialization/issue-51892.stderr
+++ b/src/test/ui/specialization/issue-51892.stderr
@@ -1,8 +1,8 @@
 error: unconstrained generic constant
-  --> $DIR/issue-51892.rs:15:5
+  --> $DIR/issue-51892.rs:15:17
    |
 LL |     type Type = [u8; std::mem::size_of::<<T as Trait>::Type>()];
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: try adding a `where` bound using this expression: `where [(); std::mem::size_of::<<T as Trait>::Type>()]:`
 
diff --git a/src/test/ui/wf/hir-wf-check-erase-regions.stderr b/src/test/ui/wf/hir-wf-check-erase-regions.stderr
index a704754e82a..272a87535d2 100644
--- a/src/test/ui/wf/hir-wf-check-erase-regions.stderr
+++ b/src/test/ui/wf/hir-wf-check-erase-regions.stderr
@@ -1,8 +1,8 @@
 error[E0277]: `&T` is not an iterator
-  --> $DIR/hir-wf-check-erase-regions.rs:7:5
+  --> $DIR/hir-wf-check-erase-regions.rs:7:21
    |
 LL |     type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&T` is not an iterator
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&T` is not an iterator
    |
   ::: $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
    |
diff --git a/src/test/ui/wf/wf-impl-associated-type-region.stderr b/src/test/ui/wf/wf-impl-associated-type-region.stderr
index f3b32ad3f7e..3f324190b7b 100644
--- a/src/test/ui/wf/wf-impl-associated-type-region.stderr
+++ b/src/test/ui/wf/wf-impl-associated-type-region.stderr
@@ -1,10 +1,10 @@
 error[E0309]: the parameter type `T` may not live long enough
-  --> $DIR/wf-impl-associated-type-region.rs:10:5
+  --> $DIR/wf-impl-associated-type-region.rs:10:16
    |
 LL | impl<'a, T> Foo<'a> for T {
    |          - help: consider adding an explicit lifetime bound...: `T: 'a`
 LL |     type Bar = &'a T;
-   |     ^^^^^^^^^^^^^^^^^ ...so that the reference type `&'a T` does not outlive the data it points at
+   |                ^^^^^ ...so that the reference type `&'a T` does not outlive the data it points at
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.stderr b/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.stderr
index 4c25ab95939..68c1e9091d7 100644
--- a/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.stderr
+++ b/src/test/ui/wf/wf-outlives-ty-in-fn-or-trait.stderr
@@ -1,18 +1,18 @@
 error[E0309]: the parameter type `T` may not live long enough
-  --> $DIR/wf-outlives-ty-in-fn-or-trait.rs:9:5
+  --> $DIR/wf-outlives-ty-in-fn-or-trait.rs:9:16
    |
 LL | impl<'a, T> Trait<'a, T> for usize {
    |          - help: consider adding an explicit lifetime bound...: `T: 'a`
 LL |     type Out = &'a fn(T);
-   |     ^^^^^^^^^^^^^^^^^^^^^ ...so that the reference type `&'a fn(T)` does not outlive the data it points at
+   |                ^^^^^^^^^ ...so that the reference type `&'a fn(T)` does not outlive the data it points at
 
 error[E0309]: the parameter type `T` may not live long enough
-  --> $DIR/wf-outlives-ty-in-fn-or-trait.rs:19:5
+  --> $DIR/wf-outlives-ty-in-fn-or-trait.rs:19:16
    |
 LL | impl<'a, T> Trait<'a, T> for u32 {
    |          - help: consider adding an explicit lifetime bound...: `T: 'a`
 LL |     type Out = &'a dyn Baz<T>;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the reference type `&'a (dyn Baz<T> + 'a)` does not outlive the data it points at
+   |                ^^^^^^^^^^^^^^ ...so that the reference type `&'a (dyn Baz<T> + 'a)` does not outlive the data it points at
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/wf/wf-trait-associated-type-region.stderr b/src/test/ui/wf/wf-trait-associated-type-region.stderr
index ae681ba6c9b..6e2cc8aba4b 100644
--- a/src/test/ui/wf/wf-trait-associated-type-region.stderr
+++ b/src/test/ui/wf/wf-trait-associated-type-region.stderr
@@ -1,8 +1,8 @@
 error[E0309]: the associated type `<Self as SomeTrait<'a>>::Type1` may not live long enough
-  --> $DIR/wf-trait-associated-type-region.rs:9:5
+  --> $DIR/wf-trait-associated-type-region.rs:9:18
    |
 LL |     type Type2 = &'a Self::Type1;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                  ^^^^^^^^^^^^^^^
    |
    = help: consider adding an explicit lifetime bound `<Self as SomeTrait<'a>>::Type1: 'a`...
    = note: ...so that the reference type `&'a <Self as SomeTrait<'a>>::Type1` does not outlive the data it points at