about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-11-14 14:08:08 -0800
committerEsteban Küber <esteban@kuber.com.ar>2019-11-18 11:02:44 -0800
commitb2e6aef0731990c98a6fb7ac6f890aa359a5e9e6 (patch)
treedf1407f0fe6c3c53725fcf0f93a5ec293ca86247 /src
parent83ffda5216a9a4248221b980ee08c30ac6e517f8 (diff)
downloadrust-b2e6aef0731990c98a6fb7ac6f890aa359a5e9e6.tar.gz
rust-b2e6aef0731990c98a6fb7ac6f890aa359a5e9e6.zip
review comments: tweak prefix strings
Diffstat (limited to 'src')
-rw-r--r--src/librustc/ty/error.rs8
-rw-r--r--src/test/ui/arg-type-mismatch.stderr4
-rw-r--r--src/test/ui/array-break-length.stderr8
-rw-r--r--src/test/ui/associated-types/issue-44153.stderr4
-rw-r--r--src/test/ui/associated-types/point-at-type-on-obligation-failure.stderr4
-rw-r--r--src/test/ui/async-await/async-block-control-flow-static-semantics.stderr24
-rw-r--r--src/test/ui/block-expression-remove-semicolon.stderr4
-rw-r--r--src/test/ui/block-result/block-must-not-have-result-do.stderr4
-rw-r--r--src/test/ui/block-result/block-must-not-have-result-res.stderr4
-rw-r--r--src/test/ui/block-result/block-must-not-have-result-while.rs2
-rw-r--r--src/test/ui/block-result/block-must-not-have-result-while.stderr4
-rw-r--r--src/test/ui/block-result/consider-removing-last-semi.stderr4
-rw-r--r--src/test/ui/block-result/issue-11714.stderr4
-rw-r--r--src/test/ui/block-result/issue-13428.stderr4
-rw-r--r--src/test/ui/block-result/issue-13624.rs4
-rw-r--r--src/test/ui/block-result/issue-13624.stderr8
-rw-r--r--src/test/ui/block-result/issue-20862.stderr4
-rw-r--r--src/test/ui/block-result/issue-22645.stderr4
-rw-r--r--src/test/ui/block-result/issue-5500.rs2
-rw-r--r--src/test/ui/block-result/issue-5500.stderr4
-rw-r--r--src/test/ui/block-result/unexpected-return-on-unit.stderr4
-rw-r--r--src/test/ui/break-while-condition.stderr12
-rw-r--r--src/test/ui/codemap_tests/tab.stderr4
-rw-r--r--src/test/ui/coercion/coercion-missing-tail-expected-type.stderr8
-rw-r--r--src/test/ui/destructure-trait-ref.rs6
-rw-r--r--src/test/ui/destructure-trait-ref.stderr12
-rw-r--r--src/test/ui/diverging-tuple-parts-39485.stderr4
-rw-r--r--src/test/ui/dst/dst-bad-assign-3.rs2
-rw-r--r--src/test/ui/dst/dst-bad-assign-3.stderr4
-rw-r--r--src/test/ui/dst/dst-bad-assign.rs2
-rw-r--r--src/test/ui/dst/dst-bad-assign.stderr4
-rw-r--r--src/test/ui/error-codes/E0070.stderr4
-rw-r--r--src/test/ui/fn/fn-trait-formatting.rs6
-rw-r--r--src/test/ui/fn/fn-trait-formatting.stderr12
-rw-r--r--src/test/ui/generic/generic-type-params-name-repr.rs12
-rw-r--r--src/test/ui/generic/generic-type-params-name-repr.stderr12
-rw-r--r--src/test/ui/if-else-type-mismatch.stderr12
-rw-r--r--src/test/ui/if/if-without-else-as-fn-expr.stderr24
-rw-r--r--src/test/ui/if/if-without-else-result.rs2
-rw-r--r--src/test/ui/if/if-without-else-result.stderr4
-rw-r--r--src/test/ui/issues/issue-11319.stderr4
-rw-r--r--src/test/ui/issues/issue-16401.rs2
-rw-r--r--src/test/ui/issues/issue-16401.stderr4
-rw-r--r--src/test/ui/issues/issue-17033.rs2
-rw-r--r--src/test/ui/issues/issue-17033.stderr2
-rw-r--r--src/test/ui/issues/issue-17728.nll.stderr4
-rw-r--r--src/test/ui/issues/issue-19991.rs2
-rw-r--r--src/test/ui/issues/issue-19991.stderr4
-rw-r--r--src/test/ui/issues/issue-22684.stderr4
-rw-r--r--src/test/ui/issues/issue-27042.stderr16
-rw-r--r--src/test/ui/issues/issue-32323.stderr2
-rw-r--r--src/test/ui/issues/issue-37026.stderr8
-rw-r--r--src/test/ui/issues/issue-37665.stderr4
-rw-r--r--src/test/ui/issues/issue-39970.stderr2
-rw-r--r--src/test/ui/issues/issue-41549.stderr4
-rw-r--r--src/test/ui/issues/issue-4201.rs2
-rw-r--r--src/test/ui/issues/issue-4201.stderr4
-rw-r--r--src/test/ui/issues/issue-43162.stderr4
-rw-r--r--src/test/ui/issues/issue-44023.stderr4
-rw-r--r--src/test/ui/issues/issue-46112.stderr4
-rw-r--r--src/test/ui/issues/issue-47486.stderr4
-rw-r--r--src/test/ui/issues/issue-50577.stderr4
-rw-r--r--src/test/ui/issues/issue-50585.stderr4
-rw-r--r--src/test/ui/issues/issue-6458-4.stderr4
-rw-r--r--src/test/ui/json-bom-plus-crlf-multifile.stderr2
-rw-r--r--src/test/ui/json-bom-plus-crlf.stderr2
-rw-r--r--src/test/ui/liveness/liveness-closure-require-ret.stderr4
-rw-r--r--src/test/ui/liveness/liveness-forgot-ret.stderr4
-rw-r--r--src/test/ui/liveness/liveness-issue-2163.stderr4
-rw-r--r--src/test/ui/liveness/liveness-missing-ret2.stderr4
-rw-r--r--src/test/ui/liveness/liveness-return-last-stmt-semi.stderr16
-rw-r--r--src/test/ui/loops/loop-break-value.stderr20
-rw-r--r--src/test/ui/loops/loop-labeled-break-value.stderr12
-rw-r--r--src/test/ui/loops/loop-properly-diverging-2.stderr4
-rw-r--r--src/test/ui/match/match-type-err-first-arm.stderr4
-rw-r--r--src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr20
-rw-r--r--src/test/ui/mir-unpretty.stderr4
-rw-r--r--src/test/ui/mismatched_types/for-loop-has-unit-body.stderr4
-rw-r--r--src/test/ui/mismatched_types/issue-19109.stderr4
-rw-r--r--src/test/ui/mismatched_types/main.stderr4
-rw-r--r--src/test/ui/missing/missing-return.stderr4
-rw-r--r--src/test/ui/or-patterns/consistent-bindings.stderr4
-rw-r--r--src/test/ui/output-type-mismatch.stderr4
-rw-r--r--src/test/ui/parser/expr-as-stmt.stderr16
-rw-r--r--src/test/ui/parser/issue-33413.stderr4
-rw-r--r--src/test/ui/parser/issue-62881.stderr4
-rw-r--r--src/test/ui/parser/issue-62895.stderr4
-rw-r--r--src/test/ui/parser/match-vec-invalid.stderr4
-rw-r--r--src/test/ui/parser/pat-lt-bracket-6.stderr4
-rw-r--r--src/test/ui/parser/pat-lt-bracket-7.stderr4
-rw-r--r--src/test/ui/parser/pat-tuple-4.stderr4
-rw-r--r--src/test/ui/parser/recover-for-loop-parens-around-head.stderr4
-rw-r--r--src/test/ui/parser/recover-from-homoglyph.stderr4
-rw-r--r--src/test/ui/parser/recover-missing-semi.stderr8
-rw-r--r--src/test/ui/pattern/pat-tuple-bad-type.stderr4
-rw-r--r--src/test/ui/proc-macro/issue-37788.stderr4
-rw-r--r--src/test/ui/proc-macro/span-preservation.stderr4
-rw-r--r--src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.nll.stderr4
-rw-r--r--src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.nll.stderr4
-rw-r--r--src/test/ui/regions/regions-lifetime-bounds-on-fns.nll.stderr4
-rw-r--r--src/test/ui/repeat_count.rs2
-rw-r--r--src/test/ui/repeat_count.stderr4
-rw-r--r--src/test/ui/return/return-type.stderr4
-rw-r--r--src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr12
-rw-r--r--src/test/ui/span/move-closure.stderr4
-rw-r--r--src/test/ui/specialization/specialization-default-projection.stderr4
-rw-r--r--src/test/ui/struct-literal-variant-in-if.stderr8
-rw-r--r--src/test/ui/substs-ppaux.normal.stderr16
-rw-r--r--src/test/ui/substs-ppaux.rs16
-rw-r--r--src/test/ui/substs-ppaux.verbose.stderr16
-rw-r--r--src/test/ui/suggestions/match-needing-semi.stderr8
-rw-r--r--src/test/ui/suppressed-error.rs2
-rw-r--r--src/test/ui/suppressed-error.stderr4
-rw-r--r--src/test/ui/terminal-width/non-whitespace-trimming-2.stderr4
-rw-r--r--src/test/ui/terminal-width/non-whitespace-trimming-unicode.stderr4
-rw-r--r--src/test/ui/terminal-width/non-whitespace-trimming.stderr4
-rw-r--r--src/test/ui/terminal-width/whitespace-trimming-2.stderr4
-rw-r--r--src/test/ui/terminal-width/whitespace-trimming.stderr4
-rw-r--r--src/test/ui/try-block/try-block-bad-type.stderr4
-rw-r--r--src/test/ui/try-block/try-block-type-error.stderr4
-rw-r--r--src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr12
-rw-r--r--src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.nll.stderr4
-rw-r--r--src/test/ui/type-alias-impl-trait/issue-63279.stderr2
-rw-r--r--src/test/ui/type/type-check/assignment-expected-bool.stderr48
-rw-r--r--src/test/ui/type/type-check/assignment-in-if.stderr24
-rw-r--r--src/test/ui/type/type-error-break-tail.stderr4
-rw-r--r--src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr4
-rw-r--r--src/test/ui/variance/variance-contravariant-arg-object.stderr8
-rw-r--r--src/test/ui/variance/variance-covariant-arg-object.stderr8
-rw-r--r--src/test/ui/variance/variance-invariant-arg-object.stderr8
130 files changed, 407 insertions, 407 deletions
diff --git a/src/librustc/ty/error.rs b/src/librustc/ty/error.rs
index 8babd0584b3..09a833baca9 100644
--- a/src/librustc/ty/error.rs
+++ b/src/librustc/ty/error.rs
@@ -252,7 +252,7 @@ impl<'tcx> ty::TyS<'tcx> {
         match self.kind {
             ty::Infer(_) | ty::Error | ty::Bool | ty::Char | ty::Int(_) |
             ty::Uint(_) | ty::Float(_) | ty::Str | ty::Never => "type".into(),
-            ty::Tuple(ref tys) if tys.is_empty() => "type".into(),
+            ty::Tuple(ref tys) if tys.is_empty() => "unit type".into(),
             ty::Adt(def, _) => def.descr().into(),
             ty::Foreign(_) => "extern type".into(),
             ty::Array(..) => "array".into(),
@@ -264,13 +264,13 @@ impl<'tcx> ty::TyS<'tcx> {
             }.into(),
             ty::FnDef(..) => "fn item".into(),
             ty::FnPtr(_) => "fn pointer".into(),
-            ty::Dynamic(..) => "trait".into(),
+            ty::Dynamic(..) => "trait object".into(),
             ty::Closure(..) => "closure".into(),
             ty::Generator(..) => "generator".into(),
             ty::GeneratorWitness(..) => "generator witness".into(),
             ty::Tuple(..) => "tuple".into(),
-            ty::Placeholder(..) => "placeholder type".into(),
-            ty::Bound(..) => "bound type".into(),
+            ty::Placeholder(..) => "higher-ranked type".into(),
+            ty::Bound(..) => "bound type variable".into(),
             ty::Projection(_) => "associated type".into(),
             ty::UnnormalizedProjection(_) => "associated type".into(),
             ty::Param(_) => "type parameter".into(),
diff --git a/src/test/ui/arg-type-mismatch.stderr b/src/test/ui/arg-type-mismatch.stderr
index d41abd1aa81..95aa36ebb89 100644
--- a/src/test/ui/arg-type-mismatch.stderr
+++ b/src/test/ui/arg-type-mismatch.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL | fn main() { let i: (); i = f(()); }
    |                              ^^ expected isize, found ()
    |
-   = note: expected type `isize`
-              found type `()`
+   = note:   expected type `isize`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/array-break-length.stderr b/src/test/ui/array-break-length.stderr
index 1fbbb0e79bb..971b3685b90 100644
--- a/src/test/ui/array-break-length.stderr
+++ b/src/test/ui/array-break-length.stderr
@@ -16,8 +16,8 @@ error[E0308]: mismatched types
 LL |         |_: [_; break]| {}
    |         ^^^^^^^^^^^^^^^^^^ expected (), found closure
    |
-   = note: expected type `()`
-           found closure `[closure@$DIR/array-break-length.rs:3:9: 3:27]`
+   = note: expected unit type `()`
+                found closure `[closure@$DIR/array-break-length.rs:3:9: 3:27]`
 
 error[E0308]: mismatched types
   --> $DIR/array-break-length.rs:8:9
@@ -25,8 +25,8 @@ error[E0308]: mismatched types
 LL |         |_: [_; continue]| {}
    |         ^^^^^^^^^^^^^^^^^^^^^ expected (), found closure
    |
-   = note: expected type `()`
-           found closure `[closure@$DIR/array-break-length.rs:8:9: 8:30]`
+   = note: expected unit type `()`
+                found closure `[closure@$DIR/array-break-length.rs:8:9: 8:30]`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/associated-types/issue-44153.stderr b/src/test/ui/associated-types/issue-44153.stderr
index 556fd0766c2..7751d20f352 100644
--- a/src/test/ui/associated-types/issue-44153.stderr
+++ b/src/test/ui/associated-types/issue-44153.stderr
@@ -7,8 +7,8 @@ LL |     fn visit() {}
 LL |     <() as Visit>::visit();
    |     ^^^^^^^^^^^^^^^^^^^^ expected (), found &()
    |
-   = note:   expected type `()`
-           found reference `&()`
+   = note: expected unit type `()`
+              found reference `&()`
    = note: required because of the requirements on the impl of `Visit` for `()`
 
 error: aborting due to previous error
diff --git a/src/test/ui/associated-types/point-at-type-on-obligation-failure.stderr b/src/test/ui/associated-types/point-at-type-on-obligation-failure.stderr
index e4bd39c8ba6..ceb811f7e01 100644
--- a/src/test/ui/associated-types/point-at-type-on-obligation-failure.stderr
+++ b/src/test/ui/associated-types/point-at-type-on-obligation-failure.stderr
@@ -9,8 +9,8 @@ LL | impl Bar for Foo {
 LL |     type Ok = ();
    |     ^^^^^^^^^^^^^ expected u32, found ()
    |
-   = note: expected type `u32`
-              found type `()`
+   = note:   expected type `u32`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr b/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr
index bdfa0443f8c..832f00642e3 100644
--- a/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr
+++ b/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr
@@ -26,8 +26,8 @@ LL | fn return_targets_async_block_not_fn() -> u8 {
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected type `u8`
-              found type `()`
+   = note:   expected type `u8`
+           found unit type `()`
 
 error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == ()`
   --> $DIR/async-block-control-flow-static-semantics.rs:18:39
@@ -35,8 +35,8 @@ error[E0271]: type mismatch resolving `<impl std::future::Future as std::future:
 LL |     let _: &dyn Future<Output = ()> = &block;
    |                                       ^^^^^^ expected (), found u8
    |
-   = note: expected type `()`
-              found type `u8`
+   = note: expected unit type `()`
+                   found type `u8`
    = note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
 
 error[E0308]: mismatched types
@@ -52,8 +52,8 @@ LL | |
 LL | | }
    | |_^ expected u8, found ()
    |
-   = note: expected type `u8`
-              found type `()`
+   = note:   expected type `u8`
+           found unit type `()`
 
 error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == ()`
   --> $DIR/async-block-control-flow-static-semantics.rs:27:39
@@ -61,8 +61,8 @@ error[E0271]: type mismatch resolving `<impl std::future::Future as std::future:
 LL |     let _: &dyn Future<Output = ()> = &block;
    |                                       ^^^^^^ expected (), found u8
    |
-   = note: expected type `()`
-              found type `u8`
+   = note: expected unit type `()`
+                   found type `u8`
    = note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
 
 error[E0308]: mismatched types
@@ -73,8 +73,8 @@ LL | fn rethrow_targets_async_block_not_fn() -> Result<u8, MyErr> {
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected enum `std::result::Result<u8, MyErr>`
-              found type `()`
+   = note:   expected enum `std::result::Result<u8, MyErr>`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/async-block-control-flow-static-semantics.rs:57:50
@@ -84,8 +84,8 @@ LL | fn rethrow_targets_async_block_not_async_fn() -> Result<u8, MyErr> {
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected enum `std::result::Result<u8, MyErr>`
-              found type `()`
+   = note:   expected enum `std::result::Result<u8, MyErr>`
+           found unit type `()`
 
 error: aborting due to 8 previous errors
 
diff --git a/src/test/ui/block-expression-remove-semicolon.stderr b/src/test/ui/block-expression-remove-semicolon.stderr
index 51942f3d920..29a53bed7d7 100644
--- a/src/test/ui/block-expression-remove-semicolon.stderr
+++ b/src/test/ui/block-expression-remove-semicolon.stderr
@@ -9,8 +9,8 @@ LL | |         foo();
 LL | |     };
    | |_____^ expected i32, found ()
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/block-result/block-must-not-have-result-do.stderr b/src/test/ui/block-result/block-must-not-have-result-do.stderr
index 5981b8b6079..11f9db6937e 100644
--- a/src/test/ui/block-result/block-must-not-have-result-do.stderr
+++ b/src/test/ui/block-result/block-must-not-have-result-do.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |         true
    |         ^^^^ expected (), found bool
    |
-   = note: expected type `()`
-              found type `bool`
+   = note: expected unit type `()`
+                   found type `bool`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/block-result/block-must-not-have-result-res.stderr b/src/test/ui/block-result/block-must-not-have-result-res.stderr
index 8a41f8b8e3d..ba80ce2d6b1 100644
--- a/src/test/ui/block-result/block-must-not-have-result-res.stderr
+++ b/src/test/ui/block-result/block-must-not-have-result-res.stderr
@@ -6,8 +6,8 @@ LL |     fn drop(&mut self) {
 LL |         true
    |         ^^^^ expected (), found bool
    |
-   = note: expected type `()`
-              found type `bool`
+   = note: expected unit type `()`
+                   found type `bool`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/block-result/block-must-not-have-result-while.rs b/src/test/ui/block-result/block-must-not-have-result-while.rs
index 108b9bc9e9b..42b439cd320 100644
--- a/src/test/ui/block-result/block-must-not-have-result-while.rs
+++ b/src/test/ui/block-result/block-must-not-have-result-while.rs
@@ -1,7 +1,7 @@
 fn main() {
     while true { //~ WARN denote infinite loops with
         true //~  ERROR mismatched types
-             //~| expected type `()`
+             //~| expected unit type `()`
              //~| found type `bool`
              //~| expected (), found bool
     }
diff --git a/src/test/ui/block-result/block-must-not-have-result-while.stderr b/src/test/ui/block-result/block-must-not-have-result-while.stderr
index 44f62875ef1..d19ae3af657 100644
--- a/src/test/ui/block-result/block-must-not-have-result-while.stderr
+++ b/src/test/ui/block-result/block-must-not-have-result-while.stderr
@@ -12,8 +12,8 @@ error[E0308]: mismatched types
 LL |         true
    |         ^^^^ expected (), found bool
    |
-   = note: expected type `()`
-              found type `bool`
+   = note: expected unit type `()`
+                   found type `bool`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/block-result/consider-removing-last-semi.stderr b/src/test/ui/block-result/consider-removing-last-semi.stderr
index b028bfd5203..76643b49bc0 100644
--- a/src/test/ui/block-result/consider-removing-last-semi.stderr
+++ b/src/test/ui/block-result/consider-removing-last-semi.stderr
@@ -10,7 +10,7 @@ LL |     "bla".to_string();
    |                      - help: consider removing this semicolon
    |
    = note: expected struct `std::string::String`
-                found type `()`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/consider-removing-last-semi.rs:6:11
@@ -24,7 +24,7 @@ LL |     "removeme".to_string();
    |                           - help: consider removing this semicolon
    |
    = note: expected struct `std::string::String`
-                found type `()`
+           found unit type `()`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/block-result/issue-11714.stderr b/src/test/ui/block-result/issue-11714.stderr
index cfb42c60127..54c1bb220a9 100644
--- a/src/test/ui/block-result/issue-11714.stderr
+++ b/src/test/ui/block-result/issue-11714.stderr
@@ -9,8 +9,8 @@ LL | fn blah() -> i32 {
 LL |     ;
    |     - help: consider removing this semicolon
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/block-result/issue-13428.stderr b/src/test/ui/block-result/issue-13428.stderr
index f7b24ddbf55..b1f2ca63451 100644
--- a/src/test/ui/block-result/issue-13428.stderr
+++ b/src/test/ui/block-result/issue-13428.stderr
@@ -10,7 +10,7 @@ LL |     ;
    |     - help: consider removing this semicolon
    |
    = note: expected struct `std::string::String`
-                found type `()`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/issue-13428.rs:11:13
@@ -24,7 +24,7 @@ LL |     ;
    |     - help: consider removing this semicolon
    |
    = note: expected struct `std::string::String`
-                found type `()`
+           found unit type `()`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/block-result/issue-13624.rs b/src/test/ui/block-result/issue-13624.rs
index 0eeaa771631..ca457aa907d 100644
--- a/src/test/ui/block-result/issue-13624.rs
+++ b/src/test/ui/block-result/issue-13624.rs
@@ -7,7 +7,7 @@ mod a {
     Enum::EnumStructVariant { x: 1, y: 2, z: 3 }
     //~^ ERROR mismatched types
     //~| expected (), found enum `a::Enum`
-    //~| expected type `()`
+    //~| expected unit type `()`
     //~| found enum `a::Enum`
   }
 }
@@ -22,7 +22,7 @@ mod b {
         a::Enum::EnumStructVariant { x, y, z } => {
         //~^ ERROR mismatched types
         //~| expected (), found enum `a::Enum`
-        //~| expected type `()`
+        //~| expected unit type `()`
         //~| found enum `a::Enum`
         }
       }
diff --git a/src/test/ui/block-result/issue-13624.stderr b/src/test/ui/block-result/issue-13624.stderr
index 81daff5b5cc..6e2b2812c72 100644
--- a/src/test/ui/block-result/issue-13624.stderr
+++ b/src/test/ui/block-result/issue-13624.stderr
@@ -6,8 +6,8 @@ LL |   pub fn get_enum_struct_variant() -> () {
 LL |     Enum::EnumStructVariant { x: 1, y: 2, z: 3 }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found enum `a::Enum`
    |
-   = note: expected type `()`
-              found enum `a::Enum`
+   = note: expected unit type `()`
+                   found enum `a::Enum`
 
 error[E0308]: mismatched types
   --> $DIR/issue-13624.rs:22:9
@@ -17,8 +17,8 @@ LL |       match enum_struct_variant {
 LL |         a::Enum::EnumStructVariant { x, y, z } => {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found enum `a::Enum`
    |
-   = note: expected type `()`
-              found enum `a::Enum`
+   = note: expected unit type `()`
+                   found enum `a::Enum`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/block-result/issue-20862.stderr b/src/test/ui/block-result/issue-20862.stderr
index bcbc9b711ad..717c7517def 100644
--- a/src/test/ui/block-result/issue-20862.stderr
+++ b/src/test/ui/block-result/issue-20862.stderr
@@ -6,8 +6,8 @@ LL | fn foo(x: i32) {
 LL |     |y| x + y
    |     ^^^^^^^^^ expected (), found closure
    |
-   = note: expected type `()`
-           found closure `[closure@$DIR/issue-20862.rs:2:5: 2:14 x:_]`
+   = note: expected unit type `()`
+                found closure `[closure@$DIR/issue-20862.rs:2:5: 2:14 x:_]`
 
 error[E0618]: expected function, found `()`
   --> $DIR/issue-20862.rs:7:13
diff --git a/src/test/ui/block-result/issue-22645.stderr b/src/test/ui/block-result/issue-22645.stderr
index 379553b9e0d..5df71e8374b 100644
--- a/src/test/ui/block-result/issue-22645.stderr
+++ b/src/test/ui/block-result/issue-22645.stderr
@@ -17,8 +17,8 @@ LL |   let b = Bob + 3.5;
 LL |   b + 3
    |   ^^^^^ expected (), found struct `Bob`
    |
-   = note: expected type `()`
-            found struct `Bob`
+   = note: expected unit type `()`
+                 found struct `Bob`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/block-result/issue-5500.rs b/src/test/ui/block-result/issue-5500.rs
index 0df7533e38d..55f1efce93d 100644
--- a/src/test/ui/block-result/issue-5500.rs
+++ b/src/test/ui/block-result/issue-5500.rs
@@ -1,7 +1,7 @@
 fn main() {
     &panic!()
     //~^ ERROR mismatched types
-    //~| expected type `()`
+    //~| expected unit type `()`
     //~| found reference `&_`
     //~| expected (), found reference
 }
diff --git a/src/test/ui/block-result/issue-5500.stderr b/src/test/ui/block-result/issue-5500.stderr
index 27e49283724..12ee677d09d 100644
--- a/src/test/ui/block-result/issue-5500.stderr
+++ b/src/test/ui/block-result/issue-5500.stderr
@@ -9,8 +9,8 @@ LL |     &panic!()
    |     expected (), found reference
    |     help: consider removing the borrow: `panic!()`
    |
-   = note:   expected type `()`
-           found reference `&_`
+   = note: expected unit type `()`
+              found reference `&_`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/block-result/unexpected-return-on-unit.stderr b/src/test/ui/block-result/unexpected-return-on-unit.stderr
index 3ceff81ec4d..3eae3e75422 100644
--- a/src/test/ui/block-result/unexpected-return-on-unit.stderr
+++ b/src/test/ui/block-result/unexpected-return-on-unit.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     foo()
    |     ^^^^^ expected (), found usize
    |
-   = note: expected type `()`
-              found type `usize`
+   = note: expected unit type `()`
+                   found type `usize`
 help: try adding a semicolon
    |
 LL |     foo();
diff --git a/src/test/ui/break-while-condition.stderr b/src/test/ui/break-while-condition.stderr
index a08edee07ea..6f131514a40 100644
--- a/src/test/ui/break-while-condition.stderr
+++ b/src/test/ui/break-while-condition.stderr
@@ -7,8 +7,8 @@ LL | |             'a: while break 'a {};
 LL | |         };
    | |_________^ expected !, found ()
    |
-   = note: expected type `!`
-              found type `()`
+   = note:   expected type `!`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/break-while-condition.rs:16:13
@@ -18,8 +18,8 @@ LL | |                 break
 LL | |             }
    | |_____________^ expected !, found ()
    |
-   = note: expected type `!`
-              found type `()`
+   = note:   expected type `!`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/break-while-condition.rs:24:13
@@ -29,8 +29,8 @@ LL | |                 return
 LL | |             }
    | |_____________^ expected !, found ()
    |
-   = note: expected type `!`
-              found type `()`
+   = note:   expected type `!`
+           found unit type `()`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/codemap_tests/tab.stderr b/src/test/ui/codemap_tests/tab.stderr
index d2d52e282da..ea3ded67c0a 100644
--- a/src/test/ui/codemap_tests/tab.stderr
+++ b/src/test/ui/codemap_tests/tab.stderr
@@ -12,8 +12,8 @@ LL | fn foo() {
 LL |     "bar            boo"
    |     ^^^^^^^^^^^^^^^^^^^^ expected (), found reference
    |
-   = note:   expected type `()`
-           found reference `&'static str`
+   = note: expected unit type `()`
+              found reference `&'static str`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr b/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr
index 3c44fdb1954..1122901a17e 100644
--- a/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr
+++ b/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr
@@ -8,8 +8,8 @@ LL | fn plus_one(x: i32) -> i32 {
 LL |     x + 1;
    |          - help: consider removing this semicolon
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/coercion-missing-tail-expected-type.rs:7:13
@@ -21,8 +21,8 @@ LL | fn foo() -> Result<u8, u64> {
 LL |     Ok(1);
    |          - help: consider removing this semicolon
    |
-   = note: expected enum `std::result::Result<u8, u64>`
-              found type `()`
+   = note:   expected enum `std::result::Result<u8, u64>`
+           found unit type `()`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/destructure-trait-ref.rs b/src/test/ui/destructure-trait-ref.rs
index 1c792826399..c1b178b221c 100644
--- a/src/test/ui/destructure-trait-ref.rs
+++ b/src/test/ui/destructure-trait-ref.rs
@@ -31,16 +31,16 @@ fn main() {
     // n > m
     let &&x = &1isize as &dyn T;
     //~^ ERROR mismatched types
-    //~| expected trait `dyn T`
+    //~| expected trait object `dyn T`
     //~| found reference `&_`
     //~| expected trait T, found reference
     let &&&x = &(&1isize as &dyn T);
     //~^ ERROR mismatched types
-    //~| expected trait `dyn T`
+    //~| expected trait object `dyn T`
     //~| found reference `&_`
     //~| expected trait T, found reference
     let box box x = box 1isize as Box<dyn T>;
     //~^ ERROR mismatched types
-    //~| expected trait `dyn T`
+    //~| expected trait object `dyn T`
     //~| found struct `std::boxed::Box<_>`
 }
diff --git a/src/test/ui/destructure-trait-ref.stderr b/src/test/ui/destructure-trait-ref.stderr
index 05545a7098c..ef67c1c9637 100644
--- a/src/test/ui/destructure-trait-ref.stderr
+++ b/src/test/ui/destructure-trait-ref.stderr
@@ -25,8 +25,8 @@ LL |     let &&x = &1isize as &dyn T;
    |          expected trait T, found reference
    |          help: you can probably remove the explicit borrow: `x`
    |
-   = note:  expected trait `dyn T`
-           found reference `&_`
+   = note: expected trait object `dyn T`
+                 found reference `&_`
 
 error[E0308]: mismatched types
   --> $DIR/destructure-trait-ref.rs:37:11
@@ -37,8 +37,8 @@ LL |     let &&&x = &(&1isize as &dyn T);
    |           expected trait T, found reference
    |           help: you can probably remove the explicit borrow: `x`
    |
-   = note:  expected trait `dyn T`
-           found reference `&_`
+   = note: expected trait object `dyn T`
+                 found reference `&_`
 
 error[E0308]: mismatched types
   --> $DIR/destructure-trait-ref.rs:42:13
@@ -46,8 +46,8 @@ error[E0308]: mismatched types
 LL |     let box box x = box 1isize as Box<dyn T>;
    |             ^^^^^ expected trait T, found struct `std::boxed::Box`
    |
-   = note: expected trait `dyn T`
-             found struct `std::boxed::Box<_>`
+   = note: expected trait object `dyn T`
+                    found struct `std::boxed::Box<_>`
 
 error: aborting due to 6 previous errors
 
diff --git a/src/test/ui/diverging-tuple-parts-39485.stderr b/src/test/ui/diverging-tuple-parts-39485.stderr
index 72cdfad6f77..de5cf274c53 100644
--- a/src/test/ui/diverging-tuple-parts-39485.stderr
+++ b/src/test/ui/diverging-tuple-parts-39485.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     &panic!()
    |     ^^^^^^^^^ expected (), found reference
    |
-   = note:   expected type `()`
-           found reference `&_`
+   = note: expected unit type `()`
+              found reference `&_`
 help: try adding a return type
    |
 LL | fn g() -> &_ {
diff --git a/src/test/ui/dst/dst-bad-assign-3.rs b/src/test/ui/dst/dst-bad-assign-3.rs
index 8f0748f0a69..8218614134c 100644
--- a/src/test/ui/dst/dst-bad-assign-3.rs
+++ b/src/test/ui/dst/dst-bad-assign-3.rs
@@ -33,7 +33,7 @@ pub fn main() {
     f5.2 = Bar1 {f: 36};
     //~^ ERROR mismatched types
     //~| expected trait ToBar, found struct `Bar1`
-    //~| expected trait `dyn ToBar`
+    //~| expected trait object `dyn ToBar`
     //~| found struct `Bar1`
     //~| ERROR the size for values of type
 }
diff --git a/src/test/ui/dst/dst-bad-assign-3.stderr b/src/test/ui/dst/dst-bad-assign-3.stderr
index 773837e7994..54bb4bf9a3a 100644
--- a/src/test/ui/dst/dst-bad-assign-3.stderr
+++ b/src/test/ui/dst/dst-bad-assign-3.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     f5.2 = Bar1 {f: 36};
    |            ^^^^^^^^^^^^ expected trait ToBar, found struct `Bar1`
    |
-   = note: expected trait `dyn ToBar`
-             found struct `Bar1`
+   = note: expected trait object `dyn ToBar`
+                    found struct `Bar1`
 
 error[E0277]: the size for values of type `dyn ToBar` cannot be known at compilation time
   --> $DIR/dst-bad-assign-3.rs:33:5
diff --git a/src/test/ui/dst/dst-bad-assign.rs b/src/test/ui/dst/dst-bad-assign.rs
index c84c61ecb0e..ad3b3c71f57 100644
--- a/src/test/ui/dst/dst-bad-assign.rs
+++ b/src/test/ui/dst/dst-bad-assign.rs
@@ -35,7 +35,7 @@ pub fn main() {
     f5.ptr = Bar1 {f: 36};
     //~^ ERROR mismatched types
     //~| expected trait ToBar, found struct `Bar1`
-    //~| expected trait `dyn ToBar`
+    //~| expected trait object `dyn ToBar`
     //~| found struct `Bar1`
     //~| ERROR the size for values of type
 }
diff --git a/src/test/ui/dst/dst-bad-assign.stderr b/src/test/ui/dst/dst-bad-assign.stderr
index d01cbf7a3e9..5a2d73c3b1a 100644
--- a/src/test/ui/dst/dst-bad-assign.stderr
+++ b/src/test/ui/dst/dst-bad-assign.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     f5.ptr = Bar1 {f: 36};
    |              ^^^^^^^^^^^^ expected trait ToBar, found struct `Bar1`
    |
-   = note: expected trait `dyn ToBar`
-             found struct `Bar1`
+   = note: expected trait object `dyn ToBar`
+                    found struct `Bar1`
 
 error[E0277]: the size for values of type `dyn ToBar` cannot be known at compilation time
   --> $DIR/dst-bad-assign.rs:35:5
diff --git a/src/test/ui/error-codes/E0070.stderr b/src/test/ui/error-codes/E0070.stderr
index 40186137b0a..c77a337012d 100644
--- a/src/test/ui/error-codes/E0070.stderr
+++ b/src/test/ui/error-codes/E0070.stderr
@@ -16,8 +16,8 @@ error[E0308]: mismatched types
 LL |     some_other_func() = 4;
    |                         ^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error[E0070]: invalid left-hand side expression
   --> $DIR/E0070.rs:8:5
diff --git a/src/test/ui/fn/fn-trait-formatting.rs b/src/test/ui/fn/fn-trait-formatting.rs
index c74b79e3a62..63ab8e88e44 100644
--- a/src/test/ui/fn/fn-trait-formatting.rs
+++ b/src/test/ui/fn/fn-trait-formatting.rs
@@ -5,15 +5,15 @@ fn needs_fn<F>(x: F) where F: Fn(isize) -> isize {}
 fn main() {
     let _: () = (box |_: isize| {}) as Box<dyn FnOnce(isize)>;
     //~^ ERROR mismatched types
-    //~| expected type `()`
+    //~| expected unit type `()`
     //~| found struct `std::boxed::Box<dyn std::ops::FnOnce(isize)>`
     let _: () = (box |_: isize, isize| {}) as Box<dyn Fn(isize, isize)>;
     //~^ ERROR mismatched types
-    //~| expected type `()`
+    //~| expected unit type `()`
     //~| found struct `std::boxed::Box<dyn std::ops::Fn(isize, isize)>`
     let _: () = (box || -> isize { unimplemented!() }) as Box<dyn FnMut() -> isize>;
     //~^ ERROR mismatched types
-    //~| expected type `()`
+    //~| expected unit type `()`
     //~| found struct `std::boxed::Box<dyn std::ops::FnMut() -> isize>`
 
     needs_fn(1);
diff --git a/src/test/ui/fn/fn-trait-formatting.stderr b/src/test/ui/fn/fn-trait-formatting.stderr
index 962a310b875..44cc7448097 100644
--- a/src/test/ui/fn/fn-trait-formatting.stderr
+++ b/src/test/ui/fn/fn-trait-formatting.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let _: () = (box |_: isize| {}) as Box<dyn FnOnce(isize)>;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box`
    |
-   = note: expected type `()`
-            found struct `std::boxed::Box<dyn std::ops::FnOnce(isize)>`
+   = note: expected unit type `()`
+                 found struct `std::boxed::Box<dyn std::ops::FnOnce(isize)>`
 
 error[E0308]: mismatched types
   --> $DIR/fn-trait-formatting.rs:10:17
@@ -13,8 +13,8 @@ error[E0308]: mismatched types
 LL |     let _: () = (box |_: isize, isize| {}) as Box<dyn Fn(isize, isize)>;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box`
    |
-   = note: expected type `()`
-            found struct `std::boxed::Box<dyn std::ops::Fn(isize, isize)>`
+   = note: expected unit type `()`
+                 found struct `std::boxed::Box<dyn std::ops::Fn(isize, isize)>`
 
 error[E0308]: mismatched types
   --> $DIR/fn-trait-formatting.rs:14:17
@@ -22,8 +22,8 @@ error[E0308]: mismatched types
 LL |     let _: () = (box || -> isize { unimplemented!() }) as Box<dyn FnMut() -> isize>;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box`
    |
-   = note: expected type `()`
-            found struct `std::boxed::Box<dyn std::ops::FnMut() -> isize>`
+   = note: expected unit type `()`
+                 found struct `std::boxed::Box<dyn std::ops::FnMut() -> isize>`
 
 error[E0277]: expected a `std::ops::Fn<(isize,)>` closure, found `{integer}`
   --> $DIR/fn-trait-formatting.rs:19:14
diff --git a/src/test/ui/generic/generic-type-params-name-repr.rs b/src/test/ui/generic/generic-type-params-name-repr.rs
index 65d409a9837..4b1af8e915c 100644
--- a/src/test/ui/generic/generic-type-params-name-repr.rs
+++ b/src/test/ui/generic/generic-type-params-name-repr.rs
@@ -14,38 +14,38 @@ fn main() {
     //~^ ERROR mismatched types
     //~| expected struct `Foo`, found ()
     //~| expected struct `Foo<isize>`
-    //~| found type `()`
+    //~| found unit type `()`
 
     // ...even when they're present, but the same types as the defaults.
     let _: Foo<isize, B, C> = ();
     //~^ ERROR mismatched types
     //~| expected struct `Foo`, found ()
     //~| expected struct `Foo<isize>`
-    //~| found type `()`
+    //~| found unit type `()`
 
     // Including cases where the default is using previous type params.
     let _: HashMap<String, isize> = ();
     //~^ ERROR mismatched types
     //~| expected struct `HashMap`, found ()
     //~| expected struct `HashMap<std::string::String, isize>`
-    //~| found type `()`
+    //~| found unit type `()`
     let _: HashMap<String, isize, Hash<String>> = ();
     //~^ ERROR mismatched types
     //~| expected struct `HashMap`, found ()
     //~| expected struct `HashMap<std::string::String, isize>`
-    //~| found type `()`
+    //~| found unit type `()`
 
     // But not when there's a different type in between.
     let _: Foo<A, isize, C> = ();
     //~^ ERROR mismatched types
     //~| expected struct `Foo`, found ()
     //~| expected struct `Foo<A, isize>`
-    //~| found type `()`
+    //~| found unit type `()`
 
     // And don't print <> at all when there's just defaults.
     let _: Foo<A, B, C> = ();
     //~^ ERROR mismatched types
     //~| expected struct `Foo`, found ()
     //~| expected struct `Foo`
-    //~| found type `()`
+    //~| found unit type `()`
 }
diff --git a/src/test/ui/generic/generic-type-params-name-repr.stderr b/src/test/ui/generic/generic-type-params-name-repr.stderr
index 86146f7e9bf..12cc11236f8 100644
--- a/src/test/ui/generic/generic-type-params-name-repr.stderr
+++ b/src/test/ui/generic/generic-type-params-name-repr.stderr
@@ -5,7 +5,7 @@ LL |     let _: Foo<isize> = ();
    |                         ^^ expected struct `Foo`, found ()
    |
    = note: expected struct `Foo<isize>`
-                found type `()`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/generic-type-params-name-repr.rs:20:31
@@ -14,7 +14,7 @@ LL |     let _: Foo<isize, B, C> = ();
    |                               ^^ expected struct `Foo`, found ()
    |
    = note: expected struct `Foo<isize>`
-                found type `()`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/generic-type-params-name-repr.rs:27:37
@@ -23,7 +23,7 @@ LL |     let _: HashMap<String, isize> = ();
    |                                     ^^ expected struct `HashMap`, found ()
    |
    = note: expected struct `HashMap<std::string::String, isize>`
-                found type `()`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/generic-type-params-name-repr.rs:32:51
@@ -32,7 +32,7 @@ LL |     let _: HashMap<String, isize, Hash<String>> = ();
    |                                                   ^^ expected struct `HashMap`, found ()
    |
    = note: expected struct `HashMap<std::string::String, isize>`
-                found type `()`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/generic-type-params-name-repr.rs:39:31
@@ -41,7 +41,7 @@ LL |     let _: Foo<A, isize, C> = ();
    |                               ^^ expected struct `Foo`, found ()
    |
    = note: expected struct `Foo<A, isize>`
-                found type `()`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/generic-type-params-name-repr.rs:46:27
@@ -50,7 +50,7 @@ LL |     let _: Foo<A, B, C> = ();
    |                           ^^ expected struct `Foo`, found ()
    |
    = note: expected struct `Foo`
-                found type `()`
+           found unit type `()`
 
 error: aborting due to 6 previous errors
 
diff --git a/src/test/ui/if-else-type-mismatch.stderr b/src/test/ui/if-else-type-mismatch.stderr
index b418c961189..d25eda0e980 100644
--- a/src/test/ui/if-else-type-mismatch.stderr
+++ b/src/test/ui/if-else-type-mismatch.stderr
@@ -60,8 +60,8 @@ LL | |         6u32;
 LL | |     };
    | |_____- if and else have incompatible types
    |
-   = note: expected type `u32`
-              found type `()`
+   = note:   expected type `u32`
+           found unit type `()`
 
 error[E0308]: if and else have incompatible types
   --> $DIR/if-else-type-mismatch.rs:25:9
@@ -92,8 +92,8 @@ LL | |         10u32;
 LL | |     };
    | |_____- if and else have incompatible types
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error[E0308]: if and else have incompatible types
   --> $DIR/if-else-type-mismatch.rs:37:9
@@ -122,8 +122,8 @@ LL | |
 LL | |     };
    | |_____^ expected i32, found ()
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error: aborting due to 8 previous errors
 
diff --git a/src/test/ui/if/if-without-else-as-fn-expr.stderr b/src/test/ui/if/if-without-else-as-fn-expr.stderr
index b49c2aa6319..a62a2cc1522 100644
--- a/src/test/ui/if/if-without-else-as-fn-expr.stderr
+++ b/src/test/ui/if/if-without-else-as-fn-expr.stderr
@@ -8,8 +8,8 @@ LL | |         return 3;
 LL | |     }
    | |_____^ expected usize, found ()
    |
-   = note: expected type `usize`
-              found type `()`
+   = note:   expected type `usize`
+           found unit type `()`
    = note: `if` expressions without `else` evaluate to `()`
    = help: consider adding an `else` block that evaluates to the expected type
 
@@ -24,8 +24,8 @@ LL | |         return 3;
 LL | |     };
    | |_____^ expected usize, found ()
    |
-   = note: expected type `usize`
-              found type `()`
+   = note:   expected type `usize`
+           found unit type `()`
    = note: `if` expressions without `else` evaluate to `()`
    = help: consider adding an `else` block that evaluates to the expected type
 
@@ -39,8 +39,8 @@ LL | |         3
 LL | |     }
    | |_____^ expected usize, found ()
    |
-   = note: expected type `usize`
-              found type `()`
+   = note:   expected type `usize`
+           found unit type `()`
    = note: `if` expressions without `else` evaluate to `()`
    = help: consider adding an `else` block that evaluates to the expected type
 
@@ -54,8 +54,8 @@ LL | |         return 3;
 LL | |     }
    | |_____^ expected usize, found ()
    |
-   = note: expected type `usize`
-              found type `()`
+   = note:   expected type `usize`
+           found unit type `()`
    = note: `if` expressions without `else` evaluate to `()`
    = help: consider adding an `else` block that evaluates to the expected type
 
@@ -70,8 +70,8 @@ LL | |         return 3;
 LL | |     };
    | |_____^ expected usize, found ()
    |
-   = note: expected type `usize`
-              found type `()`
+   = note:   expected type `usize`
+           found unit type `()`
    = note: `if` expressions without `else` evaluate to `()`
    = help: consider adding an `else` block that evaluates to the expected type
 
@@ -85,8 +85,8 @@ LL | |         3
 LL | |     }
    | |_____^ expected usize, found ()
    |
-   = note: expected type `usize`
-              found type `()`
+   = note:   expected type `usize`
+           found unit type `()`
    = note: `if` expressions without `else` evaluate to `()`
    = help: consider adding an `else` block that evaluates to the expected type
 
diff --git a/src/test/ui/if/if-without-else-result.rs b/src/test/ui/if/if-without-else-result.rs
index cd7fde40fe8..4602beb4c77 100644
--- a/src/test/ui/if/if-without-else-result.rs
+++ b/src/test/ui/if/if-without-else-result.rs
@@ -1,7 +1,7 @@
 fn main() {
     let a = if true { true };
     //~^ ERROR if may be missing an else clause [E0317]
-    //~| expected type `()`
+    //~| expected unit type `()`
     //~| found type `bool`
     //~| expected (), found bool
     println!("{}", a);
diff --git a/src/test/ui/if/if-without-else-result.stderr b/src/test/ui/if/if-without-else-result.stderr
index ddb013ab711..7870439fee1 100644
--- a/src/test/ui/if/if-without-else-result.stderr
+++ b/src/test/ui/if/if-without-else-result.stderr
@@ -7,8 +7,8 @@ LL |     let a = if true { true };
    |             |         found here
    |             expected (), found bool
    |
-   = note: expected type `()`
-              found type `bool`
+   = note: expected unit type `()`
+                   found type `bool`
    = note: `if` expressions without `else` evaluate to `()`
    = help: consider adding an `else` block that evaluates to the expected type
 
diff --git a/src/test/ui/issues/issue-11319.stderr b/src/test/ui/issues/issue-11319.stderr
index 6179f9d3fe0..9abae68ed52 100644
--- a/src/test/ui/issues/issue-11319.stderr
+++ b/src/test/ui/issues/issue-11319.stderr
@@ -16,8 +16,8 @@ LL | |         _       => true
 LL | |     }
    | |_____- `match` arms have incompatible types
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-16401.rs b/src/test/ui/issues/issue-16401.rs
index 9ed730ba211..aaa38b8f170 100644
--- a/src/test/ui/issues/issue-16401.rs
+++ b/src/test/ui/issues/issue-16401.rs
@@ -7,7 +7,7 @@ fn main() {
     match () {
         Slice { data: data, len: len } => (),
         //~^ ERROR mismatched types
-        //~| expected type `()`
+        //~| expected unit type `()`
         //~| found struct `Slice<_>`
         //~| expected (), found struct `Slice`
         _ => unreachable!()
diff --git a/src/test/ui/issues/issue-16401.stderr b/src/test/ui/issues/issue-16401.stderr
index e5bacc36de5..872066bd3f7 100644
--- a/src/test/ui/issues/issue-16401.stderr
+++ b/src/test/ui/issues/issue-16401.stderr
@@ -6,8 +6,8 @@ LL |     match () {
 LL |         Slice { data: data, len: len } => (),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `Slice`
    |
-   = note: expected type `()`
-            found struct `Slice<_>`
+   = note: expected unit type `()`
+                 found struct `Slice<_>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-17033.rs b/src/test/ui/issues/issue-17033.rs
index be80dce1371..c330745bc07 100644
--- a/src/test/ui/issues/issue-17033.rs
+++ b/src/test/ui/issues/issue-17033.rs
@@ -1,7 +1,7 @@
 fn f<'r>(p: &'r mut fn(p: &mut ())) {
     (*p)(()) //~  ERROR mismatched types
              //~| expected mutable reference `&mut ()`
-             //~| found type `()`
+             //~| found unit type `()`
              //~| expected &mut (), found ()
 }
 
diff --git a/src/test/ui/issues/issue-17033.stderr b/src/test/ui/issues/issue-17033.stderr
index c84b30d721f..37f817c2e9b 100644
--- a/src/test/ui/issues/issue-17033.stderr
+++ b/src/test/ui/issues/issue-17033.stderr
@@ -8,7 +8,7 @@ LL |     (*p)(())
    |          help: consider mutably borrowing here: `&mut ()`
    |
    = note: expected mutable reference `&mut ()`
-                           found type `()`
+                      found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-17728.nll.stderr b/src/test/ui/issues/issue-17728.nll.stderr
index 7436ebd920e..ef193ad85bf 100644
--- a/src/test/ui/issues/issue-17728.nll.stderr
+++ b/src/test/ui/issues/issue-17728.nll.stderr
@@ -13,8 +13,8 @@ LL | |         _ => None
 LL | |     }
    | |_____- `match` arms have incompatible types
    |
-   = note: expected type `RoomDirection`
-              found type `std::option::Option<_>`
+   = note: expected enum `RoomDirection`
+              found enum `std::option::Option<_>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-19991.rs b/src/test/ui/issues/issue-19991.rs
index e9094ecc015..1d8128ffcb9 100644
--- a/src/test/ui/issues/issue-19991.rs
+++ b/src/test/ui/issues/issue-19991.rs
@@ -3,7 +3,7 @@
 
 fn main() {
     if let Some(homura) = Some("madoka") { //~  ERROR missing an else clause
-                                           //~| expected type `()`
+                                           //~| expected unit type `()`
                                            //~| found type `{integer}`
                                            //~| expected (), found integer
         765
diff --git a/src/test/ui/issues/issue-19991.stderr b/src/test/ui/issues/issue-19991.stderr
index d9ea910adef..c808680ce61 100644
--- a/src/test/ui/issues/issue-19991.stderr
+++ b/src/test/ui/issues/issue-19991.stderr
@@ -10,8 +10,8 @@ LL | |         765
 LL | |     };
    | |_____^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
    = note: `if` expressions without `else` evaluate to `()`
    = help: consider adding an `else` block that evaluates to the expected type
 
diff --git a/src/test/ui/issues/issue-22684.stderr b/src/test/ui/issues/issue-22684.stderr
index 738123ec4d4..20a0d6f4103 100644
--- a/src/test/ui/issues/issue-22684.stderr
+++ b/src/test/ui/issues/issue-22684.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let _: () = foo::Foo.bar();
    |                 ^^^^^^^^^^^^^^ expected (), found bool
    |
-   = note: expected type `()`
-              found type `bool`
+   = note: expected unit type `()`
+                   found type `bool`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-27042.stderr b/src/test/ui/issues/issue-27042.stderr
index 7678984a518..4244f36e481 100644
--- a/src/test/ui/issues/issue-27042.stderr
+++ b/src/test/ui/issues/issue-27042.stderr
@@ -17,8 +17,8 @@ LL |         loop { break };
    |                expected i32, found ()
    |                help: give it a value of the expected type: `break 42`
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/issue-27042.rs:8:9
@@ -28,8 +28,8 @@ LL | |
 LL | |         while true { break }; // but here we cite the whole loop
    | |____________________________^ expected i32, found ()
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/issue-27042.rs:12:9
@@ -38,8 +38,8 @@ LL | /         'c:
 LL | |         for _ in None { break }; // but here we cite the whole loop
    | |_______________________________^ expected i32, found ()
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/issue-27042.rs:15:9
@@ -48,8 +48,8 @@ LL | /         'd:
 LL | |         while let Some(_) = None { break };
    | |__________________________________________^ expected i32, found ()
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/issues/issue-32323.stderr b/src/test/ui/issues/issue-32323.stderr
index e7ad46a4aef..f0ca557e581 100644
--- a/src/test/ui/issues/issue-32323.stderr
+++ b/src/test/ui/issues/issue-32323.stderr
@@ -7,7 +7,7 @@ LL | pub fn f<'a, T: Tr<'a>>() -> <T as Tr<'a>>::Out {}
    |        implicitly returns `()` as its body has no tail or `return` expression
    |
    = note: expected associated type `<T as Tr<'a>>::Out`
-                         found type `()`
+                    found unit type `()`
    = note: consider constraining the associated type `<T as Tr<'a>>::Out` to `()` or calling a method that returns `<T as Tr<'a>>::Out`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
 
diff --git a/src/test/ui/issues/issue-37026.stderr b/src/test/ui/issues/issue-37026.stderr
index 239f0a18190..00e44738742 100644
--- a/src/test/ui/issues/issue-37026.stderr
+++ b/src/test/ui/issues/issue-37026.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let empty_struct::XEmpty2 = ();
    |         ^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `empty_struct::XEmpty2`
    |
-   = note: expected type `()`
-            found struct `empty_struct::XEmpty2`
+   = note: expected unit type `()`
+                 found struct `empty_struct::XEmpty2`
 
 error[E0308]: mismatched types
   --> $DIR/issue-37026.rs:7:9
@@ -13,8 +13,8 @@ error[E0308]: mismatched types
 LL |     let empty_struct::XEmpty6(..) = ();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `empty_struct::XEmpty6`
    |
-   = note: expected type `()`
-            found struct `empty_struct::XEmpty6`
+   = note: expected unit type `()`
+                 found struct `empty_struct::XEmpty6`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-37665.stderr b/src/test/ui/issues/issue-37665.stderr
index c2749469951..e7eef47fd29 100644
--- a/src/test/ui/issues/issue-37665.stderr
+++ b/src/test/ui/issues/issue-37665.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let x: () = 0;
    |                 ^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-39970.stderr b/src/test/ui/issues/issue-39970.stderr
index 8bc62dd1b84..7cef2e6cd4c 100644
--- a/src/test/ui/issues/issue-39970.stderr
+++ b/src/test/ui/issues/issue-39970.stderr
@@ -8,7 +8,7 @@ LL |     <() as Visit>::visit();
    |     ^^^^^^^^^^^^^^^^^^^^ expected &(), found ()
    |
    = note: expected reference `&()`
-                   found type `()`
+              found unit type `()`
    = note: required because of the requirements on the impl of `Visit` for `()`
 
 error: aborting due to previous error
diff --git a/src/test/ui/issues/issue-41549.stderr b/src/test/ui/issues/issue-41549.stderr
index 5e102dcbf41..c2ffc2f4ac3 100644
--- a/src/test/ui/issues/issue-41549.stderr
+++ b/src/test/ui/issues/issue-41549.stderr
@@ -4,8 +4,8 @@ error[E0326]: implemented const `CONST` has an incompatible type for trait
 LL |     const CONST: () = ();
    |                  ^^ expected u32, found ()
    |
-   = note: expected type `u32`
-              found type `()`
+   = note:   expected type `u32`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-4201.rs b/src/test/ui/issues/issue-4201.rs
index 2f1d6d2177e..d4ac39526dd 100644
--- a/src/test/ui/issues/issue-4201.rs
+++ b/src/test/ui/issues/issue-4201.rs
@@ -3,7 +3,7 @@ fn main() {
         0
     } else if false {
 //~^ ERROR if may be missing an else clause
-//~| expected type `()`
+//~| expected unit type `()`
 //~| found type `{integer}`
 //~| expected (), found integer
         1
diff --git a/src/test/ui/issues/issue-4201.stderr b/src/test/ui/issues/issue-4201.stderr
index dd76faef5c7..8abb7c3c9f5 100644
--- a/src/test/ui/issues/issue-4201.stderr
+++ b/src/test/ui/issues/issue-4201.stderr
@@ -12,8 +12,8 @@ LL | |         1
 LL | |     };
    | |_____^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
    = note: `if` expressions without `else` evaluate to `()`
    = help: consider adding an `else` block that evaluates to the expected type
 
diff --git a/src/test/ui/issues/issue-43162.stderr b/src/test/ui/issues/issue-43162.stderr
index c729c05ff22..259b47ebe7c 100644
--- a/src/test/ui/issues/issue-43162.stderr
+++ b/src/test/ui/issues/issue-43162.stderr
@@ -21,8 +21,8 @@ LL |
 LL |     break true;
    |               - help: consider removing this semicolon
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/issues/issue-44023.stderr b/src/test/ui/issues/issue-44023.stderr
index 258ffe558e9..c7b5f7b2040 100644
--- a/src/test/ui/issues/issue-44023.stderr
+++ b/src/test/ui/issues/issue-44023.stderr
@@ -6,8 +6,8 @@ LL | fn საჭმელად_გემრიელი_სადილი ( )
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected type `isize`
-              found type `()`
+   = note:   expected type `isize`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-46112.stderr b/src/test/ui/issues/issue-46112.stderr
index 30ec6a966ce..ea1eca7552d 100644
--- a/src/test/ui/issues/issue-46112.stderr
+++ b/src/test/ui/issues/issue-46112.stderr
@@ -7,8 +7,8 @@ LL | fn main() { test(Ok(())); }
    |                     expected enum `std::option::Option`, found ()
    |                     help: try using a variant of the expected enum: `Some(())`
    |
-   = note: expected enum `std::option::Option<()>`
-              found type `()`
+   = note:   expected enum `std::option::Option<()>`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-47486.stderr b/src/test/ui/issues/issue-47486.stderr
index af6e3010f79..2b49c273330 100644
--- a/src/test/ui/issues/issue-47486.stderr
+++ b/src/test/ui/issues/issue-47486.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     () < std::mem::size_of::<_>();
    |          ^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found usize
    |
-   = note: expected type `()`
-              found type `usize`
+   = note: expected unit type `()`
+                   found type `usize`
 
 error[E0282]: type annotations needed
   --> $DIR/issue-47486.rs:3:11
diff --git a/src/test/ui/issues/issue-50577.stderr b/src/test/ui/issues/issue-50577.stderr
index 055a71f468d..bcc2fc50099 100644
--- a/src/test/ui/issues/issue-50577.stderr
+++ b/src/test/ui/issues/issue-50577.stderr
@@ -31,8 +31,8 @@ LL |         Drop = assert_eq!(1, 1)
    |                expected (), found isize
    |                found here
    |
-   = note: expected type `()`
-              found type `isize`
+   = note: expected unit type `()`
+                   found type `isize`
    = note: `if` expressions without `else` evaluate to `()`
    = help: consider adding an `else` block that evaluates to the expected type
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
diff --git a/src/test/ui/issues/issue-50585.stderr b/src/test/ui/issues/issue-50585.stderr
index 8e57c9806e3..d2a21c48a09 100644
--- a/src/test/ui/issues/issue-50585.stderr
+++ b/src/test/ui/issues/issue-50585.stderr
@@ -10,8 +10,8 @@ error[E0308]: mismatched types
 LL |     |y: Vec<[(); for x in 0..2 {}]>| {};
    |                  ^^^^^^^^^^^^^^^^ expected usize, found ()
    |
-   = note: expected type `usize`
-              found type `()`
+   = note:   expected type `usize`
+           found unit type `()`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-6458-4.stderr b/src/test/ui/issues/issue-6458-4.stderr
index 246b53189c8..d36297886df 100644
--- a/src/test/ui/issues/issue-6458-4.stderr
+++ b/src/test/ui/issues/issue-6458-4.stderr
@@ -8,8 +8,8 @@ LL | fn foo(b: bool) -> Result<bool,String> {
 LL |     Err("bar".to_string());
    |                           - help: consider removing this semicolon
    |
-   = note: expected enum `std::result::Result<bool, std::string::String>`
-              found type `()`
+   = note:   expected enum `std::result::Result<bool, std::string::String>`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/json-bom-plus-crlf-multifile.stderr b/src/test/ui/json-bom-plus-crlf-multifile.stderr
index 53c9682acfe..5d631d576c7 100644
--- a/src/test/ui/json-bom-plus-crlf-multifile.stderr
+++ b/src/test/ui/json-bom-plus-crlf-multifile.stderr
@@ -76,7 +76,7 @@ let x: i32 = \"I am not a number!\";
 //    type `i32` assigned to variable `x`
 ```
 "},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":801,"byte_end":809,"line_start":25,"line_end":26,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":"    let s : String = (","highlight_start":22,"highlight_end":23},{"text":"    );  // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected struct `std::string::String`, found ()","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected struct `std::string::String`
-     found type `()`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:25:22: error[E0308]: mismatched types
+found unit type `()`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:25:22: error[E0308]: mismatched types
 "}
 {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors
 "}
diff --git a/src/test/ui/json-bom-plus-crlf.stderr b/src/test/ui/json-bom-plus-crlf.stderr
index 6f2d1d0f234..a9c3ae4795d 100644
--- a/src/test/ui/json-bom-plus-crlf.stderr
+++ b/src/test/ui/json-bom-plus-crlf.stderr
@@ -76,7 +76,7 @@ let x: i32 = \"I am not a number!\";
 //    type `i32` assigned to variable `x`
 ```
 "},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":801,"byte_end":809,"line_start":25,"line_end":26,"column_start":22,"column_end":6,"is_primary":true,"text":[{"text":"    let s : String = (","highlight_start":22,"highlight_end":23},{"text":"    );  // Error spanning the newline.","highlight_start":1,"highlight_end":6}],"label":"expected struct `std::string::String`, found ()","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected struct `std::string::String`
-     found type `()`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:25:22: error[E0308]: mismatched types
+found unit type `()`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:25:22: error[E0308]: mismatched types
 "}
 {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors
 "}
diff --git a/src/test/ui/liveness/liveness-closure-require-ret.stderr b/src/test/ui/liveness/liveness-closure-require-ret.stderr
index e8f185a5cb2..3885341e7b3 100644
--- a/src/test/ui/liveness/liveness-closure-require-ret.stderr
+++ b/src/test/ui/liveness/liveness-closure-require-ret.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL | fn main() { println!("{}", force(|| {})); }
    |                                     ^^ expected isize, found ()
    |
-   = note: expected type `isize`
-              found type `()`
+   = note:   expected type `isize`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/liveness/liveness-forgot-ret.stderr b/src/test/ui/liveness/liveness-forgot-ret.stderr
index 4baf351f7eb..201f90c6412 100644
--- a/src/test/ui/liveness/liveness-forgot-ret.stderr
+++ b/src/test/ui/liveness/liveness-forgot-ret.stderr
@@ -6,8 +6,8 @@ LL | fn f(a: isize) -> isize { if god_exists(a) { return 5; }; }
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected type `isize`
-              found type `()`
+   = note:   expected type `isize`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/liveness/liveness-issue-2163.stderr b/src/test/ui/liveness/liveness-issue-2163.stderr
index 780a2548f1f..738811adedb 100644
--- a/src/test/ui/liveness/liveness-issue-2163.stderr
+++ b/src/test/ui/liveness/liveness-issue-2163.stderr
@@ -7,8 +7,8 @@ LL | |
 LL | |     });
    | |_____^ expected bool, found ()
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/liveness/liveness-missing-ret2.stderr b/src/test/ui/liveness/liveness-missing-ret2.stderr
index 1f60560b450..9825ecce403 100644
--- a/src/test/ui/liveness/liveness-missing-ret2.stderr
+++ b/src/test/ui/liveness/liveness-missing-ret2.stderr
@@ -6,8 +6,8 @@ LL | fn f() -> isize {
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected type `isize`
-              found type `()`
+   = note:   expected type `isize`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr b/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr
index 2497d93daa4..4255f55a4ec 100644
--- a/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr
+++ b/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr
@@ -10,8 +10,8 @@ LL | macro_rules! test { () => { fn foo() -> i32 { 1; } } }
 LL |     test!();
    |     -------- in this macro invocation
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/liveness-return-last-stmt-semi.rs:7:19
@@ -21,8 +21,8 @@ LL | fn no_return() -> i32 {}
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/liveness-return-last-stmt-semi.rs:9:19
@@ -34,8 +34,8 @@ LL | fn bar(x: u32) -> u32 {
 LL |     x * 2;
    |          - help: consider removing this semicolon
    |
-   = note: expected type `u32`
-              found type `()`
+   = note:   expected type `u32`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/liveness-return-last-stmt-semi.rs:13:19
@@ -45,8 +45,8 @@ LL | fn baz(x: u64) -> u32 {
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected type `u32`
-              found type `()`
+   = note:   expected type `u32`
+           found unit type `()`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/loops/loop-break-value.stderr b/src/test/ui/loops/loop-break-value.stderr
index 6fbede9778d..8a049ac0023 100644
--- a/src/test/ui/loops/loop-break-value.stderr
+++ b/src/test/ui/loops/loop-break-value.stderr
@@ -100,8 +100,8 @@ error[E0308]: mismatched types
 LL |     let val: ! = loop { break break; };
    |                               ^^^^^ expected !, found ()
    |
-   = note: expected type `!`
-              found type `()`
+   = note:   expected type `!`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/loop-break-value.rs:11:19
@@ -136,8 +136,8 @@ error[E0308]: mismatched types
 LL |                 break 'c 123;
    |                          ^^^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/loop-break-value.rs:80:15
@@ -145,8 +145,8 @@ error[E0308]: mismatched types
 LL |         break (break, break);
    |               ^^^^^^^^^^^^^^ expected (), found tuple
    |
-   = note: expected type `()`
-             found tuple `(!, !)`
+   = note: expected unit type `()`
+                  found tuple `(!, !)`
 
 error[E0308]: mismatched types
   --> $DIR/loop-break-value.rs:85:15
@@ -154,8 +154,8 @@ error[E0308]: mismatched types
 LL |         break 2;
    |               ^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/loop-break-value.rs:90:9
@@ -166,8 +166,8 @@ LL |         break;
    |         expected integer, found ()
    |         help: give it a value of the expected type: `break value`
    |
-   = note: expected type `{integer}`
-              found type `()`
+   = note:   expected type `{integer}`
+           found unit type `()`
 
 error: aborting due to 16 previous errors
 
diff --git a/src/test/ui/loops/loop-labeled-break-value.stderr b/src/test/ui/loops/loop-labeled-break-value.stderr
index 8b9468cacc1..e34e7f4e956 100644
--- a/src/test/ui/loops/loop-labeled-break-value.stderr
+++ b/src/test/ui/loops/loop-labeled-break-value.stderr
@@ -7,8 +7,8 @@ LL |         let _: i32 = loop { break };
    |                             expected i32, found ()
    |                             help: give it a value of the expected type: `break 42`
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/loop-labeled-break-value.rs:6:37
@@ -19,8 +19,8 @@ LL |         let _: i32 = 'inner: loop { break 'inner };
    |                                     expected i32, found ()
    |                                     help: give it a value of the expected type: `break 'inner 42`
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/loop-labeled-break-value.rs:9:45
@@ -31,8 +31,8 @@ LL |         let _: i32 = 'inner2: loop { loop { break 'inner2 } };
    |                                             expected i32, found ()
    |                                             help: give it a value of the expected type: `break 'inner2 42`
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/loops/loop-properly-diverging-2.stderr b/src/test/ui/loops/loop-properly-diverging-2.stderr
index 3758bbf9f6f..41027dc3ad6 100644
--- a/src/test/ui/loops/loop-properly-diverging-2.stderr
+++ b/src/test/ui/loops/loop-properly-diverging-2.stderr
@@ -7,8 +7,8 @@ LL |   let x: i32 = loop { break };
    |                       expected i32, found ()
    |                       help: give it a value of the expected type: `break 42`
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/match/match-type-err-first-arm.stderr b/src/test/ui/match/match-type-err-first-arm.stderr
index e0553fca683..8f8bb4bdcd2 100644
--- a/src/test/ui/match/match-type-err-first-arm.stderr
+++ b/src/test/ui/match/match-type-err-first-arm.stderr
@@ -62,8 +62,8 @@ LL | |
 LL | |     };
    | |_____- `match` arms have incompatible types
    |
-   = note: expected type `u32`
-              found type `()`
+   = note:   expected type `u32`
+           found unit type `()`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
index 283ef8fcba7..99e0a466817 100644
--- a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
+++ b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let _seetype: () = z;
    |                        ^ expected (), found u32
    |
-   = note: expected type `()`
-              found type `u32`
+   = note: expected unit type `()`
+                   found type `u32`
 
 error[E0308]: mismatched types
   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:102:24
@@ -13,8 +13,8 @@ error[E0308]: mismatched types
 LL |     let _seetype: () = z;
    |                        ^ expected (), found u64
    |
-   = note: expected type `()`
-              found type `u64`
+   = note: expected unit type `()`
+                   found type `u64`
 
 error[E0034]: multiple applicable items in scope
   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:120:15
@@ -47,8 +47,8 @@ error[E0308]: mismatched types
 LL |     let _seetype: () = z;
    |                        ^ expected (), found u8
    |
-   = note: expected type `()`
-              found type `u8`
+   = note: expected unit type `()`
+                   found type `u8`
 
 error[E0308]: mismatched types
   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:155:24
@@ -56,8 +56,8 @@ error[E0308]: mismatched types
 LL |     let _seetype: () = z;
    |                        ^ expected (), found u32
    |
-   = note: expected type `()`
-              found type `u32`
+   = note: expected unit type `()`
+                   found type `u32`
 
 error[E0308]: mismatched types
   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:172:24
@@ -65,8 +65,8 @@ error[E0308]: mismatched types
 LL |     let _seetype: () = z;
    |                        ^ expected (), found u32
    |
-   = note: expected type `()`
-              found type `u32`
+   = note: expected unit type `()`
+                   found type `u32`
 
 error: aborting due to 6 previous errors
 
diff --git a/src/test/ui/mir-unpretty.stderr b/src/test/ui/mir-unpretty.stderr
index 6e5dac22669..cb2715f5543 100644
--- a/src/test/ui/mir-unpretty.stderr
+++ b/src/test/ui/mir-unpretty.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let x: () = 0;
    |                 ^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr b/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr
index 3c8ba8057c5..8bba0efc814 100644
--- a/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr
+++ b/src/test/ui/mismatched_types/for-loop-has-unit-body.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |         x
    |         ^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/mismatched_types/issue-19109.stderr b/src/test/ui/mismatched_types/issue-19109.stderr
index 350dd69a1fd..c790cc90a2c 100644
--- a/src/test/ui/mismatched_types/issue-19109.stderr
+++ b/src/test/ui/mismatched_types/issue-19109.stderr
@@ -6,8 +6,8 @@ LL | fn function(t: &mut dyn Trait) {
 LL |     t as *mut dyn Trait
    |     ^^^^^^^^^^^^^^^^^^^ expected (), found *-ptr
    |
-   = note:     expected type `()`
-           found raw pointer `*mut dyn Trait`
+   = note: expected unit type `()`
+            found raw pointer `*mut dyn Trait`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/mismatched_types/main.stderr b/src/test/ui/mismatched_types/main.stderr
index 1d53cfdd252..fc128fe6fc7 100644
--- a/src/test/ui/mismatched_types/main.stderr
+++ b/src/test/ui/mismatched_types/main.stderr
@@ -6,8 +6,8 @@ LL |       let x: u32 = (
 LL | |     );
    | |_____^ expected u32, found ()
    |
-   = note: expected type `u32`
-              found type `()`
+   = note:   expected type `u32`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/missing/missing-return.stderr b/src/test/ui/missing/missing-return.stderr
index 3c8ecdcfbcb..8d8d6b78c19 100644
--- a/src/test/ui/missing/missing-return.stderr
+++ b/src/test/ui/missing/missing-return.stderr
@@ -6,8 +6,8 @@ LL | fn f() -> isize { }
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected type `isize`
-              found type `()`
+   = note:   expected type `isize`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/or-patterns/consistent-bindings.stderr b/src/test/ui/or-patterns/consistent-bindings.stderr
index 7f5e670c257..b56aebb99d5 100644
--- a/src/test/ui/or-patterns/consistent-bindings.stderr
+++ b/src/test/ui/or-patterns/consistent-bindings.stderr
@@ -12,8 +12,8 @@ error[E0308]: mismatched types
 LL |     let () = 0;
    |         ^^ expected integer, found ()
    |
-   = note: expected type `{integer}`
-              found type `()`
+   = note:   expected type `{integer}`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/output-type-mismatch.stderr b/src/test/ui/output-type-mismatch.stderr
index 449d3120571..051af60121b 100644
--- a/src/test/ui/output-type-mismatch.stderr
+++ b/src/test/ui/output-type-mismatch.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL | fn main() { let i: isize; i = f(); }
    |                               ^^^ expected isize, found ()
    |
-   = note: expected type `isize`
-              found type `()`
+   = note:   expected type `isize`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/parser/expr-as-stmt.stderr b/src/test/ui/parser/expr-as-stmt.stderr
index 4dcc914f25d..83e8880f183 100644
--- a/src/test/ui/parser/expr-as-stmt.stderr
+++ b/src/test/ui/parser/expr-as-stmt.stderr
@@ -49,8 +49,8 @@ error[E0308]: mismatched types
 LL |     {2} + {2}
    |      ^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/expr-as-stmt.rs:12:6
@@ -58,8 +58,8 @@ error[E0308]: mismatched types
 LL |     {2} + 2
    |      ^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/expr-as-stmt.rs:18:7
@@ -67,8 +67,8 @@ error[E0308]: mismatched types
 LL |     { 42 } + foo;
    |       ^^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/expr-as-stmt.rs:24:7
@@ -76,8 +76,8 @@ error[E0308]: mismatched types
 LL |     { 3 } * 3
    |       ^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error[E0614]: type `{integer}` cannot be dereferenced
   --> $DIR/expr-as-stmt.rs:24:11
diff --git a/src/test/ui/parser/issue-33413.stderr b/src/test/ui/parser/issue-33413.stderr
index 7e5c348e36c..d1e09ce1655 100644
--- a/src/test/ui/parser/issue-33413.stderr
+++ b/src/test/ui/parser/issue-33413.stderr
@@ -12,8 +12,8 @@ LL |     fn f(*, a: u8) -> u8 {}
    |        |
    |        implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected type `u8`
-              found type `()`
+   = note:   expected type `u8`
+           found unit type `()`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/parser/issue-62881.stderr b/src/test/ui/parser/issue-62881.stderr
index 3d58b6fba0b..2905cc7370d 100644
--- a/src/test/ui/parser/issue-62881.stderr
+++ b/src/test/ui/parser/issue-62881.stderr
@@ -21,8 +21,8 @@ LL | fn f() -> isize { fn f() -> isize {} pub f<
    |                      |
    |                      implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected type `isize`
-              found type `()`
+   = note:   expected type `isize`
+           found unit type `()`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/parser/issue-62895.stderr b/src/test/ui/parser/issue-62895.stderr
index 14869e9c8f5..61cb1faead1 100644
--- a/src/test/ui/parser/issue-62895.stderr
+++ b/src/test/ui/parser/issue-62895.stderr
@@ -41,8 +41,8 @@ LL | fn v() -> isize {
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected type `isize`
-              found type `()`
+   = note:   expected type `isize`
+           found unit type `()`
 
 error: aborting due to 6 previous errors
 
diff --git a/src/test/ui/parser/match-vec-invalid.stderr b/src/test/ui/parser/match-vec-invalid.stderr
index 0956ac21b7f..2e4bf8320fb 100644
--- a/src/test/ui/parser/match-vec-invalid.stderr
+++ b/src/test/ui/parser/match-vec-invalid.stderr
@@ -36,8 +36,8 @@ error[E0308]: mismatched types
 LL | const RECOVERY_WITNESS: () = 0;
    |                              ^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error: aborting due to 5 previous errors
 
diff --git a/src/test/ui/parser/pat-lt-bracket-6.stderr b/src/test/ui/parser/pat-lt-bracket-6.stderr
index 234e0c37723..d702dac81da 100644
--- a/src/test/ui/parser/pat-lt-bracket-6.stderr
+++ b/src/test/ui/parser/pat-lt-bracket-6.stderr
@@ -19,8 +19,8 @@ error[E0308]: mismatched types
 LL | const RECOVERY_WITNESS: () = 0;
    |                              ^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/parser/pat-lt-bracket-7.stderr b/src/test/ui/parser/pat-lt-bracket-7.stderr
index 86693ac27bd..77bb3b0417a 100644
--- a/src/test/ui/parser/pat-lt-bracket-7.stderr
+++ b/src/test/ui/parser/pat-lt-bracket-7.stderr
@@ -10,8 +10,8 @@ error[E0308]: mismatched types
 LL | const RECOVERY_WITNESS: () = 0;
    |                              ^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/parser/pat-tuple-4.stderr b/src/test/ui/parser/pat-tuple-4.stderr
index af3ecce1846..7aa91ab2af4 100644
--- a/src/test/ui/parser/pat-tuple-4.stderr
+++ b/src/test/ui/parser/pat-tuple-4.stderr
@@ -19,8 +19,8 @@ error[E0308]: mismatched types
 LL | const RECOVERY_WITNESS: () = 0;
    |                              ^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/parser/recover-for-loop-parens-around-head.stderr b/src/test/ui/parser/recover-for-loop-parens-around-head.stderr
index ccabfbded8b..f0373b0c89f 100644
--- a/src/test/ui/parser/recover-for-loop-parens-around-head.stderr
+++ b/src/test/ui/parser/recover-for-loop-parens-around-head.stderr
@@ -19,8 +19,8 @@ error[E0308]: mismatched types
 LL |         const RECOVERY_WITNESS: () = 0;
    |                                      ^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/parser/recover-from-homoglyph.stderr b/src/test/ui/parser/recover-from-homoglyph.stderr
index ec7d041647a..d69cba7a106 100644
--- a/src/test/ui/parser/recover-from-homoglyph.stderr
+++ b/src/test/ui/parser/recover-from-homoglyph.stderr
@@ -15,8 +15,8 @@ error[E0308]: mismatched types
 LL |     let x: usize = ();
    |                    ^^ expected usize, found ()
    |
-   = note: expected type `usize`
-              found type `()`
+   = note:   expected type `usize`
+           found unit type `()`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/parser/recover-missing-semi.stderr b/src/test/ui/parser/recover-missing-semi.stderr
index c40918ee2bd..41640ac3f23 100644
--- a/src/test/ui/parser/recover-missing-semi.stderr
+++ b/src/test/ui/parser/recover-missing-semi.stderr
@@ -22,8 +22,8 @@ error[E0308]: mismatched types
 LL |     let _: usize = ()
    |                    ^^ expected usize, found ()
    |
-   = note: expected type `usize`
-              found type `()`
+   = note:   expected type `usize`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/recover-missing-semi.rs:9:20
@@ -31,8 +31,8 @@ error[E0308]: mismatched types
 LL |     let _: usize = ()
    |                    ^^ expected usize, found ()
    |
-   = note: expected type `usize`
-              found type `()`
+   = note:   expected type `usize`
+           found unit type `()`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/pattern/pat-tuple-bad-type.stderr b/src/test/ui/pattern/pat-tuple-bad-type.stderr
index 3da3bcb635f..7a599b07f1e 100644
--- a/src/test/ui/pattern/pat-tuple-bad-type.stderr
+++ b/src/test/ui/pattern/pat-tuple-bad-type.stderr
@@ -15,8 +15,8 @@ error[E0308]: mismatched types
 LL |         (..) => {}
    |         ^^^^ expected u8, found ()
    |
-   = note: expected type `u8`
-              found type `()`
+   = note:   expected type `u8`
+           found unit type `()`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/proc-macro/issue-37788.stderr b/src/test/ui/proc-macro/issue-37788.stderr
index 6a75f229a0d..9c35115857f 100644
--- a/src/test/ui/proc-macro/issue-37788.stderr
+++ b/src/test/ui/proc-macro/issue-37788.stderr
@@ -9,8 +9,8 @@ LL |     std::cell::Cell::new(0)
    |     |
    |     expected (), found struct `std::cell::Cell`
    |
-   = note: expected type `()`
-            found struct `std::cell::Cell<{integer}>`
+   = note: expected unit type `()`
+                 found struct `std::cell::Cell<{integer}>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/proc-macro/span-preservation.stderr b/src/test/ui/proc-macro/span-preservation.stderr
index f3b4f2bcd3d..60fb9755003 100644
--- a/src/test/ui/proc-macro/span-preservation.stderr
+++ b/src/test/ui/proc-macro/span-preservation.stderr
@@ -49,8 +49,8 @@ LL | extern "C" fn baz() {
 LL |     0
    |     ^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/span-preservation.rs:49:5
diff --git a/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.nll.stderr b/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.nll.stderr
index 24c9a315bad..b47e2ea3981 100644
--- a/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.nll.stderr
+++ b/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.nll.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let _: fn(&mut &isize, &mut &isize) = a;
    |                                           ^ expected concrete lifetime, found bound lifetime parameter
    |
-   = note: expected type `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)`
-              found type `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}`
+   = note: expected fn pointer `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)`
+                 found fn item `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.nll.stderr b/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.nll.stderr
index 6d031e9ac3b..85046f59da6 100644
--- a/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.nll.stderr
+++ b/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.nll.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let _: fn(&mut &isize, &mut &isize, &mut &isize) = a;
    |                                                        ^ expected concrete lifetime, found bound lifetime parameter
    |
-   = note: expected type `for<'r, 's, 't0, 't1, 't2, 't3> fn(&'r mut &'s isize, &'t0 mut &'t1 isize, &'t2 mut &'t3 isize)`
-              found type `for<'r, 's, 't0> fn(&'r mut &isize, &'s mut &isize, &'t0 mut &isize) {a::<'_, '_, '_>}`
+   = note: expected fn pointer `for<'r, 's, 't0, 't1, 't2, 't3> fn(&'r mut &'s isize, &'t0 mut &'t1 isize, &'t2 mut &'t3 isize)`
+                 found fn item `for<'r, 's, 't0> fn(&'r mut &isize, &'s mut &isize, &'t0 mut &isize) {a::<'_, '_, '_>}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/regions/regions-lifetime-bounds-on-fns.nll.stderr b/src/test/ui/regions/regions-lifetime-bounds-on-fns.nll.stderr
index e1f14fc0cd9..78966048265 100644
--- a/src/test/ui/regions/regions-lifetime-bounds-on-fns.nll.stderr
+++ b/src/test/ui/regions/regions-lifetime-bounds-on-fns.nll.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let _: fn(&mut &isize, &mut &isize) = a;
    |                                           ^ expected concrete lifetime, found bound lifetime parameter
    |
-   = note: expected type `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)`
-              found type `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}`
+   = note: expected fn pointer `for<'r, 's, 't0, 't1> fn(&'r mut &'s isize, &'t0 mut &'t1 isize)`
+                 found fn item `for<'r, 's> fn(&'r mut &isize, &'s mut &isize) {a::<'_, '_>}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/repeat_count.rs b/src/test/ui/repeat_count.rs
index fd9c4951015..cd1b9336ac7 100644
--- a/src/test/ui/repeat_count.rs
+++ b/src/test/ui/repeat_count.rs
@@ -8,7 +8,7 @@ fn main() {
     //~^ ERROR mismatched types
     //~| expected usize, found ()
     //~| expected type `usize`
-    //~| found type `()`
+    //~| found unit type `()`
     let c = [0; true];
     //~^ ERROR mismatched types
     //~| expected usize, found bool
diff --git a/src/test/ui/repeat_count.stderr b/src/test/ui/repeat_count.stderr
index ff79a711ae1..056cad6127f 100644
--- a/src/test/ui/repeat_count.stderr
+++ b/src/test/ui/repeat_count.stderr
@@ -10,8 +10,8 @@ error[E0308]: mismatched types
 LL |     let b = [0; ()];
    |                 ^^ expected usize, found ()
    |
-   = note: expected type `usize`
-              found type `()`
+   = note:   expected type `usize`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/repeat_count.rs:12:17
diff --git a/src/test/ui/return/return-type.stderr b/src/test/ui/return/return-type.stderr
index feb8a95d3c8..40f12347101 100644
--- a/src/test/ui/return/return-type.stderr
+++ b/src/test/ui/return/return-type.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     foo(4 as usize)
    |     ^^^^^^^^^^^^^^^ expected (), found struct `S`
    |
-   = note: expected type `()`
-            found struct `S<usize>`
+   = note: expected unit type `()`
+                 found struct `S<usize>`
 help: try adding a semicolon
    |
 LL |     foo(4 as usize);
diff --git a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr
index 41f0ca2ed5a..b7f16a8d5bb 100644
--- a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr
+++ b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr
@@ -584,8 +584,8 @@ LL |     if x = let 0 = 0 {}
    |        expected bool, found ()
    |        help: try comparing for equality: `x == let 0 = 0`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:59:8
@@ -772,8 +772,8 @@ LL |     while x = let 0 = 0 {}
    |           expected bool, found ()
    |           help: try comparing for equality: `x == let 0 = 0`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:123:11
@@ -959,8 +959,8 @@ LL | fn outside_if_and_while_expr() {
 LL |     &let 0 = 0
    |     ^^^^^^^^^^ expected (), found &bool
    |
-   = note:   expected type `()`
-           found reference `&bool`
+   = note: expected unit type `()`
+              found reference `&bool`
 
 error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
   --> $DIR/disallowed-positions.rs:179:17
diff --git a/src/test/ui/span/move-closure.stderr b/src/test/ui/span/move-closure.stderr
index e628428436d..f6ee7d4d44e 100644
--- a/src/test/ui/span/move-closure.stderr
+++ b/src/test/ui/span/move-closure.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let x: () = move || ();
    |                 ^^^^^^^^^^ expected (), found closure
    |
-   = note: expected type `()`
-           found closure `[closure@$DIR/move-closure.rs:5:17: 5:27]`
+   = note: expected unit type `()`
+                found closure `[closure@$DIR/move-closure.rs:5:17: 5:27]`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/specialization/specialization-default-projection.stderr b/src/test/ui/specialization/specialization-default-projection.stderr
index 6ee634d4d1c..bad7fc35edf 100644
--- a/src/test/ui/specialization/specialization-default-projection.stderr
+++ b/src/test/ui/specialization/specialization-default-projection.stderr
@@ -8,7 +8,7 @@ LL |     ()
    |     ^^ expected associated type, found ()
    |
    = note: expected associated type `<T as Foo>::Assoc`
-                         found type `()`
+                    found unit type `()`
    = note: consider constraining the associated type `<T as Foo>::Assoc` to `()` or calling a method that returns `<T as Foo>::Assoc`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
 
@@ -23,7 +23,7 @@ LL |     generic::<()>()
    |     |
    |     expected (), found associated type
    |
-   = note:         expected type `()`
+   = note:    expected unit type `()`
            found associated type `<() as Foo>::Assoc`
    = note: consider constraining the associated type `<() as Foo>::Assoc` to `()`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
diff --git a/src/test/ui/struct-literal-variant-in-if.stderr b/src/test/ui/struct-literal-variant-in-if.stderr
index bfc8b24e8ac..8c7475e622a 100644
--- a/src/test/ui/struct-literal-variant-in-if.stderr
+++ b/src/test/ui/struct-literal-variant-in-if.stderr
@@ -59,8 +59,8 @@ LL |     if x == E::V { field } {}
    |     |              expected (), found bool
    |     expected this to be `()`
    |
-   = note: expected type `()`
-              found type `bool`
+   = note: expected unit type `()`
+                   found type `bool`
 
 error[E0308]: mismatched types
   --> $DIR/struct-literal-variant-in-if.rs:21:20
@@ -68,8 +68,8 @@ error[E0308]: mismatched types
 LL |     let y: usize = ();
    |                    ^^ expected usize, found ()
    |
-   = note: expected type `usize`
-              found type `()`
+   = note:   expected type `usize`
+           found unit type `()`
 
 error: aborting due to 7 previous errors
 
diff --git a/src/test/ui/substs-ppaux.normal.stderr b/src/test/ui/substs-ppaux.normal.stderr
index 6c732ddceef..2e23e7220b7 100644
--- a/src/test/ui/substs-ppaux.normal.stderr
+++ b/src/test/ui/substs-ppaux.normal.stderr
@@ -10,8 +10,8 @@ LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>;
    |                 expected (), found fn item
    |                 help: use parentheses to call this function: `<i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>()`
    |
-   = note: expected type `()`
-           found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::bar::<'static, char>}`
+   = note: expected unit type `()`
+                found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::bar::<'static, char>}`
 
 error[E0308]: mismatched types
   --> $DIR/substs-ppaux.rs:25:17
@@ -25,8 +25,8 @@ LL |     let x: () = <i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>;
    |                 expected (), found fn item
    |                 help: use parentheses to call this function: `<i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>()`
    |
-   = note: expected type `()`
-           found fn item `fn() {<i8 as Foo<'static, 'static>>::bar::<'static, char>}`
+   = note: expected unit type `()`
+                found fn item `fn() {<i8 as Foo<'static, 'static>>::bar::<'static, char>}`
 
 error[E0308]: mismatched types
   --> $DIR/substs-ppaux.rs:33:17
@@ -40,8 +40,8 @@ LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::baz;
    |                 expected (), found fn item
    |                 help: use parentheses to call this function: `<i8 as Foo<'static, 'static,  u8>>::baz()`
    |
-   = note: expected type `()`
-           found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::baz}`
+   = note: expected unit type `()`
+                found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::baz}`
 
 error[E0308]: mismatched types
   --> $DIR/substs-ppaux.rs:41:17
@@ -55,8 +55,8 @@ LL |     let x: () = foo::<'static>;
    |                 expected (), found fn item
    |                 help: use parentheses to call this function: `foo::<'static>()`
    |
-   = note: expected type `()`
-           found fn item `fn() {foo::<'static>}`
+   = note: expected unit type `()`
+                found fn item `fn() {foo::<'static>}`
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/substs-ppaux.rs:49:5
diff --git a/src/test/ui/substs-ppaux.rs b/src/test/ui/substs-ppaux.rs
index b5b4740603a..66cd94d7a1b 100644
--- a/src/test/ui/substs-ppaux.rs
+++ b/src/test/ui/substs-ppaux.rs
@@ -15,35 +15,35 @@ fn main() {}
 fn foo<'z>() where &'z (): Sized {
     let x: () = <i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>;
     //[verbose]~^ ERROR mismatched types
-    //[verbose]~| expected type `()`
+    //[verbose]~| expected unit type `()`
     //[verbose]~| found fn item `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::bar::<ReStatic, char>}`
     //[normal]~^^^^ ERROR mismatched types
-    //[normal]~| expected type `()`
+    //[normal]~| expected unit type `()`
     //[normal]~| found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::bar::<'static, char>}`
 
 
     let x: () = <i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>;
     //[verbose]~^ ERROR mismatched types
-    //[verbose]~| expected type `()`
+    //[verbose]~| expected unit type `()`
     //[verbose]~| found fn item `fn() {<i8 as Foo<ReStatic, ReStatic>>::bar::<ReStatic, char>}`
     //[normal]~^^^^ ERROR mismatched types
-    //[normal]~| expected type `()`
+    //[normal]~| expected unit type `()`
     //[normal]~| found fn item `fn() {<i8 as Foo<'static, 'static>>::bar::<'static, char>}`
 
     let x: () = <i8 as Foo<'static, 'static,  u8>>::baz;
     //[verbose]~^ ERROR mismatched types
-    //[verbose]~| expected type `()`
+    //[verbose]~| expected unit type `()`
     //[verbose]~| found fn item `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::baz}`
     //[normal]~^^^^ ERROR mismatched types
-    //[normal]~| expected type `()`
+    //[normal]~| expected unit type `()`
     //[normal]~| found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::baz}`
 
     let x: () = foo::<'static>;
     //[verbose]~^ ERROR mismatched types
-    //[verbose]~| expected type `()`
+    //[verbose]~| expected unit type `()`
     //[verbose]~| found fn item `fn() {foo::<ReStatic>}`
     //[normal]~^^^^ ERROR mismatched types
-    //[normal]~| expected type `()`
+    //[normal]~| expected unit type `()`
     //[normal]~| found fn item `fn() {foo::<'static>}`
 
     <str as Foo<u8>>::bar;
diff --git a/src/test/ui/substs-ppaux.verbose.stderr b/src/test/ui/substs-ppaux.verbose.stderr
index b2f647cac24..0d26dcc4c17 100644
--- a/src/test/ui/substs-ppaux.verbose.stderr
+++ b/src/test/ui/substs-ppaux.verbose.stderr
@@ -10,8 +10,8 @@ LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>;
    |                 expected (), found fn item
    |                 help: use parentheses to call this function: `<i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>()`
    |
-   = note: expected type `()`
-           found fn item `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::bar::<ReStatic, char>}`
+   = note: expected unit type `()`
+                found fn item `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::bar::<ReStatic, char>}`
 
 error[E0308]: mismatched types
   --> $DIR/substs-ppaux.rs:25:17
@@ -25,8 +25,8 @@ LL |     let x: () = <i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>;
    |                 expected (), found fn item
    |                 help: use parentheses to call this function: `<i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>()`
    |
-   = note: expected type `()`
-           found fn item `fn() {<i8 as Foo<ReStatic, ReStatic>>::bar::<ReStatic, char>}`
+   = note: expected unit type `()`
+                found fn item `fn() {<i8 as Foo<ReStatic, ReStatic>>::bar::<ReStatic, char>}`
 
 error[E0308]: mismatched types
   --> $DIR/substs-ppaux.rs:33:17
@@ -40,8 +40,8 @@ LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::baz;
    |                 expected (), found fn item
    |                 help: use parentheses to call this function: `<i8 as Foo<'static, 'static,  u8>>::baz()`
    |
-   = note: expected type `()`
-           found fn item `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::baz}`
+   = note: expected unit type `()`
+                found fn item `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::baz}`
 
 error[E0308]: mismatched types
   --> $DIR/substs-ppaux.rs:41:17
@@ -55,8 +55,8 @@ LL |     let x: () = foo::<'static>;
    |                 expected (), found fn item
    |                 help: use parentheses to call this function: `foo::<'static>()`
    |
-   = note: expected type `()`
-           found fn item `fn() {foo::<ReStatic>}`
+   = note: expected unit type `()`
+                found fn item `fn() {foo::<ReStatic>}`
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/substs-ppaux.rs:49:5
diff --git a/src/test/ui/suggestions/match-needing-semi.stderr b/src/test/ui/suggestions/match-needing-semi.stderr
index 988945817c2..eccd9d01fec 100644
--- a/src/test/ui/suggestions/match-needing-semi.stderr
+++ b/src/test/ui/suggestions/match-needing-semi.stderr
@@ -13,8 +13,8 @@ LL | |     }
    | |_____|
    |       expected this to be `()`
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/match-needing-semi.rs:12:5
@@ -28,8 +28,8 @@ LL | |     }
    | |_____|
    |       expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/suppressed-error.rs b/src/test/ui/suppressed-error.rs
index 7bb704367f3..65da1ccd975 100644
--- a/src/test/ui/suppressed-error.rs
+++ b/src/test/ui/suppressed-error.rs
@@ -1,7 +1,7 @@
 fn main() {
     let (x, y) = ();
 //~^ ERROR mismatched types
-//~| expected type `()`
+//~| expected unit type `()`
 //~| found tuple `(_, _)`
 //~| expected (), found tuple
     return x;
diff --git a/src/test/ui/suppressed-error.stderr b/src/test/ui/suppressed-error.stderr
index 0d0ca4d5f73..994011f3f0e 100644
--- a/src/test/ui/suppressed-error.stderr
+++ b/src/test/ui/suppressed-error.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let (x, y) = ();
    |         ^^^^^^ expected (), found tuple
    |
-   = note: expected type `()`
-             found tuple `(_, _)`
+   = note: expected unit type `()`
+                  found tuple `(_, _)`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/terminal-width/non-whitespace-trimming-2.stderr b/src/test/ui/terminal-width/non-whitespace-trimming-2.stderr
index bf1699f5cab..fca72817d65 100644
--- a/src/test/ui/terminal-width/non-whitespace-trimming-2.stderr
+++ b/src/test/ui/terminal-width/non-whitespace-trimming-2.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL | ...; let _: usize = 14; let _: usize = 15; let _: () = 42; let _: usize = 0; let _: usize = 1; let _: usize = 2; let _: usize = 3; let _:...
    |                                                        ^^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/terminal-width/non-whitespace-trimming-unicode.stderr b/src/test/ui/terminal-width/non-whitespace-trimming-unicode.stderr
index b56b1948d9e..e1b73104521 100644
--- a/src/test/ui/terminal-width/non-whitespace-trimming-unicode.stderr
+++ b/src/test/ui/terminal-width/non-whitespace-trimming-unicode.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL | ...♯♰♱♲♳♴♵♶♷♸♹♺♻♼♽♾♿⚀⚁⚂⚃⚄⚅⚆⚈⚉4"; let _: () = 42;  let _: &str = "🦀☀☁☂☃☄★☆☇☈☉☊☋☌☍☎☏☐☑☒☓  ☖☗☘☙☚☛☜☝☞☟☠☡☢☣☤☥☦☧☨☩☪☫☬☭☮☯☰☱☲☳☴☵☶☷☸☹☺☻☼☽☾☿♀♁♂♃♄♅♆...
    |                                               ^^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/terminal-width/non-whitespace-trimming.stderr b/src/test/ui/terminal-width/non-whitespace-trimming.stderr
index 622713eb5f6..72b1502fbf2 100644
--- a/src/test/ui/terminal-width/non-whitespace-trimming.stderr
+++ b/src/test/ui/terminal-width/non-whitespace-trimming.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL | ...) = (); let _: () = (); let _: () = (); let _: () = 42; let _: () = (); let _: () = (); let _: () = (); let _: () = (); let _: () = ()...
    |                                                        ^^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/terminal-width/whitespace-trimming-2.stderr b/src/test/ui/terminal-width/whitespace-trimming-2.stderr
index 38df5a9e9a0..dae00b902dc 100644
--- a/src/test/ui/terminal-width/whitespace-trimming-2.stderr
+++ b/src/test/ui/terminal-width/whitespace-trimming-2.stderr
@@ -6,8 +6,8 @@ LL | ...-> usize {
 LL | ...                                                                                                                                                                                 ()
    |                                                                                                                                                                                     ^^ expected usize, found ()
    |
-   = note: expected type `usize`
-              found type `()`
+   = note:   expected type `usize`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/terminal-width/whitespace-trimming.stderr b/src/test/ui/terminal-width/whitespace-trimming.stderr
index 45a804b9f6a..4a1f8f6f846 100644
--- a/src/test/ui/terminal-width/whitespace-trimming.stderr
+++ b/src/test/ui/terminal-width/whitespace-trimming.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL | ...                   let _: () = 42;
    |                                   ^^ expected (), found integer
    |
-   = note: expected type `()`
-              found type `{integer}`
+   = note: expected unit type `()`
+                   found type `{integer}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/try-block/try-block-bad-type.stderr b/src/test/ui/try-block/try-block-bad-type.stderr
index ecef3b5353f..722b7a3b60a 100644
--- a/src/test/ui/try-block/try-block-bad-type.stderr
+++ b/src/test/ui/try-block/try-block-bad-type.stderr
@@ -28,8 +28,8 @@ error[E0271]: type mismatch resolving `<std::result::Result<i32, i32> as std::op
 LL |     let res: Result<i32, i32> = try { };
    |                                       ^ expected i32, found ()
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error[E0277]: the trait bound `(): std::ops::Try` is not satisfied
   --> $DIR/try-block-bad-type.rs:17:23
diff --git a/src/test/ui/try-block/try-block-type-error.stderr b/src/test/ui/try-block/try-block-type-error.stderr
index 0cbd737debd..0dd81d8e152 100644
--- a/src/test/ui/try-block/try-block-type-error.stderr
+++ b/src/test/ui/try-block/try-block-type-error.stderr
@@ -16,8 +16,8 @@ error[E0271]: type mismatch resolving `<std::option::Option<i32> as std::ops::Tr
 LL |     };
    |     ^ expected i32, found ()
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr b/src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr
index e158224d89a..bbe152d69d7 100644
--- a/src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr
+++ b/src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr
@@ -8,7 +8,7 @@ LL |         Self::TSVariant(());
    |                         ^^ expected type parameter `T`, found ()
    |
    = note: expected type parameter `T`
-                        found type `()`
+                   found unit type `()`
    = help: type parameters must be constrained to match other types
    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
 
@@ -34,7 +34,7 @@ LL |         Self::<()>::TSVariant(());
    |                               ^^ expected type parameter `T`, found ()
    |
    = note: expected type parameter `T`
-                        found type `()`
+                   found unit type `()`
    = help: type parameters must be constrained to match other types
    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
 
@@ -60,7 +60,7 @@ LL |         Self::SVariant { v: () };
    |                             ^^ expected type parameter `T`, found ()
    |
    = note: expected type parameter `T`
-                        found type `()`
+                   found unit type `()`
    = help: type parameters must be constrained to match other types
    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
 
@@ -80,7 +80,7 @@ LL |         Self::SVariant::<()> { v: () };
    |                                   ^^ expected type parameter `T`, found ()
    |
    = note: expected type parameter `T`
-                        found type `()`
+                   found unit type `()`
    = help: type parameters must be constrained to match other types
    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
 
@@ -100,7 +100,7 @@ LL |         Self::<()>::SVariant { v: () };
    |                                   ^^ expected type parameter `T`, found ()
    |
    = note: expected type parameter `T`
-                        found type `()`
+                   found unit type `()`
    = help: type parameters must be constrained to match other types
    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
 
@@ -126,7 +126,7 @@ LL |         Self::<()>::SVariant::<()> { v: () };
    |                                         ^^ expected type parameter `T`, found ()
    |
    = note: expected type parameter `T`
-                        found type `()`
+                   found unit type `()`
    = help: type parameters must be constrained to match other types
    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
 
diff --git a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.nll.stderr b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.nll.stderr
index b4ecf81ad88..7e744925a7c 100644
--- a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.nll.stderr
+++ b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.nll.stderr
@@ -10,8 +10,8 @@ error[E0308]: mismatched types
 LL |     let z: i32 = x;
    |                  ^ expected i32, found opaque type
    |
-   = note: expected type `i32`
-              found type `WrongGeneric::<&{integer}>`
+   = note:     expected type `i32`
+           found opaque type `WrongGeneric::<&{integer}>`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/type-alias-impl-trait/issue-63279.stderr b/src/test/ui/type-alias-impl-trait/issue-63279.stderr
index 7232bae93d2..bb5f1d3bbc9 100644
--- a/src/test/ui/type-alias-impl-trait/issue-63279.stderr
+++ b/src/test/ui/type-alias-impl-trait/issue-63279.stderr
@@ -5,7 +5,7 @@ LL | type Closure = impl FnOnce();
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected opaque type, found ()
    |
    = note: expected opaque type `Closure`
-                     found type `()`
+                found unit type `()`
    = note: the return type of a function must have a statically known size
 
 error: aborting due to previous error
diff --git a/src/test/ui/type/type-check/assignment-expected-bool.stderr b/src/test/ui/type/type-check/assignment-expected-bool.stderr
index b636a71f3af..c6b42afa513 100644
--- a/src/test/ui/type/type-check/assignment-expected-bool.stderr
+++ b/src/test/ui/type/type-check/assignment-expected-bool.stderr
@@ -7,8 +7,8 @@ LL |     let _: bool = 0 = 0;
    |                   expected bool, found ()
    |                   help: try comparing for equality: `0 == 0`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:9:14
@@ -19,8 +19,8 @@ LL |         0 => 0 = 0,
    |              expected bool, found ()
    |              help: try comparing for equality: `0 == 0`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:10:14
@@ -31,8 +31,8 @@ LL |         _ => 0 = 0,
    |              expected bool, found ()
    |              help: try comparing for equality: `0 == 0`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:14:17
@@ -43,8 +43,8 @@ LL |         true => 0 = 0,
    |                 expected bool, found ()
    |                 help: try comparing for equality: `0 == 0`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:18:8
@@ -55,8 +55,8 @@ LL |     if 0 = 0 {}
    |        expected bool, found ()
    |        help: try comparing for equality: `0 == 0`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:20:24
@@ -67,8 +67,8 @@ LL |     let _: bool = if { 0 = 0 } {
    |                        expected bool, found ()
    |                        help: try comparing for equality: `0 == 0`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:21:9
@@ -79,8 +79,8 @@ LL |         0 = 0
    |         expected bool, found ()
    |         help: try comparing for equality: `0 == 0`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:23:9
@@ -91,8 +91,8 @@ LL |         0 = 0
    |         expected bool, found ()
    |         help: try comparing for equality: `0 == 0`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:26:13
@@ -103,8 +103,8 @@ LL |     let _ = (0 = 0)
    |             expected bool, found ()
    |             help: try comparing for equality: `0 == 0`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:27:14
@@ -115,8 +115,8 @@ LL |         && { 0 = 0 }
    |              expected bool, found ()
    |              help: try comparing for equality: `0 == 0`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:28:12
@@ -127,8 +127,8 @@ LL |         || (0 = 0);
    |            expected bool, found ()
    |            help: try comparing for equality: `0 == 0`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0070]: invalid left-hand side expression
   --> $DIR/assignment-expected-bool.rs:31:20
@@ -142,8 +142,8 @@ error[E0308]: mismatched types
 LL |     let _: usize = 0 = 0;
    |                    ^^^^^ expected usize, found ()
    |
-   = note: expected type `usize`
-              found type `()`
+   = note:   expected type `usize`
+           found unit type `()`
 
 error: aborting due to 13 previous errors
 
diff --git a/src/test/ui/type/type-check/assignment-in-if.stderr b/src/test/ui/type/type-check/assignment-in-if.stderr
index 87b8d17c21b..05280aab2dd 100644
--- a/src/test/ui/type/type-check/assignment-in-if.stderr
+++ b/src/test/ui/type/type-check/assignment-in-if.stderr
@@ -7,8 +7,8 @@ LL |     if x = x {
    |        expected bool, found ()
    |        help: try comparing for equality: `x == x`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-in-if.rs:20:8
@@ -19,8 +19,8 @@ LL |     if (x = x) {
    |        expected bool, found ()
    |        help: try comparing for equality: `x == x`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-in-if.rs:25:8
@@ -31,8 +31,8 @@ LL |     if y = (Foo { foo: x }) {
    |        expected bool, found ()
    |        help: try comparing for equality: `y == (Foo { foo: x })`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-in-if.rs:30:8
@@ -43,8 +43,8 @@ LL |     if 3 = x {
    |        expected bool, found ()
    |        help: try comparing for equality: `3 == x`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-in-if.rs:36:13
@@ -55,8 +55,8 @@ LL |             x = 4
    |             expected bool, found ()
    |             help: try comparing for equality: `x == 4`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-in-if.rs:38:13
@@ -67,8 +67,8 @@ LL |             x = 5
    |             expected bool, found ()
    |             help: try comparing for equality: `x == 5`
    |
-   = note: expected type `bool`
-              found type `()`
+   = note:   expected type `bool`
+           found unit type `()`
 
 error: aborting due to 6 previous errors
 
diff --git a/src/test/ui/type/type-error-break-tail.stderr b/src/test/ui/type/type-error-break-tail.stderr
index e5297d9a596..47416c4f911 100644
--- a/src/test/ui/type/type-error-break-tail.stderr
+++ b/src/test/ui/type/type-error-break-tail.stderr
@@ -10,8 +10,8 @@ LL |         if false { break; }
    |                    expected i32, found ()
    |                    help: give it a value of the expected type: `break 42`
    |
-   = note: expected type `i32`
-              found type `()`
+   = note:   expected type `i32`
+           found unit type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr b/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr
index d155744836e..aca9c3f558a 100644
--- a/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr
+++ b/src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr
@@ -6,8 +6,8 @@ LL | fn ice(x: Box<dyn Iterator<Item=()>>) {
 LL |     *x
    |     ^^ expected (), found trait std::iter::Iterator
    |
-   = note: expected type `()`
-             found trait `(dyn std::iter::Iterator<Item = ()> + 'static)`
+   = note: expected unit type `()`
+           found trait object `(dyn std::iter::Iterator<Item = ()> + 'static)`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/variance/variance-contravariant-arg-object.stderr b/src/test/ui/variance/variance-contravariant-arg-object.stderr
index 67ce9bc1346..a512a60aa42 100644
--- a/src/test/ui/variance/variance-contravariant-arg-object.stderr
+++ b/src/test/ui/variance/variance-contravariant-arg-object.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected trait `dyn Get<&'min i32>`
-              found trait `dyn Get<&'max i32>`
+   = note: expected trait object `dyn Get<&'min i32>`
+              found trait object `dyn Get<&'max i32>`
 note: the lifetime `'min` as defined on the function body at 10:21...
   --> $DIR/variance-contravariant-arg-object.rs:10:21
    |
@@ -23,8 +23,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected trait `dyn Get<&'max i32>`
-              found trait `dyn Get<&'min i32>`
+   = note: expected trait object `dyn Get<&'max i32>`
+              found trait object `dyn Get<&'min i32>`
 note: the lifetime `'min` as defined on the function body at 17:21...
   --> $DIR/variance-contravariant-arg-object.rs:17:21
    |
diff --git a/src/test/ui/variance/variance-covariant-arg-object.stderr b/src/test/ui/variance/variance-covariant-arg-object.stderr
index f66c0f20ba1..75b6d588c15 100644
--- a/src/test/ui/variance/variance-covariant-arg-object.stderr
+++ b/src/test/ui/variance/variance-covariant-arg-object.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected trait `dyn Get<&'min i32>`
-              found trait `dyn Get<&'max i32>`
+   = note: expected trait object `dyn Get<&'min i32>`
+              found trait object `dyn Get<&'max i32>`
 note: the lifetime `'min` as defined on the function body at 10:21...
   --> $DIR/variance-covariant-arg-object.rs:10:21
    |
@@ -23,8 +23,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected trait `dyn Get<&'max i32>`
-              found trait `dyn Get<&'min i32>`
+   = note: expected trait object `dyn Get<&'max i32>`
+              found trait object `dyn Get<&'min i32>`
 note: the lifetime `'min` as defined on the function body at 18:21...
   --> $DIR/variance-covariant-arg-object.rs:18:21
    |
diff --git a/src/test/ui/variance/variance-invariant-arg-object.stderr b/src/test/ui/variance/variance-invariant-arg-object.stderr
index 8ae7240b282..13ee9b9da3c 100644
--- a/src/test/ui/variance/variance-invariant-arg-object.stderr
+++ b/src/test/ui/variance/variance-invariant-arg-object.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected trait `dyn Get<&'min i32>`
-              found trait `dyn Get<&'max i32>`
+   = note: expected trait object `dyn Get<&'min i32>`
+              found trait object `dyn Get<&'max i32>`
 note: the lifetime `'min` as defined on the function body at 7:21...
   --> $DIR/variance-invariant-arg-object.rs:7:21
    |
@@ -23,8 +23,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected trait `dyn Get<&'max i32>`
-              found trait `dyn Get<&'min i32>`
+   = note: expected trait object `dyn Get<&'max i32>`
+              found trait object `dyn Get<&'min i32>`
 note: the lifetime `'min` as defined on the function body at 14:21...
   --> $DIR/variance-invariant-arg-object.rs:14:21
    |