about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-18 06:11:35 +0000
committerbors <bors@rust-lang.org>2024-07-18 06:11:35 +0000
commit52f3c71c8dc4aaed71e3035995fcbdd6d78c98c6 (patch)
tree29470eed894270e4f81716b839c190806fdf0099 /tests
parent4bb2f278617e5498ac9a4776d3e1268154c500c5 (diff)
parent77e5bbf3412a6e5d4defb3445c729dc457cd1fc0 (diff)
downloadrust-52f3c71c8dc4aaed71e3035995fcbdd6d78c98c6.tar.gz
rust-52f3c71c8dc4aaed71e3035995fcbdd6d78c98c6.zip
Auto merge of #127898 - matthiaskrgr:rollup-lkkpoui, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #127077 (Make language around `ToOwned` for `BorrowedFd` more precise)
 - #127783 (Put the dots back in RTN pretty printing)
 - #127787 (Migrate `atomic-lock-free` to `rmake`)
 - #127810 (Rename `tcx` to `cx` in `rustc_type_ir`)
 - #127878 (Fix associated item removal suggestion)
 - #127886 (Accurate `use` rename suggestion span)
 - #127888 (More accurate span for type parameter suggestion)
 - #127889 (More accurate span for anonymous argument suggestion)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests')
-rw-r--r--tests/run-make/atomic-lock-free/Makefile48
-rw-r--r--tests/run-make/atomic-lock-free/rmake.rs52
-rw-r--r--tests/rustdoc-ui/ice-unresolved-import-100241.stderr11
-rw-r--r--tests/rustdoc-ui/invalid_associated_const.stderr10
-rw-r--r--tests/rustdoc-ui/issue-102467.stderr10
-rw-r--r--tests/ui/anon-params/anon-params-denied-2018.stderr8
-rw-r--r--tests/ui/associated-consts/issue-102335-const.stderr10
-rw-r--r--tests/ui/associated-type-bounds/issue-102335-ty.stderr20
-rw-r--r--tests/ui/associated-type-bounds/no-gat-position.stderr5
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr4
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/display.rs25
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/display.stderr78
-rw-r--r--tests/ui/associated-types/associated-types-eq-2.stderr40
-rw-r--r--tests/ui/async-await/return-type-notation/issue-110963-early.stderr8
-rw-r--r--tests/ui/async-await/return-type-notation/rtn-in-impl-signature.stderr5
-rw-r--r--tests/ui/blind/blind-item-block-item-shadow.stderr2
-rw-r--r--tests/ui/blind/blind-item-item-shadow.stderr2
-rw-r--r--tests/ui/duplicate/duplicate-check-macro-exports.stderr2
-rw-r--r--tests/ui/error-codes/E0229.stderr15
-rw-r--r--tests/ui/error-codes/E0252.stderr2
-rw-r--r--tests/ui/error-codes/E0254.stderr2
-rw-r--r--tests/ui/error-codes/E0255.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-102335-gat.stderr10
-rw-r--r--tests/ui/generics/impl-block-params-declared-in-wrong-spot-issue-113073.stderr30
-rw-r--r--tests/ui/imports/double-import.stderr2
-rw-r--r--tests/ui/imports/issue-19498.stderr6
-rw-r--r--tests/ui/imports/issue-24081.stderr10
-rw-r--r--tests/ui/imports/issue-25396.stderr8
-rw-r--r--tests/ui/imports/issue-32354-suggest-import-rename.stderr2
-rw-r--r--tests/ui/imports/issue-45829/import-self.stderr2
-rw-r--r--tests/ui/imports/issue-45829/issue-45829.stderr2
-rw-r--r--tests/ui/imports/issue-45829/rename-use-vs-extern.stderr2
-rw-r--r--tests/ui/imports/issue-45829/rename-use-with-tabs.stderr2
-rw-r--r--tests/ui/imports/issue-45829/rename-with-path.stderr2
-rw-r--r--tests/ui/imports/issue-45829/rename.stderr2
-rw-r--r--tests/ui/imports/issue-52891.stderr2
-rw-r--r--tests/ui/imports/issue-8640.stderr2
-rw-r--r--tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr5
-rw-r--r--tests/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr2
-rw-r--r--tests/ui/resolve/resolve-conflict-item-vs-import.stderr2
-rw-r--r--tests/ui/resolve/resolve-conflict-type-vs-import.stderr2
-rw-r--r--tests/ui/suggestions/issue-85347.stderr10
-rw-r--r--tests/ui/variants/variant-namespacing.stderr12
43 files changed, 315 insertions, 163 deletions
diff --git a/tests/run-make/atomic-lock-free/Makefile b/tests/run-make/atomic-lock-free/Makefile
deleted file mode 100644
index 37e59624a25..00000000000
--- a/tests/run-make/atomic-lock-free/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-include ../tools.mk
-
-# This tests ensure that atomic types are never lowered into runtime library calls that are not
-# guaranteed to be lock-free.
-
-all:
-ifeq ($(UNAME),Linux)
-ifeq ($(filter x86,$(LLVM_COMPONENTS)),x86)
-	$(RUSTC) --target=i686-unknown-linux-gnu atomic_lock_free.rs
-	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
-	$(RUSTC) --target=x86_64-unknown-linux-gnu atomic_lock_free.rs
-	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
-endif
-ifeq ($(filter arm,$(LLVM_COMPONENTS)),arm)
-	$(RUSTC) --target=arm-unknown-linux-gnueabi atomic_lock_free.rs
-	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
-	$(RUSTC) --target=arm-unknown-linux-gnueabihf atomic_lock_free.rs
-	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
-	$(RUSTC) --target=armv7-unknown-linux-gnueabihf atomic_lock_free.rs
-	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
-	$(RUSTC) --target=thumbv7neon-unknown-linux-gnueabihf atomic_lock_free.rs
-	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
-endif
-ifeq ($(filter aarch64,$(LLVM_COMPONENTS)),aarch64)
-	$(RUSTC) --target=aarch64-unknown-linux-gnu atomic_lock_free.rs
-	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
-endif
-ifeq ($(filter mips,$(LLVM_COMPONENTS)),mips)
-	$(RUSTC) --target=mips-unknown-linux-gnu atomic_lock_free.rs
-	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
-	$(RUSTC) --target=mipsel-unknown-linux-gnu atomic_lock_free.rs
-	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
-endif
-ifeq ($(filter powerpc,$(LLVM_COMPONENTS)),powerpc)
-	$(RUSTC) --target=powerpc-unknown-linux-gnu atomic_lock_free.rs
-	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
-	$(RUSTC) --target=powerpc-unknown-linux-gnuspe atomic_lock_free.rs
-	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
-	$(RUSTC) --target=powerpc64-unknown-linux-gnu atomic_lock_free.rs
-	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
-	$(RUSTC) --target=powerpc64le-unknown-linux-gnu atomic_lock_free.rs
-	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
-endif
-ifeq ($(filter systemz,$(LLVM_COMPONENTS)),systemz)
-	$(RUSTC) --target=s390x-unknown-linux-gnu atomic_lock_free.rs
-	nm "$(TMPDIR)/libatomic_lock_free.rlib" | $(CGREP) -v __atomic_fetch_add
-endif
-endif
diff --git a/tests/run-make/atomic-lock-free/rmake.rs b/tests/run-make/atomic-lock-free/rmake.rs
new file mode 100644
index 00000000000..77e136e8487
--- /dev/null
+++ b/tests/run-make/atomic-lock-free/rmake.rs
@@ -0,0 +1,52 @@
+// This tests ensure that atomic types are never lowered into runtime library calls that are not
+// guaranteed to be lock-free.
+
+//@ only-linux
+
+use run_make_support::{llvm_components_contain, llvm_readobj, rustc};
+
+fn compile(target: &str) {
+    rustc().input("atomic_lock_free.rs").target(target).run();
+}
+
+fn check() {
+    llvm_readobj()
+        .symbols()
+        .input("libatomic_lock_free.rlib")
+        .run()
+        .assert_stdout_not_contains("__atomic_fetch_add");
+}
+
+fn compile_and_check(target: &str) {
+    compile(target);
+    check();
+}
+
+fn main() {
+    if llvm_components_contain("x86") {
+        compile_and_check("i686-unknown-linux-gnu");
+        compile_and_check("x86_64-unknown-linux-gnu");
+    }
+    if llvm_components_contain("arm") {
+        compile_and_check("arm-unknown-linux-gnueabi");
+        compile_and_check("arm-unknown-linux-gnueabihf");
+        compile_and_check("armv7-unknown-linux-gnueabihf");
+        compile_and_check("thumbv7neon-unknown-linux-gnueabihf");
+    }
+    if llvm_components_contain("aarch64") {
+        compile_and_check("aarch64-unknown-linux-gnu");
+    }
+    if llvm_components_contain("mips") {
+        compile_and_check("mips-unknown-linux-gnu");
+        compile_and_check("mipsel-unknown-linux-gnu");
+    }
+    if llvm_components_contain("powerpc") {
+        compile_and_check("powerpc-unknown-linux-gnu");
+        compile_and_check("powerpc-unknown-linux-gnuspe");
+        compile_and_check("powerpc64-unknown-linux-gnu");
+        compile_and_check("powerpc64le-unknown-linux-gnu");
+    }
+    if llvm_components_contain("systemz") {
+        compile_and_check("s390x-unknown-linux-gnu");
+    }
+}
diff --git a/tests/rustdoc-ui/ice-unresolved-import-100241.stderr b/tests/rustdoc-ui/ice-unresolved-import-100241.stderr
new file mode 100644
index 00000000000..57fbbb59c8d
--- /dev/null
+++ b/tests/rustdoc-ui/ice-unresolved-import-100241.stderr
@@ -0,0 +1,11 @@
+error[E0432]: unresolved import `inner`
+  --> $DIR/ice-unresolved-import-100241.rs:9:13
+   |
+LL |     pub use inner::S;
+   |             ^^^^^ maybe a missing crate `inner`?
+   |
+   = help: consider adding `extern crate inner` to use the `inner` crate
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/rustdoc-ui/invalid_associated_const.stderr b/tests/rustdoc-ui/invalid_associated_const.stderr
index 6e5ddc44982..66f8ffe6d72 100644
--- a/tests/rustdoc-ui/invalid_associated_const.stderr
+++ b/tests/rustdoc-ui/invalid_associated_const.stderr
@@ -6,8 +6,9 @@ LL |     type A: S<C<X = 0i32> = 34>;
    |
 help: consider removing this associated item binding
    |
