about summary refs log tree commit diff
path: root/tests/ui/resolve
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/resolve')
-rw-r--r--tests/ui/resolve/const-with-typo-in-pattern-binding.stderr15
-rw-r--r--tests/ui/resolve/issue-100365.stderr20
-rw-r--r--tests/ui/resolve/issue-101749.stderr5
-rw-r--r--tests/ui/resolve/issue-103202.stderr5
-rw-r--r--tests/ui/resolve/issue-103474.stderr5
-rw-r--r--tests/ui/resolve/issue-112472-multi-generics-suggestion.stderr10
-rw-r--r--tests/ui/resolve/issue-18252.stderr5
-rw-r--r--tests/ui/resolve/issue-22692.stderr40
-rw-r--r--tests/ui/resolve/issue-35675.stderr10
-rw-r--r--tests/ui/resolve/issue-3907.stderr3
-rw-r--r--tests/ui/resolve/issue-39226.stderr10
-rw-r--r--tests/ui/resolve/issue-42944.stderr5
-rw-r--r--tests/ui/resolve/issue-5035.stderr8
-rw-r--r--tests/ui/resolve/issue-5099.stderr15
-rw-r--r--tests/ui/resolve/issue-55673.stderr15
-rw-r--r--tests/ui/resolve/issue-73427.stderr60
-rw-r--r--tests/ui/resolve/privacy-enum-ctor.stderr55
-rw-r--r--tests/ui/resolve/privacy-struct-ctor.stderr10
-rw-r--r--tests/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr3
-rw-r--r--tests/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr5
-rw-r--r--tests/ui/resolve/resolve-inconsistent-names.stderr10
-rw-r--r--tests/ui/resolve/resolve-issue-135614-assoc-const.import_trait_associated_functions.stderr5
-rw-r--r--tests/ui/resolve/resolve-issue-135614-assoc-const.normal.stderr5
-rw-r--r--tests/ui/resolve/resolve-variant-assoc-item.stderr10
-rw-r--r--tests/ui/resolve/suggest-path-for-tuple-struct.stderr10
-rw-r--r--tests/ui/resolve/suggest-path-instead-of-mod-dot-item.stderr50
-rw-r--r--tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr25
-rw-r--r--tests/ui/resolve/typo-suggestion-mistyped-in-path.stderr10
-rw-r--r--tests/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr3
29 files changed, 260 insertions, 172 deletions
diff --git a/tests/ui/resolve/const-with-typo-in-pattern-binding.stderr b/tests/ui/resolve/const-with-typo-in-pattern-binding.stderr
index a0cdac3fa25..f142f91064f 100644
--- a/tests/ui/resolve/const-with-typo-in-pattern-binding.stderr
+++ b/tests/ui/resolve/const-with-typo-in-pattern-binding.stderr
@@ -28,8 +28,9 @@ LL |         _ => {}
    |
 help: you might have meant to pattern match against the value of similarly named constant `god` instead of introducing a new catch-all binding
    |
-LL |         god => {}
-   |         ~~~
+LL -         GOD => {}
+LL +         god => {}
+   |
 
 error: unreachable pattern
   --> $DIR/const-with-typo-in-pattern-binding.rs:30:9
@@ -42,8 +43,9 @@ LL |         _ => {}
    |
 help: you might have meant to pattern match against the value of similarly named constant `GOOD` instead of introducing a new catch-all binding
    |
-LL |         GOOD => {}
-   |         ~~~~
+LL -         GOOOD => {}
+LL +         GOOD => {}
+   |
 
 error: unreachable pattern
   --> $DIR/const-with-typo-in-pattern-binding.rs:36:9
@@ -71,8 +73,9 @@ LL |         _ => {}
    |
 help: you might have meant to pattern match against the value of constant `ARCH` instead of introducing a new catch-all binding
    |
-LL |         std::env::consts::ARCH => {}
-   |         ~~~~~~~~~~~~~~~~~~~~~~
+LL -         ARCH => {}
+LL +         std::env::consts::ARCH => {}
+   |
 
 error: aborting due to 5 previous errors
 
diff --git a/tests/ui/resolve/issue-100365.stderr b/tests/ui/resolve/issue-100365.stderr
index 2d9bab4304d..7a880c6f31a 100644
--- a/tests/ui/resolve/issue-100365.stderr
+++ b/tests/ui/resolve/issue-100365.stderr
@@ -6,8 +6,9 @@ LL |     let addr = Into::<std::net::IpAddr>.into([127, 0, 0, 1]);
    |
 help: use the path separator to refer to an item
    |
-LL |     let addr = Into::<std::net::IpAddr>::into([127, 0, 0, 1]);
-   |                                        ~~
+LL -     let addr = Into::<std::net::IpAddr>.into([127, 0, 0, 1]);
+LL +     let addr = Into::<std::net::IpAddr>::into([127, 0, 0, 1]);
+   |
 
 error[E0423]: expected value, found trait `Into`
   --> $DIR/issue-100365.rs:6:13
@@ -17,8 +18,9 @@ LL |     let _ = Into.into(());
    |
 help: use the path separator to refer to an item
    |
-LL |     let _ = Into::into(());
-   |                 ~~
+LL -     let _ = Into.into(());
+LL +     let _ = Into::into(());
+   |
 
 error[E0423]: expected value, found trait `Into`
   --> $DIR/issue-100365.rs:10:13