-LL |     type A: S<C<X = 0i32> = 34>;
-   |                ~~~~~~~~~~
+LL -     type A: S<C<X = 0i32> = 34>;
+LL +     type A: S<C = 34>;
+   |
 
 error[E0229]: associated item constraints are not allowed here
   --> $DIR/invalid_associated_const.rs:4:17
@@ -18,8 +19,9 @@ LL |     type A: S<C<X = 0i32> = 34>;
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: consider removing this associated item binding
    |
-LL |     type A: S<C<X = 0i32> = 34>;
-   |                ~~~~~~~~~~
+LL -     type A: S<C<X = 0i32> = 34>;
+LL +     type A: S<C = 34>;
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/rustdoc-ui/issue-102467.stderr b/tests/rustdoc-ui/issue-102467.stderr
index 99f91102319..5fcdba782e7 100644
--- a/tests/rustdoc-ui/issue-102467.stderr
+++ b/tests/rustdoc-ui/issue-102467.stderr
@@ -6,8 +6,9 @@ LL |     type A: S<C<X = 0i32> = 34>;
    |
 help: consider removing this associated item binding
    |
-LL |     type A: S<C<X = 0i32> = 34>;
-   |                ~~~~~~~~~~
+LL -     type A: S<C<X = 0i32> = 34>;
+LL +     type A: S<C = 34>;
+   |
 
 error[E0229]: associated item constraints are not allowed here
   --> $DIR/issue-102467.rs:7:17
@@ -18,8 +19,9 @@ LL |     type A: S<C<X = 0i32> = 34>;
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: consider removing this associated item binding
    |
-LL |     type A: S<C<X = 0i32> = 34>;
-   |                ~~~~~~~~~~
+LL -     type A: S<C<X = 0i32> = 34>;
+LL +     type A: S<C = 34>;
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/anon-params/anon-params-denied-2018.stderr b/tests/ui/anon-params/anon-params-denied-2018.stderr
index bb60c898e81..2d6356ffcb1 100644
--- a/tests/ui/anon-params/anon-params-denied-2018.stderr
+++ b/tests/ui/anon-params/anon-params-denied-2018.stderr
@@ -48,7 +48,7 @@ LL |     fn foo_with_qualified_path(<Bar as T>::Baz);
 help: explicitly ignore the parameter name
    |
 LL |     fn foo_with_qualified_path(_: <Bar as T>::Baz);