@@ -28,8 +30,9 @@ LL |     let _ = Into::<()>.into;
    |
 help: use the path separator to refer to an item
    |
-LL |     let _ = Into::<()>::into;
-   |                       ~~
+LL -     let _ = Into::<()>.into;
+LL +     let _ = Into::<()>::into;
+   |
 
 error[E0423]: expected value, found trait `std::iter::Iterator`
   --> $DIR/issue-100365.rs:17:9
@@ -65,8 +68,9 @@ LL |     let _ = create!();
    = note: this error originates in the macro `create` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: use the path separator to refer to an item
    |
-LL |         Into::<String>::into("")
-   |                       ~~
+LL -         Into::<String>.into("")
+LL +         Into::<String>::into("")
+   |
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/resolve/issue-101749.stderr b/tests/ui/resolve/issue-101749.stderr
index fedbf182ee8..09e800ec7c3 100644
--- a/tests/ui/resolve/issue-101749.stderr
+++ b/tests/ui/resolve/issue-101749.stderr
@@ -7,8 +7,9 @@ LL |     let _ = rect::area();
    = help: you might be missing a crate named `rect`
 help: you may have meant to call an instance method
    |
-LL |     let _ = rect.area();
-   |                 ~
+LL -     let _ = rect::area();
+LL +     let _ = rect.area();
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/resolve/issue-103202.stderr b/tests/ui/resolve/issue-103202.stderr
index 87fa940ac3b..cf32efab981 100644
--- a/tests/ui/resolve/issue-103202.stderr
+++ b/tests/ui/resolve/issue-103202.stderr
@@ -6,8 +6,9 @@ LL |     fn f(self: &S::x) {}
    |
 help: if there were a trait named `Example` with associated type `x` implemented for `S`, you could use the fully-qualified path
    |
-LL |     fn f(self: &<S as Example>::x) {}
-   |                 ~~~~~~~~~~~~~~~~~
+LL -     fn f(self: &S::x) {}
+LL +     fn f(self: &<S as Example>::x) {}
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/resolve/issue-103474.stderr b/tests/ui/resolve/issue-103474.stderr
index e48fb31eccc..717892921f1 100644
--- a/tests/ui/resolve/issue-103474.stderr
+++ b/tests/ui/resolve/issue-103474.stderr
@@ -6,8 +6,9 @@ LL |         this.i
    |
 help: you might have meant to use `self` here instead
    |