-   |                                ~~~~~~~~~~~~~~~~~~
+   |                                ++
 
 error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`
   --> $DIR/anon-params-denied-2018.rs:15:56
@@ -60,7 +60,7 @@ LL |     fn foo_with_qualified_path_and_ref(&<Bar as T>::Baz);
 help: explicitly ignore the parameter name
    |
 LL |     fn foo_with_qualified_path_and_ref(_: &<Bar as T>::Baz);
-   |                                        ~~~~~~~~~~~~~~~~~~~
+   |                                        ++
 
 error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `,`
   --> $DIR/anon-params-denied-2018.rs:18:57
@@ -72,7 +72,7 @@ LL |     fn foo_with_multiple_qualified_paths(<Bar as T>::Baz, <Bar as T>::Baz);
 help: explicitly ignore the parameter name
    |
 LL |     fn foo_with_multiple_qualified_paths(_: <Bar as T>::Baz, <Bar as T>::Baz);
-   |                                          ~~~~~~~~~~~~~~~~~~
+   |                                          ++
 
 error: expected one of `(`, `...`, `..=`, `..`, `::`, `:`, `{`, or `|`, found `)`
   --> $DIR/anon-params-denied-2018.rs:18:74
@@ -84,7 +84,7 @@ LL |     fn foo_with_multiple_qualified_paths(<Bar as T>::Baz, <Bar as T>::Baz);
 help: explicitly ignore the parameter name
    |
 LL |     fn foo_with_multiple_qualified_paths(<Bar as T>::Baz, _: <Bar as T>::Baz);
-   |                                                           ~~~~~~~~~~~~~~~~~~
+   |                                                           ++
 
 error: expected one of `:`, `@`, or `|`, found `,`
   --> $DIR/anon-params-denied-2018.rs:22:36
diff --git a/tests/ui/associated-consts/issue-102335-const.stderr b/tests/ui/associated-consts/issue-102335-const.stderr
index dc1631220e2..cf96c8cf8eb 100644
--- a/tests/ui/associated-consts/issue-102335-const.stderr
+++ b/tests/ui/associated-consts/issue-102335-const.stderr
@@ -6,8 +6,9 @@ LL |     type A: S<C<X = 0i32> = 34>;
    |
 help: consider removing this associated item binding
    |
-LL |     type A: S<C<X = 0i32> = 34>;
-   |                ~~~~~~~~~~
+LL -     type A: S<C<X = 0i32> = 34>;
+LL +     type A: S<C = 34>;
+   |
 
 error[E0229]: associated item constraints are not allowed here
   --> $DIR/issue-102335-const.rs:4:17
@@ -18,8 +19,9 @@ LL |     type A: S<C<X = 0i32> = 34>;
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: consider removing this associated item binding
    |
-LL |     type A: S<C<X = 0i32> = 34>;
-   |                ~~~~~~~~~~
+LL -     type A: S<C<X = 0i32> = 34>;
+LL +     type A: S<C = 34>;
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/associated-type-bounds/issue-102335-ty.stderr b/tests/ui/associated-type-bounds/issue-102335-ty.stderr
index cd585f7f7d8..259b0ca00e1 100644
--- a/tests/ui/associated-type-bounds/issue-102335-ty.stderr
+++ b/tests/ui/associated-type-bounds/issue-102335-ty.stderr
@@ -6,8 +6,9 @@ LL |     type A: S<C<i32 = u32> = ()>; // Just one erroneous equality constraint
    |
 help: consider removing this associated item binding
    |
-LL |     type A: S<C<i32 = u32> = ()>; // Just one erroneous equality constraint
-   |                ~~~~~~~~~~~
+LL -     type A: S<C<i32 = u32> = ()>; // Just one erroneous equality constraint
+LL +     type A: S<C = ()>; // Just one erroneous equality constraint
+   |
 
 error[E0229]: associated item constraints are not allowed here
   --> $DIR/issue-102335-ty.rs:2:17
@@ -18,8 +19,9 @@ LL |     type A: S<C<i32 = u32> = ()>; // Just one erroneous equality constraint
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: consider removing this associated item binding
    |
-LL |     type A: S<C<i32 = u32> = ()>; // Just one erroneous equality constraint
-   |                ~~~~~~~~~~~
+LL -     type A: S<C<i32 = u32> = ()>; // Just one erroneous equality constraint
+LL +     type A: S<C = ()>; // Just one erroneous equality constraint
+   |
 
 error[E0229]: associated item constraints are not allowed here
   --> $DIR/issue-102335-ty.rs:8:17
@@ -29,8 +31,9 @@ LL |     type A: S<C<i32 = u32, X = i32> = ()>; // More than one erroneous equal
    |
 help: consider removing this associated item binding
    |
-LL |     type A: S<C<i32 = u32, X = i32> = ()>; // More than one erroneous equality constraints
-   |                 ~~~~~~~~~~
+LL -     type A: S<C<i32 = u32, X = i32> = ()>; // More than one erroneous equality constraints
+LL +     type A: S<C<X = i32> = ()>; // More than one erroneous equality constraints
+   |
 
 error[E0229]: associated item constraints are not allowed here
   --> $DIR/issue-102335-ty.rs:8:17
@@ -41,8 +44,9 @@ LL |     type A: S<C<i32 = u32, X = i32> = ()>; // More than one erroneous equal
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: consider removing this associated item binding
    |
-LL |     type A: S<C<i32 = u32, X = i32> = ()>; // More than one erroneous equality constraints
-   |                 ~~~~~~~~~~
+LL -     type A: S<C<i32 = u32, X = i32> = ()>; // More than one erroneous equality constraints
+LL +     type A: S<C<X = i32> = ()>; // More than one erroneous equality constraints
+   |
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/associated-type-bounds/no-gat-position.stderr b/tests/ui/associated-type-bounds/no-gat-position.stderr
index 39a2f89f9ac..03dc752c533 100644
--- a/tests/ui/associated-type-bounds/no-gat-position.stderr
+++ b/tests/ui/associated-type-bounds/no-gat-position.stderr
@@ -6,8 +6,9 @@ LL |     fn next<'a>(&'a mut self) -> Option<Self::Item<'a, As1: Copy>>;
    |
 help: consider removing this associated item constraint
    |
-LL |     fn next<'a>(&'a mut self) -> Option<Self::Item<'a, As1: Copy>>;
-   |                                                      ~~~~~~~~~~~
+LL -     fn next<'a>(&'a mut self) -> Option<Self::Item<'a, As1: Copy>>;
+LL +     fn next<'a>(&'a mut self) -> Option<Self::Item<'a>>;
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
index dde7036231e..e9fd8503296 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
@@ -13,12 +13,12 @@ error: future cannot be sent between threads safely
 LL |     is_send(foo::<T>());
    |             ^^^^^^^^^^ future returned by `foo` is not `Send`
    |
-   = help: within `impl Future<Output = Result<(), ()>>`, the trait `Send` is not implemented for `impl Future<Output = Result<(), ()>> { <T as Foo>::method() }`, which is required by `impl Future<Output = Result<(), ()>>: Send`
+   = help: within `impl Future<Output = Result<(), ()>>`, the trait `Send` is not implemented for `impl Future<Output = Result<(), ()>> { <T as Foo>::method(..) }`, which is required by `impl Future<Output = Result<(), ()>>: Send`
 note: future is not `Send` as it awaits another future which is not `Send`
   --> $DIR/basic.rs:13:5
    |
 LL |     T::method().await?;
-   |     ^^^^^^^^^^^ await occurs here on type `impl Future<Output = Result<(), ()>> { <T as Foo>::method() }`, which is not `Send`
+   |     ^^^^^^^^^^^ await occurs here on type `impl Future<Output = Result<(), ()>> { <T as Foo>::method(..) }`, which is not `Send`
 note: required by a bound in `is_send`
   --> $DIR/basic.rs:17:20
    |
diff --git a/tests/ui/associated-type-bounds/return-type-notation/display.rs b/tests/ui/associated-type-bounds/return-type-notation/display.rs
new file mode 100644
index 00000000000..c5be2ca00ea
--- /dev/null
+++ b/tests/ui/associated-type-bounds/return-type-notation/display.rs
@@ -0,0 +1,25 @@
+#![feature(return_type_notation)]
+//~^ WARN the feature `return_type_notation` is incomplete
+
+trait Trait {}
+fn needs_trait(_: impl Trait) {}
+
+trait Assoc {
+    fn method() -> impl Sized;
+    fn method_with_lt() -> impl Sized;
+    fn method_with_ty<T>() -> impl Sized;
+    fn method_with_ct<const N: usize>() -> impl Sized;
+}
+
+fn foo<T: Assoc>(t: T) {
+    needs_trait(T::method());
+    //~^ ERROR the trait bound
+    needs_trait(T::method_with_lt());
+    //~^ ERROR the trait bound
+    needs_trait(T::method_with_ty());
+    //~^ ERROR the trait bound
+    needs_trait(T::method_with_ct());
+    //~^ ERROR the trait bound
+}
+
+fn main() {}
diff --git a/tests/ui/associated-type-bounds/return-type-notation/display.stderr b/tests/ui/associated-type-bounds/return-type-notation/display.stderr
new file mode 100644
index 00000000000..4915ec1aa83
--- /dev/null
+++ b/tests/ui/associated-type-bounds/return-type-notation/display.stderr
@@ -0,0 +1,78 @@
+warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/display.rs:1:12
+   |
+LL | #![feature(return_type_notation)]
+   |            ^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
+   = note: `#[warn(incomplete_features)]` on by default
+
+error[E0277]: the trait bound `impl Sized { <T as Assoc>::method(..) }: Trait` is not satisfied
+  --> $DIR/display.rs:15:17
+   |
+LL |     needs_trait(T::method());
+   |     ----------- ^^^^^^^^^^^ the trait `Trait` is not implemented for `impl Sized { <T as Assoc>::method(..) }`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `needs_trait`
+  --> $DIR/display.rs:5:24
+   |
+LL | fn needs_trait(_: impl Trait) {}
+   |                        ^^^^^ required by this bound in `needs_trait`
+
+error[E0277]: the trait bound `impl Sized { <T as Assoc>::method_with_lt(..) }: Trait` is not satisfied
+  --> $DIR/display.rs:17:17
+   |
+LL |     needs_trait(T::method_with_lt());
+   |     ----------- ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `impl Sized { <T as Assoc>::method_with_lt(..) }`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `needs_trait`
+  --> $DIR/display.rs:5:24
+   |
+LL | fn needs_trait(_: impl Trait) {}
+   |                        ^^^^^ required by this bound in `needs_trait`
+
+error[E0277]: the trait bound `impl Sized: Trait` is not satisfied
+  --> $DIR/display.rs:19:17
+   |
+LL |     needs_trait(T::method_with_ty());
+   |     ----------- ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `impl Sized`
+   |     |
+   |     required by a bound introduced by this call
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/display.rs:4:1
+   |
+LL | trait Trait {}
+   | ^^^^^^^^^^^
+note: required by a bound in `needs_trait`
+  --> $DIR/display.rs:5:24
+   |
+LL | fn needs_trait(_: impl Trait) {}
+   |                        ^^^^^ required by this bound in `needs_trait`
+
+error[E0277]: the trait bound `impl Sized: Trait` is not satisfied
+  --> $DIR/display.rs:21:17
+   |
+LL |     needs_trait(T::method_with_ct());
+   |     ----------- ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `impl Sized`
+   |     |
+   |     required by a bound introduced by this call
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/display.rs:4:1
+   |
+LL | trait Trait {}
+   | ^^^^^^^^^^^
+note: required by a bound in `needs_trait`
+  --> $DIR/display.rs:5:24
+   |
+LL | fn needs_trait(_: impl Trait) {}
+   |                        ^^^^^ required by this bound in `needs_trait`
+
+error: aborting due to 4 previous errors; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/associated-types-eq-2.stderr b/tests/ui/associated-types/associated-types-eq-2.stderr
index 69b1b533450..e5013a35d45 100644
--- a/tests/ui/associated-types/associated-types-eq-2.stderr
+++ b/tests/ui/associated-types/associated-types-eq-2.stderr
@@ -50,8 +50,9 @@ LL | impl Tr1<A = usize> for usize {
    |
 help: consider removing this associated item binding
    |
-LL | impl Tr1<A = usize> for usize {
-   |         ~~~~~~~~~~~
+LL - impl Tr1<A = usize> for usize {
+LL + impl Tr1 for usize {
+   |
 
 error[E0046]: not all trait items implemented, missing: `A`
   --> $DIR/associated-types-eq-2.rs:20:1
@@ -70,8 +71,9 @@ LL | fn baz<I: Tr1>(_x: &<I as Tr1<A=Bar>>::A) {}
    |
 help: consider removing this associated item binding
    |
-LL | fn baz<I: Tr1>(_x: &<I as Tr1<A=Bar>>::A) {}
-   |                              ~~~~~~~
+LL - fn baz<I: Tr1>(_x: &<I as Tr1<A=Bar>>::A) {}
+LL + fn baz<I: Tr1>(_x: &<I as Tr1>::A) {}
+   |
 
 error[E0107]: trait takes 3 generic arguments but 1 generic argument was supplied
   --> $DIR/associated-types-eq-2.rs:40:6
@@ -128,8 +130,9 @@ LL | impl Tr2<i32, t2 = Qux, T3 = usize> for Qux {
    |
 help: consider removing this associated item binding
    |
-LL | impl Tr2<i32, t2 = Qux, T3 = usize> for Qux {
-   |             ~~~~~~~~~~
+LL - impl Tr2<i32, t2 = Qux, T3 = usize> for Qux {
+LL + impl Tr2<i32, T3 = usize> for Qux {
+   |
 
 error[E0107]: trait takes 3 generic arguments but 1 generic argument was supplied
   --> $DIR/associated-types-eq-2.rs:54:6
@@ -157,8 +160,9 @@ LL | impl Tr2<i32, X = Qux, Y = usize> for Bar {
    |
 help: consider removing this associated item binding
    |
-LL | impl Tr2<i32, X = Qux, Y = usize> for Bar {
-   |             ~~~~~~~~~
+LL - impl Tr2<i32, X = Qux, Y = usize> for Bar {
+LL + impl Tr2<i32, Y = usize> for Bar {
+   |
 
 error[E0107]: trait takes 3 generic arguments but 2 generic arguments were supplied
   --> $DIR/associated-types-eq-2.rs:61:6
@@ -228,8 +232,9 @@ LL | impl Tr3<n = 42, T2 = Qux, T3 = usize> for Qux {
    |
 help: consider removing this associated item binding
    |
-LL | impl Tr3<n = 42, T2 = Qux, T3 = usize> for Qux {
-   |          ~~~~~~~
+LL - impl Tr3<n = 42, T2 = Qux, T3 = usize> for Qux {
+LL + impl Tr3<T2 = Qux, T3 = usize> for Qux {
+   |
 
 error[E0229]: associated item constraints are not allowed here
   --> $DIR/associated-types-eq-2.rs:92:10
@@ -239,8 +244,9 @@ LL | impl Tr3<N = u32, T2 = Qux, T3 = usize> for Bar {
    |
 help: consider removing this associated item binding
    |
-LL | impl Tr3<N = u32, T2 = Qux, T3 = usize> for Bar {
-   |          ~~~~~~~~
+LL - impl Tr3<N = u32, T2 = Qux, T3 = usize> for Bar {
+LL + impl Tr3<T2 = Qux, T3 = usize> for Bar {
+   |
 
 error[E0107]: trait takes 3 generic arguments but 1 generic argument was supplied
   --> $DIR/associated-types-eq-2.rs:98:6
@@ -268,8 +274,9 @@ LL | impl Tr3<42, T2 = 42, T3 = usize> for Bar {
    |
 help: consider removing this associated item binding
    |
-LL | impl Tr3<42, T2 = 42, T3 = usize> for Bar {
-   |            ~~~~~~~~~
+LL - impl Tr3<42, T2 = 42, T3 = usize> for Bar {
+LL + impl Tr3<42, T3 = usize> for Bar {
+   |
 
 error[E0107]: trait takes 3 generic arguments but 0 generic arguments were supplied
   --> $DIR/associated-types-eq-2.rs:106:6
@@ -295,8 +302,9 @@ LL | impl Tr3<X = 42, Y = Qux, Z = usize> for Bar {
    |
 help: consider removing this associated item binding
    |
-LL | impl Tr3<X = 42, Y = Qux, Z = usize> for Bar {
-   |          ~~~~~~~
+LL - impl Tr3<X = 42, Y = Qux, Z = usize> for Bar {
+LL + impl Tr3<Y = Qux, Z = usize> for Bar {
+   |
 
 error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/associated-types-eq-2.rs:117:13
diff --git a/tests/ui/async-await/return-type-notation/issue-110963-early.stderr b/tests/ui/async-await/return-type-notation/issue-110963-early.stderr
index 23ede089b5a..acad8bd3791 100644
--- a/tests/ui/async-await/return-type-notation/issue-110963-early.stderr
+++ b/tests/ui/async-await/return-type-notation/issue-110963-early.stderr
@@ -18,8 +18,8 @@ LL | |         }
 LL | |     });
    | |______^ implementation of `Send` is not general enough
    |
-   = note: `Send` would have to be implemented for the type `impl Future<Output = bool> { <HC as HealthCheck>::check<'0>() }`, for any two lifetimes `'0` and `'1`...
-   = note: ...but `Send` is actually implemented for the type `impl Future<Output = bool> { <HC as HealthCheck>::check<'2>() }`, for some specific lifetime `'2`
+   = note: `Send` would have to be implemented for the type `impl Future<Output = bool> { <HC as HealthCheck>::check<'0>(..) }`, for any two lifetimes `'0` and `'1`...
+   = note: ...but `Send` is actually implemented for the type `impl Future<Output = bool> { <HC as HealthCheck>::check<'2>(..) }`, for some specific lifetime `'2`
 
 error: implementation of `Send` is not general enough
   --> $DIR/issue-110963-early.rs:14:5
@@ -32,8 +32,8 @@ LL | |         }
 LL | |     });
    | |______^ implementation of `Send` is not general enough
    |
-   = note: `Send` would have to be implemented for the type `impl Future<Output = bool> { <HC as HealthCheck>::check<'0>() }`, for any two lifetimes `'0` and `'1`...
-   = note: ...but `Send` is actually implemented for the type `impl Future<Output = bool> { <HC as HealthCheck>::check<'2>() }`, for some specific lifetime `'2`
+   = note: `Send` would have to be implemented for the type `impl Future<Output = bool> { <HC as HealthCheck>::check<'0>(..) }`, for any two lifetimes `'0` and `'1`...
+   = note: ...but `Send` is actually implemented for the type `impl Future<Output = bool> { <HC as HealthCheck>::check<'2>(..) }`, for some specific lifetime `'2`
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: aborting due to 2 previous errors; 1 warning emitted
diff --git a/tests/ui/async-await/return-type-notation/rtn-in-impl-signature.stderr b/tests/ui/async-await/return-type-notation/rtn-in-impl-signature.stderr
index b23dbc37a55..e061587f491 100644
--- a/tests/ui/async-await/return-type-notation/rtn-in-impl-signature.stderr
+++ b/tests/ui/async-await/return-type-notation/rtn-in-impl-signature.stderr
@@ -15,8 +15,9 @@ LL | impl Super1<'_, bar(..): Send> for () {}
    |
 help: consider removing this associated item constraint
    |
-LL | impl Super1<'_, bar(..): Send> for () {}
-   |               ~~~~~~~~~~~~~~~
+LL - impl Super1<'_, bar(..): Send> for () {}
+LL + impl Super1<'_> for () {}
+   |
 
 error[E0046]: not all trait items implemented, missing: `bar`
   --> $DIR/rtn-in-impl-signature.rs:10:1
diff --git a/tests/ui/blind/blind-item-block-item-shadow.stderr b/tests/ui/blind/blind-item-block-item-shadow.stderr
index 2e24ef453c2..38e3087ca34 100644
--- a/tests/ui/blind/blind-item-block-item-shadow.stderr
+++ b/tests/ui/blind/blind-item-block-item-shadow.stderr
@@ -10,7 +10,7 @@ LL |         use foo::Bar;
 help: you can use `as` to change the binding name of the import
    |
 LL |         use foo::Bar as OtherBar;
-   |             ~~~~~~~~~~~~~~~~~~~~
+   |                      +++++++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/blind/blind-item-item-shadow.stderr b/tests/ui/blind/blind-item-item-shadow.stderr
index 84b273c7338..08f5f5b47ed 100644
--- a/tests/ui/blind/blind-item-item-shadow.stderr
+++ b/tests/ui/blind/blind-item-item-shadow.stderr
@@ -11,7 +11,7 @@ LL | use foo::foo;
 help: you can use `as` to change the binding name of the import
    |
 LL | use foo::foo as other_foo;
-   |     ~~~~~~~~~~~~~~~~~~~~~
+   |              ++++++++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/duplicate/duplicate-check-macro-exports.stderr b/tests/ui/duplicate/duplicate-check-macro-exports.stderr
index eff19c09062..470a516ecbc 100644
--- a/tests/ui/duplicate/duplicate-check-macro-exports.stderr
+++ b/tests/ui/duplicate/duplicate-check-macro-exports.stderr
@@ -11,7 +11,7 @@ LL | macro_rules! panic { () => {} }
 help: you can use `as` to change the binding name of the import
    |
 LL | pub use std::panic as other_panic;
-   |         ~~~~~~~~~~~~~~~~~~~~~~~~~
+   |                    ++++++++++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/error-codes/E0229.stderr b/tests/ui/error-codes/E0229.stderr
index 7d9cedc3bdc..038f44e8b14 100644
--- a/tests/ui/error-codes/E0229.stderr
+++ b/tests/ui/error-codes/E0229.stderr
@@ -6,8 +6,9 @@ LL | fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
    |
 help: consider removing this associated item binding
    |
-LL | fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
-   |                        ~~~~~~~~~
+LL - fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
+LL + fn baz<I>(x: &<I as Foo>::A) {}
+   |
 
 error[E0229]: associated item constraints are not allowed here
   --> $DIR/E0229.rs:13:25
@@ -18,8 +19,9 @@ LL | fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: consider removing this associated item binding
    |
-LL | fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
-   |                        ~~~~~~~~~
+LL - fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
+LL + fn baz<I>(x: &<I as Foo>::A) {}
+   |
 
 error[E0229]: associated item constraints are not allowed here
   --> $DIR/E0229.rs:13:25
@@ -30,8 +32,9 @@ LL | fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: consider removing this associated item binding
    |
-LL | fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
-   |                        ~~~~~~~~~
+LL - fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
+LL + fn baz<I>(x: &<I as Foo>::A) {}
+   |
 
 error[E0277]: the trait bound `I: Foo` is not satisfied
   --> $DIR/E0229.rs:13:15
diff --git a/tests/ui/error-codes/E0252.stderr b/tests/ui/error-codes/E0252.stderr
index efbb9ec96de..16574964eb3 100644
--- a/tests/ui/error-codes/E0252.stderr
+++ b/tests/ui/error-codes/E0252.stderr
@@ -10,7 +10,7 @@ LL | use bar::baz;
 help: you can use `as` to change the binding name of the import
    |
 LL | use bar::baz as other_baz;
-   |     ~~~~~~~~~~~~~~~~~~~~~
+   |              ++++++++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/error-codes/E0254.stderr b/tests/ui/error-codes/E0254.stderr
index d89497b2804..592b8766d6b 100644
--- a/tests/ui/error-codes/E0254.stderr
+++ b/tests/ui/error-codes/E0254.stderr
@@ -11,7 +11,7 @@ LL | use foo::alloc;
 help: you can use `as` to change the binding name of the import
    |
 LL | use foo::alloc as other_alloc;
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
+   |                ++++++++++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/error-codes/E0255.stderr b/tests/ui/error-codes/E0255.stderr
index e5f908217e1..b67a334f02c 100644
--- a/tests/ui/error-codes/E0255.stderr
+++ b/tests/ui/error-codes/E0255.stderr
@@ -11,7 +11,7 @@ LL | fn foo() {}
 help: you can use `as` to change the binding name of the import
    |
 LL | use bar::foo as other_foo;
-   |     ~~~~~~~~~~~~~~~~~~~~~
+   |              ++++++++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/generic-associated-types/issue-102335-gat.stderr b/tests/ui/generic-associated-types/issue-102335-gat.stderr
index b4772486e6e..bcef76290fc 100644
--- a/tests/ui/generic-associated-types/issue-102335-gat.stderr
+++ b/tests/ui/generic-associated-types/issue-102335-gat.stderr
@@ -6,8 +6,9 @@ LL |     type A: S<C<(), i32 = ()> = ()>;
    |
 help: consider removing this associated item binding
    |
-LL |     type A: S<C<(), i32 = ()> = ()>;
-   |                   ~~~~~~~~~~
+LL -     type A: S<C<(), i32 = ()> = ()>;
+LL +     type A: S<C<()> = ()>;
+   |
 
 error[E0229]: associated item constraints are not allowed here
   --> $DIR/issue-102335-gat.rs:2:21
@@ -18,8 +19,9 @@ LL |     type A: S<C<(), i32 = ()> = ()>;
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: consider removing this associated item binding
    |
-LL |     type A: S<C<(), i32 = ()> = ()>;
-   |                   ~~~~~~~~~~
+LL -     type A: S<C<(), i32 = ()> = ()>;
+LL +     type A: S<C<()> = ()>;
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/generics/impl-block-params-declared-in-wrong-spot-issue-113073.stderr b/tests/ui/generics/impl-block-params-declared-in-wrong-spot-issue-113073.stderr
index dfc6761e17e..c60c4c72a21 100644
--- a/tests/ui/generics/impl-block-params-declared-in-wrong-spot-issue-113073.stderr
+++ b/tests/ui/generics/impl-block-params-declared-in-wrong-spot-issue-113073.stderr
@@ -14,8 +14,9 @@ LL | impl Foo<T: Default> for String {}
    |
 help: declare the type parameter right after the `impl` keyword
    |
-LL | impl<T: Default> Foo<T> for String {}
-   |     ++++++++++++     ~
+LL - impl Foo<T: Default> for String {}
+LL + impl<T: Default> Foo<T> for String {}
+   |
 
 error[E0229]: associated item constraints are not allowed here
   --> $DIR/impl-block-params-declared-in-wrong-spot-issue-113073.rs:7:10
@@ -25,8 +26,9 @@ LL | impl Foo<T: 'a + Default> for u8 {}
    |
 help: declare the type parameter right after the `impl` keyword
    |
-LL | impl<'a, T: 'a + Default> Foo<T> for u8 {}
-   |     +++++++++++++++++++++     ~
+LL - impl Foo<T: 'a + Default> for u8 {}
+LL + impl<'a, T: 'a + Default> Foo<T> for u8 {}
+   |
 
 error[E0229]: associated item constraints are not allowed here
   --> $DIR/impl-block-params-declared-in-wrong-spot-issue-113073.rs:13:13
@@ -36,8 +38,9 @@ LL | impl<T> Foo<T: Default> for u16 {}
    |
 help: declare the type parameter right after the `impl` keyword
    |
-LL | impl<T, T: Default> Foo<T> for u16 {}
-   |       ++++++++++++      ~
+LL - impl<T> Foo<T: Default> for u16 {}
+LL + impl<T, T: Default> Foo<T> for u16 {}
+   |
 
 error[E0229]: associated item constraints are not allowed here
   --> $DIR/impl-block-params-declared-in-wrong-spot-issue-113073.rs:17:14
@@ -47,8 +50,9 @@ LL | impl<'a> Foo<T: 'a + Default> for u32 {}
    |
 help: declare the type parameter right after the `impl` keyword
    |
-LL | impl<'a, 'a, T: 'a + Default> Foo<T> for u32 {}
-   |        +++++++++++++++++++++      ~
+LL - impl<'a> Foo<T: 'a + Default> for u32 {}
+LL + impl<'a, 'a, T: 'a + Default> Foo<T> for u32 {}
+   |
 
 error[E0229]: associated item constraints are not allowed here
   --> $DIR/impl-block-params-declared-in-wrong-spot-issue-113073.rs:23:10
@@ -58,8 +62,9 @@ LL | impl Bar<T: Default, K: Default> for String {}
    |
 help: declare the type parameter right after the `impl` keyword
    |
-LL | impl<T: Default> Bar<T, K: Default> for String {}
-   |     ++++++++++++     ~
+LL - impl Bar<T: Default, K: Default> for String {}
+LL + impl<T: Default> Bar<T, K: Default> for String {}
+   |
 
 error[E0107]: trait takes 2 generic arguments but 1 generic argument was supplied
   --> $DIR/impl-block-params-declared-in-wrong-spot-issue-113073.rs:27:9
@@ -87,8 +92,9 @@ LL | impl<T> Bar<T, K: Default> for u8 {}
    |
 help: declare the type parameter right after the `impl` keyword
    |
-LL | impl<T, K: Default> Bar<T, K> for u8 {}
-   |       ++++++++++++         ~
+LL - impl<T> Bar<T, K: Default> for u8 {}
+LL + impl<T, K: Default> Bar<T, K> for u8 {}
+   |
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/imports/double-import.stderr b/tests/ui/imports/double-import.stderr
index 73bb73e3490..15b8620909f 100644
--- a/tests/ui/imports/double-import.stderr
+++ b/tests/ui/imports/double-import.stderr
@@ -10,7 +10,7 @@ LL | use sub2::foo;
 help: you can use `as` to change the binding name of the import
    |
 LL | use sub2::foo as other_foo;
-   |     ~~~~~~~~~~~~~~~~~~~~~~
+   |               ++++++++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/imports/issue-19498.stderr b/tests/ui/imports/issue-19498.stderr
index 9d26022098f..69bdb67d389 100644
--- a/tests/ui/imports/issue-19498.stderr
+++ b/tests/ui/imports/issue-19498.stderr
@@ -11,7 +11,7 @@ LL | mod A {}
 help: you can use `as` to change the binding name of the import
    |
 LL | use self::A as OtherA;
-   |     ~~~~~~~~~~~~~~~~~
+   |             +++++++++
 
 error[E0255]: the name `B` is defined multiple times
   --> $DIR/issue-19498.rs:5:1
@@ -26,7 +26,7 @@ LL | pub mod B {}
 help: you can use `as` to change the binding name of the import
    |
 LL | use self::B as OtherB;
-   |     ~~~~~~~~~~~~~~~~~
+   |             +++++++++
 
 error[E0255]: the name `D` is defined multiple times
   --> $DIR/issue-19498.rs:9:5
@@ -40,7 +40,7 @@ LL |     mod D {}
 help: you can use `as` to change the binding name of the import
    |
 LL |     use C::D as OtherD;
-   |         ~~~~~~~~~~~~~~
+   |              +++++++++
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/imports/issue-24081.stderr b/tests/ui/imports/issue-24081.stderr
index e5ed6b10a54..6ceba6c7013 100644
--- a/tests/ui/imports/issue-24081.stderr
+++ b/tests/ui/imports/issue-24081.stderr
@@ -11,7 +11,7 @@ LL | type Add = bool;
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::ops::Add as OtherAdd;
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
+   |                   +++++++++++
 
 error[E0255]: the name `Sub` is defined multiple times
   --> $DIR/issue-24081.rs:9:1
@@ -26,7 +26,7 @@ LL | struct Sub { x: f32 }
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::ops::Sub as OtherSub;
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
+   |                   +++++++++++
 
 error[E0255]: the name `Mul` is defined multiple times
   --> $DIR/issue-24081.rs:11:1
@@ -41,7 +41,7 @@ LL | enum Mul { A, B }
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::ops::Mul as OtherMul;
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
+   |                   +++++++++++
 
 error[E0255]: the name `Div` is defined multiple times
   --> $DIR/issue-24081.rs:13:1
@@ -56,7 +56,7 @@ LL | mod Div { }
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::ops::Div as OtherDiv;
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
+   |                   +++++++++++
 
 error[E0255]: the name `Rem` is defined multiple times
   --> $DIR/issue-24081.rs:15:1
@@ -71,7 +71,7 @@ LL | trait Rem {  }
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::ops::Rem as OtherRem;
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~
+   |                   +++++++++++
 
 error: aborting due to 5 previous errors
 
diff --git a/tests/ui/imports/issue-25396.stderr b/tests/ui/imports/issue-25396.stderr
index 518d2be7841..6f9b080f3c5 100644
--- a/tests/ui/imports/issue-25396.stderr
+++ b/tests/ui/imports/issue-25396.stderr
@@ -10,7 +10,7 @@ LL | use bar::baz;
 help: you can use `as` to change the binding name of the import
    |
 LL | use bar::baz as other_baz;
-   |     ~~~~~~~~~~~~~~~~~~~~~
+   |              ++++++++++++
 
 error[E0252]: the name `Quux` is defined multiple times
   --> $DIR/issue-25396.rs:7:5
@@ -24,7 +24,7 @@ LL | use bar::Quux;
 help: you can use `as` to change the binding name of the import
    |
 LL | use bar::Quux as OtherQuux;
-   |     ~~~~~~~~~~~~~~~~~~~~~~
+   |               ++++++++++++
 
 error[E0252]: the name `blah` is defined multiple times
   --> $DIR/issue-25396.rs:10:5
@@ -38,7 +38,7 @@ LL | use bar::blah;
 help: you can use `as` to change the binding name of the import
    |
 LL | use bar::blah as other_blah;
-   |     ~~~~~~~~~~~~~~~~~~~~~~~
+   |               +++++++++++++
 
 error[E0252]: the name `WOMP` is defined multiple times
   --> $DIR/issue-25396.rs:13:5
@@ -52,7 +52,7 @@ LL | use bar::WOMP;
 help: you can use `as` to change the binding name of the import
    |
 LL | use bar::WOMP as OtherWOMP;
-   |     ~~~~~~~~~~~~~~~~~~~~~~
+   |               ++++++++++++
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/imports/issue-32354-suggest-import-rename.stderr b/tests/ui/imports/issue-32354-suggest-import-rename.stderr
index de9bdc4f2cc..753fa434ffb 100644
--- a/tests/ui/imports/issue-32354-suggest-import-rename.stderr
+++ b/tests/ui/imports/issue-32354-suggest-import-rename.stderr
@@ -10,7 +10,7 @@ LL | use extension2::ConstructorExtension;
 help: you can use `as` to change the binding name of the import
    |
 LL | use extension2::ConstructorExtension as OtherConstructorExtension;
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   |                                      ++++++++++++++++++++++++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/imports/issue-45829/import-self.stderr b/tests/ui/imports/issue-45829/import-self.stderr
index 0c9424f3083..3c9d4fe6ba6 100644
--- a/tests/ui/imports/issue-45829/import-self.stderr
+++ b/tests/ui/imports/issue-45829/import-self.stderr
@@ -48,7 +48,7 @@ LL | use foo::self;
 help: you can use `as` to change the binding name of the import
    |
 LL | use foo as other_foo;
-   |     ~~~~~~~~~~~~~~~~
+   |         ~~~~~~~~~~~~
 
 error[E0252]: the name `A` is defined multiple times
   --> $DIR/import-self.rs:16:11
diff --git a/tests/ui/imports/issue-45829/issue-45829.stderr b/tests/ui/imports/issue-45829/issue-45829.stderr
index 627a09a07b8..c6835c3bd7a 100644
--- a/tests/ui/imports/issue-45829/issue-45829.stderr
+++ b/tests/ui/imports/issue-45829/issue-45829.stderr
@@ -10,7 +10,7 @@ LL | use foo::{A, B as A};
 help: you can use `as` to change the binding name of the import
    |
 LL | use foo::{A, B as OtherA};
-   |              ~~~~~~~~~~~
+   |                ~~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/imports/issue-45829/rename-use-vs-extern.stderr b/tests/ui/imports/issue-45829/rename-use-vs-extern.stderr
index 9b0a2534a1d..fd4fb9db0b6 100644
--- a/tests/ui/imports/issue-45829/rename-use-vs-extern.stderr
+++ b/tests/ui/imports/issue-45829/rename-use-vs-extern.stderr
@@ -10,7 +10,7 @@ LL | use std as issue_45829_b;
 help: you can use `as` to change the binding name of the import
    |
 LL | use std as other_issue_45829_b;
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~
+   |         ~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/imports/issue-45829/rename-use-with-tabs.stderr b/tests/ui/imports/issue-45829/rename-use-with-tabs.stderr
index 5751f41ae9d..178303bbc1d 100644
--- a/tests/ui/imports/issue-45829/rename-use-with-tabs.stderr
+++ b/tests/ui/imports/issue-45829/rename-use-with-tabs.stderr
@@ -10,7 +10,7 @@ LL | use foo::{A, bar::B    as    A};
 help: you can use `as` to change the binding name of the import
    |
 LL | use foo::{A, bar::B as OtherA};
-   |              ~~~~~~~~~~~~~~~~
+   |                     ~~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/imports/issue-45829/rename-with-path.stderr b/tests/ui/imports/issue-45829/rename-with-path.stderr
index 69e084db6ff..a83fdb37324 100644
--- a/tests/ui/imports/issue-45829/rename-with-path.stderr
+++ b/tests/ui/imports/issue-45829/rename-with-path.stderr
@@ -10,7 +10,7 @@ LL | use std::{collections::HashMap as A, sync::Arc as A};
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::{collections::HashMap as A, sync::Arc as OtherA};
-   |                                      ~~~~~~~~~~~~~~~~~~~
+   |                                                ~~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/imports/issue-45829/rename.stderr b/tests/ui/imports/issue-45829/rename.stderr
index f1ee5112dc1..4977909487c 100644
--- a/tests/ui/imports/issue-45829/rename.stderr
+++ b/tests/ui/imports/issue-45829/rename.stderr
@@ -10,7 +10,7 @@ LL | use std as core;
 help: you can use `as` to change the binding name of the import
    |
 LL | use std as other_core;
-   |     ~~~~~~~~~~~~~~~~~
+   |         ~~~~~~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/imports/issue-52891.stderr b/tests/ui/imports/issue-52891.stderr
index 7bb1301edf2..730962d702a 100644
--- a/tests/ui/imports/issue-52891.stderr
+++ b/tests/ui/imports/issue-52891.stderr
@@ -98,7 +98,7 @@ LL | use issue_52891::b::inner;
 help: you can use `as` to change the binding name of the import
    |
 LL | use issue_52891::b::inner as other_inner;
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   |                           ++++++++++++++
 
 error[E0254]: the name `issue_52891` is defined multiple times
   --> $DIR/issue-52891.rs:31:19
diff --git a/tests/ui/imports/issue-8640.stderr b/tests/ui/imports/issue-8640.stderr
index ea350e97e64..d22fddb1a69 100644
--- a/tests/ui/imports/issue-8640.stderr
+++ b/tests/ui/imports/issue-8640.stderr
@@ -10,7 +10,7 @@ LL |     mod bar {}
 help: you can use `as` to change the binding name of the import
    |
 LL |     use baz::bar as other_bar;
-   |         ~~~~~~~~~~~~~~~~~~~~~
+   |                  ++++++++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr b/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr
index f8d919fd68b..4ea14cdf042 100644
--- a/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr
+++ b/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr
@@ -6,8 +6,9 @@ LL |     fn bar(foo: Foo<Target = usize>) {}
    |
 help: consider removing this associated item binding
    |
-LL |     fn bar(foo: Foo<Target = usize>) {}
-   |                    ~~~~~~~~~~~~~~~~
+LL -     fn bar(foo: Foo<Target = usize>) {}
+LL +     fn bar(foo: Foo) {}
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr b/tests/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr
index e22e636adb6..a8d0efedb6c 100644
--- a/tests/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr
+++ b/tests/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr
@@ -8,7 +8,7 @@ LL | use std::slice as std;
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::slice as other_std;
-   |     ~~~~~~~~~~~~~~~~~~~~~~~
+   |                ~~~~~~~~~~~~
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/resolve/resolve-conflict-item-vs-import.stderr b/tests/ui/resolve/resolve-conflict-item-vs-import.stderr
index 3b1b5f1ad00..a8b16009c55 100644
--- a/tests/ui/resolve/resolve-conflict-item-vs-import.stderr
+++ b/tests/ui/resolve/resolve-conflict-item-vs-import.stderr
@@ -11,7 +11,7 @@ LL | fn transmute() {}
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::mem::transmute as other_transmute;
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   |                         ++++++++++++++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/resolve/resolve-conflict-type-vs-import.stderr b/tests/ui/resolve/resolve-conflict-type-vs-import.stderr
index c5cb4e07862..241e48d0cd5 100644
--- a/tests/ui/resolve/resolve-conflict-type-vs-import.stderr
+++ b/tests/ui/resolve/resolve-conflict-type-vs-import.stderr
@@ -11,7 +11,7 @@ LL | struct Iter;
 help: you can use `as` to change the binding name of the import
    |
 LL | use std::slice::Iter as OtherIter;
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   |                      ++++++++++++
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/suggestions/issue-85347.stderr b/tests/ui/suggestions/issue-85347.stderr
index b3616041c4c..af77ddd35e3 100644
--- a/tests/ui/suggestions/issue-85347.stderr
+++ b/tests/ui/suggestions/issue-85347.stderr
@@ -22,8 +22,9 @@ LL |     type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
    |
 help: consider removing this associated item binding
    |
-LL |     type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
-   |                                             ~~~~~~~~~~~~~~~
+LL -     type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
+LL +     type Bar<'a>: Deref<Target = <Self>::Bar>;
+   |
 
 error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
   --> $DIR/issue-85347.rs:3:42
@@ -51,8 +52,9 @@ LL |     type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 help: consider removing this associated item binding
    |
-LL |     type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
-   |                                             ~~~~~~~~~~~~~~~
+LL -     type Bar<'a>: Deref<Target = <Self>::Bar<Target = Self>>;
+LL +     type Bar<'a>: Deref<Target = <Self>::Bar>;
+   |
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/variants/variant-namespacing.stderr b/tests/ui/variants/variant-namespacing.stderr
index 9e91ff7178d..2a2491b81f9 100644
--- a/tests/ui/variants/variant-namespacing.stderr
+++ b/tests/ui/variants/variant-namespacing.stderr
@@ -11,7 +11,7 @@ LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit};
 help: you can use `as` to change the binding name of the import
    |
 LL | pub use variant_namespacing::XE::{XStruct as OtherXStruct, XTuple, XUnit};
-   |                                   ~~~~~~~~~~~~~~~~~~~~~~~
+   |                                           +++++++++++++++
 
 error[E0255]: the name `XTuple` is defined multiple times
   --> $DIR/variant-namespacing.rs:24:44
@@ -26,7 +26,7 @@ LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit};
 help: you can use `as` to change the binding name of the import
    |
 LL | pub use variant_namespacing::XE::{XStruct, XTuple as OtherXTuple, XUnit};
-   |                                            ~~~~~~~~~~~~~~~~~~~~~
+   |                                                   ++++++++++++++
 
 error[E0255]: the name `XUnit` is defined multiple times
   --> $DIR/variant-namespacing.rs:24:52
@@ -41,7 +41,7 @@ LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit};
 help: you can use `as` to change the binding name of the import
    |
 LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit as OtherXUnit};
-   |                                                    ~~~~~~~~~~~~~~~~~~~
+   |                                                          +++++++++++++
 
 error[E0255]: the name `Struct` is defined multiple times
   --> $DIR/variant-namespacing.rs:28:13
@@ -56,7 +56,7 @@ LL | pub use E::{Struct, Tuple, Unit};
 help: you can use `as` to change the binding name of the import
    |
 LL | pub use E::{Struct as OtherStruct, Tuple, Unit};
-   |             ~~~~~~~~~~~~~~~~~~~~~
+   |                    ++++++++++++++
 
 error[E0255]: the name `Tuple` is defined multiple times
   --> $DIR/variant-namespacing.rs:28:21
@@ -71,7 +71,7 @@ LL | pub use E::{Struct, Tuple, Unit};
 help: you can use `as` to change the binding name of the import
    |
 LL | pub use E::{Struct, Tuple as OtherTuple, Unit};
-   |                     ~~~~~~~~~~~~~~~~~~~
+   |                           +++++++++++++
 
 error[E0255]: the name `Unit` is defined multiple times
   --> $DIR/variant-namespacing.rs:28:28
@@ -86,7 +86,7 @@ LL | pub use E::{Struct, Tuple, Unit};
 help: you can use `as` to change the binding name of the import
    |
 LL | pub use E::{Struct, Tuple, Unit as OtherUnit};
-   |                            ~~~~~~~~~~~~~~~~~
+   |                                 ++++++++++++
 
 error: aborting due to 6 previous errors