-LL |         self.i
-   |         ~~~~
+LL -         this.i
+LL +         self.i
+   |
 help: if you meant to use `self`, you are also missing a `self` receiver argument
    |
 LL |     fn needs_self(&self) {
diff --git a/tests/ui/resolve/issue-112472-multi-generics-suggestion.stderr b/tests/ui/resolve/issue-112472-multi-generics-suggestion.stderr
index f463e2dad2c..1ed6e68c333 100644
--- a/tests/ui/resolve/issue-112472-multi-generics-suggestion.stderr
+++ b/tests/ui/resolve/issue-112472-multi-generics-suggestion.stderr
@@ -6,8 +6,9 @@ LL |     <DecodeLine as convert::TryFrom<String>>::Error: ParseError,
    |
 help: constrain the associated type to `ParseError`
    |
-LL |     DecodeLine: convert::TryFrom<String, Error = ParseError>,
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL -     <DecodeLine as convert::TryFrom<String>>::Error: ParseError,
+LL +     DecodeLine: convert::TryFrom<String, Error = ParseError>,
+   |
 
 error[E0404]: expected trait, found enum `ParseError`
   --> $DIR/issue-112472-multi-generics-suggestion.rs:25:45
@@ -17,8 +18,9 @@ LL |     <DecodeLine as TryFrom<String>>::Error: ParseError,
    |
 help: constrain the associated type to `ParseError`
    |
-LL |     DecodeLine: TryFrom<String, Error = ParseError>,
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL -     <DecodeLine as TryFrom<String>>::Error: ParseError,
+LL +     DecodeLine: TryFrom<String, Error = ParseError>,
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/resolve/issue-18252.stderr b/tests/ui/resolve/issue-18252.stderr
index 6cb9c1f1dd2..b22ad3f5225 100644
--- a/tests/ui/resolve/issue-18252.stderr
+++ b/tests/ui/resolve/issue-18252.stderr
@@ -6,8 +6,9 @@ LL |     let f = Foo::Variant(42);
    |
 help: you might have meant to create a new value of the struct
    |
-LL |     let f = Foo::Variant { x: /* value */ };
-   |                          ~~~~~~~~~~~~~~~~~~
+LL -     let f = Foo::Variant(42);
+LL +     let f = Foo::Variant { x: /* value */ };
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/resolve/issue-22692.stderr b/tests/ui/resolve/issue-22692.stderr
index be0634ebffc..546f12b35c1 100644
--- a/tests/ui/resolve/issue-22692.stderr
+++ b/tests/ui/resolve/issue-22692.stderr
@@ -6,8 +6,9 @@ LL |     let _ = String.new();
    |
 help: use the path separator to refer to an item
    |
-LL |     let _ = String::new();
-   |                   ~~
+LL -     let _ = String.new();
+LL +     let _ = String::new();
+   |
 
 error[E0423]: expected value, found struct `String`
   --> $DIR/issue-22692.rs:6:13
@@ -17,8 +18,9 @@ LL |     let _ = String.default;
    |
 help: use the path separator to refer to an item
    |
-LL |     let _ = String::default;
-   |                   ~~
+LL -     let _ = String.default;
+LL +     let _ = String::default;
+   |
 
 error[E0423]: expected value, found struct `Vec`
   --> $DIR/issue-22692.rs:10:13
@@ -28,8 +30,9 @@ LL |     let _ = Vec::<()>.with_capacity(1);
    |
 help: use the path separator to refer to an item
    |
-LL |     let _ = Vec::<()>::with_capacity(1);
-   |                      ~~
+LL -     let _ = Vec::<()>.with_capacity(1);
+LL +     let _ = Vec::<()>::with_capacity(1);
+   |
 
 error[E0423]: expected value, found struct `std::cell::Cell`
   --> $DIR/issue-22692.rs:17:9
@@ -43,8 +46,9 @@ LL |     Type!().get();
    = note: this error originates in the macro `Type` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: use the path separator to refer to an item
    |
-LL |     <Type!()>::get();
-   |     ~~~~~~~~~~~
+LL -     Type!().get();
+LL +     <Type!()>::get();
+   |
 
 error[E0423]: expected value, found struct `std::cell::Cell`
   --> $DIR/issue-22692.rs:17:9
@@ -58,8 +62,9 @@ LL |     Type! {}.get;
    = note: this error originates in the macro `Type` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: use the path separator to refer to an item
    |
-LL |     <Type! {}>::get;
-   |     ~~~~~~~~~~~~
+LL -     Type! {}.get;
+LL +     <Type! {}>::get;
+   |
 
 error[E0423]: expected value, found struct `Vec`
   --> $DIR/issue-22692.rs:26:9
@@ -73,8 +78,9 @@ LL |     let _ = create!(type method);
    = note: this error originates in the macro `create` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: use the path separator to refer to an item
    |
-LL |         Vec::new()
-   |            ~~
+LL -         Vec.new()
+LL +         Vec::new()
+   |
 
 error[E0423]: expected value, found struct `Vec`
   --> $DIR/issue-22692.rs:31:9
@@ -88,8 +94,9 @@ LL |     let _ = create!(type field);
    = note: this error originates in the macro `create` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: use the path separator to refer to an item
    |
-LL |         Vec::new
-   |            ~~
+LL -         Vec.new
+LL +         Vec::new
+   |
 
 error[E0423]: expected value, found struct `std::cell::Cell`
   --> $DIR/issue-22692.rs:17:9
@@ -103,8 +110,9 @@ LL |     let _ = create!(macro method);
    = note: this error originates in the macro `Type` which comes from the expansion of the macro `create` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: use the path separator to refer to an item
    |
-LL |         <Type!()>::new(0)
-   |         ~~~~~~~~~~~
+LL -         Type!().new(0)
+LL +         <Type!()>::new(0)
+   |
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/resolve/issue-35675.stderr b/tests/ui/resolve/issue-35675.stderr
index 44af65b0768..83d92ea7bf1 100644
--- a/tests/ui/resolve/issue-35675.stderr
+++ b/tests/ui/resolve/issue-35675.stderr
@@ -6,8 +6,9 @@ LL | fn should_return_fruit() -> Apple {
    |
 help: there is an enum variant `Fruit::Apple`; try using the variant's enum
    |
-LL | fn should_return_fruit() -> Fruit {
-   |                             ~~~~~
+LL - fn should_return_fruit() -> Apple {
+LL + fn should_return_fruit() -> Fruit {
+   |
 
 error[E0425]: cannot find function, tuple struct or tuple variant `Apple` in this scope
   --> $DIR/issue-35675.rs:9:5
@@ -57,8 +58,9 @@ LL | fn bar() -> Variant3 {
    |
 help: there is an enum variant `x::Enum::Variant3`; try using the variant's enum
    |
-LL | fn bar() -> x::Enum {
-   |             ~~~~~~~
+LL - fn bar() -> Variant3 {
+LL + fn bar() -> x::Enum {
+   |
 
 error[E0573]: expected type, found variant `Some`
   --> $DIR/issue-35675.rs:28:13
diff --git a/tests/ui/resolve/issue-3907.stderr b/tests/ui/resolve/issue-3907.stderr
index e9dc344496e..0dc85829160 100644
--- a/tests/ui/resolve/issue-3907.stderr
+++ b/tests/ui/resolve/issue-3907.stderr
@@ -6,7 +6,8 @@ LL | impl Foo for S {
    |
 help: you might have meant to use `#![feature(trait_alias)]` instead of a `type` alias
    |
-LL | trait Foo = dyn issue_3907::Foo;
+LL - type Foo = dyn issue_3907::Foo;
+LL + trait Foo = dyn issue_3907::Foo;
    |
 help: consider importing this trait instead
    |
diff --git a/tests/ui/resolve/issue-39226.stderr b/tests/ui/resolve/issue-39226.stderr
index 857f6a73517..3d771b4fc42 100644
--- a/tests/ui/resolve/issue-39226.stderr
+++ b/tests/ui/resolve/issue-39226.stderr
@@ -9,12 +9,14 @@ LL |         handle: Handle
    |
 help: use struct literal syntax instead
    |
-LL |         handle: Handle {}
-   |                 ~~~~~~~~~
+LL -         handle: Handle
+LL +         handle: Handle {}
+   |
 help: a local variable with a similar name exists
    |
-LL |         handle: handle
-   |                 ~~~~~~
+LL -         handle: Handle
+LL +         handle: handle
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/resolve/issue-42944.stderr b/tests/ui/resolve/issue-42944.stderr
index 4ffa9402c66..53c155d8f13 100644
--- a/tests/ui/resolve/issue-42944.stderr
+++ b/tests/ui/resolve/issue-42944.stderr
@@ -23,8 +23,9 @@ LL |     pub struct Bx(pub(in crate::foo) ());
    |                   ^^^^^^^^^^^^^^^^^^^^^ private field
 help: consider making the field publicly accessible
    |
-LL |     pub struct Bx(pub ());
-   |                   ~~~
+LL -     pub struct Bx(pub(in crate::foo) ());
+LL +     pub struct Bx(pub ());
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/resolve/issue-5035.stderr b/tests/ui/resolve/issue-5035.stderr
index 32b972b21ff..b249aaa4b28 100644
--- a/tests/ui/resolve/issue-5035.stderr
+++ b/tests/ui/resolve/issue-5035.stderr
@@ -15,12 +15,14 @@ LL | impl K for isize {}
    |
 help: you might have meant to use `#![feature(trait_alias)]` instead of a `type` alias
    |
-LL | trait K = dyn I;
+LL - type K = dyn I;
+LL + trait K = dyn I;
    |
 help: a trait with a similar name exists
    |
-LL | impl I for isize {}
-   |      ~
+LL - impl K for isize {}
+LL + impl I for isize {}
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/resolve/issue-5099.stderr b/tests/ui/resolve/issue-5099.stderr
index e9b2a9c4d48..991c39db335 100644
--- a/tests/ui/resolve/issue-5099.stderr
+++ b/tests/ui/resolve/issue-5099.stderr
@@ -6,8 +6,9 @@ LL |         this.a
    |
 help: you might have meant to use `self` here instead
    |
-LL |         self.a
-   |         ~~~~
+LL -         this.a
+LL +         self.a
+   |
 help: if you meant to use `self`, you are also missing a `self` receiver argument
    |
 LL |     fn a(&self) -> A {
@@ -21,8 +22,9 @@ LL |         this.b(x);
    |
 help: you might have meant to use `self` here instead
    |
-LL |         self.b(x);
-   |         ~~~~
+LL -         this.b(x);
+LL +         self.b(x);
+   |
 help: if you meant to use `self`, you are also missing a `self` receiver argument
    |
 LL |     fn b(&self, x: i32) {
@@ -36,8 +38,9 @@ LL |         let _ = || this.a;
    |
 help: you might have meant to use `self` here instead
    |
-LL |         let _ = || self.a;
-   |                    ~~~~
+LL -         let _ = || this.a;
+LL +         let _ = || self.a;
+   |
 help: if you meant to use `self`, you are also missing a `self` receiver argument
    |
 LL |     fn c(&self) {
diff --git a/tests/ui/resolve/issue-55673.stderr b/tests/ui/resolve/issue-55673.stderr
index 7d420126199..30b1cd09085 100644
--- a/tests/ui/resolve/issue-55673.stderr
+++ b/tests/ui/resolve/issue-55673.stderr
@@ -6,8 +6,9 @@ LL |     T::Baa: std::fmt::Debug,
    |
 help: change the associated type name to use `Bar` from `Foo`
    |
-LL |     T::Bar: std::fmt::Debug,
-   |        ~~~
+LL -     T::Baa: std::fmt::Debug,
+LL +     T::Bar: std::fmt::Debug,
+   |
 
 error[E0220]: associated type `Baa` not found for `T`
   --> $DIR/issue-55673.rs:16:8
@@ -17,12 +18,14 @@ LL |     T::Baa: std::fmt::Debug,
    |
 help: consider further restricting type parameter `T` with trait `Foo`
    |
-LL |     T::Baa: std::fmt::Debug, T: Foo
-   |                            ~~~~~~~~
+LL -     T::Baa: std::fmt::Debug,
+LL +     T::Baa: std::fmt::Debug, T: Foo
+   |
 help: ...and changing the associated type name
    |
-LL |     T::Bar: std::fmt::Debug,
-   |        ~~~
+LL -     T::Baa: std::fmt::Debug,
+LL +     T::Bar: std::fmt::Debug,
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/resolve/issue-73427.stderr b/tests/ui/resolve/issue-73427.stderr
index 0a9a504f79c..890bb04f24d 100644
--- a/tests/ui/resolve/issue-73427.stderr
+++ b/tests/ui/resolve/issue-73427.stderr
@@ -17,14 +17,17 @@ LL | | }
    | |_^
 help: you might have meant to use one of the following enum variants
    |
-LL |     (A::Tuple()).foo();
-   |     ~~~~~~~~~~~~
-LL |     A::Unit.foo();
-   |     ~~~~~~~
+LL -     A.foo();
+LL +     (A::Tuple()).foo();
+   |
+LL -     A.foo();
+LL +     A::Unit.foo();
+   |
 help: alternatively, the following enum variant is available
    |
-LL |     (A::TupleWithFields(/* fields */)).foo();
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL -     A.foo();
+LL +     (A::TupleWithFields(/* fields */)).foo();
+   |
 
 error[E0423]: expected value, found enum `B`
   --> $DIR/issue-73427.rs:35:5
@@ -58,12 +61,14 @@ LL | | }
    | |_^
 help: you might have meant to use the following enum variant
    |
-LL |     C::Unit.foo();
-   |     ~~~~~~~
+LL -     C.foo();
+LL +     C::Unit.foo();
+   |
 help: alternatively, the following enum variant is available
    |
-LL |     (C::TupleWithFields(/* fields */)).foo();
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL -     C.foo();
+LL +     (C::TupleWithFields(/* fields */)).foo();
+   |
 
 error[E0423]: expected value, found enum `D`
   --> $DIR/issue-73427.rs:39:5
@@ -81,12 +86,14 @@ LL | | }
    | |_^
 help: you might have meant to use the following enum variant
    |
-LL |     D::Unit.foo();
-   |     ~~~~~~~
+LL -     D.foo();
+LL +     D::Unit.foo();
+   |
 help: alternatively, the following enum variant is available
    |
-LL |     (D::TupleWithFields(/* fields */)).foo();
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL -     D.foo();
+LL +     (D::TupleWithFields(/* fields */)).foo();
+   |
 
 error[E0423]: expected value, found enum `E`
   --> $DIR/issue-73427.rs:41:5
@@ -103,8 +110,9 @@ LL | | }
    | |_^
 help: the following enum variant is available
    |
-LL |     (E::TupleWithFields(/* fields */)).foo();
-   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL -     E.foo();
+LL +     (E::TupleWithFields(/* fields */)).foo();
+   |
 help: consider importing one of these constants instead
    |
 LL + use std::f128::consts::E;
@@ -136,10 +144,12 @@ LL | | }
    | |_^
 help: try to match against one of the enum's variants
    |
-LL |     if let A::Tuple(3) = x { }
-   |            ~~~~~~~~
-LL |     if let A::TupleWithFields(3) = x { }
-   |            ~~~~~~~~~~~~~~~~~~
+LL -     if let A(3) = x { }
+LL +     if let A::Tuple(3) = x { }
+   |
+LL -     if let A(3) = x { }
+LL +     if let A::TupleWithFields(3) = x { }
+   |
 
 error[E0423]: expected function, tuple struct or tuple variant, found enum `A`
   --> $DIR/issue-73427.rs:46:13
@@ -161,10 +171,12 @@ LL | | }
    | |_^
 help: try to construct one of the enum's variants
    |
-LL |     let x = A::Tuple(3);
-   |             ~~~~~~~~
-LL |     let x = A::TupleWithFields(3);
-   |             ~~~~~~~~~~~~~~~~~~
+LL -     let x = A(3);
+LL +     let x = A::Tuple(3);
+   |
+LL -     let x = A(3);
+LL +     let x = A::TupleWithFields(3);
+   |
 
 error: aborting due to 7 previous errors
 
diff --git a/tests/ui/resolve/privacy-enum-ctor.stderr b/tests/ui/resolve/privacy-enum-ctor.stderr
index 12a6580048e..3bbab3716af 100644
--- a/tests/ui/resolve/privacy-enum-ctor.stderr
+++ b/tests/ui/resolve/privacy-enum-ctor.stderr
@@ -17,12 +17,14 @@ LL | |         }
    | |_________^
 help: you might have meant to use the following enum variant
    |
-LL |         m::Z::Unit;
-   |         ~~~~~~~~~~
+LL -         n::Z;
+LL +         m::Z::Unit;
+   |
 help: alternatively, the following enum variant is available
    |
-LL |         (m::Z::Fn(/* fields */));
-   |         ~~~~~~~~~~~~~~~~~~~~~~~~
+LL -         n::Z;
+LL +         (m::Z::Fn(/* fields */));
+   |
 
 error[E0423]: expected value, found enum `Z`
   --> $DIR/privacy-enum-ctor.rs:25:9
@@ -43,12 +45,14 @@ LL | |         }
    | |_________^
 help: you might have meant to use the following enum variant
    |
-LL |         m::Z::Unit;
-   |         ~~~~~~~~~~
+LL -         Z;
+LL +         m::Z::Unit;
+   |
 help: alternatively, the following enum variant is available
    |
-LL |         (m::Z::Fn(/* fields */));
-   |         ~~~~~~~~~~~~~~~~~~~~~~~~
+LL -         Z;
+LL +         (m::Z::Fn(/* fields */));
+   |
 
 error[E0423]: expected value, found enum `m::E`
   --> $DIR/privacy-enum-ctor.rs:41:16
@@ -72,16 +76,19 @@ LL | |     }
    | |_____^
 help: you might have meant to use the following enum variant
    |
-LL |     let _: E = E::Unit;
-   |                ~~~~~~~
+LL -     let _: E = m::E;
+LL +     let _: E = E::Unit;
+   |
 help: alternatively, the following enum variant is available
    |
-LL |     let _: E = (E::Fn(/* fields */));
-   |                ~~~~~~~~~~~~~~~~~~~~~
+LL -     let _: E = m::E;
+LL +     let _: E = (E::Fn(/* fields */));
+   |
 help: a function with a similar name exists
    |
-LL |     let _: E = m::f;
-   |                   ~
+LL -     let _: E = m::E;
+LL +     let _: E = m::f;
+   |
 help: consider importing one of these constants instead
    |
 LL + use std::f128::consts::E;
@@ -117,12 +124,14 @@ LL | |     }
    | |_____^
 help: you might have meant to use the following enum variant
    |
-LL |     let _: E = E::Unit;
-   |                ~~~~~~~
+LL -     let _: E = E;
+LL +     let _: E = E::Unit;
+   |
 help: alternatively, the following enum variant is available
    |
-LL |     let _: E = (E::Fn(/* fields */));
-   |                ~~~~~~~~~~~~~~~~~~~~~
+LL -     let _: E = E;
+LL +     let _: E = (E::Fn(/* fields */));
+   |
 help: consider importing one of these constants instead
    |
 LL + use std::f128::consts::E;
@@ -168,12 +177,14 @@ LL | |         }
    | |_________^
 help: you might have meant to use the following enum variant
    |
-LL |     let _: Z = m::Z::Unit;
-   |                ~~~~~~~~~~
+LL -     let _: Z = m::n::Z;
+LL +     let _: Z = m::Z::Unit;
+   |
 help: alternatively, the following enum variant is available
    |
-LL |     let _: Z = (m::Z::Fn(/* fields */));
-   |                ~~~~~~~~~~~~~~~~~~~~~~~~
+LL -     let _: Z = m::n::Z;
+LL +     let _: Z = (m::Z::Fn(/* fields */));
+   |
 
 error[E0412]: cannot find type `Z` in this scope
   --> $DIR/privacy-enum-ctor.rs:61:12
diff --git a/tests/ui/resolve/privacy-struct-ctor.stderr b/tests/ui/resolve/privacy-struct-ctor.stderr
index c1fcaaf0573..1d8c741c964 100644
--- a/tests/ui/resolve/privacy-struct-ctor.stderr
+++ b/tests/ui/resolve/privacy-struct-ctor.stderr
@@ -55,8 +55,9 @@ LL |         pub(in m) struct Z(pub(in m::n) u8);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: consider making the field publicly accessible
    |
-LL |         pub(in m) struct Z(pub u8);
-   |                            ~~~
+LL -         pub(in m) struct Z(pub(in m::n) u8);
+LL +         pub(in m) struct Z(pub u8);
+   |
 
 error[E0603]: tuple struct constructor `S` is private
   --> $DIR/privacy-struct-ctor.rs:29:8
@@ -112,8 +113,9 @@ LL |         pub(in m) struct Z(pub(in m::n) u8);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: consider making the field publicly accessible
    |
-LL |         pub(in m) struct Z(pub u8);
-   |                            ~~~
+LL -         pub(in m) struct Z(pub(in m::n) u8);
+LL +         pub(in m) struct Z(pub u8);
+   |
 
 error[E0603]: tuple struct constructor `S` is private
   --> $DIR/privacy-struct-ctor.rs:41:16
diff --git a/tests/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr b/tests/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr
index 999e9a47d6c..f1db2d71b6a 100644
--- a/tests/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr
+++ b/tests/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr
@@ -3,7 +3,8 @@ error[E0259]: the name `std` is defined multiple times
    = note: `std` must be defined only once in the type namespace of this module
 help: you can use `as` to change the binding name of the import
    |
-LL | extern crate std as other_std;
+LL - extern crate std;
+LL + extern crate std as other_std;
    |
 
 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 a8d0efedb6c..40c76821bb8 100644
--- a/tests/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr
+++ b/tests/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr
@@ -7,8 +7,9 @@ LL | use std::slice as std;
    = note: `std` must be defined only once in the type namespace of this module
 help: you can use `as` to change the binding name of the import
    |
-LL | use std::slice as other_std;
-   |                ~~~~~~~~~~~~
+LL - use std::slice as std;
+LL + use std::slice as other_std;
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/resolve/resolve-inconsistent-names.stderr b/tests/ui/resolve/resolve-inconsistent-names.stderr
index d6240fb8f87..3197e0b0894 100644
--- a/tests/ui/resolve/resolve-inconsistent-names.stderr
+++ b/tests/ui/resolve/resolve-inconsistent-names.stderr
@@ -34,8 +34,9 @@ LL |         (A, B) | (ref B, c) | (c, A) => ()
    |
 help: if you meant to match on unit variant `E::A`, use the full path in the pattern
    |
-LL |         (E::A, B) | (ref B, c) | (c, A) => ()
-   |          ~~~~
+LL -         (A, B) | (ref B, c) | (c, A) => ()
+LL +         (E::A, B) | (ref B, c) | (c, A) => ()
+   |
 
 error[E0408]: variable `B` is not bound in all patterns
   --> $DIR/resolve-inconsistent-names.rs:19:31
@@ -64,8 +65,9 @@ LL |         (CONST1, _) | (_, Const2) => ()
    |
 help: if you meant to match on constant `m::Const2`, use the full path in the pattern
    |
-LL |         (CONST1, _) | (_, m::Const2) => ()
-   |                           ~~~~~~~~~
+LL -         (CONST1, _) | (_, Const2) => ()
+LL +         (CONST1, _) | (_, m::Const2) => ()
+   |
 
 error[E0408]: variable `CONST1` is not bound in all patterns
   --> $DIR/resolve-inconsistent-names.rs:31:23
diff --git a/tests/ui/resolve/resolve-issue-135614-assoc-const.import_trait_associated_functions.stderr b/tests/ui/resolve/resolve-issue-135614-assoc-const.import_trait_associated_functions.stderr
index b41fa1818e2..3d6d47578c3 100644
--- a/tests/ui/resolve/resolve-issue-135614-assoc-const.import_trait_associated_functions.stderr
+++ b/tests/ui/resolve/resolve-issue-135614-assoc-const.import_trait_associated_functions.stderr
@@ -11,8 +11,9 @@ LL |     const DEFAULT: u32 = 0;
    = note: the matched value is of type `u32`
 help: introduce a variable instead
    |
-LL |     let DEFAULT_var: u32 = 0;
-   |         ~~~~~~~~~~~
+LL -     let DEFAULT: u32 = 0;
+LL +     let DEFAULT_var: u32 = 0;
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/resolve/resolve-issue-135614-assoc-const.normal.stderr b/tests/ui/resolve/resolve-issue-135614-assoc-const.normal.stderr
index 908f5bdd897..f041487da41 100644
--- a/tests/ui/resolve/resolve-issue-135614-assoc-const.normal.stderr
+++ b/tests/ui/resolve/resolve-issue-135614-assoc-const.normal.stderr
@@ -21,8 +21,9 @@ LL |     const DEFAULT: u32 = 0;
    = note: the matched value is of type `u32`
 help: introduce a variable instead
    |
-LL |     let DEFAULT_var: u32 = 0;
-   |         ~~~~~~~~~~~
+LL -     let DEFAULT: u32 = 0;
+LL +     let DEFAULT_var: u32 = 0;
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/resolve/resolve-variant-assoc-item.stderr b/tests/ui/resolve/resolve-variant-assoc-item.stderr
index 9a5a605ac05..4b15114f022 100644
--- a/tests/ui/resolve/resolve-variant-assoc-item.stderr
+++ b/tests/ui/resolve/resolve-variant-assoc-item.stderr
@@ -6,8 +6,9 @@ LL |     E::V::associated_item;
    |
 help: there is an enum variant `E::V`; try using the variant's enum
    |
-LL |     E::associated_item;
-   |     ~
+LL -     E::V::associated_item;
+LL +     E::associated_item;
+   |
 
 error[E0433]: failed to resolve: `V` is a variant, not a module
   --> $DIR/resolve-variant-assoc-item.rs:6:5
@@ -17,8 +18,9 @@ LL |     V::associated_item;
    |
 help: there is an enum variant `E::V`; try using the variant's enum
    |
-LL |     E::associated_item;
-   |     ~
+LL -     V::associated_item;
+LL +     E::associated_item;
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/resolve/suggest-path-for-tuple-struct.stderr b/tests/ui/resolve/suggest-path-for-tuple-struct.stderr
index 12c631f5a83..68a5b550978 100644
--- a/tests/ui/resolve/suggest-path-for-tuple-struct.stderr
+++ b/tests/ui/resolve/suggest-path-for-tuple-struct.stderr
@@ -6,8 +6,9 @@ LL |     let _ = SomeTupleStruct.new();
    |
 help: use the path separator to refer to an item
    |
-LL |     let _ = SomeTupleStruct::new();
-   |                            ~~
+LL -     let _ = SomeTupleStruct.new();
+LL +     let _ = SomeTupleStruct::new();
+   |
 
 error[E0423]: expected value, found struct `SomeRegularStruct`
   --> $DIR/suggest-path-for-tuple-struct.rs:24:13
@@ -17,8 +18,9 @@ LL |     let _ = SomeRegularStruct.new();
    |
 help: use the path separator to refer to an item
    |
-LL |     let _ = SomeRegularStruct::new();
-   |                              ~~
+LL -     let _ = SomeRegularStruct.new();
+LL +     let _ = SomeRegularStruct::new();
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/resolve/suggest-path-instead-of-mod-dot-item.stderr b/tests/ui/resolve/suggest-path-instead-of-mod-dot-item.stderr
index 9c12fd2644c..5db943cd10d 100644
--- a/tests/ui/resolve/suggest-path-instead-of-mod-dot-item.stderr
+++ b/tests/ui/resolve/suggest-path-instead-of-mod-dot-item.stderr
@@ -6,8 +6,9 @@ LL |     a.I
    |
 help: use the path separator to refer to an item
    |
-LL |     a::I
-   |      ~~
+LL -     a.I
+LL +     a::I
+   |
 
 error[E0423]: expected value, found module `a`
   --> $DIR/suggest-path-instead-of-mod-dot-item.rs:23:5
@@ -17,8 +18,9 @@ LL |     a.g()
    |
 help: use the path separator to refer to an item
    |
-LL |     a::g()
-   |      ~~
+LL -     a.g()
+LL +     a::g()
+   |
 
 error[E0423]: expected value, found module `a`
   --> $DIR/suggest-path-instead-of-mod-dot-item.rs:29:5
@@ -28,8 +30,9 @@ LL |     a.b.J
    |
 help: use the path separator to refer to an item
    |
-LL |     a::b.J
-   |      ~~
+LL -     a.b.J
+LL +     a::b.J
+   |
 
 error[E0423]: expected value, found module `a::b`
   --> $DIR/suggest-path-instead-of-mod-dot-item.rs:35:5
@@ -42,12 +45,14 @@ LL |     a::b.J
    |
 help: use the path separator to refer to an item
    |
-LL |     a::b::J
-   |         ~~
+LL -     a::b.J
+LL +     a::b::J
+   |
 help: a constant with a similar name exists
    |
-LL |     a::I.J
-   |        ~
+LL -     a::b.J
+LL +     a::I.J
+   |
 
 error[E0423]: expected value, found module `a`
   --> $DIR/suggest-path-instead-of-mod-dot-item.rs:42:5
@@ -57,8 +62,9 @@ LL |     a.b.f();
    |
 help: use the path separator to refer to an item
    |
-LL |     a::b.f();
-   |      ~~
+LL -     a.b.f();
+LL +     a::b.f();
+   |
 
 error[E0423]: expected value, found module `a::b`
   --> $DIR/suggest-path-instead-of-mod-dot-item.rs:46:12
@@ -82,12 +88,14 @@ LL |     a::b.f()
    |
 help: use the path separator to refer to an item
    |
-LL |     a::b::f()
-   |         ~~
+LL -     a::b.f()
+LL +     a::b::f()
+   |
 help: a constant with a similar name exists
    |
-LL |     a::I.f()
-   |        ~
+LL -     a::b.f()
+LL +     a::I.f()
+   |
 
 error[E0423]: expected value, found module `a::b`
   --> $DIR/suggest-path-instead-of-mod-dot-item.rs:59:5
@@ -145,8 +153,9 @@ LL |     let _ = create!(method);
    = note: this error originates in the macro `create` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: use the path separator to refer to an item
    |
-LL |         a::f()
-   |          ~~
+LL -         a.f()
+LL +         a::f()
+   |
 
 error[E0423]: expected value, found module `a`
   --> $DIR/suggest-path-instead-of-mod-dot-item.rs:85:9
@@ -160,8 +169,9 @@ LL |     let _ = create!(field);
    = note: this error originates in the macro `create` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: use the path separator to refer to an item
    |
-LL |         a::f
-   |          ~~
+LL -         a.f
+LL +         a::f
+   |
 
 error: aborting due to 13 previous errors
 
diff --git a/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr b/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr
index 5662021a2d5..15fdb975a1b 100644
--- a/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr
+++ b/tests/ui/resolve/typo-suggestion-for-variable-with-name-similar-to-struct-field.stderr
@@ -28,8 +28,9 @@ LL |         println!("{self.config}");
    |                    +++++
 help: a local variable with a similar name exists
    |
-LL |         println!("{cofig}");
-   |                    ~~~~~
+LL -         println!("{config}");
+LL +         println!("{cofig}");
+   |
 
 error[E0425]: cannot find value `bah` in this scope
   --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:33:9
@@ -46,8 +47,9 @@ LL |         Self::bah;
    |         ++++++
 help: a function with a similar name exists
    |
-LL |         ba;
-   |         ~~
+LL -         bah;
+LL +         ba;
+   |
 
 error[E0425]: cannot find value `BAR` in this scope
   --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:35:9
@@ -64,8 +66,9 @@ LL |         Self::BAR;
    |         ++++++
 help: a constant with a similar name exists
    |
-LL |         BARR;
-   |         ~~~~
+LL -         BAR;
+LL +         BARR;
+   |
 
 error[E0412]: cannot find type `Baz` in this scope
   --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:37:18
@@ -82,8 +85,9 @@ LL |         let foo: Self::Baz = "".to_string();
    |                  ++++++
 help: a type alias with a similar name exists
    |
-LL |         let foo: Bar = "".to_string();
-   |                  ~~~
+LL -         let foo: Baz = "".to_string();
+LL +         let foo: Bar = "".to_string();
+   |
 
 error[E0425]: cannot find function `baz` in this scope
   --> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:31:9
@@ -100,8 +104,9 @@ LL |         self.baz();
    |         +++++
 help: a function with a similar name exists
    |
-LL |         ba();
-   |         ~~
+LL -         baz();
+LL +         ba();
+   |
 
 error: aborting due to 7 previous errors
 
diff --git a/tests/ui/resolve/typo-suggestion-mistyped-in-path.stderr b/tests/ui/resolve/typo-suggestion-mistyped-in-path.stderr
index 3ae134e43bc..1ea7f1d39cb 100644
--- a/tests/ui/resolve/typo-suggestion-mistyped-in-path.stderr
+++ b/tests/ui/resolve/typo-suggestion-mistyped-in-path.stderr
@@ -18,8 +18,9 @@ LL |     Struct::fob();
    |
 help: there is an associated function `foo` with a similar name
    |
-LL |     Struct::foo();
-   |             ~~~
+LL -     Struct::fob();
+LL +     Struct::foo();
+   |
 
 error[E0433]: failed to resolve: use of undeclared type `Struc`
   --> $DIR/typo-suggestion-mistyped-in-path.rs:27:5
@@ -38,8 +39,9 @@ LL |     modul::foo();
    |
 help: there is a crate or module with a similar name
    |
-LL |     module::foo();
-   |     ~~~~~~
+LL -     modul::foo();
+LL +     module::foo();
+   |
 
 error[E0433]: failed to resolve: use of undeclared type `Trai`
   --> $DIR/typo-suggestion-mistyped-in-path.rs:39:5
diff --git a/tests/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr b/tests/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr
index 8addc0303fb..f885705a17b 100644
--- a/tests/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr
+++ b/tests/ui/resolve/unboxed-closure-sugar-nonexistent-trait.stderr
@@ -12,7 +12,8 @@ LL | fn g<F:Typedef(isize) -> isize>(x: F) {}
    |
 help: you might have meant to use `#![feature(trait_alias)]` instead of a `type` alias
    |
-LL | trait Typedef = isize;
+LL - type Typedef = isize;
+LL + trait Typedef = isize;
    |
 
 error: aborting due to 2 previous errors