about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-11-21 17:53:19 +0000
committerbors <bors@rust-lang.org>2019-11-21 17:53:19 +0000
commit53712f8637dbe326df569a90814aae1cc5429710 (patch)
tree3ffee9436fa178bcc3d74251c686074cbd8a4c04 /src
parent35ef33a89dfd8ff8c8a7b3c58fa7136bbcb2f1ed (diff)
parent468722b33c589ade04a11f05f53d0f3bff6c7a99 (diff)
Auto merge of #66389 - estebank:type-err-labels, r=petrochenkov
Specific labels when referring to "expected" and "found" types
Diffstat (limited to 'src')
-rw-r--r--src/librustc/infer/error_reporting/mod.rs71
-rw-r--r--src/librustc/ty/diagnostics.rs56
-rw-r--r--src/librustc/ty/error.rs104
-rw-r--r--src/librustc/ty/mod.rs33
-rw-r--r--src/librustc/ty/wf.rs4
-rw-r--r--src/librustc_errors/diagnostic.rs76
-rw-r--r--src/librustc_errors/diagnostic_builder.rs59
-rw-r--r--src/librustc_typeck/check/_match.rs8
-rw-r--r--src/librustc_typeck/check/pat.rs2
-rw-r--r--src/test/rustdoc-ui/failed-doctest-missing-codes.stdout5
-rw-r--r--src/test/ui/arg-type-mismatch.stderr5
-rw-r--r--src/test/ui/array-break-length.stderr12
-rw-r--r--src/test/ui/array-not-vector.rs10
-rw-r--r--src/test/ui/array-not-vector.stderr13
-rw-r--r--src/test/ui/associated-const/associated-const-generic-obligations.stderr6
-rw-r--r--src/test/ui/associated-const/associated-const-impl-wrong-lifetime.stderr4
-rw-r--r--src/test/ui/associated-const/associated-const-impl-wrong-type.stderr2
-rw-r--r--src/test/ui/associated-type/associated-type-projection-from-supertrait.stderr12
-rw-r--r--src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr6
-rw-r--r--src/test/ui/associated-types/associated-types-eq-3.rs8
-rw-r--r--src/test/ui/associated-types/associated-types-eq-3.stderr13
-rw-r--r--src/test/ui/associated-types/associated-types-eq-hr.stderr12
-rw-r--r--src/test/ui/associated-types/associated-types-issue-20346.stderr2
-rw-r--r--src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr12
-rw-r--r--src/test/ui/associated-types/associated-types-overridden-binding-2.stderr4
-rw-r--r--src/test/ui/associated-types/associated-types-path-2.rs4
-rw-r--r--src/test/ui/associated-types/associated-types-path-2.stderr4
-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.stderr5
-rw-r--r--src/test/ui/async-await/async-block-control-flow-static-semantics.stderr30
-rw-r--r--src/test/ui/async-await/dont-suggest-missing-await.stderr6
-rw-r--r--src/test/ui/async-await/issue-66387-if-without-else.stderr4
-rw-r--r--src/test/ui/async-await/suggest-missing-await-closure.stderr6
-rw-r--r--src/test/ui/async-await/suggest-missing-await.stderr6
-rw-r--r--src/test/ui/bad/bad-const-type.rs2
-rw-r--r--src/test/ui/bad/bad-const-type.stderr3
-rw-r--r--src/test/ui/bad/bad-expr-path.stderr4
-rw-r--r--src/test/ui/bad/bad-expr-path2.stderr4
-rw-r--r--src/test/ui/bad/bad-main.stderr4
-rw-r--r--src/test/ui/binop/binop-logic-float.stderr4
-rw-r--r--src/test/ui/binop/binop-logic-int.stderr10
-rw-r--r--src/test/ui/blind/blind-item-block-middle.stderr3
-rw-r--r--src/test/ui/block-expression-remove-semicolon.stderr5
-rw-r--r--src/test/ui/block-result/block-must-not-have-result-do.stderr5
-rw-r--r--src/test/ui/block-result/block-must-not-have-result-res.stderr5
-rw-r--r--src/test/ui/block-result/block-must-not-have-result-while.rs4
-rw-r--r--src/test/ui/block-result/block-must-not-have-result-while.stderr5
-rw-r--r--src/test/ui/block-result/consider-removing-last-semi.stderr10
-rw-r--r--src/test/ui/block-result/issue-11714.stderr5
-rw-r--r--src/test/ui/block-result/issue-13428.stderr10
-rw-r--r--src/test/ui/block-result/issue-13624.rs8
-rw-r--r--src/test/ui/block-result/issue-13624.stderr12
-rw-r--r--src/test/ui/block-result/issue-20862.stderr6
-rw-r--r--src/test/ui/block-result/issue-22645.stderr5
-rw-r--r--src/test/ui/block-result/issue-5500.rs6
-rw-r--r--src/test/ui/block-result/issue-5500.stderr6
-rw-r--r--src/test/ui/block-result/unexpected-return-on-unit.stderr4
-rw-r--r--src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr4
-rw-r--r--src/test/ui/break-while-condition.stderr18
-rw-r--r--src/test/ui/c-variadic/variadic-ffi-1.stderr8
-rw-r--r--src/test/ui/c-variadic/variadic-ffi-4.stderr20
-rw-r--r--src/test/ui/chalkify/type_inference.stderr5
-rw-r--r--src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr8
-rw-r--r--src/test/ui/closures/closure-array-break-length.stderr8
-rw-r--r--src/test/ui/closures/closure-expected-type/expect-region-supply-region.stderr8
-rw-r--r--src/test/ui/closures/closure-no-fn-1.stderr4
-rw-r--r--src/test/ui/closures/closure-no-fn-2.stderr4
-rw-r--r--src/test/ui/closures/closure-reform-bad.stderr4
-rw-r--r--src/test/ui/codemap_tests/tab.stderr5
-rw-r--r--src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr84
-rw-r--r--src/test/ui/coercion/coerce-mut.rs4
-rw-r--r--src/test/ui/coercion/coerce-mut.stderr4
-rw-r--r--src/test/ui/coercion/coerce-to-bang.stderr24
-rw-r--r--src/test/ui/coercion/coercion-missing-tail-expected-type.stderr11
-rw-r--r--src/test/ui/coercion/coercion-slice.rs3
-rw-r--r--src/test/ui/coercion/coercion-slice.stderr5
-rw-r--r--src/test/ui/compare-method/reordered-type-param.stderr4
-rw-r--r--src/test/ui/const-generics/const-argument-cross-crate-mismatch.stderr6
-rw-r--r--src/test/ui/const-generics/fn-const-param-infer.stderr14
-rw-r--r--src/test/ui/const-generics/raw-ptr-const-param.stderr4
-rw-r--r--src/test/ui/const-generics/slice-const-param-mismatch.stderr12
-rw-r--r--src/test/ui/const-generics/types-mismatch-const-args.stderr10
-rw-r--r--src/test/ui/consts/const-array-oob-arith.stderr6
-rw-r--r--src/test/ui/consts/const-cast-wrong-type.stderr2
-rw-r--r--src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr2
-rw-r--r--src/test/ui/consts/const-eval/const-eval-overflow-4b.rs2
-rw-r--r--src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr2
-rw-r--r--src/test/ui/consts/const-eval/const-eval-span.rs3
-rw-r--r--src/test/ui/consts/const-eval/const-eval-span.stderr5
-rw-r--r--src/test/ui/consts/const-integer-bool-ops.rs36
-rw-r--r--src/test/ui/consts/const-integer-bool-ops.stderr60
-rw-r--r--src/test/ui/consts/const-tup-index-span.rs2
-rw-r--r--src/test/ui/consts/const-tup-index-span.stderr6
-rw-r--r--src/test/ui/consts/const-type-mismatch.stderr4
-rw-r--r--src/test/ui/consts/enum-discr-type-err.stderr2
-rw-r--r--src/test/ui/conversion-methods.stderr19
-rw-r--r--src/test/ui/cross/cross-borrow-trait.rs4
-rw-r--r--src/test/ui/cross/cross-borrow-trait.stderr6
-rw-r--r--src/test/ui/deref-suggestion.stderr49
-rw-r--r--src/test/ui/destructure-trait-ref.rs16
-rw-r--r--src/test/ui/destructure-trait-ref.stderr18
-rw-r--r--src/test/ui/did_you_mean/issue-42764.stderr7
-rw-r--r--src/test/ui/did_you_mean/issue-53280-expected-float-found-integer-literal.stderr25
-rw-r--r--src/test/ui/did_you_mean/recursion_limit_deref.stderr4
-rw-r--r--src/test/ui/discrim/discrim-ill-typed.rs16
-rw-r--r--src/test/ui/discrim/discrim-ill-typed.stderr16
-rw-r--r--src/test/ui/diverging-fn-tail-35849.stderr4
-rw-r--r--src/test/ui/diverging-tuple-parts-39485.stderr10
-rw-r--r--src/test/ui/dst/dst-bad-assign-3.rs6
-rw-r--r--src/test/ui/dst/dst-bad-assign-3.stderr6
-rw-r--r--src/test/ui/dst/dst-bad-assign.rs6
-rw-r--r--src/test/ui/dst/dst-bad-assign.stderr6
-rw-r--r--src/test/ui/dst/dst-bad-coerce1.stderr12
-rw-r--r--src/test/ui/dst/dst-bad-coerce2.stderr16
-rw-r--r--src/test/ui/dst/dst-bad-coerce4.rs12
-rw-r--r--src/test/ui/dst/dst-bad-coerce4.stderr12
-rw-r--r--src/test/ui/dst/dst-bad-coercions.stderr36
-rw-r--r--src/test/ui/elide-errors-on-mismatched-tuple.stderr4
-rw-r--r--src/test/ui/error-codes/E0070.stderr5
-rw-r--r--src/test/ui/error-codes/E0271.stderr5
-rw-r--r--src/test/ui/error-codes/E0308-4.stderr2
-rw-r--r--src/test/ui/error-codes/E0308.stderr6
-rw-r--r--src/test/ui/estr-subtyping.stderr5
-rw-r--r--src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr4
-rw-r--r--src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr4
-rw-r--r--src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr8
-rw-r--r--src/test/ui/explicit/explicit-self-lifetime-mismatch.rs8
-rw-r--r--src/test/ui/explicit/explicit-self-lifetime-mismatch.stderr8
-rw-r--r--src/test/ui/extern/extern-main-fn.stderr4
-rw-r--r--src/test/ui/extern/extern-types-distinct-types.stderr4
-rw-r--r--src/test/ui/float-literal-inference-restrictions.stderr7
-rw-r--r--src/test/ui/fn/fn-bad-block-type.stderr2
-rw-r--r--src/test/ui/fn/fn-compare-mismatch.stderr4
-rw-r--r--src/test/ui/fn/fn-item-type.rs12
-rw-r--r--src/test/ui/fn/fn-item-type.stderr20
-rw-r--r--src/test/ui/fn/fn-trait-formatting.rs12
-rw-r--r--src/test/ui/fn/fn-trait-formatting.stderr18
-rw-r--r--src/test/ui/fully-qualified-type/fully-qualified-type-name1.rs2
-rw-r--r--src/test/ui/fully-qualified-type/fully-qualified-type-name1.stderr2
-rw-r--r--src/test/ui/fully-qualified-type/fully-qualified-type-name2.rs2
-rw-r--r--src/test/ui/fully-qualified-type/fully-qualified-type-name2.stderr3
-rw-r--r--src/test/ui/fully-qualified-type/fully-qualified-type-name4.rs4
-rw-r--r--src/test/ui/fully-qualified-type/fully-qualified-type-name4.stderr4
-rw-r--r--src/test/ui/generator/type-mismatch-signature-deduction.stderr4
-rw-r--r--src/test/ui/generic/generic-arg-mismatch-recover.stderr6
-rw-r--r--src/test/ui/generic/generic-type-params-name-repr.rs36
-rw-r--r--src/test/ui/generic/generic-type-params-name-repr.stderr36
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr4
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr4
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr4
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr4
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr4
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr4
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr4
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr8
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr4
-rw-r--r--src/test/ui/hrtb/hrtb-exists-forall-fn.stderr4
-rw-r--r--src/test/ui/hrtb/issue-62203-hrtb-ice.stderr6
-rw-r--r--src/test/ui/if-else-type-mismatch.stderr40
-rw-r--r--src/test/ui/if/if-branch-types.rs2
-rw-r--r--src/test/ui/if/if-branch-types.stderr5
-rw-r--r--src/test/ui/if/if-let-arm-types.rs3
-rw-r--r--src/test/ui/if/if-let-arm-types.stderr5
-rw-r--r--src/test/ui/if/if-no-match-bindings.stderr40
-rw-r--r--src/test/ui/if/if-typeck.stderr4
-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.rs4
-rw-r--r--src/test/ui/if/if-without-else-result.stderr4
-rw-r--r--src/test/ui/if/ifmt-bad-arg.stderr12
-rw-r--r--src/test/ui/impl-trait/bound-normalization-fail.stderr12
-rw-r--r--src/test/ui/impl-trait/equality.rs2
-rw-r--r--src/test/ui/impl-trait/equality.stderr5
-rw-r--r--src/test/ui/impl-trait/equality2.rs12
-rw-r--r--src/test/ui/impl-trait/equality2.stderr24
-rw-r--r--src/test/ui/impl-trait/impl-generic-mismatch-ab.stderr4
-rw-r--r--src/test/ui/impl-trait/trait_type.stderr4
-rw-r--r--src/test/ui/impl-trait/universal-mismatched-type.stderr4
-rw-r--r--src/test/ui/impl-trait/universal-two-impl-traits.stderr4
-rw-r--r--src/test/ui/include-macros/mismatched-types.stderr12
-rw-r--r--src/test/ui/indexing-requires-a-uint.stderr2
-rw-r--r--src/test/ui/integer-literal-suffix-inference.rs72
-rw-r--r--src/test/ui/integer-literal-suffix-inference.stderr72
-rw-r--r--src/test/ui/integral-variable-unification-error.rs2
-rw-r--r--src/test/ui/integral-variable-unification-error.stderr3
-rw-r--r--src/test/ui/issues/issue-10176.rs4
-rw-r--r--src/test/ui/issues/issue-10176.stderr4
-rw-r--r--src/test/ui/issues/issue-10764.stderr4
-rw-r--r--src/test/ui/issues/issue-11319.rs3
-rw-r--r--src/test/ui/issues/issue-11319.stderr5
-rw-r--r--src/test/ui/issues/issue-11374.stderr6
-rw-r--r--src/test/ui/issues/issue-11515.stderr4
-rw-r--r--src/test/ui/issues/issue-11844.stderr4
-rw-r--r--src/test/ui/issues/issue-12552.stderr8
-rw-r--r--src/test/ui/issues/issue-12997-2.stderr5
-rw-r--r--src/test/ui/issues/issue-13033.rs4
-rw-r--r--src/test/ui/issues/issue-13033.stderr4
-rw-r--r--src/test/ui/issues/issue-13359.rs4
-rw-r--r--src/test/ui/issues/issue-13359.stderr4
-rw-r--r--src/test/ui/issues/issue-13407.stderr3
-rw-r--r--src/test/ui/issues/issue-13446.stderr6
-rw-r--r--src/test/ui/issues/issue-13466.rs8
-rw-r--r--src/test/ui/issues/issue-13466.stderr8
-rw-r--r--src/test/ui/issues/issue-1362.stderr2
-rw-r--r--src/test/ui/issues/issue-13853.stderr8
-rw-r--r--src/test/ui/issues/issue-14091.stderr5
-rw-r--r--src/test/ui/issues/issue-1448-2.stderr2
-rw-r--r--src/test/ui/issues/issue-14541.rs2
-rw-r--r--src/test/ui/issues/issue-14541.stderr3
-rw-r--r--src/test/ui/issues/issue-15094.rs4
-rw-r--r--src/test/ui/issues/issue-15094.stderr4
-rw-r--r--src/test/ui/issues/issue-15783.rs6
-rw-r--r--src/test/ui/issues/issue-15783.stderr6
-rw-r--r--src/test/ui/issues/issue-15896.rs2
-rw-r--r--src/test/ui/issues/issue-15896.stderr3
-rw-r--r--src/test/ui/issues/issue-16338.rs2
-rw-r--r--src/test/ui/issues/issue-16338.stderr4
-rw-r--r--src/test/ui/issues/issue-16401.rs6
-rw-r--r--src/test/ui/issues/issue-16401.stderr6
-rw-r--r--src/test/ui/issues/issue-17033.rs4
-rw-r--r--src/test/ui/issues/issue-17033.stderr5
-rw-r--r--src/test/ui/issues/issue-17728.nll.stderr4
-rw-r--r--src/test/ui/issues/issue-17728.stderr4
-rw-r--r--src/test/ui/issues/issue-17740.rs8
-rw-r--r--src/test/ui/issues/issue-17740.stderr8
-rw-r--r--src/test/ui/issues/issue-17905-2.stderr8
-rw-r--r--src/test/ui/issues/issue-19991.rs4
-rw-r--r--src/test/ui/issues/issue-19991.stderr6
-rw-r--r--src/test/ui/issues/issue-20225.rs3
-rw-r--r--src/test/ui/issues/issue-20225.stderr22
-rw-r--r--src/test/ui/issues/issue-21332.stderr4
-rw-r--r--src/test/ui/issues/issue-22684.stderr5
-rw-r--r--src/test/ui/issues/issue-23589.stderr5
-rw-r--r--src/test/ui/issues/issue-24036.stderr6
-rw-r--r--src/test/ui/issues/issue-24204.stderr4
-rw-r--r--src/test/ui/issues/issue-24322.stderr4
-rw-r--r--src/test/ui/issues/issue-24819.stderr4
-rw-r--r--src/test/ui/issues/issue-27008.rs4
-rw-r--r--src/test/ui/issues/issue-27008.stderr5
-rw-r--r--src/test/ui/issues/issue-27042.stderr20
-rw-r--r--src/test/ui/issues/issue-29084.rs4
-rw-r--r--src/test/ui/issues/issue-29084.stderr5
-rw-r--r--src/test/ui/issues/issue-2951.rs4
-rw-r--r--src/test/ui/issues/issue-2951.stderr4
-rw-r--r--src/test/ui/issues/issue-30225.stderr3
-rw-r--r--src/test/ui/issues/issue-31173.rs2
-rw-r--r--src/test/ui/issues/issue-31173.stderr6
-rw-r--r--src/test/ui/issues/issue-31910.rs2
-rw-r--r--src/test/ui/issues/issue-31910.stderr2
-rw-r--r--src/test/ui/issues/issue-32323.stderr6
-rw-r--r--src/test/ui/issues/issue-33504.stderr3
-rw-r--r--src/test/ui/issues/issue-33941.stderr8
-rw-r--r--src/test/ui/issues/issue-34334.stderr4
-rw-r--r--src/test/ui/issues/issue-3477.rs2
-rw-r--r--src/test/ui/issues/issue-3477.stderr2
-rw-r--r--src/test/ui/issues/issue-35241.stderr4
-rw-r--r--src/test/ui/issues/issue-35869.stderr24
-rw-r--r--src/test/ui/issues/issue-3680.rs4
-rw-r--r--src/test/ui/issues/issue-3680.stderr4
-rw-r--r--src/test/ui/issues/issue-37026.stderr10
-rw-r--r--src/test/ui/issues/issue-37665.stderr5
-rw-r--r--src/test/ui/issues/issue-37884.stderr4
-rw-r--r--src/test/ui/issues/issue-38940.stderr4
-rw-r--r--src/test/ui/issues/issue-39970.stderr4
-rw-r--r--src/test/ui/issues/issue-39974.rs2
-rw-r--r--src/test/ui/issues/issue-39974.stderr2
-rw-r--r--src/test/ui/issues/issue-40000.stderr4
-rw-r--r--src/test/ui/issues/issue-40749.rs2
-rw-r--r--src/test/ui/issues/issue-40749.stderr4
-rw-r--r--src/test/ui/issues/issue-41549.stderr5
-rw-r--r--src/test/ui/issues/issue-41742.stderr5
-rw-r--r--src/test/ui/issues/issue-4201.rs4
-rw-r--r--src/test/ui/issues/issue-4201.stderr6
-rw-r--r--src/test/ui/issues/issue-43162.stderr5
-rw-r--r--src/test/ui/issues/issue-43420-no-over-suggest.stderr6
-rw-r--r--src/test/ui/issues/issue-44023.stderr5
-rw-r--r--src/test/ui/issues/issue-4517.rs4
-rw-r--r--src/test/ui/issues/issue-4517.stderr5
-rw-r--r--src/test/ui/issues/issue-46112.stderr6
-rw-r--r--src/test/ui/issues/issue-46302.stderr5
-rw-r--r--src/test/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.stderr10
-rw-r--r--src/test/ui/issues/issue-47486.stderr5
-rw-r--r--src/test/ui/issues/issue-48364.stderr6
-rw-r--r--src/test/ui/issues/issue-48838.stderr4
-rw-r--r--src/test/ui/issues/issue-4968.rs2
-rw-r--r--src/test/ui/issues/issue-4968.stderr2
-rw-r--r--src/test/ui/issues/issue-50577.stderr4
-rw-r--r--src/test/ui/issues/issue-50585.stderr5
-rw-r--r--src/test/ui/issues/issue-50600.stderr4
-rw-r--r--src/test/ui/issues/issue-50688.stderr4
-rw-r--r--src/test/ui/issues/issue-5100.rs22
-rw-r--r--src/test/ui/issues/issue-5100.stderr22
-rw-r--r--src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr4
-rw-r--r--src/test/ui/issues/issue-5216.stderr8
-rw-r--r--src/test/ui/issues/issue-52533-1.stderr4
-rw-r--r--src/test/ui/issues/issue-53348.rs3
-rw-r--r--src/test/ui/issues/issue-53348.stderr5
-rw-r--r--src/test/ui/issues/issue-5358-1.rs4
-rw-r--r--src/test/ui/issues/issue-5358-1.stderr4
-rw-r--r--src/test/ui/issues/issue-53692.stderr11
-rw-r--r--src/test/ui/issues/issue-56943.stderr3
-rw-r--r--src/test/ui/issues/issue-57741-1.stderr8
-rw-r--r--src/test/ui/issues/issue-57741.stderr16
-rw-r--r--src/test/ui/issues/issue-59488.stderr12
-rw-r--r--src/test/ui/issues/issue-59756.stderr4
-rw-r--r--src/test/ui/issues/issue-61106.stderr5
-rw-r--r--src/test/ui/issues/issue-61882.stderr11
-rw-r--r--src/test/ui/issues/issue-6458-4.stderr6
-rw-r--r--src/test/ui/issues/issue-7061.rs4
-rw-r--r--src/test/ui/issues/issue-7061.stderr6
-rw-r--r--src/test/ui/issues/issue-7092.rs4
-rw-r--r--src/test/ui/issues/issue-7092.stderr4
-rw-r--r--src/test/ui/issues/issue-7867.rs4
-rw-r--r--src/test/ui/issues/issue-7867.stderr4
-rw-r--r--src/test/ui/issues/issue-8761.rs4
-rw-r--r--src/test/ui/issues/issue-8761.stderr4
-rw-r--r--src/test/ui/issues/issue-9575.stderr4
-rw-r--r--src/test/ui/json-bom-plus-crlf-multifile.stderr12
-rw-r--r--src/test/ui/json-bom-plus-crlf.stderr12
-rw-r--r--src/test/ui/keyword/keyword-false-as-identifier.stderr5
-rw-r--r--src/test/ui/keyword/keyword-true-as-identifier.stderr5
-rw-r--r--src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr8
-rw-r--r--src/test/ui/liveness/liveness-closure-require-ret.stderr5
-rw-r--r--src/test/ui/liveness/liveness-forgot-ret.stderr5
-rw-r--r--src/test/ui/liveness/liveness-issue-2163.stderr5
-rw-r--r--src/test/ui/liveness/liveness-missing-ret2.stderr5
-rw-r--r--src/test/ui/liveness/liveness-return-last-stmt-semi.stderr20
-rw-r--r--src/test/ui/loops/loop-break-value.stderr42
-rw-r--r--src/test/ui/loops/loop-labeled-break-value.stderr15
-rw-r--r--src/test/ui/loops/loop-properly-diverging-2.stderr5
-rw-r--r--src/test/ui/lub-glb/old-lub-glb-hr.stderr4
-rw-r--r--src/test/ui/lub-glb/old-lub-glb-object.stderr4
-rw-r--r--src/test/ui/main-wrong-type.stderr4
-rw-r--r--src/test/ui/match/match-arm-resolving-to-never.stderr4
-rw-r--r--src/test/ui/match/match-ill-type2.stderr2
-rw-r--r--src/test/ui/match/match-range-fail.rs2
-rw-r--r--src/test/ui/match/match-range-fail.stderr5
-rw-r--r--src/test/ui/match/match-ref-mut-invariance.stderr4
-rw-r--r--src/test/ui/match/match-ref-mut-let-invariance.stderr4
-rw-r--r--src/test/ui/match/match-struct.rs2
-rw-r--r--src/test/ui/match/match-struct.stderr3
-rw-r--r--src/test/ui/match/match-tag-nullary.stderr3
-rw-r--r--src/test/ui/match/match-tag-unary.stderr3
-rw-r--r--src/test/ui/match/match-type-err-first-arm.rs11
-rw-r--r--src/test/ui/match/match-type-err-first-arm.stderr26
-rw-r--r--src/test/ui/meta-expected-error-correct-rev.a.stderr2
-rw-r--r--src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr2
-rw-r--r--src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs10
-rw-r--r--src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr25
-rw-r--r--src/test/ui/methods/method-self-arg-1.rs8
-rw-r--r--src/test/ui/methods/method-self-arg-1.stderr11
-rw-r--r--src/test/ui/mir-unpretty.stderr5
-rw-r--r--src/test/ui/mismatched_types/E0053.stderr10
-rw-r--r--src/test/ui/mismatched_types/E0409.stderr5
-rw-r--r--src/test/ui/mismatched_types/abridged.stderr30
-rw-r--r--src/test/ui/mismatched_types/for-loop-has-unit-body.stderr5
-rw-r--r--src/test/ui/mismatched_types/issue-19109.stderr6
-rw-r--r--src/test/ui/mismatched_types/issue-26480.stderr2
-rw-r--r--src/test/ui/mismatched_types/issue-35030.stderr6
-rw-r--r--src/test/ui/mismatched_types/issue-38371.stderr16
-rw-r--r--src/test/ui/mismatched_types/main.stderr5
-rw-r--r--src/test/ui/mismatched_types/numeric-literal-cast.stderr6
-rw-r--r--src/test/ui/mismatched_types/overloaded-calls-bad.stderr5
-rw-r--r--src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr4
-rw-r--r--src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr10
-rw-r--r--src/test/ui/missing/missing-return.stderr5
-rw-r--r--src/test/ui/mut/mut-cross-borrowing.stderr6
-rw-r--r--src/test/ui/mut/mut-pattern-mismatched.rs8
-rw-r--r--src/test/ui/mut/mut-pattern-mismatched.stderr8
-rw-r--r--src/test/ui/never_type/call-fn-never-arg-wrong-type.stderr6
-rw-r--r--src/test/ui/never_type/never-assign-wrong-type.stderr6
-rw-r--r--src/test/ui/nll/trait-associated-constant.stderr4
-rw-r--r--src/test/ui/noexporttypeexe.rs4
-rw-r--r--src/test/ui/noexporttypeexe.stderr4
-rw-r--r--src/test/ui/numeric/const-scope.stderr12
-rw-r--r--src/test/ui/numeric/len.stderr2
-rw-r--r--src/test/ui/numeric/numeric-cast-2.stderr6
-rw-r--r--src/test/ui/numeric/numeric-cast-without-suggestion.stderr42
-rw-r--r--src/test/ui/numeric/numeric-cast.stderr226
-rw-r--r--src/test/ui/numeric/numeric-suffix.stderr268
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr4
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr4
-rw-r--r--src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr4
-rw-r--r--src/test/ui/or-patterns/consistent-bindings.stderr5
-rw-r--r--src/test/ui/or-patterns/issue-64879-trailing-before-guard.stderr5
-rw-r--r--src/test/ui/or-patterns/or-pattern-mismatch.stderr5
-rw-r--r--src/test/ui/or-patterns/or-patterns-syntactic-fail.stderr3
-rw-r--r--src/test/ui/output-type-mismatch.stderr5
-rw-r--r--src/test/ui/parser/expr-as-stmt.stderr20
-rw-r--r--src/test/ui/parser/fn-arg-doc-comment.rs9
-rw-r--r--src/test/ui/parser/fn-arg-doc-comment.stderr17
-rw-r--r--src/test/ui/parser/issue-33413.stderr5
-rw-r--r--src/test/ui/parser/issue-62881.stderr5
-rw-r--r--src/test/ui/parser/issue-62895.stderr5
-rw-r--r--src/test/ui/parser/lex-bad-char-literals-6.stderr5
-rw-r--r--src/test/ui/parser/match-vec-invalid.stderr5
-rw-r--r--src/test/ui/parser/numeric-lifetime.stderr5
-rw-r--r--src/test/ui/parser/pat-lt-bracket-6.stderr5
-rw-r--r--src/test/ui/parser/pat-lt-bracket-7.stderr5
-rw-r--r--src/test/ui/parser/pat-tuple-4.stderr5
-rw-r--r--src/test/ui/parser/pat-tuple-5.stderr6
-rw-r--r--src/test/ui/parser/recover-for-loop-parens-around-head.stderr5
-rw-r--r--src/test/ui/parser/recover-from-homoglyph.stderr5
-rw-r--r--src/test/ui/parser/recover-missing-semi.stderr10
-rw-r--r--src/test/ui/parser/recover-range-pats.stderr36
-rw-r--r--src/test/ui/parser/recover-tuple.stderr5
-rw-r--r--src/test/ui/parser/require-parens-for-chained-comparison.stderr10
-rw-r--r--src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr4
-rw-r--r--src/test/ui/parser/unclosed-delimiter-in-dep.stderr4
-rw-r--r--src/test/ui/pattern/pat-tuple-bad-type.stderr5
-rw-r--r--src/test/ui/pattern/pat-tuple-overfield.stderr8
-rw-r--r--src/test/ui/pattern/pattern-error-continue.rs6
-rw-r--r--src/test/ui/pattern/pattern-error-continue.stderr11
-rw-r--r--src/test/ui/pattern/pattern-ident-path-generics.stderr6
-rw-r--r--src/test/ui/pattern/pattern-tyvar.stderr6
-rw-r--r--src/test/ui/point-to-type-err-cause-on-impl-trait-return-2.stderr6
-rw-r--r--src/test/ui/point-to-type-err-cause-on-impl-trait-return.stderr35
-rw-r--r--src/test/ui/pptypedef.rs4
-rw-r--r--src/test/ui/pptypedef.stderr4
-rw-r--r--src/test/ui/proc-macro/attribute-spans-preserved.stderr10
-rw-r--r--src/test/ui/proc-macro/attribute-with-error.stderr20
-rw-r--r--src/test/ui/proc-macro/issue-37788.stderr6
-rw-r--r--src/test/ui/proc-macro/macro-brackets.stderr2
-rw-r--r--src/test/ui/proc-macro/nested-item-spans.stderr10
-rw-r--r--src/test/ui/proc-macro/signature.stderr4
-rw-r--r--src/test/ui/proc-macro/span-preservation.stderr29
-rw-r--r--src/test/ui/ptr-coercion.rs12
-rw-r--r--src/test/ui/ptr-coercion.stderr12
-rw-r--r--src/test/ui/range/issue-54505-no-literals.stderr48
-rw-r--r--src/test/ui/range/issue-54505-no-std.stderr24
-rw-r--r--src/test/ui/range/issue-54505.stderr24
-rw-r--r--src/test/ui/range/range-1.stderr2
-rw-r--r--src/test/ui/regions-fn-subtyping-return-static-fail.stderr8
-rw-r--r--src/test/ui/regions/region-invariant-static-error-reporting.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-lifetime-bounds-on-fns-where-clause.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/region-multiple-lifetime-bounds-on-fns-where-clause.stderr4
-rw-r--r--src/test/ui/regions/regions-bounds.stderr8
-rw-r--r--src/test/ui/regions/regions-fn-subtyping-return-static.stderr4
-rw-r--r--src/test/ui/regions/regions-infer-invariance-due-to-decl.stderr4
-rw-r--r--src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr4
-rw-r--r--src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr4
-rw-r--r--src/test/ui/regions/regions-infer-not-param.rs8
-rw-r--r--src/test/ui/regions/regions-infer-not-param.stderr12
-rw-r--r--src/test/ui/regions/regions-infer-paramd-indirect.rs4
-rw-r--r--src/test/ui/regions/regions-infer-paramd-indirect.stderr4
-rw-r--r--src/test/ui/regions/regions-lifetime-bounds-on-fns.nll.stderr4
-rw-r--r--src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr4
-rw-r--r--src/test/ui/regions/regions-trait-1.stderr4
-rw-r--r--src/test/ui/regions/regions-trait-object-subtyping.stderr4
-rw-r--r--src/test/ui/regions/regions-variance-invariant-use-covariant.stderr4
-rw-r--r--src/test/ui/reify-intrinsic.stderr4
-rw-r--r--src/test/ui/reject-specialized-drops-8142.rs4
-rw-r--r--src/test/ui/reject-specialized-drops-8142.stderr4
-rw-r--r--src/test/ui/repeat_count.rs22
-rw-r--r--src/test/ui/repeat_count.stderr38
-rw-r--r--src/test/ui/resolve/name-clash-nullary.stderr4
-rw-r--r--src/test/ui/resolve/privacy-enum-ctor.stderr12
-rw-r--r--src/test/ui/resolve/resolve-inconsistent-binding-mode.stderr10
-rw-r--r--src/test/ui/resolve/resolve-inconsistent-names.stderr5
-rw-r--r--src/test/ui/retslot-cast.stderr4
-rw-r--r--src/test/ui/return/return-from-diverging.stderr6
-rw-r--r--src/test/ui/return/return-type.stderr6
-rw-r--r--src/test/ui/rfc-2005-default-binding-mode/const.stderr5
-rw-r--r--src/test/ui/rfc-2005-default-binding-mode/lit.stderr12
-rw-r--r--src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr12
-rw-r--r--src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr12
-rw-r--r--src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr135
-rw-r--r--src/test/ui/shift-various-bad-types.rs2
-rw-r--r--src/test/ui/shift-various-bad-types.stderr2
-rw-r--r--src/test/ui/slice-mut.rs4
-rw-r--r--src/test/ui/slice-mut.stderr4
-rw-r--r--src/test/ui/slightly-nice-generic-literal-messages.rs2
-rw-r--r--src/test/ui/slightly-nice-generic-literal-messages.stderr4
-rw-r--r--src/test/ui/span/coerce-suggestions.stderr22
-rw-r--r--src/test/ui/span/issue-33884.stderr2
-rw-r--r--src/test/ui/span/issue-34264.stderr5
-rw-r--r--src/test/ui/span/issue-39018.stderr5
-rw-r--r--src/test/ui/span/move-closure.stderr6
-rw-r--r--src/test/ui/specialization/specialization-default-projection.stderr12
-rw-r--r--src/test/ui/specialization/specialization-default-types.stderr8
-rw-r--r--src/test/ui/static/static-mut-bad-types.stderr2
-rw-r--r--src/test/ui/static/static-reference-to-fn-1.stderr4
-rw-r--r--src/test/ui/str/str-array-assignment.stderr15
-rw-r--r--src/test/ui/str/str-lit-type-mismatch.stderr18
-rw-r--r--src/test/ui/struct-literal-variant-in-if.stderr10
-rw-r--r--src/test/ui/structs/struct-base-wrong-type.stderr12
-rw-r--r--src/test/ui/structs/struct-path-self-type-mismatch.stderr10
-rw-r--r--src/test/ui/structs/structure-constructor-type-mismatch.rs12
-rw-r--r--src/test/ui/structs/structure-constructor-type-mismatch.stderr58
-rw-r--r--src/test/ui/substs-ppaux.normal.stderr24
-rw-r--r--src/test/ui/substs-ppaux.rs32
-rw-r--r--src/test/ui/substs-ppaux.verbose.stderr24
-rw-r--r--src/test/ui/suggestions/as-ref.stderr32
-rw-r--r--src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr4
-rw-r--r--src/test/ui/suggestions/dont-suggest-try_into-in-macros.stderr2
-rw-r--r--src/test/ui/suggestions/fn-or-tuple-struct-without-args.stderr56
-rw-r--r--src/test/ui/suggestions/format-borrow.stderr10
-rw-r--r--src/test/ui/suggestions/issue-52820.stderr10
-rw-r--r--src/test/ui/suggestions/issue-59819.stderr13
-rw-r--r--src/test/ui/suggestions/match-ergonomics.stderr18
-rw-r--r--src/test/ui/suggestions/match-needing-semi.stderr10
-rw-r--r--src/test/ui/suggestions/mismatched-types-numeric-from.stderr2
-rw-r--r--src/test/ui/suggestions/mut-ref-reassignment.stderr16
-rw-r--r--src/test/ui/suggestions/opaque-type-error.stderr4
-rw-r--r--src/test/ui/suggestions/recover-from-semicolon-trailing-item.stderr15
-rw-r--r--src/test/ui/suggestions/suggest-box.stderr4
-rw-r--r--src/test/ui/suggestions/type-mismatch-struct-field-shorthand-2.stderr4
-rw-r--r--src/test/ui/suggestions/type-mismatch-struct-field-shorthand.stderr6
-rw-r--r--src/test/ui/suppressed-error.rs6
-rw-r--r--src/test/ui/suppressed-error.stderr6
-rw-r--r--src/test/ui/switched-expectations.stderr5
-rw-r--r--src/test/ui/tag-that-dare-not-speak-its-name.rs4
-rw-r--r--src/test/ui/tag-that-dare-not-speak-its-name.stderr4
-rw-r--r--src/test/ui/tail-typeck.stderr2
-rw-r--r--src/test/ui/terminal-width/non-whitespace-trimming-2.stderr7
-rw-r--r--src/test/ui/terminal-width/non-whitespace-trimming-unicode.stderr7
-rw-r--r--src/test/ui/terminal-width/non-whitespace-trimming.stderr7
-rw-r--r--src/test/ui/terminal-width/whitespace-trimming-2.stderr5
-rw-r--r--src/test/ui/terminal-width/whitespace-trimming.stderr5
-rw-r--r--src/test/ui/terr-in-field.rs2
-rw-r--r--src/test/ui/terr-in-field.stderr3
-rw-r--r--src/test/ui/terr-sorts.rs4
-rw-r--r--src/test/ui/terr-sorts.stderr4
-rw-r--r--src/test/ui/traits/trait-bounds-sugar.stderr4
-rw-r--r--src/test/ui/traits/trait-impl-method-mismatch.rs4
-rw-r--r--src/test/ui/traits/trait-impl-method-mismatch.stderr4
-rw-r--r--src/test/ui/traits/trait-matching-lifetimes.stderr8
-rw-r--r--src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr5
-rw-r--r--src/test/ui/traits/traits-multidispatch-bad.stderr2
-rw-r--r--src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr2
-rw-r--r--src/test/ui/try-block/try-block-bad-type.stderr10
-rw-r--r--src/test/ui/try-block/try-block-type-error.stderr10
-rw-r--r--src/test/ui/tuple/tuple-arity-mismatch.rs8
-rw-r--r--src/test/ui/tuple/tuple-arity-mismatch.stderr8
-rw-r--r--src/test/ui/tutorial-suffix-inference-test.rs6
-rw-r--r--src/test/ui/tutorial-suffix-inference-test.stderr6
-rw-r--r--src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr36
-rw-r--r--src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr5
-rw-r--r--src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.nll.stderr6
-rw-r--r--src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.stderr6
-rw-r--r--src/test/ui/type-alias-impl-trait/issue-63279.stderr6
-rw-r--r--src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr6
-rw-r--r--src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr12
-rw-r--r--src/test/ui/type/type-ascription-precedence.stderr21
-rw-r--r--src/test/ui/type/type-ascription-soundness.stderr24
-rw-r--r--src/test/ui/type/type-check/assignment-expected-bool.stderr60
-rw-r--r--src/test/ui/type/type-check/assignment-in-if.stderr30
-rw-r--r--src/test/ui/type/type-error-break-tail.stderr5
-rw-r--r--src/test/ui/type/type-mismatch-multiple.rs6
-rw-r--r--src/test/ui/type/type-mismatch-multiple.stderr7
-rw-r--r--src/test/ui/type/type-mismatch-same-crate-name.rs6
-rw-r--r--src/test/ui/type/type-mismatch-same-crate-name.stderr10
-rw-r--r--src/test/ui/type/type-mismatch.stderr226
-rw-r--r--src/test/ui/type/type-parameter-names.rs4
-rw-r--r--src/test/ui/type/type-parameter-names.stderr4
-rw-r--r--src/test/ui/type/type-params-in-different-spaces-1.rs4
-rw-r--r--src/test/ui/type/type-params-in-different-spaces-1.stderr4
-rw-r--r--src/test/ui/type/type-params-in-different-spaces-3.stderr4
-rw-r--r--src/test/ui/type/type-shadow.stderr5
-rw-r--r--src/test/ui/typeck/issue-57673-ice-on-deref-of-boxed-trait.stderr6
-rw-r--r--src/test/ui/typeck/typeck_type_placeholder_mismatch.rs8
-rw-r--r--src/test/ui/typeck/typeck_type_placeholder_mismatch.stderr8
-rw-r--r--src/test/ui/ufcs/ufcs-explicit-self-bad.rs8
-rw-r--r--src/test/ui/ufcs/ufcs-explicit-self-bad.stderr16
-rw-r--r--src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr4
-rw-r--r--src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr2
-rw-r--r--src/test/ui/unsafe/unsafe-subtyping.stderr4
-rw-r--r--src/test/ui/unsafe/unsafe-trait-impl.rs4
-rw-r--r--src/test/ui/unsafe/unsafe-trait-impl.stderr4
-rw-r--r--src/test/ui/variance/variance-btree-invariant-types.stderr48
-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
-rw-r--r--src/test/ui/variance/variance-use-contravariant-struct-1.stderr4
-rw-r--r--src/test/ui/variance/variance-use-covariant-struct-1.stderr4
-rw-r--r--src/test/ui/variance/variance-use-invariant-struct-1.stderr8
-rw-r--r--src/test/ui/wf/wf-unsafe-trait-obj-match.stderr4
-rw-r--r--src/test/ui/while-type-error.stderr4
-rw-r--r--src/test/ui/wrong-mul-method-signature.stderr26
-rw-r--r--src/test/ui/wrong-ret-type.stderr2
581 files changed, 2544 insertions, 3540 deletions
diff --git a/src/librustc/infer/error_reporting/mod.rs b/src/librustc/infer/error_reporting/mod.rs
index d0f6a8a434d..f2607b23527 100644
--- a/src/librustc/infer/error_reporting/mod.rs
+++ b/src/librustc/infer/error_reporting/mod.rs
@@ -1163,8 +1163,8 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
             Some(values) => {
                 let (is_simple_error, exp_found) = match values {
                     ValuePairs::Types(exp_found) => {
-                        let is_simple_err =
-                            exp_found.expected.is_primitive() && exp_found.found.is_primitive();
+                        let is_simple_err = exp_found.expected.is_simple_text()
+                            && exp_found.found.is_simple_text();
 
                         (is_simple_err, Some(exp_found))
                     }
@@ -1197,40 +1197,61 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
         };
 
         if let Some((expected, found)) = expected_found {
-            match (terr, is_simple_error, expected == found) {
-                (&TypeError::Sorts(ref values), false, true) => {
-                    let sort_string = | a_type: Ty<'tcx> |
-                        if let ty::Opaque(def_id, _) = a_type.kind {
-                            format!(" (opaque type at {})", self.tcx.sess.source_map()
-                                .mk_substr_filename(self.tcx.def_span(def_id)))
-                        } else {
-                            format!(" ({})", a_type.sort_string(self.tcx))
-                        };
-                    diag.note_expected_found_extra(
-                        &"type",
-                        expected,
-                        found,
-                        &sort_string(values.expected),
-                        &sort_string(values.found),
-                    );
+            let expected_label = exp_found.map_or("type".into(), |ef| ef.expected.prefix_string());
+            let found_label = exp_found.map_or("type".into(), |ef| ef.found.prefix_string());
+            match (&terr, expected == found) {
+                (TypeError::Sorts(values), extra) => {
+                    let sort_string = |ty: Ty<'tcx>| match (extra, &ty.kind) {
+                        (true, ty::Opaque(def_id, _)) => format!(
+                            " (opaque type at {})",
+                            self.tcx.sess.source_map()
+                                .mk_substr_filename(self.tcx.def_span(*def_id)),
+                        ),
+                        (true, _) => format!(" ({})", ty.sort_string(self.tcx)),
+                        (false, _) => "".to_string(),
+                    };
+                    if !(values.expected.is_simple_text() && values.found.is_simple_text()) || (
+                        exp_found.map_or(false, |ef| {
+                            // This happens when the type error is a subset of the expectation,
+                            // like when you have two references but one is `usize` and the other
+                            // is `f32`. In those cases we still want to show the `note`. If the
+                            // value from `ef` is `Infer(_)`, then we ignore it.
+                            if !ef.expected.is_ty_infer() {
+                                ef.expected != values.expected
+                            } else if !ef.found.is_ty_infer() {
+                                ef.found != values.found
+                            } else {
+                                false
+                            }
+                        })
+                    ) {
+                        diag.note_expected_found_extra(
+                            &expected_label,
+                            expected,
+                            &found_label,
+                            found,
+                            &sort_string(values.expected),
+                            &sort_string(values.found),
+                        );
+                    }
                 }
-                (TypeError::ObjectUnsafeCoercion(_), ..) => {
+                (TypeError::ObjectUnsafeCoercion(_), _) => {
                     diag.note_unsuccessfull_coercion(found, expected);
                 }
-                (_, false, _) => {
+                (_, _) => {
                     debug!(
                         "note_type_err: exp_found={:?}, expected={:?} found={:?}",
                         exp_found, expected, found
                     );
-                    if let Some(exp_found) = exp_found {
-                        self.suggest_as_ref_where_appropriate(span, &exp_found, diag);
+                    if !is_simple_error || terr.must_include_note() {
+                        diag.note_expected_found(&expected_label, expected, &found_label, found);
                     }
-
-                    diag.note_expected_found(&"type", expected, found);
                 }
-                _ => (),
             }
         }
+        if let Some(exp_found) = exp_found {
+            self.suggest_as_ref_where_appropriate(span, &exp_found, diag);
+        }
 
         // In some (most?) cases cause.body_id points to actual body, but in some cases
         // it's a actual definition. According to the comments (e.g. in
diff --git a/src/librustc/ty/diagnostics.rs b/src/librustc/ty/diagnostics.rs
new file mode 100644
index 00000000000..95bdce2d222
--- /dev/null
+++ b/src/librustc/ty/diagnostics.rs
@@ -0,0 +1,56 @@
+//! Diagnostics related methods for `TyS`.
+
+use crate::ty::TyS;
+use crate::ty::TyKind::*;
+use crate::ty::sty::InferTy;
+
+impl<'tcx> TyS<'tcx> {
+    /// Similar to `TyS::is_primitive`, but also considers inferred numeric values to be primitive.
+    pub fn is_primitive_ty(&self) -> bool {
+        match self.kind {
+            Bool | Char | Str | Int(_) | Uint(_) | Float(_) |
+            Infer(InferTy::IntVar(_)) | Infer(InferTy::FloatVar(_)) |
+            Infer(InferTy::FreshIntTy(_)) | Infer(InferTy::FreshFloatTy(_)) => true,
+            _ => false,
+        }
+    }
+
+    /// Whether the type is succinctly representable as a type instead of just refered to with a
+    /// description in error messages. This is used in the main error message.
+    pub fn is_simple_ty(&self) -> bool {
+        match self.kind {
+            Bool | Char | Str | Int(_) | Uint(_) | Float(_) |
+            Infer(InferTy::IntVar(_)) | Infer(InferTy::FloatVar(_)) |
+            Infer(InferTy::FreshIntTy(_)) | Infer(InferTy::FreshFloatTy(_)) => true,
+            Ref(_, x, _) | Array(x, _) | Slice(x) => x.peel_refs().is_simple_ty(),
+            Tuple(tys) if tys.is_empty() => true,
+            _ => false,
+        }
+    }
+
+    /// Whether the type is succinctly representable as a type instead of just refered to with a
+    /// description in error messages. This is used in the primary span label. Beyond what
+    /// `is_simple_ty` includes, it also accepts ADTs with no type arguments and references to
+    /// ADTs with no type arguments.
+    pub fn is_simple_text(&self) -> bool {
+        match self.kind {
+            Adt(_, substs) => substs.types().next().is_none(),
+            Ref(_, ty, _) => ty.is_simple_text(),
+            _ => self.is_simple_ty(),
+        }
+    }
+
+    /// Whether the type can be safely suggested during error recovery.
+    pub fn is_suggestable(&self) -> bool {
+        match self.kind {
+            Opaque(..) |
+            FnDef(..) |
+            FnPtr(..) |
+            Dynamic(..) |
+            Closure(..) |
+            Infer(..) |
+            Projection(..) => false,
+            _ => true,
+        }
+    }
+}
diff --git a/src/librustc/ty/error.rs b/src/librustc/ty/error.rs
index febea68ddbb..8e3ae0864aa 100644
--- a/src/librustc/ty/error.rs
+++ b/src/librustc/ty/error.rs
@@ -64,8 +64,11 @@ pub enum UnconstrainedNumeric {
 impl<'tcx> fmt::Display for TypeError<'tcx> {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         use self::TypeError::*;
-        fn report_maybe_different(f: &mut fmt::Formatter<'_>,
-                                  expected: &str, found: &str) -> fmt::Result {
+        fn report_maybe_different(
+            f: &mut fmt::Formatter<'_>,
+            expected: &str,
+            found: &str,
+        ) -> fmt::Result {
             // A naive approach to making sure that we're not reporting silly errors such as:
             // (expected closure, found closure).
             if expected == found {
@@ -183,46 +186,77 @@ impl<'tcx> fmt::Display for TypeError<'tcx> {
     }
 }
 
+impl<'tcx> TypeError<'tcx> {
+    pub fn must_include_note(&self) -> bool {
+        use self::TypeError::*;
+        match self {
+            CyclicTy(_) |
+            UnsafetyMismatch(_) |
+            Mismatch |
+            AbiMismatch(_) |
+            FixedArraySize(_) |
+            Sorts(_) |
+            IntMismatch(_) |
+            FloatMismatch(_) |
+            VariadicMismatch(_) => false,
+
+            Mutability |
+            TupleSize(_) |
+            ArgCount |
+            RegionsDoesNotOutlive(..) |
+            RegionsInsufficientlyPolymorphic(..) |
+            RegionsOverlyPolymorphic(..) |
+            RegionsPlaceholderMismatch |
+            Traits(_) |
+            ProjectionMismatched(_) |
+            ProjectionBoundsLength(_) |
+            ExistentialMismatch(_) |
+            ConstMismatch(_) |
+            IntrinsicCast |
+            ObjectUnsafeCoercion(_) => true,
+        }
+    }
+}
+
 impl<'tcx> ty::TyS<'tcx> {
     pub fn sort_string(&self, tcx: TyCtxt<'_>) -> Cow<'static, str> {
         match self.kind {
             ty::Bool | ty::Char | ty::Int(_) |
-            ty::Uint(_) | ty::Float(_) | ty::Str | ty::Never => self.to_string().into(),
-            ty::Tuple(ref tys) if tys.is_empty() => self.to_string().into(),
+            ty::Uint(_) | ty::Float(_) | ty::Str | ty::Never => format!("`{}`", self).into(),
+            ty::Tuple(ref tys) if tys.is_empty() => format!("`{}`", self).into(),
 
             ty::Adt(def, _) => format!("{} `{}`", def.descr(), tcx.def_path_str(def.did)).into(),
             ty::Foreign(def_id) => format!("extern type `{}`", tcx.def_path_str(def_id)).into(),
-            ty::Array(_, n) => {
+            ty::Array(t, n) => {
                 let n = tcx.lift(&n).unwrap();
                 match n.try_eval_usize(tcx, ty::ParamEnv::empty()) {
-                    Some(n) => {
-                        format!("array of {} element{}", n, pluralize!(n)).into()
-                    }
+                    _ if t.is_simple_ty() => format!("array `{}`", self).into(),
+                    Some(n) => format!("array of {} element{} ", n, pluralize!(n)).into(),
                     None => "array".into(),
                 }
             }
+            ty::Slice(ty) if ty.is_simple_ty() => format!("slice `{}`", self).into(),
             ty::Slice(_) => "slice".into(),
             ty::RawPtr(_) => "*-ptr".into(),
-            ty::Ref(region, ty, mutbl) => {
+            ty::Ref(_, ty, mutbl) => {
                 let tymut = ty::TypeAndMut { ty, mutbl };
                 let tymut_string = tymut.to_string();
-                if tymut_string == "_" ||         //unknown type name,
-                   tymut_string.len() > 10 ||     //name longer than saying "reference",
-                   region.to_string() != "'_"     //... or a complex type
-                {
-                    format!("{}reference", match mutbl {
-                        hir::Mutability::Mutable => "mutable ",
-                        _ => ""
-                    }).into()
-                } else {
-                    format!("&{}", tymut_string).into()
+                if tymut_string != "_" && (
+                    ty.is_simple_text() || tymut_string.len() < "mutable reference".len()
+                ) {
+                    format!("`&{}`", tymut_string).into()
+                } else { // Unknown type name, it's long or has type arguments
+                    match mutbl {
+                        hir::Mutability::Mutable => "mutable reference",
+                        _ => "reference",
+                    }.into()
                 }
             }
             ty::FnDef(..) => "fn item".into(),
             ty::FnPtr(_) => "fn pointer".into(),
             ty::Dynamic(ref inner, ..) => {
                 if let Some(principal) = inner.principal() {
-                    format!("trait {}", tcx.def_path_str(principal.def_id())).into()
+                    format!("trait `{}`", tcx.def_path_str(principal.def_id())).into()
                 } else {
                     "trait".into()
                 }
@@ -246,6 +280,36 @@ impl<'tcx> ty::TyS<'tcx> {
             ty::Error => "type error".into(),
         }
     }
+
+    pub fn prefix_string(&self) -> Cow<'static, str> {
+        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() => "unit type".into(),
+            ty::Adt(def, _) => def.descr().into(),
+            ty::Foreign(_) => "extern type".into(),
+            ty::Array(..) => "array".into(),
+            ty::Slice(_) => "slice".into(),
+            ty::RawPtr(_) => "raw pointer".into(),
+            ty::Ref(.., mutbl) => match mutbl {
+                hir::Mutability::Mutable => "mutable reference",
+                _ => "reference"
+            }.into(),
+            ty::FnDef(..) => "fn item".into(),
+            ty::FnPtr(_) => "fn pointer".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(..) => "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(),
+            ty::Opaque(..) => "opaque type".into(),
+        }
+    }
 }
 
 impl<'tcx> TyCtxt<'tcx> {
diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs
index a54bf5079ca..d001916aca2 100644
--- a/src/librustc/ty/mod.rs
+++ b/src/librustc/ty/mod.rs
@@ -71,6 +71,7 @@ pub use self::sty::BoundRegion::*;
 pub use self::sty::InferTy::*;
 pub use self::sty::RegionKind::*;
 pub use self::sty::TyKind::*;
+pub use crate::ty::diagnostics::*;
 
 pub use self::binding::BindingMode;
 pub use self::binding::BindingMode::*;
@@ -122,6 +123,7 @@ mod instance;
 mod structural_impls;
 mod structural_match;
 mod sty;
+mod diagnostics;
 
 // Data types
 
@@ -552,37 +554,6 @@ impl<'tcx> Hash for TyS<'tcx> {
     }
 }
 
-impl<'tcx> TyS<'tcx> {
-    pub fn is_primitive_ty(&self) -> bool {
-        match self.kind {
-            Bool |
-            Char |
-            Int(_) |
-            Uint(_) |
-            Float(_) |
-            Infer(InferTy::IntVar(_)) |
-            Infer(InferTy::FloatVar(_)) |
-            Infer(InferTy::FreshIntTy(_)) |
-            Infer(InferTy::FreshFloatTy(_)) => true,
-            Ref(_, x, _) => x.is_primitive_ty(),
-            _ => false,
-        }
-    }
-
-    pub fn is_suggestable(&self) -> bool {
-        match self.kind {
-            Opaque(..) |
-            FnDef(..) |
-            FnPtr(..) |
-            Dynamic(..) |
-            Closure(..) |
-            Infer(..) |
-            Projection(..) => false,
-            _ => true,
-        }
-    }
-}
-
 impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for ty::TyS<'tcx> {
     fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
         let ty::TyS {
diff --git a/src/librustc/ty/wf.rs b/src/librustc/ty/wf.rs
index aa0456b78af..276fc8c1dec 100644
--- a/src/librustc/ty/wf.rs
+++ b/src/librustc/ty/wf.rs
@@ -209,7 +209,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
                     //   LL | impl Bar for Foo {
                     //      | ---------------- in this `impl` item
                     //   LL |     type Ok = ();
-                    //      |     ^^^^^^^^^^^^^ expected u32, found ()
+                    //      |     ^^^^^^^^^^^^^ expected `u32`, found `()`
                     //      |
                     //      = note: expected type `u32`
                     //                 found type `()`
@@ -228,7 +228,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
                     //   LL | impl Bar for Foo {
                     //      | ---------------- in this `impl` item
                     //   LL |     type Ok = ();
-                    //      |     ^^^^^^^^^^^^^ expected u32, found ()
+                    //      |     ^^^^^^^^^^^^^ expected `u32`, found `()`
                     //   ...
                     //   LL | impl Bar2 for Foo2 {
                     //      | ---------------- in this `impl` item
diff --git a/src/librustc_errors/diagnostic.rs b/src/librustc_errors/diagnostic.rs
index b9af4aae550..41ce2d8c440 100644
--- a/src/librustc_errors/diagnostic.rs
+++ b/src/librustc_errors/diagnostic.rs
@@ -154,20 +154,21 @@ impl Diagnostic {
         self
     }
 
-    pub fn note_expected_found(&mut self,
-                               label: &dyn fmt::Display,
-                               expected: DiagnosticStyledString,
-                               found: DiagnosticStyledString)
-                               -> &mut Self
-    {
-        self.note_expected_found_extra(label, expected, found, &"", &"")
-    }
-
-    pub fn note_unsuccessfull_coercion(&mut self,
-                                       expected: DiagnosticStyledString,
-                                       found: DiagnosticStyledString)
-                                       -> &mut Self
-    {
+    pub fn note_expected_found(
+        &mut self,
+        expected_label: &dyn fmt::Display,
+        expected: DiagnosticStyledString,
+        found_label: &dyn fmt::Display,
+        found: DiagnosticStyledString,
+    ) -> &mut Self {
+        self.note_expected_found_extra(expected_label, expected, found_label, found, &"", &"")
+    }
+
+    pub fn note_unsuccessfull_coercion(
+        &mut self,
+        expected: DiagnosticStyledString,
+        found: DiagnosticStyledString,
+    ) -> &mut Self {
         let mut msg: Vec<_> =
             vec![(format!("required when trying to coerce from type `"),
                   Style::NoStyle)];
@@ -189,27 +190,38 @@ impl Diagnostic {
         self
     }
 
-    pub fn note_expected_found_extra(&mut self,
-                                     label: &dyn fmt::Display,
-                                     expected: DiagnosticStyledString,
-                                     found: DiagnosticStyledString,
-                                     expected_extra: &dyn fmt::Display,
-                                     found_extra: &dyn fmt::Display)
-                                     -> &mut Self
-    {
-        let mut msg: Vec<_> = vec![(format!("expected {} `", label), Style::NoStyle)];
+    pub fn note_expected_found_extra(
+        &mut self,
+        expected_label: &dyn fmt::Display,
+        expected: DiagnosticStyledString,
+        found_label: &dyn fmt::Display,
+        found: DiagnosticStyledString,
+        expected_extra: &dyn fmt::Display,
+        found_extra: &dyn fmt::Display,
+    ) -> &mut Self {
+        let expected_label = format!("expected {}", expected_label);
+        let found_label = format!("found {}", found_label);
+        let (found_padding, expected_padding) = if expected_label.len() > found_label.len() {
+            (expected_label.len() - found_label.len(), 0)
+        } else {
+            (0, found_label.len() - expected_label.len())
+        };
+        let mut msg: Vec<_> = vec![(
+            format!("{}{} `", " ".repeat(expected_padding), expected_label),
+            Style::NoStyle,
+        )];
         msg.extend(expected.0.iter()
-                   .map(|x| match *x {
-                       StringPart::Normal(ref s) => (s.to_owned(), Style::NoStyle),
-                       StringPart::Highlighted(ref s) => (s.to_owned(), Style::Highlight),
-                   }));
+            .map(|x| match *x {
+                StringPart::Normal(ref s) => (s.to_owned(), Style::NoStyle),
+                StringPart::Highlighted(ref s) => (s.to_owned(), Style::Highlight),
+            }));
         msg.push((format!("`{}\n", expected_extra), Style::NoStyle));
-        msg.push((format!("   found {} `", label), Style::NoStyle));
+        msg.push((format!("{}{} `", " ".repeat(found_padding), found_label), Style::NoStyle));
         msg.extend(found.0.iter()
-                   .map(|x| match *x {
-                       StringPart::Normal(ref s) => (s.to_owned(), Style::NoStyle),
-                       StringPart::Highlighted(ref s) => (s.to_owned(), Style::Highlight),
-                   }));
+            .map(|x| match *x {
+                StringPart::Normal(ref s) => (s.to_owned(), Style::NoStyle),
+                StringPart::Highlighted(ref s) => (s.to_owned(), Style::Highlight),
+            }));
         msg.push((format!("`{}", found_extra), Style::NoStyle));
 
         // For now, just attach these as notes
diff --git a/src/librustc_errors/diagnostic_builder.rs b/src/librustc_errors/diagnostic_builder.rs
index 40642dd14b8..a95c29f8c27 100644
--- a/src/librustc_errors/diagnostic_builder.rs
+++ b/src/librustc_errors/diagnostic_builder.rs
@@ -195,37 +195,44 @@ impl<'a> DiagnosticBuilder<'a> {
         self
     }
 
-    forward!(pub fn note_expected_found(&mut self,
-                                        label: &dyn fmt::Display,
-                                        expected: DiagnosticStyledString,
-                                        found: DiagnosticStyledString,
-                                        ) -> &mut Self);
-
-    forward!(pub fn note_expected_found_extra(&mut self,
-                                              label: &dyn fmt::Display,
-                                              expected: DiagnosticStyledString,
-                                              found: DiagnosticStyledString,
-                                              expected_extra: &dyn fmt::Display,
-                                              found_extra: &dyn fmt::Display,
-                                              ) -> &mut Self);
-
-    forward!(pub fn note_unsuccessfull_coercion(&mut self,
-                                                expected: DiagnosticStyledString,
-                                                found: DiagnosticStyledString,
-                                                ) -> &mut Self);
+    forward!(pub fn note_expected_found(
+        &mut self,
+        expected_label: &dyn fmt::Display,
+        expected: DiagnosticStyledString,
+        found_label: &dyn fmt::Display,
+        found: DiagnosticStyledString,
+    ) -> &mut Self);
+
+    forward!(pub fn note_expected_found_extra(
+        &mut self,
+        expected_label: &dyn fmt::Display,
+        expected: DiagnosticStyledString,
+        found_label: &dyn fmt::Display,
+        found: DiagnosticStyledString,
+        expected_extra: &dyn fmt::Display,
+        found_extra: &dyn fmt::Display,
+    ) -> &mut Self);
+
+    forward!(pub fn note_unsuccessfull_coercion(
+        &mut self,
+        expected: DiagnosticStyledString,
+        found: DiagnosticStyledString,
+    ) -> &mut Self);
 
     forward!(pub fn note(&mut self, msg: &str) -> &mut Self);
-    forward!(pub fn span_note<S: Into<MultiSpan>>(&mut self,
-                                                  sp: S,
-                                                  msg: &str,
-                                                  ) -> &mut Self);
+    forward!(pub fn span_note<S: Into<MultiSpan>>(
+        &mut self,
+        sp: S,
+        msg: &str,
+    ) -> &mut Self);
     forward!(pub fn warn(&mut self, msg: &str) -> &mut Self);
     forward!(pub fn span_warn<S: Into<MultiSpan>>(&mut self, sp: S, msg: &str) -> &mut Self);
     forward!(pub fn help(&mut self, msg: &str) -> &mut Self);
-    forward!(pub fn span_help<S: Into<MultiSpan>>(&mut self,
-                                                  sp: S,
-                                                  msg: &str,
-                                                  ) -> &mut Self);
+    forward!(pub fn span_help<S: Into<MultiSpan>>(
+        &mut self,
+        sp: S,
+        msg: &str,
+    ) -> &mut Self);
 
     pub fn multipart_suggestion(
         &mut self,
diff --git a/src/librustc_typeck/check/_match.rs b/src/librustc_typeck/check/_match.rs
index 6a35f9b8452..6b34159066a 100644
--- a/src/librustc_typeck/check/_match.rs
+++ b/src/librustc_typeck/check/_match.rs
@@ -285,7 +285,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             //    ||         ----- expected because of this
             // LL ||     } else {
             // LL ||         10u32
-            //    ||         ^^^^^ expected i32, found u32
+            //    ||         ^^^^^ expected `i32`, found `u32`
             // LL ||     };
             //    ||_____- if and else have incompatible types
             // ```
@@ -294,7 +294,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             // The entire expression is in one line, only point at the arms
             // ```
             // LL |     let x = if true { 10i32 } else { 10u32 };
-            //    |                       -----          ^^^^^ expected i32, found u32
+            //    |                       -----          ^^^^^ expected `i32`, found `u32`
             //    |                       |
             //    |                       expected because of this
             // ```
@@ -323,7 +323,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                 //   | ||     ^
                 //   | ||_____|
                 //   | |______if and else have incompatible types
-                //   |        expected integer, found ()
+                //   |        expected integer, found `()`
                 // ```
                 // by not pointing at the entire expression:
                 // ```
@@ -335,7 +335,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
                 //   |  ____________^
                 // 5 | |
                 // 6 | |     };
-                //   | |_____^ expected integer, found ()
+                //   | |_____^ expected integer, found `()`
                 // ```
                 if outer_sp.is_some() {
                     outer_sp = Some(self.tcx.sess.source_map().def_span(span));
diff --git a/src/librustc_typeck/check/pat.rs b/src/librustc_typeck/check/pat.rs
index b2250559506..bba30ebbbe7 100644
--- a/src/librustc_typeck/check/pat.rs
+++ b/src/librustc_typeck/check/pat.rs
@@ -47,7 +47,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
     /// 4 |    let temp: usize = match a + b {
     ///   |                            ----- this expression has type `usize`
     /// 5 |         Ok(num) => num,
-    ///   |         ^^^^^^^ expected usize, found enum `std::result::Result`
+    ///   |         ^^^^^^^ expected `usize`, found enum `std::result::Result`
     ///   |
     ///   = note: expected type `usize`
     ///              found type `std::result::Result<_, _>`
diff --git a/src/test/rustdoc-ui/failed-doctest-missing-codes.stdout b/src/test/rustdoc-ui/failed-doctest-missing-codes.stdout
index a8753d14de2..9d486d0a661 100644
--- a/src/test/rustdoc-ui/failed-doctest-missing-codes.stdout
+++ b/src/test/rustdoc-ui/failed-doctest-missing-codes.stdout
@@ -9,10 +9,7 @@ error[E0308]: mismatched types
   --> $DIR/failed-doctest-missing-codes.rs:9:13
    |
 LL | let x: () = 5i32;
-   |             ^^^^ expected (), found i32
-   |
-   = note: expected type `()`
-              found type `i32`
+   |             ^^^^ expected `()`, found `i32`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/arg-type-mismatch.stderr b/src/test/ui/arg-type-mismatch.stderr
index d41abd1aa81..05b21efeece 100644
--- a/src/test/ui/arg-type-mismatch.stderr
+++ b/src/test/ui/arg-type-mismatch.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/arg-type-mismatch.rs:5:30
    |
 LL | fn main() { let i: (); i = f(()); }
-   |                              ^^ expected isize, found ()
-   |
-   = note: expected type `isize`
-              found type `()`
+   |                              ^^ expected `isize`, found `()`
 
 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 45f529bafe7..69c7599cce1 100644
--- a/src/test/ui/array-break-length.stderr
+++ b/src/test/ui/array-break-length.stderr
@@ -14,19 +14,19 @@ error[E0308]: mismatched types
   --> $DIR/array-break-length.rs:3:9
    |
 LL |         |_: [_; break]| {}
-   |         ^^^^^^^^^^^^^^^^^^ expected (), found closure
+   |         ^^^^^^^^^^^^^^^^^^ expected `()`, found closure
    |
-   = note: expected type `()`
-              found type `[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
    |
 LL |         |_: [_; continue]| {}
-   |         ^^^^^^^^^^^^^^^^^^^^^ expected (), found closure
+   |         ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found closure
    |
-   = note: expected type `()`
-              found type `[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/array-not-vector.rs b/src/test/ui/array-not-vector.rs
index 80b40ef25c3..5e46f015baf 100644
--- a/src/test/ui/array-not-vector.rs
+++ b/src/test/ui/array-not-vector.rs
@@ -1,14 +1,12 @@
 fn main() {
     let _x: i32 = [1, 2, 3];
     //~^ ERROR mismatched types
-    //~| expected type `i32`
-    //~| found type `[{integer}; 3]`
-    //~| expected i32, found array of 3 elements
+    //~| expected `i32`, found array
 
     let x: &[i32] = &[1, 2, 3];
     let _y: &i32 = x;
     //~^ ERROR mismatched types
-    //~| expected type `&i32`
-    //~| found type `&[i32]`
-    //~| expected i32, found slice
+    //~| expected reference `&i32`
+    //~| found reference `&[i32]`
+    //~| expected `i32`, found slice
 }
diff --git a/src/test/ui/array-not-vector.stderr b/src/test/ui/array-not-vector.stderr
index b5a5389db09..412a8ae8461 100644
--- a/src/test/ui/array-not-vector.stderr
+++ b/src/test/ui/array-not-vector.stderr
@@ -2,19 +2,16 @@ error[E0308]: mismatched types
   --> $DIR/array-not-vector.rs:2:19
    |
 LL |     let _x: i32 = [1, 2, 3];
-   |                   ^^^^^^^^^ expected i32, found array of 3 elements
-   |
-   = note: expected type `i32`
-              found type `[{integer}; 3]`
+   |                   ^^^^^^^^^ expected `i32`, found array `[{integer}; 3]`
 
 error[E0308]: mismatched types
-  --> $DIR/array-not-vector.rs:9:20
+  --> $DIR/array-not-vector.rs:7:20
    |
 LL |     let _y: &i32 = x;
-   |                    ^ expected i32, found slice
+   |                    ^ expected `i32`, found slice `[i32]`
    |
-   = note: expected type `&i32`
-              found type `&[i32]`
+   = note: expected reference `&i32`
+              found reference `&[i32]`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/associated-const/associated-const-generic-obligations.stderr b/src/test/ui/associated-const/associated-const-generic-obligations.stderr
index ca6118cb3ba..d6cdcd4747f 100644
--- a/src/test/ui/associated-const/associated-const-generic-obligations.stderr
+++ b/src/test/ui/associated-const/associated-const-generic-obligations.stderr
@@ -5,10 +5,10 @@ LL |     const FROM: Self::Out;
    |                 --------- type in trait
 ...
 LL |     const FROM: &'static str = "foo";
-   |                 ^^^^^^^^^^^^ expected associated type, found reference
+   |                 ^^^^^^^^^^^^ expected associated type, found `&str`
    |
-   = note: expected type `<T as Foo>::Out`
-              found type `&'static str`
+   = note: expected associated type `<T as Foo>::Out`
+                    found reference `&'static str`
    = note: consider constraining the associated type `<T as Foo>::Out` to `&'static str` or calling a method that returns `<T as Foo>::Out`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
 
diff --git a/src/test/ui/associated-const/associated-const-impl-wrong-lifetime.stderr b/src/test/ui/associated-const/associated-const-impl-wrong-lifetime.stderr
index 2ceab394e95..0cce10b54a4 100644
--- a/src/test/ui/associated-const/associated-const-impl-wrong-lifetime.stderr
+++ b/src/test/ui/associated-const/associated-const-impl-wrong-lifetime.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     const NAME: &'a str = "unit";
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `&'static str`
-              found type `&'a str`
+   = note: expected reference `&'static str`
+              found reference `&'a str`
 note: the lifetime `'a` as defined on the impl at 6:6...
   --> $DIR/associated-const-impl-wrong-lifetime.rs:6:6
    |
diff --git a/src/test/ui/associated-const/associated-const-impl-wrong-type.stderr b/src/test/ui/associated-const/associated-const-impl-wrong-type.stderr
index 0693d99282d..acdf33b2b83 100644
--- a/src/test/ui/associated-const/associated-const-impl-wrong-type.stderr
+++ b/src/test/ui/associated-const/associated-const-impl-wrong-type.stderr
@@ -5,7 +5,7 @@ LL |     const BAR: u32;
    |                --- type in trait
 ...
 LL |     const BAR: i32 = -1;
-   |                ^^^ expected u32, found i32
+   |                ^^^ expected `u32`, found `i32`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/associated-type/associated-type-projection-from-supertrait.stderr b/src/test/ui/associated-type/associated-type-projection-from-supertrait.stderr
index 4ba4925ef1b..07f207627f4 100644
--- a/src/test/ui/associated-type/associated-type-projection-from-supertrait.stderr
+++ b/src/test/ui/associated-type/associated-type-projection-from-supertrait.stderr
@@ -3,36 +3,24 @@ error[E0308]: mismatched types
    |
 LL | fn b() { dent(ModelT, Blue); }
    |                       ^^^^ expected struct `Black`, found struct `Blue`
-   |
-   = note: expected type `Black`
-              found type `Blue`
 
 error[E0308]: mismatched types
   --> $DIR/associated-type-projection-from-supertrait.rs:28:23
    |
 LL | fn c() { dent(ModelU, Black); }
    |                       ^^^^^ expected struct `Blue`, found struct `Black`
-   |
-   = note: expected type `Blue`
-              found type `Black`
 
 error[E0308]: mismatched types
   --> $DIR/associated-type-projection-from-supertrait.rs:32:28
    |
 LL | fn f() { ModelT.chip_paint(Blue); }
    |                            ^^^^ expected struct `Black`, found struct `Blue`
-   |
-   = note: expected type `Black`
-              found type `Blue`
 
 error[E0308]: mismatched types
   --> $DIR/associated-type-projection-from-supertrait.rs:33:28
    |
 LL | fn g() { ModelU.chip_paint(Black); }
    |                            ^^^^^ expected struct `Blue`, found struct `Black`
-   |
-   = note: expected type `Blue`
-              found type `Black`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr b/src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr
index 800b762911a..86e651b53f0 100644
--- a/src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr
+++ b/src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr
@@ -6,9 +6,6 @@ LL | fn blue_car<C:Car<Color=Blue>>(c: C) {
 ...
 LL | fn b() { blue_car(ModelT); }
    |          ^^^^^^^^ expected struct `Blue`, found struct `Black`
-   |
-   = note: expected type `Blue`
-              found type `Black`
 
 error[E0271]: type mismatch resolving `<ModelU as Vehicle>::Color == Black`
   --> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:32:10
@@ -18,9 +15,6 @@ LL | fn black_car<C:Car<Color=Black>>(c: C) {
 ...
 LL | fn c() { black_car(ModelU); }
    |          ^^^^^^^^^ expected struct `Black`, found struct `Blue`
-   |
-   = note: expected type `Black`
-              found type `Blue`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/associated-types/associated-types-eq-3.rs b/src/test/ui/associated-types/associated-types-eq-3.rs
index 22e04a8f15c..3bb03c39e0f 100644
--- a/src/test/ui/associated-types/associated-types-eq-3.rs
+++ b/src/test/ui/associated-types/associated-types-eq-3.rs
@@ -22,9 +22,9 @@ fn foo1<I: Foo<A=Bar>>(x: I) {
 fn foo2<I: Foo>(x: I) {
     let _: Bar = x.boo();
     //~^ ERROR mismatched types
-    //~| expected type `Bar`
-    //~| found type `<I as Foo>::A`
+    //~| found associated type `<I as Foo>::A`
     //~| expected struct `Bar`, found associated type
+    //~| expected struct `Bar`
 }
 
 
@@ -37,8 +37,8 @@ pub fn main() {
     let a = 42;
     foo1(a);
     //~^ ERROR type mismatch resolving
-    //~| expected struct `Bar`, found usize
+    //~| expected struct `Bar`, found `usize`
     baz(&a);
     //~^ ERROR type mismatch resolving
-    //~| expected struct `Bar`, found usize
+    //~| expected struct `Bar`, found `usize`
 }
diff --git a/src/test/ui/associated-types/associated-types-eq-3.stderr b/src/test/ui/associated-types/associated-types-eq-3.stderr
index 0f2bc84aa1c..24c830d8b5b 100644
--- a/src/test/ui/associated-types/associated-types-eq-3.stderr
+++ b/src/test/ui/associated-types/associated-types-eq-3.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let _: Bar = x.boo();
    |                  ^^^^^^^ expected struct `Bar`, found associated type
    |
-   = note: expected type `Bar`
-              found type `<I as Foo>::A`
+   = note:       expected struct `Bar`
+           found associated type `<I as Foo>::A`
    = note: consider constraining the associated type `<I as Foo>::A` to `Bar`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
 
@@ -16,19 +16,14 @@ LL | fn foo1<I: Foo<A=Bar>>(x: I) {
    |    ----        ----- required by this bound in `foo1`
 ...
 LL |     foo1(a);
-   |     ^^^^ expected struct `Bar`, found usize
-   |
-   = note: expected type `Bar`
-              found type `usize`
+   |     ^^^^ expected struct `Bar`, found `usize`
 
 error[E0271]: type mismatch resolving `<isize as Foo>::A == Bar`
   --> $DIR/associated-types-eq-3.rs:41:9
    |
 LL |     baz(&a);
-   |         ^^ expected struct `Bar`, found usize
+   |         ^^ expected struct `Bar`, found `usize`
    |
-   = note: expected type `Bar`
-              found type `usize`
    = note: required for the cast to the object type `dyn Foo<A = Bar>`
 
 error: aborting due to 3 previous errors
diff --git a/src/test/ui/associated-types/associated-types-eq-hr.stderr b/src/test/ui/associated-types/associated-types-eq-hr.stderr
index a8c239389e9..fd7d89d1933 100644
--- a/src/test/ui/associated-types/associated-types-eq-hr.stderr
+++ b/src/test/ui/associated-types/associated-types-eq-hr.stderr
@@ -7,10 +7,10 @@ LL |     where T : for<'x> TheTrait<&'x isize, A = &'x isize>
    |                                           ------------- required by this bound in `foo`
 ...
 LL |     foo::<UintStruct>();
-   |     ^^^^^^^^^^^^^^^^^ expected isize, found usize
+   |     ^^^^^^^^^^^^^^^^^ expected `isize`, found `usize`
    |
-   = note: expected type `&isize`
-              found type `&usize`
+   = note: expected reference `&isize`
+              found reference `&usize`
 
 error[E0271]: type mismatch resolving `for<'x> <IntStruct as TheTrait<&'x isize>>::A == &'x usize`
   --> $DIR/associated-types-eq-hr.rs:86:5
@@ -21,10 +21,10 @@ LL |     where T : for<'x> TheTrait<&'x isize, A = &'x usize>
    |                                           ------------- required by this bound in `bar`
 ...
 LL |     bar::<IntStruct>();
-   |     ^^^^^^^^^^^^^^^^ expected usize, found isize
+   |     ^^^^^^^^^^^^^^^^ expected `usize`, found `isize`
    |
-   = note: expected type `&usize`
-              found type `&isize`
+   = note: expected reference `&usize`
+              found reference `&isize`
 
 error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied
   --> $DIR/associated-types-eq-hr.rs:91:17
diff --git a/src/test/ui/associated-types/associated-types-issue-20346.stderr b/src/test/ui/associated-types/associated-types-issue-20346.stderr
index f5053f6a1c0..cebcae44fd0 100644
--- a/src/test/ui/associated-types/associated-types-issue-20346.stderr
+++ b/src/test/ui/associated-types/associated-types-issue-20346.stderr
@@ -10,7 +10,7 @@ LL | fn test_adapter<T, I: Iterator<Item=Option<T>>>(it: I) {
 LL |     is_iterator_of::<Option<T>, _>(&adapter);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::option::Option`, found type parameter `T`
    |
-   = note: expected type `std::option::Option<T>`
+   = note: expected enum `std::option::Option<T>`
               found type `T`
    = 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/associated-types/associated-types-multiple-types-one-trait.stderr b/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr
index e3a2b5edf3f..d56b45dc251 100644
--- a/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr
+++ b/src/test/ui/associated-types/associated-types-multiple-types-one-trait.stderr
@@ -2,13 +2,13 @@ error[E0271]: type mismatch resolving `<T as Foo>::Y == i32`
   --> $DIR/associated-types-multiple-types-one-trait.rs:13:5
    |
 LL |     want_y(t);
-   |     ^^^^^^ expected i32, found associated type
+   |     ^^^^^^ expected `i32`, found associated type
 ...
 LL | fn want_y<T:Foo<Y=i32>>(t: &T) { }
    |    ------       ----- required by this bound in `want_y`
    |
-   = note: expected type `i32`
-              found type `<T as Foo>::Y`
+   = note:         expected type `i32`
+           found associated type `<T as Foo>::Y`
    = note: consider constraining the associated type `<T as Foo>::Y` to `i32`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
 
@@ -16,13 +16,13 @@ error[E0271]: type mismatch resolving `<T as Foo>::X == u32`
   --> $DIR/associated-types-multiple-types-one-trait.rs:18:5
    |
 LL |     want_x(t);
-   |     ^^^^^^ expected u32, found associated type
+   |     ^^^^^^ expected `u32`, found associated type
 ...
 LL | fn want_x<T:Foo<X=u32>>(t: &T) { }
    |    ------       ----- required by this bound in `want_x`
    |
-   = note: expected type `u32`
-              found type `<T as Foo>::X`
+   = note:         expected type `u32`
+           found associated type `<T as Foo>::X`
    = note: consider constraining the associated type `<T as Foo>::X` to `u32`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
 
diff --git a/src/test/ui/associated-types/associated-types-overridden-binding-2.stderr b/src/test/ui/associated-types/associated-types-overridden-binding-2.stderr
index 02a6ac12dd9..82c0eba87ef 100644
--- a/src/test/ui/associated-types/associated-types-overridden-binding-2.stderr
+++ b/src/test/ui/associated-types/associated-types-overridden-binding-2.stderr
@@ -2,10 +2,8 @@ error[E0271]: type mismatch resolving `<std::vec::IntoIter<u32> as std::iter::It
   --> $DIR/associated-types-overridden-binding-2.rs:6:43
    |
 LL |     let _: &dyn I32Iterator<Item = u32> = &vec![42].into_iter();
-   |                                           ^^^^^^^^^^^^^^^^^^^^^ expected i32, found u32
+   |                                           ^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32`
    |
-   = note: expected type `i32`
-              found type `u32`
    = note: required for the cast to the object type `dyn std::iter::Iterator<Item = u32, Item = i32>`
 
 error: aborting due to previous error
diff --git a/src/test/ui/associated-types/associated-types-path-2.rs b/src/test/ui/associated-types/associated-types-path-2.rs
index b28b60e7008..c993e1d2720 100644
--- a/src/test/ui/associated-types/associated-types-path-2.rs
+++ b/src/test/ui/associated-types/associated-types-path-2.rs
@@ -18,7 +18,7 @@ pub fn f2<T: Foo>(a: T) -> T::A {
 pub fn f1_int_int() {
     f1(2i32, 4i32);
     //~^ ERROR mismatched types
-    //~| expected u32, found i32
+    //~| expected `u32`, found `i32`
 }
 
 pub fn f1_int_uint() {
@@ -40,7 +40,7 @@ pub fn f1_uint_int() {
 pub fn f2_int() {
     let _: i32 = f2(2i32);
     //~^ ERROR mismatched types
-    //~| expected i32, found u32
+    //~| expected `i32`, found `u32`
 }
 
 pub fn main() { }
diff --git a/src/test/ui/associated-types/associated-types-path-2.stderr b/src/test/ui/associated-types/associated-types-path-2.stderr
index 246c745cd33..f1b77982624 100644
--- a/src/test/ui/associated-types/associated-types-path-2.stderr
+++ b/src/test/ui/associated-types/associated-types-path-2.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/associated-types-path-2.rs:19:14
    |
 LL |     f1(2i32, 4i32);
-   |              ^^^^ expected u32, found i32
+   |              ^^^^ expected `u32`, found `i32`
    |
 help: change the type of the numeric literal from `i32` to `u32`
    |
@@ -43,7 +43,7 @@ error[E0308]: mismatched types
   --> $DIR/associated-types-path-2.rs:41:18
    |
 LL |     let _: i32 = f2(2i32);
-   |                  ^^^^^^^^ expected i32, found u32
+   |                  ^^^^^^^^ expected `i32`, found `u32`
    |
 help: you can convert an `u32` to `i32` and panic if the converted value wouldn't fit
    |
diff --git a/src/test/ui/associated-types/issue-44153.stderr b/src/test/ui/associated-types/issue-44153.stderr
index b62a866a20b..8ef71087958 100644
--- a/src/test/ui/associated-types/issue-44153.stderr
+++ b/src/test/ui/associated-types/issue-44153.stderr
@@ -5,10 +5,8 @@ LL |     fn visit() {}
    |     ---------- required by `Visit::visit`
 ...
 LL |     <() as Visit>::visit();
-   |     ^^^^^^^^^^^^^^^^^^^^ expected (), found &()
+   |     ^^^^^^^^^^^^^^^^^^^^ expected `()`, found `&()`
    |
-   = note: expected type `()`
-              found 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/associated-types/point-at-type-on-obligation-failure.stderr b/src/test/ui/associated-types/point-at-type-on-obligation-failure.stderr
index e4bd39c8ba6..e86b460f818 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
@@ -7,10 +7,7 @@ LL |     type Ok;
 LL | impl Bar for Foo {
    | ---------------- in this `impl` item
 LL |     type Ok = ();
-   |     ^^^^^^^^^^^^^ expected u32, found ()
-   |
-   = note: expected type `u32`
-              found type `()`
+   |     ^^^^^^^^^^^^^ expected `u32`, found `()`
 
 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 6bef9dca265..afb8f146192 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
@@ -22,21 +22,16 @@ error[E0308]: mismatched types
   --> $DIR/async-block-control-flow-static-semantics.rs:13:43
    |
 LL | fn return_targets_async_block_not_fn() -> u8 {
-   |    ---------------------------------      ^^ expected u8, found ()
+   |    ---------------------------------      ^^ expected `u8`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
-   |
-   = note: expected type `u8`
-              found 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
    |
 LL |     let _: &dyn Future<Output = ()> = &block;
-   |                                       ^^^^^^ expected (), found u8
+   |                                       ^^^^^^ expected `()`, found `u8`
    |
-   = note: expected type `()`
-              found type `u8`
    = note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
 
 error[E0308]: mismatched types
@@ -50,42 +45,37 @@ LL | |         return 0u8;
 ...  |
 LL | |
 LL | | }
-   | |_^ expected u8, found ()
-   |
-   = note: expected type `u8`
-              found type `()`
+   | |_^ expected `u8`, found `()`
 
 error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == ()`
   --> $DIR/async-block-control-flow-static-semantics.rs:27:39
    |
 LL |     let _: &dyn Future<Output = ()> = &block;
-   |                                       ^^^^^^ expected (), found u8
+   |                                       ^^^^^^ expected `()`, found `u8`
    |
-   = note: expected type `()`
-              found type `u8`
    = note: required for the cast to the object type `dyn std::future::Future<Output = ()>`
 
 error[E0308]: mismatched types
   --> $DIR/async-block-control-flow-static-semantics.rs:48:44
    |
 LL | fn rethrow_targets_async_block_not_fn() -> Result<u8, MyErr> {
-   |    ----------------------------------      ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found ()
+   |    ----------------------------------      ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected type `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
    |
 LL | fn rethrow_targets_async_block_not_async_fn() -> Result<u8, MyErr> {
-   |    ----------------------------------------      ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found ()
+   |    ----------------------------------------      ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected type `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/async-await/dont-suggest-missing-await.stderr b/src/test/ui/async-await/dont-suggest-missing-await.stderr
index c87e0bc221d..239f801c39d 100644
--- a/src/test/ui/async-await/dont-suggest-missing-await.stderr
+++ b/src/test/ui/async-await/dont-suggest-missing-await.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/dont-suggest-missing-await.rs:14:18
    |
 LL |         take_u32(x)
-   |                  ^ expected u32, found opaque type
+   |                  ^ expected `u32`, found opaque type
    |
-   = note: expected type `u32`
-              found type `impl std::future::Future`
+   = note:     expected type `u32`
+           found opaque type `impl std::future::Future`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/async-await/issue-66387-if-without-else.stderr b/src/test/ui/async-await/issue-66387-if-without-else.stderr
index 32952059525..42e44472aca 100644
--- a/src/test/ui/async-await/issue-66387-if-without-else.stderr
+++ b/src/test/ui/async-await/issue-66387-if-without-else.stderr
@@ -4,10 +4,8 @@ error[E0317]: if may be missing an else clause
 LL | /     if true {
 LL | |         return 0;
 LL | |     }
-   | |_____^ expected (), found i32
+   | |_____^ expected `()`, found `i32`
    |
-   = note: expected type `()`
-              found type `i32`
    = 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/async-await/suggest-missing-await-closure.stderr b/src/test/ui/async-await/suggest-missing-await-closure.stderr
index 487ca6c0fc5..1efc20082a0 100644
--- a/src/test/ui/async-await/suggest-missing-await-closure.stderr
+++ b/src/test/ui/async-await/suggest-missing-await-closure.stderr
@@ -4,11 +4,11 @@ error[E0308]: mismatched types
 LL |         take_u32(x)
    |                  ^
    |                  |
-   |                  expected u32, found opaque type
+   |                  expected `u32`, found opaque type
    |                  help: consider using `.await` here: `x.await`
    |
-   = note: expected type `u32`
-              found type `impl std::future::Future`
+   = note:     expected type `u32`
+           found opaque type `impl std::future::Future`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/async-await/suggest-missing-await.stderr b/src/test/ui/async-await/suggest-missing-await.stderr
index ccca97ec204..7a635a37107 100644
--- a/src/test/ui/async-await/suggest-missing-await.stderr
+++ b/src/test/ui/async-await/suggest-missing-await.stderr
@@ -4,11 +4,11 @@ error[E0308]: mismatched types
 LL |     take_u32(x)
    |              ^
    |              |
-   |              expected u32, found opaque type
+   |              expected `u32`, found opaque type
    |              help: consider using `.await` here: `x.await`
    |
-   = note: expected type `u32`
-              found type `impl std::future::Future`
+   = note:     expected type `u32`
+           found opaque type `impl std::future::Future`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/bad/bad-const-type.rs b/src/test/ui/bad/bad-const-type.rs
index 8121929e096..ce9ea7bc9ed 100644
--- a/src/test/ui/bad/bad-const-type.rs
+++ b/src/test/ui/bad/bad-const-type.rs
@@ -1,6 +1,4 @@
 static i: String = 10;
 //~^ ERROR mismatched types
-//~| expected type `std::string::String`
-//~| found type `{integer}`
 //~| expected struct `std::string::String`, found integer
 fn main() { println!("{}", i); }
diff --git a/src/test/ui/bad/bad-const-type.stderr b/src/test/ui/bad/bad-const-type.stderr
index 677dc72652e..f667779fab5 100644
--- a/src/test/ui/bad/bad-const-type.stderr
+++ b/src/test/ui/bad/bad-const-type.stderr
@@ -6,9 +6,6 @@ LL | static i: String = 10;
    |                    |
    |                    expected struct `std::string::String`, found integer
    |                    help: try using a conversion method: `10.to_string()`
-   |
-   = note: expected type `std::string::String`
-              found type `{integer}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/bad/bad-expr-path.stderr b/src/test/ui/bad/bad-expr-path.stderr
index 15ac7f2b86f..faba9911f86 100644
--- a/src/test/ui/bad/bad-expr-path.stderr
+++ b/src/test/ui/bad/bad-expr-path.stderr
@@ -22,8 +22,8 @@ error[E0580]: main function has wrong type
 LL | fn main(arguments: Vec<String>) {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters
    |
-   = note: expected type `fn()`
-              found type `fn(std::vec::Vec<std::string::String>)`
+   = note: expected fn pointer `fn()`
+              found fn pointer `fn(std::vec::Vec<std::string::String>)`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/bad/bad-expr-path2.stderr b/src/test/ui/bad/bad-expr-path2.stderr
index 45723168f19..53b6d35e8f3 100644
--- a/src/test/ui/bad/bad-expr-path2.stderr
+++ b/src/test/ui/bad/bad-expr-path2.stderr
@@ -22,8 +22,8 @@ error[E0580]: main function has wrong type
 LL | fn main(arguments: Vec<String>) {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters
    |
-   = note: expected type `fn()`
-              found type `fn(std::vec::Vec<std::string::String>)`
+   = note: expected fn pointer `fn()`
+              found fn pointer `fn(std::vec::Vec<std::string::String>)`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/bad/bad-main.stderr b/src/test/ui/bad/bad-main.stderr
index c7f15e7a4fa..1e57c2488e9 100644
--- a/src/test/ui/bad/bad-main.stderr
+++ b/src/test/ui/bad/bad-main.stderr
@@ -4,8 +4,8 @@ error[E0580]: main function has wrong type
 LL | fn main(x: isize) { }
    | ^^^^^^^^^^^^^^^^^ incorrect number of function parameters
    |
-   = note: expected type `fn()`
-              found type `fn(isize)`
+   = note: expected fn pointer `fn()`
+              found fn pointer `fn(isize)`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/binop/binop-logic-float.stderr b/src/test/ui/binop/binop-logic-float.stderr
index 5a94307ff85..3615622ae36 100644
--- a/src/test/ui/binop/binop-logic-float.stderr
+++ b/src/test/ui/binop/binop-logic-float.stderr
@@ -2,13 +2,13 @@ error[E0308]: mismatched types
   --> $DIR/binop-logic-float.rs:1:21
    |
 LL | fn main() { let x = 1.0_f32 || 2.0_f32; }
-   |                     ^^^^^^^ expected bool, found f32
+   |                     ^^^^^^^ expected `bool`, found `f32`
 
 error[E0308]: mismatched types
   --> $DIR/binop-logic-float.rs:1:32
    |
 LL | fn main() { let x = 1.0_f32 || 2.0_f32; }
-   |                                ^^^^^^^ expected bool, found f32
+   |                                ^^^^^^^ expected `bool`, found `f32`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/binop/binop-logic-int.stderr b/src/test/ui/binop/binop-logic-int.stderr
index b699b390b8b..50d857cd9d7 100644
--- a/src/test/ui/binop/binop-logic-int.stderr
+++ b/src/test/ui/binop/binop-logic-int.stderr
@@ -2,19 +2,13 @@ error[E0308]: mismatched types
   --> $DIR/binop-logic-int.rs:1:21
    |
 LL | fn main() { let x = 1 && 2; }
-   |                     ^ expected bool, found integer
-   |
-   = note: expected type `bool`
-              found type `{integer}`
+   |                     ^ expected `bool`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/binop-logic-int.rs:1:26
    |
 LL | fn main() { let x = 1 && 2; }
-   |                          ^ expected bool, found integer
-   |
-   = note: expected type `bool`
-              found type `{integer}`
+   |                          ^ expected `bool`, found integer
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/blind/blind-item-block-middle.stderr b/src/test/ui/blind/blind-item-block-middle.stderr
index 389b63c0adf..264e7fc8e73 100644
--- a/src/test/ui/blind/blind-item-block-middle.stderr
+++ b/src/test/ui/blind/blind-item-block-middle.stderr
@@ -3,9 +3,6 @@ error[E0308]: mismatched types
    |
 LL |     let bar = 5;
    |         ^^^ expected integer, found struct `foo::bar`
-   |
-   = note: expected type `{integer}`
-              found type `foo::bar`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/block-expression-remove-semicolon.stderr b/src/test/ui/block-expression-remove-semicolon.stderr
index 51942f3d920..e39cd04f81b 100644
--- a/src/test/ui/block-expression-remove-semicolon.stderr
+++ b/src/test/ui/block-expression-remove-semicolon.stderr
@@ -7,10 +7,7 @@ LL | |
 LL | |         foo();
    | |              - help: consider removing this semicolon
 LL | |     };
-   | |_____^ expected i32, found ()
-   |
-   = note: expected type `i32`
-              found type `()`
+   | |_____^ expected `i32`, found `()`
 
 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..914886f81b4 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
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/block-must-not-have-result-do.rs:3:9
    |
 LL |         true
-   |         ^^^^ expected (), found bool
-   |
-   = note: expected type `()`
-              found type `bool`
+   |         ^^^^ expected `()`, found `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..0080d06dd20 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
@@ -4,10 +4,7 @@ error[E0308]: mismatched types
 LL |     fn drop(&mut self) {
    |                        - expected `()` because of default return type
 LL |         true
-   |         ^^^^ expected (), found bool
-   |
-   = note: expected type `()`
-              found type `bool`
+   |         ^^^^ expected `()`, found `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..418059bf280 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,8 +1,6 @@
 fn main() {
     while true { //~ WARN denote infinite loops with
         true //~  ERROR mismatched types
-             //~| expected type `()`
-             //~| found type `bool`
-             //~| expected (), found 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..638ce03cb36 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
@@ -10,10 +10,7 @@ error[E0308]: mismatched types
   --> $DIR/block-must-not-have-result-while.rs:3:9
    |
 LL |         true
-   |         ^^^^ expected (), found bool
-   |
-   = note: expected type `()`
-              found type `bool`
+   |         ^^^^ expected `()`, found `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 f4984ca4463..b45f2a62821 100644
--- a/src/test/ui/block-result/consider-removing-last-semi.stderr
+++ b/src/test/ui/block-result/consider-removing-last-semi.stderr
@@ -2,29 +2,23 @@ error[E0308]: mismatched types
   --> $DIR/consider-removing-last-semi.rs:1:11
    |
 LL | fn f() -> String {
-   |    -      ^^^^^^ expected struct `std::string::String`, found ()
+   |    -      ^^^^^^ expected struct `std::string::String`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
 LL |     0u8;
 LL |     "bla".to_string();
    |                      - help: consider removing this semicolon
-   |
-   = note: expected type `std::string::String`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/consider-removing-last-semi.rs:6:11
    |
 LL | fn g() -> String {
-   |    -      ^^^^^^ expected struct `std::string::String`, found ()
+   |    -      ^^^^^^ expected struct `std::string::String`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
 LL |     "this won't work".to_string();
 LL |     "removeme".to_string();
    |                           - help: consider removing this semicolon
-   |
-   = note: expected type `std::string::String`
-              found 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..61991643a4a 100644
--- a/src/test/ui/block-result/issue-11714.stderr
+++ b/src/test/ui/block-result/issue-11714.stderr
@@ -2,15 +2,12 @@ error[E0308]: mismatched types
   --> $DIR/issue-11714.rs:1:14
    |
 LL | fn blah() -> i32 {
-   |    ----      ^^^ expected i32, found ()
+   |    ----      ^^^ expected `i32`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
 ...
 LL |     ;
    |     - help: consider removing this semicolon
-   |
-   = note: expected type `i32`
-              found 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 f7cafab3d77..707d24cd6ab 100644
--- a/src/test/ui/block-result/issue-13428.stderr
+++ b/src/test/ui/block-result/issue-13428.stderr
@@ -2,29 +2,23 @@ error[E0308]: mismatched types
   --> $DIR/issue-13428.rs:3:13
    |
 LL | fn foo() -> String {
-   |    ---      ^^^^^^ expected struct `std::string::String`, found ()
+   |    ---      ^^^^^^ expected struct `std::string::String`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
 ...
 LL |     ;
    |     - help: consider removing this semicolon
-   |
-   = note: expected type `std::string::String`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/issue-13428.rs:11:13
    |
 LL | fn bar() -> String {
-   |    ---      ^^^^^^ expected struct `std::string::String`, found ()
+   |    ---      ^^^^^^ expected struct `std::string::String`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
 LL |     "foobar".to_string()
 LL |     ;
    |     - help: consider removing this semicolon
-   |
-   = note: expected type `std::string::String`
-              found 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 7b6a0775e16..bd1d0de320e 100644
--- a/src/test/ui/block-result/issue-13624.rs
+++ b/src/test/ui/block-result/issue-13624.rs
@@ -6,9 +6,7 @@ mod a {
   pub fn get_enum_struct_variant() -> () {
     Enum::EnumStructVariant { x: 1, y: 2, z: 3 }
     //~^ ERROR mismatched types
-    //~| expected type `()`
-    //~| found type `a::Enum`
-    //~| expected (), found enum `a::Enum`
+    //~| expected `()`, found enum `a::Enum`
   }
 }
 
@@ -21,9 +19,7 @@ mod b {
       match enum_struct_variant {
         a::Enum::EnumStructVariant { x, y, z } => {
         //~^ ERROR mismatched types
-        //~| expected type `()`
-        //~| found type `a::Enum`
-        //~| expected (), found enum `a::Enum`
+        //~| expected `()`, 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 417667a5354..90ffb4b2e52 100644
--- a/src/test/ui/block-result/issue-13624.stderr
+++ b/src/test/ui/block-result/issue-13624.stderr
@@ -4,21 +4,15 @@ error[E0308]: mismatched types
 LL |   pub fn get_enum_struct_variant() -> () {
    |                                       -- expected `()` because of return type
 LL |     Enum::EnumStructVariant { x: 1, y: 2, z: 3 }
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found enum `a::Enum`
-   |
-   = note: expected type `()`
-              found type `a::Enum`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found enum `a::Enum`
 
 error[E0308]: mismatched types
-  --> $DIR/issue-13624.rs:22:9
+  --> $DIR/issue-13624.rs:20:9
    |
 LL |       match enum_struct_variant {
    |             ------------------- this match expression has type `()`
 LL |         a::Enum::EnumStructVariant { x, y, z } => {
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found enum `a::Enum`
-   |
-   = note: expected type `()`
-              found type `a::Enum`
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, 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 6dc17815fac..f9c890b0ed8 100644
--- a/src/test/ui/block-result/issue-20862.stderr
+++ b/src/test/ui/block-result/issue-20862.stderr
@@ -4,10 +4,10 @@ error[E0308]: mismatched types
 LL | fn foo(x: i32) {
    |                - possibly return type missing here?
 LL |     |y| x + y
-   |     ^^^^^^^^^ expected (), found closure
+   |     ^^^^^^^^^ expected `()`, found closure
    |
-   = note: expected type `()`
-              found type `[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 d2ec0dc06bd..79eb1d4b890 100644
--- a/src/test/ui/block-result/issue-22645.stderr
+++ b/src/test/ui/block-result/issue-22645.stderr
@@ -15,10 +15,7 @@ LL | fn main() {
    |           - expected `()` because of default return type
 LL |   let b = Bob + 3.5;
 LL |   b + 3
-   |   ^^^^^ expected (), found struct `Bob`
-   |
-   = note: expected type `()`
-              found type `Bob`
+   |   ^^^^^ expected `()`, 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 5a549bb07ea..577987a4596 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 `()`
-    //~| found type `&_`
-    //~| expected (), found reference
+    //~| 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 6a13b31fe93..9d9f7ac2e4a 100644
--- a/src/test/ui/block-result/issue-5500.stderr
+++ b/src/test/ui/block-result/issue-5500.stderr
@@ -6,11 +6,11 @@ LL | fn main() {
 LL |     &panic!()
    |     ^^^^^^^^^
    |     |
-   |     expected (), found reference
+   |     expected `()`, found reference
    |     help: consider removing the borrow: `panic!()`
    |
-   = note: expected type `()`
-              found type `&_`
+   = 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..3dce459ddbd 100644
--- a/src/test/ui/block-result/unexpected-return-on-unit.stderr
+++ b/src/test/ui/block-result/unexpected-return-on-unit.stderr
@@ -2,10 +2,8 @@ error[E0308]: mismatched types
   --> $DIR/unexpected-return-on-unit.rs:9:5
    |
 LL |     foo()
-   |     ^^^^^ expected (), found usize
+   |     ^^^^^ expected `()`, found `usize`
    |
-   = note: expected type `()`
-              found type `usize`
 help: try adding a semicolon
    |
 LL |     foo();
diff --git a/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr b/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr
index 52d43eae658..421c57fc74a 100644
--- a/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr
+++ b/src/test/ui/borrowck/regions-bound-missing-bound-in-impl.stderr
@@ -22,8 +22,8 @@ error[E0308]: method not compatible with trait
 LL |     fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `fn(&'a isize, Inv<'c>, Inv<'c>, Inv<'d>)`
-              found type `fn(&'a isize, Inv<'_>, Inv<'c>, Inv<'d>)`
+   = note: expected fn pointer `fn(&'a isize, Inv<'c>, Inv<'c>, Inv<'d>)`
+              found fn pointer `fn(&'a isize, Inv<'_>, Inv<'c>, Inv<'d>)`
 note: the lifetime `'c` as defined on the method body at 27:24...
   --> $DIR/regions-bound-missing-bound-in-impl.rs:27:24
    |
diff --git a/src/test/ui/break-while-condition.stderr b/src/test/ui/break-while-condition.stderr
index bae3b6765e2..bbc9f21edb0 100644
--- a/src/test/ui/break-while-condition.stderr
+++ b/src/test/ui/break-while-condition.stderr
@@ -5,10 +5,10 @@ LL |           let _: ! = {
    |  ____________________^
 LL | |             'a: while break 'a {};
 LL | |         };
-   | |_________^ expected !, found ()
+   | |_________^ expected `!`, found `()`
    |
-   = note: expected type `!`
-              found type `()`
+   = note:   expected type `!`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/break-while-condition.rs:14:13
@@ -16,10 +16,10 @@ error[E0308]: mismatched types
 LL | /             while false {
 LL | |                 break
 LL | |             }
-   | |_____________^ expected !, found ()
+   | |_____________^ expected `!`, found `()`
    |
-   = note: expected type `!`
-              found type `()`
+   = note:   expected type `!`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/break-while-condition.rs:22:13
@@ -27,10 +27,10 @@ error[E0308]: mismatched types
 LL | /             while false {
 LL | |                 return
 LL | |             }
-   | |_____________^ expected !, found ()
+   | |_____________^ 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/c-variadic/variadic-ffi-1.stderr b/src/test/ui/c-variadic/variadic-ffi-1.stderr
index 73f72a177bc..3d1710648da 100644
--- a/src/test/ui/c-variadic/variadic-ffi-1.stderr
+++ b/src/test/ui/c-variadic/variadic-ffi-1.stderr
@@ -28,8 +28,8 @@ error[E0308]: mismatched types
 LL |         let x: unsafe extern "C" fn(f: isize, x: u8) = foo;
    |                                                        ^^^ expected non-variadic fn, found variadic function
    |
-   = note: expected type `unsafe extern "C" fn(isize, u8)`
-              found type `unsafe extern "C" fn(isize, u8, ...) {foo}`
+   = note: expected fn pointer `unsafe extern "C" fn(isize, u8)`
+                 found fn item `unsafe extern "C" fn(isize, u8, ...) {foo}`
 
 error[E0308]: mismatched types
   --> $DIR/variadic-ffi-1.rs:20:54
@@ -37,8 +37,8 @@ error[E0308]: mismatched types
 LL |         let y: extern "C" fn(f: isize, x: u8, ...) = bar;
    |                                                      ^^^ expected variadic fn, found non-variadic function
    |
-   = note: expected type `extern "C" fn(isize, u8, ...)`
-              found type `extern "C" fn(isize, u8) {bar}`
+   = note: expected fn pointer `extern "C" fn(isize, u8, ...)`
+                 found fn item `extern "C" fn(isize, u8) {bar}`
 
 error[E0617]: can't pass `f32` to variadic function
   --> $DIR/variadic-ffi-1.rs:22:19
diff --git a/src/test/ui/c-variadic/variadic-ffi-4.stderr b/src/test/ui/c-variadic/variadic-ffi-4.stderr
index 05535659161..c80ed5ebf5c 100644
--- a/src/test/ui/c-variadic/variadic-ffi-4.stderr
+++ b/src/test/ui/c-variadic/variadic-ffi-4.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     ap
    |     ^^ lifetime mismatch
    |
-   = note: expected type `core::ffi::VaListImpl<'f>`
-              found type `core::ffi::VaListImpl<'_>`
+   = note: expected struct `core::ffi::VaListImpl<'f>`
+              found struct `core::ffi::VaListImpl<'_>`
 note: the scope of call-site for function at 7:78...
   --> $DIR/variadic-ffi-4.rs:7:78
    |
@@ -26,8 +26,8 @@ error[E0308]: mismatched types
 LL |     ap
    |     ^^ lifetime mismatch
    |
-   = note: expected type `core::ffi::VaListImpl<'static>`
-              found type `core::ffi::VaListImpl<'_>`
+   = note: expected struct `core::ffi::VaListImpl<'static>`
+              found struct `core::ffi::VaListImpl<'_>`
 note: the scope of call-site for function at 11:79...
   --> $DIR/variadic-ffi-4.rs:11:79
    |
@@ -69,8 +69,8 @@ error[E0308]: mismatched types
 LL |     *ap0 = ap1;
    |            ^^^ lifetime mismatch
    |
-   = note: expected type `core::ffi::VaListImpl<'_>`
-              found type `core::ffi::VaListImpl<'_>`
+   = note: expected struct `core::ffi::VaListImpl<'_>`
+              found struct `core::ffi::VaListImpl<'_>`
 note: the scope of call-site for function at 19:87...
   --> $DIR/variadic-ffi-4.rs:19:87
    |
@@ -121,8 +121,8 @@ error[E0308]: mismatched types
 LL |     ap0 = &mut ap1;
    |           ^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `&mut core::ffi::VaListImpl<'_>`
-              found type `&mut core::ffi::VaListImpl<'_>`
+   = note: expected mutable reference `&mut core::ffi::VaListImpl<'_>`
+              found mutable reference `&mut core::ffi::VaListImpl<'_>`
 note: the scope of call-site for function at 23:83...
   --> $DIR/variadic-ffi-4.rs:23:83
    |
@@ -189,8 +189,8 @@ error[E0308]: mismatched types
 LL |     *ap0 = ap1.clone();
    |            ^^^^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `core::ffi::VaListImpl<'_>`
-              found type `core::ffi::VaListImpl<'_>`
+   = note: expected struct `core::ffi::VaListImpl<'_>`
+              found struct `core::ffi::VaListImpl<'_>`
 note: the scope of call-site for function at 30:87...
   --> $DIR/variadic-ffi-4.rs:30:87
    |
diff --git a/src/test/ui/chalkify/type_inference.stderr b/src/test/ui/chalkify/type_inference.stderr
index c6bc306e45a..b8152caf3d2 100644
--- a/src/test/ui/chalkify/type_inference.stderr
+++ b/src/test/ui/chalkify/type_inference.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/type_inference.rs:21:14
    |
 LL |     only_foo(x);
-   |              ^ expected i32, found floating-point number
-   |
-   = note: expected type `i32`
-              found type `{float}`
+   |              ^ expected `i32`, found floating-point number
 
 error[E0277]: the trait bound `{float}: Bar` is not satisfied
   --> $DIR/type_inference.rs:25:5
diff --git a/src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr b/src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr
index 8af7f882cc2..a15444207f5 100644
--- a/src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr
+++ b/src/test/ui/closure-expected-type/expect-fn-supply-fn.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {});
    |                                                    ^^^^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `fn(&u32)`
-              found type `fn(&'x u32)`
+   = note: expected fn pointer `fn(&u32)`
+              found fn pointer `fn(&'x u32)`
 note: the anonymous lifetime #2 defined on the body at 14:48...
   --> $DIR/expect-fn-supply-fn.rs:14:48
    |
@@ -23,8 +23,8 @@ error[E0308]: mismatched types
 LL |     with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {});
    |                                                    ^^^^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `fn(&u32)`
-              found type `fn(&'x u32)`
+   = note: expected fn pointer `fn(&u32)`
+              found fn pointer `fn(&'x u32)`
 note: the lifetime `'x` as defined on the function body at 11:36...
   --> $DIR/expect-fn-supply-fn.rs:11:36
    |
diff --git a/src/test/ui/closures/closure-array-break-length.stderr b/src/test/ui/closures/closure-array-break-length.stderr
index 18da4a94e6f..f6991a23f4d 100644
--- a/src/test/ui/closures/closure-array-break-length.stderr
+++ b/src/test/ui/closures/closure-array-break-length.stderr
@@ -20,19 +20,19 @@ error[E0308]: mismatched types
   --> $DIR/closure-array-break-length.rs:4:11
    |
 LL |     while |_: [_; continue]| {} {}
-   |           ^^^^^^^^^^^^^^^^^^^^^ expected bool, found closure
+   |           ^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found closure
    |
    = note: expected type `bool`
-              found type `[closure@$DIR/closure-array-break-length.rs:4:11: 4:32]`
+           found closure `[closure@$DIR/closure-array-break-length.rs:4:11: 4:32]`
 
 error[E0308]: mismatched types
   --> $DIR/closure-array-break-length.rs:7:11
    |
 LL |     while |_: [_; break]| {} {}
-   |           ^^^^^^^^^^^^^^^^^^ expected bool, found closure
+   |           ^^^^^^^^^^^^^^^^^^ expected `bool`, found closure
    |
    = note: expected type `bool`
-              found type `[closure@$DIR/closure-array-break-length.rs:7:11: 7:29]`
+           found closure `[closure@$DIR/closure-array-break-length.rs:7:11: 7:29]`
 
 error: aborting due to 5 previous errors
 
diff --git a/src/test/ui/closures/closure-expected-type/expect-region-supply-region.stderr b/src/test/ui/closures/closure-expected-type/expect-region-supply-region.stderr
index 9f74738315a..eb860f9aef2 100644
--- a/src/test/ui/closures/closure-expected-type/expect-region-supply-region.stderr
+++ b/src/test/ui/closures/closure-expected-type/expect-region-supply-region.stderr
@@ -24,8 +24,8 @@ error[E0308]: mismatched types
 LL |     closure_expecting_bound(|x: &'x u32| {
    |                                 ^^^^^^^ lifetime mismatch
    |
-   = note: expected type `&u32`
-              found type `&'x u32`
+   = note: expected reference `&u32`
+              found reference `&'x u32`
 note: the anonymous lifetime #2 defined on the body at 37:29...
   --> $DIR/expect-region-supply-region.rs:37:29
    |
@@ -50,8 +50,8 @@ error[E0308]: mismatched types
 LL |     closure_expecting_bound(|x: &'x u32| {
    |                                 ^^^^^^^ lifetime mismatch
    |
-   = note: expected type `&u32`
-              found type `&'x u32`
+   = note: expected reference `&u32`
+              found reference `&'x u32`
 note: the lifetime `'x` as defined on the function body at 32:30...
   --> $DIR/expect-region-supply-region.rs:32:30
    |
diff --git a/src/test/ui/closures/closure-no-fn-1.stderr b/src/test/ui/closures/closure-no-fn-1.stderr
index 6d07c6b035e..9945530a5a7 100644
--- a/src/test/ui/closures/closure-no-fn-1.stderr
+++ b/src/test/ui/closures/closure-no-fn-1.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let foo: fn(u8) -> u8 = |v: u8| { a += v; a };
    |                             ^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found closure
    |
-   = note: expected type `fn(u8) -> u8`
-              found type `[closure@$DIR/closure-no-fn-1.rs:6:29: 6:50 a:_]`
+   = note: expected fn pointer `fn(u8) -> u8`
+                 found closure `[closure@$DIR/closure-no-fn-1.rs:6:29: 6:50 a:_]`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/closures/closure-no-fn-2.stderr b/src/test/ui/closures/closure-no-fn-2.stderr
index 5adcdf6058b..f3b0d155dd9 100644
--- a/src/test/ui/closures/closure-no-fn-2.stderr
+++ b/src/test/ui/closures/closure-no-fn-2.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let bar: fn() -> u8 = || { b };
    |                           ^^^^^^^^ expected fn pointer, found closure
    |
-   = note: expected type `fn() -> u8`
-              found type `[closure@$DIR/closure-no-fn-2.rs:6:27: 6:35 b:_]`
+   = note: expected fn pointer `fn() -> u8`
+                 found closure `[closure@$DIR/closure-no-fn-2.rs:6:27: 6:35 b:_]`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/closures/closure-reform-bad.stderr b/src/test/ui/closures/closure-reform-bad.stderr
index 5c5480912be..63236cf5424 100644
--- a/src/test/ui/closures/closure-reform-bad.stderr
+++ b/src/test/ui/closures/closure-reform-bad.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     call_bare(f)
    |               ^ expected fn pointer, found closure
    |
-   = note: expected type `for<'r> fn(&'r str)`
-              found type `[closure@$DIR/closure-reform-bad.rs:10:13: 10:50 string:_]`
+   = note: expected fn pointer `for<'r> fn(&'r str)`
+                 found closure `[closure@$DIR/closure-reform-bad.rs:10:13: 10:50 string:_]`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/codemap_tests/tab.stderr b/src/test/ui/codemap_tests/tab.stderr
index 7b3f959c1cb..c3f19d20d39 100644
--- a/src/test/ui/codemap_tests/tab.stderr
+++ b/src/test/ui/codemap_tests/tab.stderr
@@ -10,10 +10,7 @@ error[E0308]: mismatched types
 LL | fn foo() {
    |          - help: try adding a return type: `-> &'static str`
 LL |     "bar            boo"
-   |     ^^^^^^^^^^^^^^^^^^^^ expected (), found reference
-   |
-   = note: expected type `()`
-              found type `&'static str`
+   |     ^^^^^^^^^^^^^^^^^^^^ expected `()`, found `&str`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr b/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr
index 3b81610a06e..303d83d3426 100644
--- a/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr
+++ b/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr
@@ -2,127 +2,127 @@ error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:9:13
    |
 LL |     let _ = box { [1, 2, 3] }: Box<[i32]>;
-   |             ^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements
+   |             ^^^^^^^^^^^^^^^^^ expected slice `[i32]`, found array `[i32; 3]`
    |
-   = note: expected type `std::boxed::Box<[i32]>`
-              found type `std::boxed::Box<[i32; 3]>`
+   = note: expected struct `std::boxed::Box<[i32]>`
+              found struct `std::boxed::Box<[i32; 3]>`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:10:13
    |
 LL |     let _ = box if true { [1, 2, 3] } else { [1, 3, 4] }: Box<[i32]>;
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice `[i32]`, found array `[i32; 3]`
    |
-   = note: expected type `std::boxed::Box<[i32]>`
-              found type `std::boxed::Box<[i32; 3]>`
+   = note: expected struct `std::boxed::Box<[i32]>`
+              found struct `std::boxed::Box<[i32; 3]>`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:11:13
    |
 LL |     let _ = box match true { true => [1, 2, 3], false => [1, 3, 4] }: Box<[i32]>;
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice `[i32]`, found array `[i32; 3]`
    |
-   = note: expected type `std::boxed::Box<[i32]>`
-              found type `std::boxed::Box<[i32; 3]>`
+   = note: expected struct `std::boxed::Box<[i32]>`
+              found struct `std::boxed::Box<[i32; 3]>`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:13:13
    |
 LL |     let _ = box { |x| (x as u8) }: Box<dyn Fn(i32) -> _>;
-   |             ^^^^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure
+   |             ^^^^^^^^^^^^^^^^^^^^^ expected trait `std::ops::Fn`, found closure
    |
-   = note: expected type `std::boxed::Box<dyn std::ops::Fn(i32) -> u8>`
-              found type `std::boxed::Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:13:19: 13:32]>`
+   = note: expected struct `std::boxed::Box<dyn std::ops::Fn(i32) -> u8>`
+              found struct `std::boxed::Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:13:19: 13:32]>`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:14:13
    |
 LL |     let _ = box if true { false } else { true }: Box<dyn Debug>;
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found bool
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `std::fmt::Debug`, found `bool`
    |
-   = note: expected type `std::boxed::Box<dyn std::fmt::Debug>`
-              found type `std::boxed::Box<bool>`
+   = note: expected struct `std::boxed::Box<dyn std::fmt::Debug>`
+              found struct `std::boxed::Box<bool>`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:15:13
    |
 LL |     let _ = box match true { true => 'a', false => 'b' }: Box<dyn Debug>;
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found char
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `std::fmt::Debug`, found `char`
    |
-   = note: expected type `std::boxed::Box<dyn std::fmt::Debug>`
-              found type `std::boxed::Box<char>`
+   = note: expected struct `std::boxed::Box<dyn std::fmt::Debug>`
+              found struct `std::boxed::Box<char>`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:17:13
    |
 LL |     let _ = &{ [1, 2, 3] }: &[i32];
-   |             ^^^^^^^^^^^^^^ expected slice, found array of 3 elements
+   |             ^^^^^^^^^^^^^^ expected slice `[i32]`, found array `[i32; 3]`
    |
-   = note: expected type `&[i32]`
-              found type `&[i32; 3]`
+   = note: expected reference `&[i32]`
+              found reference `&[i32; 3]`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:18:13
    |
 LL |     let _ = &if true { [1, 2, 3] } else { [1, 3, 4] }: &[i32];
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice `[i32]`, found array `[i32; 3]`
    |
-   = note: expected type `&[i32]`
-              found type `&[i32; 3]`
+   = note: expected reference `&[i32]`
+              found reference `&[i32; 3]`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:19:13
    |
 LL |     let _ = &match true { true => [1, 2, 3], false => [1, 3, 4] }: &[i32];
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice `[i32]`, found array `[i32; 3]`
    |
-   = note: expected type `&[i32]`
-              found type `&[i32; 3]`
+   = note: expected reference `&[i32]`
+              found reference `&[i32; 3]`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:21:13
    |
 LL |     let _ = &{ |x| (x as u8) }: &dyn Fn(i32) -> _;
-   |             ^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure
+   |             ^^^^^^^^^^^^^^^^^^ expected trait `std::ops::Fn`, found closure
    |
-   = note: expected type `&dyn std::ops::Fn(i32) -> u8`
-              found type `&[closure@$DIR/coerce-expect-unsized-ascribed.rs:21:16: 21:29]`
+   = note: expected reference `&dyn std::ops::Fn(i32) -> u8`
+              found reference `&[closure@$DIR/coerce-expect-unsized-ascribed.rs:21:16: 21:29]`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:22:13
    |
 LL |     let _ = &if true { false } else { true }: &dyn Debug;
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found bool
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `std::fmt::Debug`, found `bool`
    |
-   = note: expected type `&dyn std::fmt::Debug`
-              found type `&bool`
+   = note: expected reference `&dyn std::fmt::Debug`
+              found reference `&bool`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:23:13
    |
 LL |     let _ = &match true { true => 'a', false => 'b' }: &dyn Debug;
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found char
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `std::fmt::Debug`, found `char`
    |
-   = note: expected type `&dyn std::fmt::Debug`
-              found type `&char`
+   = note: expected reference `&dyn std::fmt::Debug`
+              found reference `&char`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:25:13
    |
 LL |     let _ = Box::new([1, 2, 3]): Box<[i32]>;
-   |             ^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements
+   |             ^^^^^^^^^^^^^^^^^^^ expected slice `[i32]`, found array `[i32; 3]`
    |
-   = note: expected type `std::boxed::Box<[i32]>`
-              found type `std::boxed::Box<[i32; 3]>`
+   = note: expected struct `std::boxed::Box<[i32]>`
+              found struct `std::boxed::Box<[i32; 3]>`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-expect-unsized-ascribed.rs:26:13
    |
 LL |     let _ = Box::new(|x| (x as u8)): Box<dyn Fn(i32) -> _>;
-   |             ^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure
+   |             ^^^^^^^^^^^^^^^^^^^^^^^ expected trait `std::ops::Fn`, found closure
    |
-   = note: expected type `std::boxed::Box<dyn std::ops::Fn(i32) -> _>`
-              found type `std::boxed::Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:26:22: 26:35]>`
+   = note: expected struct `std::boxed::Box<dyn std::ops::Fn(i32) -> _>`
+              found struct `std::boxed::Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:26:22: 26:35]>`
 
 error: aborting due to 14 previous errors
 
diff --git a/src/test/ui/coercion/coerce-mut.rs b/src/test/ui/coercion/coerce-mut.rs
index 409fb8e86be..43f0b55856d 100644
--- a/src/test/ui/coercion/coerce-mut.rs
+++ b/src/test/ui/coercion/coerce-mut.rs
@@ -4,7 +4,7 @@ fn main() {
     let x = 0;
     f(&x);
     //~^ ERROR mismatched types
-    //~| expected type `&mut i32`
-    //~| found type `&{integer}`
+    //~| expected mutable reference `&mut i32`
+    //~| found reference `&{integer}`
     //~| types differ in mutability
 }
diff --git a/src/test/ui/coercion/coerce-mut.stderr b/src/test/ui/coercion/coerce-mut.stderr
index f8e3d6e60d6..2601ca5e91e 100644
--- a/src/test/ui/coercion/coerce-mut.stderr
+++ b/src/test/ui/coercion/coerce-mut.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     f(&x);
    |       ^^ types differ in mutability
    |
-   = note: expected type `&mut i32`
-              found type `&{integer}`
+   = note: expected mutable reference `&mut i32`
+                      found reference `&{integer}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/coercion/coerce-to-bang.stderr b/src/test/ui/coercion/coerce-to-bang.stderr
index b6fd5bf43ab..9629a247e01 100644
--- a/src/test/ui/coercion/coerce-to-bang.stderr
+++ b/src/test/ui/coercion/coerce-to-bang.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/coerce-to-bang.rs:4:17
    |
 LL |     foo(return, 22, 44);
-   |                 ^^ expected !, found integer
+   |                 ^^ expected `!`, found integer
    |
    = note: expected type `!`
               found type `{integer}`
@@ -11,7 +11,7 @@ error[E0308]: mismatched types
   --> $DIR/coerce-to-bang.rs:16:13
    |
 LL |     foo(22, 44, return);
-   |             ^^ expected !, found integer
+   |             ^^ expected `!`, found integer
    |
    = note: expected type `!`
               found type `{integer}`
@@ -20,7 +20,7 @@ error[E0308]: mismatched types
   --> $DIR/coerce-to-bang.rs:24:12
    |
 LL |     foo(a, b, c); // ... and hence a reference to `a` is expected to diverge.
-   |            ^ expected !, found integer
+   |            ^ expected `!`, found integer
    |
    = note: expected type `!`
               found type `{integer}`
@@ -29,7 +29,7 @@ error[E0308]: mismatched types
   --> $DIR/coerce-to-bang.rs:34:12
    |
 LL |     foo(a, b, c);
-   |            ^ expected !, found integer
+   |            ^ expected `!`, found integer
    |
    = note: expected type `!`
               found type `{integer}`
@@ -38,7 +38,7 @@ error[E0308]: mismatched types
   --> $DIR/coerce-to-bang.rs:43:12
    |
 LL |     foo(a, b, c);
-   |            ^ expected !, found integer
+   |            ^ expected `!`, found integer
    |
    = note: expected type `!`
               found type `{integer}`
@@ -47,16 +47,16 @@ error[E0308]: mismatched types
   --> $DIR/coerce-to-bang.rs:48:21
    |
 LL |     let x: [!; 2] = [return, 22];
-   |                     ^^^^^^^^^^^^ expected !, found integer
+   |                     ^^^^^^^^^^^^ expected `!`, found integer
    |
-   = note: expected type `[!; 2]`
-              found type `[{integer}; 2]`
+   = note: expected array `[!; 2]`
+              found array `[{integer}; 2]`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-to-bang.rs:53:22
    |
 LL |     let x: [!; 2] = [22, return];
-   |                      ^^ expected !, found integer
+   |                      ^^ expected `!`, found integer
    |
    = note: expected type `!`
               found type `{integer}`
@@ -65,7 +65,7 @@ error[E0308]: mismatched types
   --> $DIR/coerce-to-bang.rs:58:37
    |
 LL |     let x: (usize, !, usize) = (22, 44, 66);
-   |                                     ^^ expected !, found integer
+   |                                     ^^ expected `!`, found integer
    |
    = note: expected type `!`
               found type `{integer}`
@@ -74,7 +74,7 @@ error[E0308]: mismatched types
   --> $DIR/coerce-to-bang.rs:63:41
    |
 LL |     let x: (usize, !, usize) = (return, 44, 66);
-   |                                         ^^ expected !, found integer
+   |                                         ^^ expected `!`, found integer
    |
    = note: expected type `!`
               found type `{integer}`
@@ -83,7 +83,7 @@ error[E0308]: mismatched types
   --> $DIR/coerce-to-bang.rs:74:37
    |
 LL |     let x: (usize, !, usize) = (22, 44, return);
-   |                                     ^^ expected !, found integer
+   |                                     ^^ expected `!`, found integer
    |
    = note: expected type `!`
               found type `{integer}`
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 955793e8586..f1911dde981 100644
--- a/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr
+++ b/src/test/ui/coercion/coercion-missing-tail-expected-type.stderr
@@ -2,27 +2,24 @@ error[E0308]: mismatched types
   --> $DIR/coercion-missing-tail-expected-type.rs:3:24
    |
 LL | fn plus_one(x: i32) -> i32 {
-   |    --------            ^^^ expected i32, found ()
+   |    --------            ^^^ expected `i32`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
 LL |     x + 1;
    |          - help: consider removing this semicolon
-   |
-   = note: expected type `i32`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/coercion-missing-tail-expected-type.rs:7:13
    |
 LL | fn foo() -> Result<u8, u64> {
-   |    ---      ^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found ()
+   |    ---      ^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
 LL |     Ok(1);
    |          - help: consider removing this semicolon
    |
-   = note: expected type `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/coercion/coercion-slice.rs b/src/test/ui/coercion/coercion-slice.rs
index b69edcf2606..b756c8f8203 100644
--- a/src/test/ui/coercion/coercion-slice.rs
+++ b/src/test/ui/coercion/coercion-slice.rs
@@ -3,6 +3,5 @@
 fn main() {
     let _: &[i32] = [0];
     //~^ ERROR mismatched types
-    //~| expected type `&[i32]`
-    //~| expected &[i32], found array of 1 element
+    //~| expected `&[i32]`, found array `[{integer}; 1]`
 }
diff --git a/src/test/ui/coercion/coercion-slice.stderr b/src/test/ui/coercion/coercion-slice.stderr
index ccd776e9879..0e7fc06a9b7 100644
--- a/src/test/ui/coercion/coercion-slice.stderr
+++ b/src/test/ui/coercion/coercion-slice.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |     let _: &[i32] = [0];
    |                     ^^^
    |                     |
-   |                     expected &[i32], found array of 1 element
+   |                     expected `&[i32]`, found array `[{integer}; 1]`
    |                     help: consider borrowing here: `&[0]`
-   |
-   = note: expected type `&[i32]`
-              found type `[{integer}; 1]`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/compare-method/reordered-type-param.stderr b/src/test/ui/compare-method/reordered-type-param.stderr
index 326b84470d6..f1f8a663f21 100644
--- a/src/test/ui/compare-method/reordered-type-param.stderr
+++ b/src/test/ui/compare-method/reordered-type-param.stderr
@@ -10,8 +10,8 @@ LL |   fn b<F:Clone,G>(&self, _x: G) -> G { panic!() }
    |        |       found type parameter
    |        expected type parameter
    |
-   = note: expected type `fn(&E, F) -> F`
-              found type `fn(&E, G) -> G`
+   = note: expected fn pointer `fn(&E, F) -> F`
+              found fn pointer `fn(&E, G) -> G`
    = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
 
diff --git a/src/test/ui/const-generics/const-argument-cross-crate-mismatch.stderr b/src/test/ui/const-generics/const-argument-cross-crate-mismatch.stderr
index 7090cb880fd..aefd514f7a6 100644
--- a/src/test/ui/const-generics/const-argument-cross-crate-mismatch.stderr
+++ b/src/test/ui/const-generics/const-argument-cross-crate-mismatch.stderr
@@ -3,18 +3,12 @@ error[E0308]: mismatched types
    |
 LL |     let _ = const_generic_lib::function(const_generic_lib::Struct([0u8, 1u8]));
    |                                                                   ^^^^^^^^^^ expected an array with a fixed size of 3 elements, found one with 2 elements
-   |
-   = note: expected type `[u8; 3]`
-              found type `[u8; 2]`
 
 error[E0308]: mismatched types
   --> $DIR/const-argument-cross-crate-mismatch.rs:8:65
    |
 LL |     let _: const_generic_lib::Alias = const_generic_lib::Struct([0u8, 1u8, 2u8]);
    |                                                                 ^^^^^^^^^^^^^^^ expected an array with a fixed size of 2 elements, found one with 3 elements
-   |
-   = note: expected type `[u8; 2]`
-              found type `[u8; 3]`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/const-generics/fn-const-param-infer.stderr b/src/test/ui/const-generics/fn-const-param-infer.stderr
index e36bb824151..8f61e35e492 100644
--- a/src/test/ui/const-generics/fn-const-param-infer.stderr
+++ b/src/test/ui/const-generics/fn-const-param-infer.stderr
@@ -12,17 +12,17 @@ error[E0308]: mismatched types
 LL |     let _: Checked<not_one> = Checked::<not_two>;
    |                               ^^^^^^^^^^^^^^^^^^ expected `not_one`, found `not_two`
    |
-   = note: expected type `Checked<not_one>`
-              found type `Checked<not_two>`
+   = note: expected struct `Checked<not_one>`
+              found struct `Checked<not_two>`
 
 error[E0308]: mismatched types
   --> $DIR/fn-const-param-infer.rs:20:24
    |
 LL |     let _ = Checked::<{generic_arg::<u32>}>;
-   |                        ^^^^^^^^^^^^^^^^^^ expected usize, found u32
+   |                        ^^^^^^^^^^^^^^^^^^ expected `usize`, found `u32`
    |
-   = note: expected type `fn(usize) -> bool`
-              found type `fn(u32) -> bool {generic_arg::<u32>}`
+   = note: expected fn pointer `fn(usize) -> bool`
+                 found fn item `fn(u32) -> bool {generic_arg::<u32>}`
 
 error[E0282]: type annotations needed
   --> $DIR/fn-const-param-infer.rs:22:23
@@ -36,8 +36,8 @@ error[E0308]: mismatched types
 LL |     let _: Checked<{generic::<u32>}> = Checked::<{generic::<u16>}>;
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `generic::<u32>`, found `generic::<u16>`
    |
-   = note: expected type `Checked<generic::<u32>>`
-              found type `Checked<generic::<u16>>`
+   = note: expected struct `Checked<generic::<u32>>`
+              found struct `Checked<generic::<u16>>`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/const-generics/raw-ptr-const-param.stderr b/src/test/ui/const-generics/raw-ptr-const-param.stderr
index 75b4c0a0a3d..ff5c59fa375 100644
--- a/src/test/ui/const-generics/raw-ptr-const-param.stderr
+++ b/src/test/ui/const-generics/raw-ptr-const-param.stderr
@@ -12,8 +12,8 @@ error[E0308]: mismatched types
 LL |     let _: Const<{15 as *const _}> = Const::<{10 as *const _}>;
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{pointer}`, found `{pointer}`
    |
-   = note: expected type `Const<{pointer}>`
-              found type `Const<{pointer}>`
+   = note: expected struct `Const<{pointer}>`
+              found struct `Const<{pointer}>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/const-generics/slice-const-param-mismatch.stderr b/src/test/ui/const-generics/slice-const-param-mismatch.stderr
index 380a70d664e..9d11da13315 100644
--- a/src/test/ui/const-generics/slice-const-param-mismatch.stderr
+++ b/src/test/ui/const-generics/slice-const-param-mismatch.stderr
@@ -12,8 +12,8 @@ error[E0308]: mismatched types
 LL |     let _: ConstString<"Hello"> = ConstString::<"World">;
    |                                   ^^^^^^^^^^^^^^^^^^^^^^ expected `"Hello"`, found `"World"`
    |
-   = note: expected type `ConstString<"Hello">`
-              found type `ConstString<"World">`
+   = note: expected struct `ConstString<"Hello">`
+              found struct `ConstString<"World">`
 
 error[E0308]: mismatched types
   --> $DIR/slice-const-param-mismatch.rs:11:33
@@ -21,8 +21,8 @@ error[E0308]: mismatched types
 LL |     let _: ConstString<"ℇ㇈↦"> = ConstString::<"ℇ㇈↥">;
    |                                  ^^^^^^^^^^^^^^^^^^^^^ expected `"ℇ㇈↦"`, found `"ℇ㇈↥"`
    |
-   = note: expected type `ConstString<"ℇ㇈↦">`
-              found type `ConstString<"ℇ㇈↥">`
+   = note: expected struct `ConstString<"ℇ㇈↦">`
+              found struct `ConstString<"ℇ㇈↥">`
 
 error[E0308]: mismatched types
   --> $DIR/slice-const-param-mismatch.rs:13:33
@@ -30,8 +30,8 @@ error[E0308]: mismatched types
 LL |     let _: ConstBytes<b"AAA"> = ConstBytes::<b"BBB">;
    |                                 ^^^^^^^^^^^^^^^^^^^^ expected `b"AAA"`, found `b"BBB"`
    |
-   = note: expected type `ConstBytes<b"AAA">`
-              found type `ConstBytes<b"BBB">`
+   = note: expected struct `ConstBytes<b"AAA">`
+              found struct `ConstBytes<b"BBB">`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/const-generics/types-mismatch-const-args.stderr b/src/test/ui/const-generics/types-mismatch-const-args.stderr
index 805a3067d3b..0ce98f1455c 100644
--- a/src/test/ui/const-generics/types-mismatch-const-args.stderr
+++ b/src/test/ui/const-generics/types-mismatch-const-args.stderr
@@ -12,17 +12,17 @@ error[E0308]: mismatched types
 LL |     let _: A<'a, u32, {2u32}, {3u32}> = A::<'a, u32, {4u32}, {3u32}> { data: PhantomData };
    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `2u32`, found `4u32`
    |
-   = note: expected type `A<'_, _, 2u32, _>`
-              found type `A<'_, _, 4u32, _>`
+   = note: expected struct `A<'_, _, 2u32, _>`
+              found struct `A<'_, _, 4u32, _>`
 
 error[E0308]: mismatched types
   --> $DIR/types-mismatch-const-args.rs:15:41
    |
 LL |     let _: A<'a, u16, {2u32}, {3u32}> = A::<'b, u32, {2u32}, {3u32}> { data: PhantomData };
-   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u16, found u32
+   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u16`, found `u32`
    |
-   = note: expected type `A<'a, u16, _, _>`
-              found type `A<'b, u32, _, _>`
+   = note: expected struct `A<'a, u16, _, _>`
+              found struct `A<'b, u32, _, _>`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/consts/const-array-oob-arith.stderr b/src/test/ui/consts/const-array-oob-arith.stderr
index 987e7ddf4d9..eae93b72ddc 100644
--- a/src/test/ui/consts/const-array-oob-arith.stderr
+++ b/src/test/ui/consts/const-array-oob-arith.stderr
@@ -3,18 +3,12 @@ error[E0308]: mismatched types
    |
 LL | const BLUB: [i32; (ARR[0] - 40) as usize] = [5];
    |                                             ^^^ expected an array with a fixed size of 2 elements, found one with 1 element
-   |
-   = note: expected type `[i32; 2]`
-              found type `[i32; 1]`
 
 error[E0308]: mismatched types
   --> $DIR/const-array-oob-arith.rs:10:44
    |
 LL | const BOO: [i32; (ARR[0] - 41) as usize] = [5, 99];
    |                                            ^^^^^^^ expected an array with a fixed size of 1 element, found one with 2 elements
-   |
-   = note: expected type `[i32; 1]`
-              found type `[i32; 2]`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/consts/const-cast-wrong-type.stderr b/src/test/ui/consts/const-cast-wrong-type.stderr
index ad816d9297b..282f5ccde77 100644
--- a/src/test/ui/consts/const-cast-wrong-type.stderr
+++ b/src/test/ui/consts/const-cast-wrong-type.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/const-cast-wrong-type.rs:2:23
    |
 LL | static b: *const i8 = &a as *const i8;
-   |                       ^^^^^^^^^^^^^^^ expected u8, found i8
+   |                       ^^^^^^^^^^^^^^^ expected `u8`, found `i8`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr b/src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr
index f6b6b5882ba..3da34fe9af7 100644
--- a/src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr
+++ b/src/test/ui/consts/const-eval/const-eval-overflow-3b.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/const-eval-overflow-3b.rs:18:22
    |
 LL |     = [0; (i8::MAX + 1u8) as usize];
-   |                      ^^^ expected i8, found u8
+   |                      ^^^ expected `i8`, found `u8`
 
 error[E0277]: cannot add `u8` to `i8`
   --> $DIR/const-eval-overflow-3b.rs:18:20
diff --git a/src/test/ui/consts/const-eval/const-eval-overflow-4b.rs b/src/test/ui/consts/const-eval/const-eval-overflow-4b.rs
index 75c396f2351..2a4585faf14 100644
--- a/src/test/ui/consts/const-eval/const-eval-overflow-4b.rs
+++ b/src/test/ui/consts/const-eval/const-eval-overflow-4b.rs
@@ -11,7 +11,7 @@ use std::{u8, u16, u32, u64, usize};
 const A_I8_T
     : [u32; (i8::MAX as i8 + 1u8) as usize]
     //~^ ERROR mismatched types
-    //~| expected i8, found u8
+    //~| expected `i8`, found `u8`
     //~| ERROR cannot add `u8` to `i8`
     = [0; (i8::MAX as usize) + 1];
 
diff --git a/src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr b/src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr
index 3735b2fd5ff..5b2c4116c4b 100644
--- a/src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr
+++ b/src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/const-eval-overflow-4b.rs:12:30
    |
 LL |     : [u32; (i8::MAX as i8 + 1u8) as usize]
-   |                              ^^^ expected i8, found u8
+   |                              ^^^ expected `i8`, found `u8`
 
 error[E0277]: cannot add `u8` to `i8`
   --> $DIR/const-eval-overflow-4b.rs:12:28
diff --git a/src/test/ui/consts/const-eval/const-eval-span.rs b/src/test/ui/consts/const-eval/const-eval-span.rs
index 59f4b138249..82f101b47cf 100644
--- a/src/test/ui/consts/const-eval/const-eval-span.rs
+++ b/src/test/ui/consts/const-eval/const-eval-span.rs
@@ -8,8 +8,7 @@ const CONSTANT: S = S(0);
 enum E {
     V = CONSTANT,
     //~^ ERROR mismatched types
-    //~| expected isize, found struct `S`
-    //~|         found type `S`
+    //~| expected `isize`, found struct `S`
 }
 
 fn main() {}
diff --git a/src/test/ui/consts/const-eval/const-eval-span.stderr b/src/test/ui/consts/const-eval/const-eval-span.stderr
index 8ff9bfe54c7..c5b001899ff 100644
--- a/src/test/ui/consts/const-eval/const-eval-span.stderr
+++ b/src/test/ui/consts/const-eval/const-eval-span.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/const-eval-span.rs:9:9
    |
 LL |     V = CONSTANT,
-   |         ^^^^^^^^ expected isize, found struct `S`
-   |
-   = note: expected type `isize`
-              found type `S`
+   |         ^^^^^^^^ expected `isize`, found struct `S`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/consts/const-integer-bool-ops.rs b/src/test/ui/consts/const-integer-bool-ops.rs
index f0d5a558e35..6924956bdf7 100644
--- a/src/test/ui/consts/const-integer-bool-ops.rs
+++ b/src/test/ui/consts/const-integer-bool-ops.rs
@@ -1,76 +1,76 @@
 const X: usize = 42 && 39;
 //~^ ERROR mismatched types
-//~| expected bool, found integer
+//~| expected `bool`, found integer
 //~| ERROR mismatched types
-//~| expected bool, found integer
+//~| expected `bool`, found integer
 //~| ERROR mismatched types
-//~| expected usize, found bool
+//~| expected `usize`, found `bool`
 const ARR: [i32; X] = [99; 34];
 //~^ ERROR evaluation of constant value failed
 
 const X1: usize = 42 || 39;
 //~^ ERROR mismatched types
-//~| expected bool, found integer
+//~| expected `bool`, found integer
 //~| ERROR mismatched types
-//~| expected bool, found integer
+//~| expected `bool`, found integer
 //~| ERROR mismatched types
-//~| expected usize, found bool
+//~| expected `usize`, found `bool`
 const ARR1: [i32; X1] = [99; 47];
 //~^ ERROR evaluation of constant value failed
 
 const X2: usize = -42 || -39;
 //~^ ERROR mismatched types
-//~| expected bool, found integer
+//~| expected `bool`, found integer
 //~| ERROR mismatched types
-//~| expected bool, found integer
+//~| expected `bool`, found integer
 //~| ERROR mismatched types
-//~| expected usize, found bool
+//~| expected `usize`, found `bool`
 const ARR2: [i32; X2] = [99; 18446744073709551607];
 //~^ ERROR evaluation of constant value failed
 
 const X3: usize = -42 && -39;
 //~^ ERROR mismatched types
-//~| expected bool, found integer
+//~| expected `bool`, found integer
 //~| ERROR mismatched types
-//~| expected bool, found integer
+//~| expected `bool`, found integer
 //~| ERROR mismatched types
-//~| expected usize, found bool
+//~| expected `usize`, found `bool`
 const ARR3: [i32; X3] = [99; 6];
 //~^ ERROR evaluation of constant value failed
 
 const Y: usize = 42.0 == 42.0;
 //~^ ERROR mismatched types
-//~| expected usize, found bool
+//~| expected `usize`, found `bool`
 const ARRR: [i32; Y] = [99; 1];
 //~^ ERROR evaluation of constant value failed
 
 const Y1: usize = 42.0 >= 42.0;
 //~^ ERROR mismatched types
-//~| expected usize, found bool
+//~| expected `usize`, found `bool`
 const ARRR1: [i32; Y1] = [99; 1];
 //~^ ERROR evaluation of constant value failed
 
 const Y2: usize = 42.0 <= 42.0;
 //~^ ERROR mismatched types
-//~| expected usize, found bool
+//~| expected `usize`, found `bool`
 const ARRR2: [i32; Y2] = [99; 1];
 //~^ ERROR evaluation of constant value failed
 
 const Y3: usize = 42.0 > 42.0;
 //~^ ERROR mismatched types
-//~| expected usize, found bool
+//~| expected `usize`, found `bool`
 const ARRR3: [i32; Y3] = [99; 0];
 //~^ ERROR evaluation of constant value failed
 
 const Y4: usize = 42.0 < 42.0;
 //~^ ERROR mismatched types
-//~| expected usize, found bool
+//~| expected `usize`, found `bool`
 const ARRR4: [i32; Y4] = [99; 0];
 //~^ ERROR evaluation of constant value failed
 
 const Y5: usize = 42.0 != 42.0;
 //~^ ERROR mismatched types
-//~| expected usize, found bool
+//~| expected `usize`, found `bool`
 const ARRR5: [i32; Y5] = [99; 0];
 //~^ ERROR evaluation of constant value failed
 
diff --git a/src/test/ui/consts/const-integer-bool-ops.stderr b/src/test/ui/consts/const-integer-bool-ops.stderr
index 7fd973786d1..9001fefd102 100644
--- a/src/test/ui/consts/const-integer-bool-ops.stderr
+++ b/src/test/ui/consts/const-integer-bool-ops.stderr
@@ -2,25 +2,19 @@ error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:1:18
    |
 LL | const X: usize = 42 && 39;
-   |                  ^^ expected bool, found integer
-   |
-   = note: expected type `bool`
-              found type `{integer}`
+   |                  ^^ expected `bool`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:1:24
    |
 LL | const X: usize = 42 && 39;
-   |                        ^^ expected bool, found integer
-   |
-   = note: expected type `bool`
-              found type `{integer}`
+   |                        ^^ expected `bool`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:1:18
    |
 LL | const X: usize = 42 && 39;
-   |                  ^^^^^^^^ expected usize, found bool
+   |                  ^^^^^^^^ expected `usize`, found `bool`
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/const-integer-bool-ops.rs:8:18
@@ -32,25 +26,19 @@ error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:11:19
    |
 LL | const X1: usize = 42 || 39;
-   |                   ^^ expected bool, found integer
-   |
-   = note: expected type `bool`
-              found type `{integer}`
+   |                   ^^ expected `bool`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:11:25
    |
 LL | const X1: usize = 42 || 39;
-   |                         ^^ expected bool, found integer
-   |
-   = note: expected type `bool`
-              found type `{integer}`
+   |                         ^^ expected `bool`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:11:19
    |
 LL | const X1: usize = 42 || 39;
-   |                   ^^^^^^^^ expected usize, found bool
+   |                   ^^^^^^^^ expected `usize`, found `bool`
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/const-integer-bool-ops.rs:18:19
@@ -62,25 +50,19 @@ error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:21:19
    |
 LL | const X2: usize = -42 || -39;
-   |                   ^^^ expected bool, found integer
-   |
-   = note: expected type `bool`
-              found type `{integer}`
+   |                   ^^^ expected `bool`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:21:26
    |
 LL | const X2: usize = -42 || -39;
-   |                          ^^^ expected bool, found integer
-   |
-   = note: expected type `bool`
-              found type `{integer}`
+   |                          ^^^ expected `bool`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:21:19
    |
 LL | const X2: usize = -42 || -39;
-   |                   ^^^^^^^^^^ expected usize, found bool
+   |                   ^^^^^^^^^^ expected `usize`, found `bool`
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/const-integer-bool-ops.rs:28:19
@@ -92,25 +74,19 @@ error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:31:19
    |
 LL | const X3: usize = -42 && -39;
-   |                   ^^^ expected bool, found integer
-   |
-   = note: expected type `bool`
-              found type `{integer}`
+   |                   ^^^ expected `bool`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:31:26
    |
 LL | const X3: usize = -42 && -39;
-   |                          ^^^ expected bool, found integer
-   |
-   = note: expected type `bool`
-              found type `{integer}`
+   |                          ^^^ expected `bool`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:31:19
    |
 LL | const X3: usize = -42 && -39;
-   |                   ^^^^^^^^^^ expected usize, found bool
+   |                   ^^^^^^^^^^ expected `usize`, found `bool`
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/const-integer-bool-ops.rs:38:19
@@ -122,7 +98,7 @@ error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:41:18
    |
 LL | const Y: usize = 42.0 == 42.0;
-   |                  ^^^^^^^^^^^^ expected usize, found bool
+   |                  ^^^^^^^^^^^^ expected `usize`, found `bool`
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/const-integer-bool-ops.rs:44:19
@@ -134,7 +110,7 @@ error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:47:19
    |
 LL | const Y1: usize = 42.0 >= 42.0;
-   |                   ^^^^^^^^^^^^ expected usize, found bool
+   |                   ^^^^^^^^^^^^ expected `usize`, found `bool`
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/const-integer-bool-ops.rs:50:20
@@ -146,7 +122,7 @@ error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:53:19
    |
 LL | const Y2: usize = 42.0 <= 42.0;
-   |                   ^^^^^^^^^^^^ expected usize, found bool
+   |                   ^^^^^^^^^^^^ expected `usize`, found `bool`
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/const-integer-bool-ops.rs:56:20
@@ -158,7 +134,7 @@ error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:59:19
    |
 LL | const Y3: usize = 42.0 > 42.0;
-   |                   ^^^^^^^^^^^ expected usize, found bool
+   |                   ^^^^^^^^^^^ expected `usize`, found `bool`
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/const-integer-bool-ops.rs:62:20
@@ -170,7 +146,7 @@ error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:65:19
    |
 LL | const Y4: usize = 42.0 < 42.0;
-   |                   ^^^^^^^^^^^ expected usize, found bool
+   |                   ^^^^^^^^^^^ expected `usize`, found `bool`
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/const-integer-bool-ops.rs:68:20
@@ -182,7 +158,7 @@ error[E0308]: mismatched types
   --> $DIR/const-integer-bool-ops.rs:71:19
    |
 LL | const Y5: usize = 42.0 != 42.0;
-   |                   ^^^^^^^^^^^^ expected usize, found bool
+   |                   ^^^^^^^^^^^^ expected `usize`, found `bool`
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/const-integer-bool-ops.rs:74:20
diff --git a/src/test/ui/consts/const-tup-index-span.rs b/src/test/ui/consts/const-tup-index-span.rs
index 047ed0204b1..763263c6aeb 100644
--- a/src/test/ui/consts/const-tup-index-span.rs
+++ b/src/test/ui/consts/const-tup-index-span.rs
@@ -2,7 +2,7 @@
 
 const TUP: (usize,) = 5usize << 64;
 //~^ ERROR mismatched types
-//~| expected tuple, found usize
+//~| expected tuple, found `usize`
 const ARR: [i32; TUP.0] = [];
 //~^ ERROR evaluation of constant value failed
 
diff --git a/src/test/ui/consts/const-tup-index-span.stderr b/src/test/ui/consts/const-tup-index-span.stderr
index 2c4e2730045..8e4a092e40f 100644
--- a/src/test/ui/consts/const-tup-index-span.stderr
+++ b/src/test/ui/consts/const-tup-index-span.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/const-tup-index-span.rs:3:23
    |
 LL | const TUP: (usize,) = 5usize << 64;
-   |                       ^^^^^^^^^^^^ expected tuple, found usize
+   |                       ^^^^^^^^^^^^ expected tuple, found `usize`
    |
-   = note: expected type `(usize,)`
-              found type `usize`
+   = note: expected tuple `(usize,)`
+               found type `usize`
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/const-tup-index-span.rs:6:18
diff --git a/src/test/ui/consts/const-type-mismatch.stderr b/src/test/ui/consts/const-type-mismatch.stderr
index dbc533c6c60..17bb27d4b72 100644
--- a/src/test/ui/consts/const-type-mismatch.stderr
+++ b/src/test/ui/consts/const-type-mismatch.stderr
@@ -2,13 +2,13 @@ error[E0308]: mismatched types
   --> $DIR/const-type-mismatch.rs:4:21
    |
 LL | const TWELVE: u16 = TEN + 2;
-   |                     ^^^^^^^ expected u16, found u8
+   |                     ^^^^^^^ expected `u16`, found `u8`
 
 error[E0308]: mismatched types
   --> $DIR/const-type-mismatch.rs:9:27
    |
 LL |     const ALSO_TEN: u16 = TEN;
-   |                           ^^^ expected u16, found u8
+   |                           ^^^ expected `u16`, found `u8`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/consts/enum-discr-type-err.stderr b/src/test/ui/consts/enum-discr-type-err.stderr
index a2545c8b6f2..848ccf94da2 100644
--- a/src/test/ui/consts/enum-discr-type-err.stderr
+++ b/src/test/ui/consts/enum-discr-type-err.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/enum-discr-type-err.rs:18:21
    |
 LL |               $( $v = $s::V, )*
-   |                       ^^^^^ expected isize, found i32
+   |                       ^^^^^ expected `isize`, found `i32`
 ...
 LL | / mac! {
 LL | |     A = F,
diff --git a/src/test/ui/conversion-methods.stderr b/src/test/ui/conversion-methods.stderr
index 5c666afb89a..1aca37a6fb8 100644
--- a/src/test/ui/conversion-methods.stderr
+++ b/src/test/ui/conversion-methods.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |     let _tis_an_instants_play: String = "'Tis a fond Ambush—";
    |                                         ^^^^^^^^^^^^^^^^^^^^^
    |                                         |
-   |                                         expected struct `std::string::String`, found reference
+   |                                         expected struct `std::string::String`, found `&str`
    |                                         help: try using a conversion method: `"'Tis a fond Ambush—".to_string()`
-   |
-   = note: expected type `std::string::String`
-              found type `&'static str`
 
 error[E0308]: mismatched types
   --> $DIR/conversion-methods.rs:6:40
@@ -16,11 +13,8 @@ error[E0308]: mismatched types
 LL |     let _just_to_make_bliss: PathBuf = Path::new("/ern/her/own/surprise");
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |                                        |
-   |                                        expected struct `std::path::PathBuf`, found reference
+   |                                        expected struct `std::path::PathBuf`, found `&std::path::Path`
    |                                        help: try using a conversion method: `Path::new("/ern/her/own/surprise").to_path_buf()`
-   |
-   = note: expected type `std::path::PathBuf`
-              found type `&std::path::Path`
 
 error[E0308]: mismatched types
   --> $DIR/conversion-methods.rs:9:40
@@ -30,9 +24,6 @@ LL |     let _but_should_the_play: String = 2; // Perhaps surprisingly, we sugge
    |                                        |
    |                                        expected struct `std::string::String`, found integer
    |                                        help: try using a conversion method: `2.to_string()`
-   |
-   = note: expected type `std::string::String`
-              found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/conversion-methods.rs:12:47
@@ -40,11 +31,11 @@ error[E0308]: mismatched types
 LL |     let _prove_piercing_earnest: Vec<usize> = &[1, 2, 3];
    |                                               ^^^^^^^^^^
    |                                               |
-   |                                               expected struct `std::vec::Vec`, found reference
+   |                                               expected struct `std::vec::Vec`, found `&[{integer}; 3]`
    |                                               help: try using a conversion method: `(&[1, 2, 3]).to_vec()`
    |
-   = note: expected type `std::vec::Vec<usize>`
-              found type `&[{integer}; 3]`
+   = note: expected struct `std::vec::Vec<usize>`
+           found reference `&[{integer}; 3]`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/cross/cross-borrow-trait.rs b/src/test/ui/cross/cross-borrow-trait.rs
index 274cdad75ec..ce42b696ddf 100644
--- a/src/test/ui/cross/cross-borrow-trait.rs
+++ b/src/test/ui/cross/cross-borrow-trait.rs
@@ -8,6 +8,6 @@ impl Trait for Foo {}
 pub fn main() {
     let x: Box<dyn Trait> = Box::new(Foo);
     let _y: &dyn Trait = x; //~ ERROR E0308
-                            //~| expected type `&dyn Trait`
-                            //~| found type `std::boxed::Box<dyn Trait>`
+                            //~| expected reference `&dyn Trait`
+                            //~| found struct `std::boxed::Box<dyn Trait>`
 }
diff --git a/src/test/ui/cross/cross-borrow-trait.stderr b/src/test/ui/cross/cross-borrow-trait.stderr
index ada1c0204eb..9bffa6bd111 100644
--- a/src/test/ui/cross/cross-borrow-trait.stderr
+++ b/src/test/ui/cross/cross-borrow-trait.stderr
@@ -4,11 +4,11 @@ error[E0308]: mismatched types
 LL |     let _y: &dyn Trait = x;
    |                          ^
    |                          |
-   |                          expected &dyn Trait, found struct `std::boxed::Box`
+   |                          expected `&dyn Trait`, found struct `std::boxed::Box`
    |                          help: consider borrowing here: `&x`
    |
-   = note: expected type `&dyn Trait`
-              found type `std::boxed::Box<dyn Trait>`
+   = note: expected reference `&dyn Trait`
+                 found struct `std::boxed::Box<dyn Trait>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/deref-suggestion.stderr b/src/test/ui/deref-suggestion.stderr
index 9c49f541c93..226f6fb620f 100644
--- a/src/test/ui/deref-suggestion.stderr
+++ b/src/test/ui/deref-suggestion.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |     foo(s);
    |         ^
    |         |
-   |         expected struct `std::string::String`, found reference
+   |         expected struct `std::string::String`, found `&std::string::String`
    |         help: try using a conversion method: `s.to_string()`
-   |
-   = note: expected type `std::string::String`
-              found type `&std::string::String`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:14:10
@@ -16,11 +13,8 @@ error[E0308]: mismatched types
 LL |     foo3(u);
    |          ^
    |          |
-   |          expected u32, found &u32
+   |          expected `u32`, found `&u32`
    |          help: consider dereferencing the borrow: `*u`
-   |
-   = note: expected type `u32`
-              found type `&u32`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:30:9
@@ -28,11 +22,8 @@ error[E0308]: mismatched types
 LL |     foo(&"aaa".to_owned());
    |         ^^^^^^^^^^^^^^^^^
    |         |
-   |         expected struct `std::string::String`, found reference
+   |         expected struct `std::string::String`, found `&std::string::String`
    |         help: consider removing the borrow: `"aaa".to_owned()`
-   |
-   = note: expected type `std::string::String`
-              found type `&std::string::String`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:32:9
@@ -40,32 +31,24 @@ error[E0308]: mismatched types
 LL |     foo(&mut "aaa".to_owned());
    |         ^^^^^^^^^^^^^^^^^^^^^
    |         |
-   |         expected struct `std::string::String`, found mutable reference
+   |         expected struct `std::string::String`, found `&mut std::string::String`
    |         help: consider removing the borrow: `"aaa".to_owned()`
-   |
-   = note: expected type `std::string::String`
-              found type `&mut std::string::String`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:2:20
    |
 LL |     ($x:expr) => { &$x }
-   |                    ^^^ expected u32, found &{integer}
+   |                    ^^^ expected `u32`, found `&{integer}`
 ...
 LL |     foo3(borrow!(0));
    |          ---------- in this macro invocation
-   |
-   = note: expected type `u32`
-              found type `&{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:36:5
    |
 LL |     assert_eq!(3i32, &3i32);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found &i32
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `&i32`
    |
-   = note: expected type `i32`
-              found type `&i32`
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error[E0308]: mismatched types
@@ -74,11 +57,8 @@ error[E0308]: mismatched types
 LL |     let s = S { u };
    |                 ^
    |                 |
-   |                 expected &u32, found integer
+   |                 expected `&u32`, found integer
    |                 help: consider borrowing here: `u: &u`
-   |
-   = note: expected type `&u32`
-              found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:41:20
@@ -86,11 +66,8 @@ error[E0308]: mismatched types
 LL |     let s = S { u: u };
    |                    ^
    |                    |
-   |                    expected &u32, found integer
+   |                    expected `&u32`, found integer
    |                    help: consider borrowing here: `&u`
-   |
-   = note: expected type `&u32`
-              found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:44:17
@@ -98,11 +75,8 @@ error[E0308]: mismatched types
 LL |     let r = R { i };
    |                 ^
    |                 |
-   |                 expected u32, found &{integer}
+   |                 expected `u32`, found `&{integer}`
    |                 help: consider dereferencing the borrow: `i: *i`
-   |
-   = note: expected type `u32`
-              found type `&{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:46:20
@@ -110,11 +84,8 @@ error[E0308]: mismatched types
 LL |     let r = R { i: i };
    |                    ^
    |                    |
-   |                    expected u32, found &{integer}
+   |                    expected `u32`, found `&{integer}`
    |                    help: consider dereferencing the borrow: `*i`
-   |
-   = note: expected type `u32`
-              found type `&{integer}`
 
 error: aborting due to 10 previous errors
 
diff --git a/src/test/ui/destructure-trait-ref.rs b/src/test/ui/destructure-trait-ref.rs
index 71cf37ca849..fb92196b2bd 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 type `dyn T`
-    //~| found type `&_`
-    //~| expected trait T, found reference
+    //~| expected trait object `dyn T`
+    //~| found reference `&_`
+    //~| expected trait `T`, found reference
     let &&&x = &(&1isize as &dyn T);
     //~^ ERROR mismatched types
-    //~| expected type `dyn T`
-    //~| found type `&_`
-    //~| expected trait T, found reference
+    //~| 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 type `dyn T`
-    //~| found type `std::boxed::Box<_>`
+    //~| 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 d3ad21eb24f..f77291969d2 100644
--- a/src/test/ui/destructure-trait-ref.stderr
+++ b/src/test/ui/destructure-trait-ref.stderr
@@ -22,11 +22,11 @@ error[E0308]: mismatched types
 LL |     let &&x = &1isize as &dyn T;
    |          ^^
    |          |
-   |          expected trait T, found reference
+   |          expected trait `T`, found reference
    |          help: you can probably remove the explicit borrow: `x`
    |
-   = note: expected type `dyn T`
-              found type `&_`
+   = note: expected trait object `dyn T`
+                 found reference `&_`
 
 error[E0308]: mismatched types
   --> $DIR/destructure-trait-ref.rs:37:11
@@ -34,20 +34,20 @@ error[E0308]: mismatched types
 LL |     let &&&x = &(&1isize as &dyn T);
    |           ^^
    |           |
-   |           expected trait T, found reference
+   |           expected trait `T`, found reference
    |           help: you can probably remove the explicit borrow: `x`
    |
-   = note: expected type `dyn T`
-              found type `&_`
+   = note: expected trait object `dyn T`
+                 found reference `&_`
 
 error[E0308]: mismatched types
   --> $DIR/destructure-trait-ref.rs:42:13
    |
 LL |     let box box x = box 1isize as Box<dyn T>;
-   |             ^^^^^ expected trait T, found struct `std::boxed::Box`
+   |             ^^^^^ expected trait `T`, found struct `std::boxed::Box`
    |
-   = note: expected type `dyn T`
-              found type `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/did_you_mean/issue-42764.stderr b/src/test/ui/did_you_mean/issue-42764.stderr
index 0b3e44446ae..16b80a6f412 100644
--- a/src/test/ui/did_you_mean/issue-42764.stderr
+++ b/src/test/ui/did_you_mean/issue-42764.stderr
@@ -2,9 +2,9 @@ error[E0308]: mismatched types
   --> $DIR/issue-42764.rs:11:43
    |
 LL |     this_function_expects_a_double_option(n);
-   |                                           ^ expected enum `DoubleOption`, found usize
+   |                                           ^ expected enum `DoubleOption`, found `usize`
    |
-   = note: expected type `DoubleOption<_>`
+   = note: expected enum `DoubleOption<_>`
               found type `usize`
 help: try using a variant of the expected enum
    |
@@ -18,9 +18,6 @@ error[E0308]: mismatched types
    |
 LL |     let _c = Context { wrapper: Payload{} };
    |                                 ^^^^^^^^^ expected struct `Wrapper`, found struct `Payload`
-   |
-   = note: expected type `Wrapper`
-              found type `Payload`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/did_you_mean/issue-53280-expected-float-found-integer-literal.stderr b/src/test/ui/did_you_mean/issue-53280-expected-float-found-integer-literal.stderr
index 301704ec0c7..e2c3c08a8d9 100644
--- a/src/test/ui/did_you_mean/issue-53280-expected-float-found-integer-literal.stderr
+++ b/src/test/ui/did_you_mean/issue-53280-expected-float-found-integer-literal.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |     let sixteen: f32 = 16;
    |                        ^^
    |                        |
-   |                        expected f32, found integer
+   |                        expected `f32`, found integer
    |                        help: use a float literal: `16.0`
-   |
-   = note: expected type `f32`
-              found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/issue-53280-expected-float-found-integer-literal.rs:5:38
@@ -16,11 +13,8 @@ error[E0308]: mismatched types
 LL |     let a_million_and_seventy: f64 = 1_000_070;
    |                                      ^^^^^^^^^
    |                                      |
-   |                                      expected f64, found integer
+   |                                      expected `f64`, found integer
    |                                      help: use a float literal: `1_000_070.0`
-   |
-   = note: expected type `f64`
-              found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/issue-53280-expected-float-found-integer-literal.rs:8:30
@@ -28,29 +22,20 @@ error[E0308]: mismatched types
 LL |     let negative_nine: f32 = -9;
    |                              ^^
    |                              |
-   |                              expected f32, found integer
+   |                              expected `f32`, found integer
    |                              help: use a float literal: `-9.0`
-   |
-   = note: expected type `f32`
-              found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/issue-53280-expected-float-found-integer-literal.rs:15:30
    |
 LL |     let sixteen_again: f64 = 0x10;
-   |                              ^^^^ expected f64, found integer
-   |
-   = note: expected type `f64`
-              found type `{integer}`
+   |                              ^^^^ expected `f64`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/issue-53280-expected-float-found-integer-literal.rs:17:30
    |
 LL |     let and_once_more: f32 = 0o20;
-   |                              ^^^^ expected f32, found integer
-   |
-   = note: expected type `f32`
-              found type `{integer}`
+   |                              ^^^^ expected `f32`, found integer
 
 error: aborting due to 5 previous errors
 
diff --git a/src/test/ui/did_you_mean/recursion_limit_deref.stderr b/src/test/ui/did_you_mean/recursion_limit_deref.stderr
index c76efb1d009..233474e5fe6 100644
--- a/src/test/ui/did_you_mean/recursion_limit_deref.stderr
+++ b/src/test/ui/did_you_mean/recursion_limit_deref.stderr
@@ -12,8 +12,8 @@ error[E0308]: mismatched types
 LL |     let x: &Bottom = &t;
    |                      ^^ expected struct `Bottom`, found struct `Top`
    |
-   = note: expected type `&Bottom`
-              found type `&Top`
+   = note: expected reference `&Bottom`
+              found reference `&Top`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/discrim/discrim-ill-typed.rs b/src/test/ui/discrim/discrim-ill-typed.rs
index 3844d21094e..98c90f0ea68 100644
--- a/src/test/ui/discrim/discrim-ill-typed.rs
+++ b/src/test/ui/discrim/discrim-ill-typed.rs
@@ -16,7 +16,7 @@ fn f_i8() {
         Ok2,
         OhNo = 0_u8,
         //~^ ERROR mismatched types
-        //~| expected i8, found u8
+        //~| expected `i8`, found `u8`
     }
 
     let x = A::Ok;
@@ -29,7 +29,7 @@ fn f_u8() {
         Ok2,
         OhNo = 0_i8,
         //~^ ERROR mismatched types
-        //~| expected u8, found i8
+        //~| expected `u8`, found `i8`
     }
 
     let x = A::Ok;
@@ -42,7 +42,7 @@ fn f_i16() {
         Ok2,
         OhNo = 0_u16,
         //~^ ERROR mismatched types
-        //~| expected i16, found u16
+        //~| expected `i16`, found `u16`
     }
 
     let x = A::Ok;
@@ -55,7 +55,7 @@ fn f_u16() {
         Ok2,
         OhNo = 0_i16,
         //~^ ERROR mismatched types
-        //~| expected u16, found i16
+        //~| expected `u16`, found `i16`
     }
 
     let x = A::Ok;
@@ -68,7 +68,7 @@ fn f_i32() {
         Ok2,
         OhNo = 0_u32,
         //~^ ERROR mismatched types
-        //~| expected i32, found u32
+        //~| expected `i32`, found `u32`
     }
 
     let x = A::Ok;
@@ -81,7 +81,7 @@ fn f_u32() {
         Ok2,
         OhNo = 0_i32,
         //~^ ERROR mismatched types
-        //~| expected u32, found i32
+        //~| expected `u32`, found `i32`
     }
 
     let x = A::Ok;
@@ -94,7 +94,7 @@ fn f_i64() {
         Ok2,
         OhNo = 0_u64,
         //~^ ERROR mismatched types
-        //~| expected i64, found u64
+        //~| expected `i64`, found `u64`
     }
 
     let x = A::Ok;
@@ -107,7 +107,7 @@ fn f_u64() {
         Ok2,
         OhNo = 0_i64,
         //~^ ERROR mismatched types
-        //~| expected u64, found i64
+        //~| expected `u64`, found `i64`
     }
 
     let x = A::Ok;
diff --git a/src/test/ui/discrim/discrim-ill-typed.stderr b/src/test/ui/discrim/discrim-ill-typed.stderr
index d9675d65a2a..7b9f086151a 100644
--- a/src/test/ui/discrim/discrim-ill-typed.stderr
+++ b/src/test/ui/discrim/discrim-ill-typed.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/discrim-ill-typed.rs:17:16
    |
 LL |         OhNo = 0_u8,
-   |                ^^^^ expected i8, found u8
+   |                ^^^^ expected `i8`, found `u8`
    |
 help: change the type of the numeric literal from `u8` to `i8`
    |
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
   --> $DIR/discrim-ill-typed.rs:30:16
    |
 LL |         OhNo = 0_i8,
-   |                ^^^^ expected u8, found i8
+   |                ^^^^ expected `u8`, found `i8`
    |
 help: change the type of the numeric literal from `i8` to `u8`
    |
@@ -24,7 +24,7 @@ error[E0308]: mismatched types
   --> $DIR/discrim-ill-typed.rs:43:16
    |
 LL |         OhNo = 0_u16,
-   |                ^^^^^ expected i16, found u16
+   |                ^^^^^ expected `i16`, found `u16`
    |
 help: change the type of the numeric literal from `u16` to `i16`
    |
@@ -35,7 +35,7 @@ error[E0308]: mismatched types
   --> $DIR/discrim-ill-typed.rs:56:16
    |
 LL |         OhNo = 0_i16,
-   |                ^^^^^ expected u16, found i16
+   |                ^^^^^ expected `u16`, found `i16`
    |
 help: change the type of the numeric literal from `i16` to `u16`
    |
@@ -46,7 +46,7 @@ error[E0308]: mismatched types
   --> $DIR/discrim-ill-typed.rs:69:16
    |
 LL |         OhNo = 0_u32,
-   |                ^^^^^ expected i32, found u32
+   |                ^^^^^ expected `i32`, found `u32`
    |
 help: change the type of the numeric literal from `u32` to `i32`
    |
@@ -57,7 +57,7 @@ error[E0308]: mismatched types
   --> $DIR/discrim-ill-typed.rs:82:16
    |
 LL |         OhNo = 0_i32,
-   |                ^^^^^ expected u32, found i32
+   |                ^^^^^ expected `u32`, found `i32`
    |
 help: change the type of the numeric literal from `i32` to `u32`
    |
@@ -68,7 +68,7 @@ error[E0308]: mismatched types
   --> $DIR/discrim-ill-typed.rs:95:16
    |
 LL |         OhNo = 0_u64,
-   |                ^^^^^ expected i64, found u64
+   |                ^^^^^ expected `i64`, found `u64`
    |
 help: change the type of the numeric literal from `u64` to `i64`
    |
@@ -79,7 +79,7 @@ error[E0308]: mismatched types
   --> $DIR/discrim-ill-typed.rs:108:16
    |
 LL |         OhNo = 0_i64,
-   |                ^^^^^ expected u64, found i64
+   |                ^^^^^ expected `u64`, found `i64`
    |
 help: change the type of the numeric literal from `i64` to `u64`
    |
diff --git a/src/test/ui/diverging-fn-tail-35849.stderr b/src/test/ui/diverging-fn-tail-35849.stderr
index 383a7009e85..21361489a2c 100644
--- a/src/test/ui/diverging-fn-tail-35849.stderr
+++ b/src/test/ui/diverging-fn-tail-35849.stderr
@@ -5,10 +5,10 @@ LL | fn assert_sizeof() -> ! {
    |                       - expected `!` because of return type
 LL |     unsafe {
 LL |         ::std::mem::transmute::<f64, [u8; 8]>(panic!())
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected !, found array of 8 elements
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `!`, found array `[u8; 8]`
    |
    = note: expected type `!`
-              found type `[u8; 8]`
+             found array `[u8; 8]`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/diverging-tuple-parts-39485.stderr b/src/test/ui/diverging-tuple-parts-39485.stderr
index 70eefeb329d..ad3e5ab3dc9 100644
--- a/src/test/ui/diverging-tuple-parts-39485.stderr
+++ b/src/test/ui/diverging-tuple-parts-39485.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/diverging-tuple-parts-39485.rs:8:5
    |
 LL |     &panic!()
-   |     ^^^^^^^^^ expected (), found reference
+   |     ^^^^^^^^^ expected `()`, found reference
    |
-   = note: expected type `()`
-              found type `&_`
+   = note: expected unit type `()`
+              found reference `&_`
 help: try adding a return type
    |
 LL | fn g() -> &_ {
@@ -21,10 +21,10 @@ error[E0308]: mismatched types
 LL | fn f() -> isize {
    |           ----- expected `isize` because of return type
 LL |     (return 1, return 2)
-   |     ^^^^^^^^^^^^^^^^^^^^ expected isize, found tuple
+   |     ^^^^^^^^^^^^^^^^^^^^ expected `isize`, found tuple
    |
    = note: expected type `isize`
-              found type `(!, !)`
+             found tuple `(!, !)`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/dst/dst-bad-assign-3.rs b/src/test/ui/dst/dst-bad-assign-3.rs
index 691909a2317..e3b621b909a 100644
--- a/src/test/ui/dst/dst-bad-assign-3.rs
+++ b/src/test/ui/dst/dst-bad-assign-3.rs
@@ -32,8 +32,8 @@ pub fn main() {
     let z: Box<dyn ToBar> = Box::new(Bar1 {f: 36});
     f5.2 = Bar1 {f: 36};
     //~^ ERROR mismatched types
-    //~| expected type `dyn ToBar`
-    //~| found type `Bar1`
-    //~| expected trait ToBar, found struct `Bar1`
+    //~| expected trait `ToBar`, found struct `Bar1`
+    //~| 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 8c80ec7aac1..dc03f38e103 100644
--- a/src/test/ui/dst/dst-bad-assign-3.stderr
+++ b/src/test/ui/dst/dst-bad-assign-3.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/dst-bad-assign-3.rs:33:12
    |
 LL |     f5.2 = Bar1 {f: 36};
-   |            ^^^^^^^^^^^^ expected trait ToBar, found struct `Bar1`
+   |            ^^^^^^^^^^^^ expected trait `ToBar`, found struct `Bar1`
    |
-   = note: expected type `dyn ToBar`
-              found type `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 4f2648653f0..ed94242f5bf 100644
--- a/src/test/ui/dst/dst-bad-assign.rs
+++ b/src/test/ui/dst/dst-bad-assign.rs
@@ -34,8 +34,8 @@ pub fn main() {
     let z: Box<dyn ToBar> = Box::new(Bar1 {f: 36});
     f5.ptr = Bar1 {f: 36};
     //~^ ERROR mismatched types
-    //~| expected type `dyn ToBar`
-    //~| found type `Bar1`
-    //~| expected trait ToBar, found struct `Bar1`
+    //~| expected trait `ToBar`, found struct `Bar1`
+    //~| 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 849b1a62a46..8031f162482 100644
--- a/src/test/ui/dst/dst-bad-assign.stderr
+++ b/src/test/ui/dst/dst-bad-assign.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/dst-bad-assign.rs:35:14
    |
 LL |     f5.ptr = Bar1 {f: 36};
-   |              ^^^^^^^^^^^^ expected trait ToBar, found struct `Bar1`
+   |              ^^^^^^^^^^^^ expected trait `ToBar`, found struct `Bar1`
    |
-   = note: expected type `dyn ToBar`
-              found type `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/dst/dst-bad-coerce1.stderr b/src/test/ui/dst/dst-bad-coerce1.stderr
index a48f37b20be..3eb16663e13 100644
--- a/src/test/ui/dst/dst-bad-coerce1.stderr
+++ b/src/test/ui/dst/dst-bad-coerce1.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/dst-bad-coerce1.rs:16:29
    |
 LL |     let f3: &Fat<[usize]> = f2;
-   |                             ^^ expected slice, found array of 3 elements
+   |                             ^^ expected slice `[usize]`, found array `[isize; 3]`
    |
-   = note: expected type `&Fat<[usize]>`
-              found type `&Fat<[isize; 3]>`
+   = note: expected reference `&Fat<[usize]>`
+              found reference `&Fat<[isize; 3]>`
 
 error[E0277]: the trait bound `Foo: Bar` is not satisfied
   --> $DIR/dst-bad-coerce1.rs:22:29
@@ -19,10 +19,10 @@ error[E0308]: mismatched types
   --> $DIR/dst-bad-coerce1.rs:28:27
    |
 LL |     let f3: &([usize],) = f2;
-   |                           ^^ expected slice, found array of 3 elements
+   |                           ^^ expected slice `[usize]`, found array `[isize; 3]`
    |
-   = note: expected type `&([usize],)`
-              found type `&([isize; 3],)`
+   = note: expected reference `&([usize],)`
+              found reference `&([isize; 3],)`
 
 error[E0277]: the trait bound `Foo: Bar` is not satisfied
   --> $DIR/dst-bad-coerce1.rs:34:27
diff --git a/src/test/ui/dst/dst-bad-coerce2.stderr b/src/test/ui/dst/dst-bad-coerce2.stderr
index d1da9b6ca07..e76fcb5f72d 100644
--- a/src/test/ui/dst/dst-bad-coerce2.stderr
+++ b/src/test/ui/dst/dst-bad-coerce2.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let f3: &mut Fat<[isize]> = f2;
    |                                 ^^ types differ in mutability
    |
-   = note: expected type `&mut Fat<[isize]>`
-              found type `&Fat<[isize; 3]>`
+   = note: expected mutable reference `&mut Fat<[isize]>`
+                      found reference `&Fat<[isize; 3]>`
 
 error[E0308]: mismatched types
   --> $DIR/dst-bad-coerce2.rs:20:33
@@ -13,8 +13,8 @@ error[E0308]: mismatched types
 LL |     let f3: &mut Fat<dyn Bar> = f2;
    |                                 ^^ types differ in mutability
    |
-   = note: expected type `&mut Fat<dyn Bar>`
-              found type `&Fat<Foo>`
+   = note: expected mutable reference `&mut Fat<dyn Bar>`
+                      found reference `&Fat<Foo>`
 
 error[E0308]: mismatched types
   --> $DIR/dst-bad-coerce2.rs:25:31
@@ -22,8 +22,8 @@ error[E0308]: mismatched types
 LL |     let f3: &mut ([isize],) = f2;
    |                               ^^ types differ in mutability
    |
-   = note: expected type `&mut ([isize],)`
-              found type `&([isize; 3],)`
+   = note: expected mutable reference `&mut ([isize],)`
+                      found reference `&([isize; 3],)`
 
 error[E0308]: mismatched types
   --> $DIR/dst-bad-coerce2.rs:30:31
@@ -31,8 +31,8 @@ error[E0308]: mismatched types
 LL |     let f3: &mut (dyn Bar,) = f2;
    |                               ^^ types differ in mutability
    |
-   = note: expected type `&mut (dyn Bar,)`
-              found type `&(Foo,)`
+   = note: expected mutable reference `&mut (dyn Bar,)`
+                      found reference `&(Foo,)`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/dst/dst-bad-coerce4.rs b/src/test/ui/dst/dst-bad-coerce4.rs
index 9635e1e3380..f63da60d281 100644
--- a/src/test/ui/dst/dst-bad-coerce4.rs
+++ b/src/test/ui/dst/dst-bad-coerce4.rs
@@ -11,15 +11,15 @@ pub fn main() {
     let f1: &Fat<[isize]> = &Fat { ptr: [1, 2, 3] };
     let f2: &Fat<[isize; 3]> = f1;
     //~^ ERROR mismatched types
-    //~| expected type `&Fat<[isize; 3]>`
-    //~| found type `&Fat<[isize]>`
-    //~| expected array of 3 elements, found slice
+    //~| expected array `[isize; 3]`, found slice `[isize]`
+    //~| expected reference `&Fat<[isize; 3]>`
+    //~| found reference `&Fat<[isize]>`
 
     // Tuple with a vec of isizes.
     let f1: &([isize],) = &([1, 2, 3],);
     let f2: &([isize; 3],) = f1;
     //~^ ERROR mismatched types
-    //~| expected type `&([isize; 3],)`
-    //~| found type `&([isize],)`
-    //~| expected array of 3 elements, found slice
+    //~| expected array `[isize; 3]`, found slice `[isize]`
+    //~| expected reference `&([isize; 3],)`
+    //~| found reference `&([isize],)`
 }
diff --git a/src/test/ui/dst/dst-bad-coerce4.stderr b/src/test/ui/dst/dst-bad-coerce4.stderr
index fbf59ae5c66..e85d354e468 100644
--- a/src/test/ui/dst/dst-bad-coerce4.stderr
+++ b/src/test/ui/dst/dst-bad-coerce4.stderr
@@ -2,19 +2,19 @@ error[E0308]: mismatched types
   --> $DIR/dst-bad-coerce4.rs:12:32
    |
 LL |     let f2: &Fat<[isize; 3]> = f1;
-   |                                ^^ expected array of 3 elements, found slice
+   |                                ^^ expected array `[isize; 3]`, found slice `[isize]`
    |
-   = note: expected type `&Fat<[isize; 3]>`
-              found type `&Fat<[isize]>`
+   = note: expected reference `&Fat<[isize; 3]>`
+              found reference `&Fat<[isize]>`
 
 error[E0308]: mismatched types
   --> $DIR/dst-bad-coerce4.rs:20:30
    |
 LL |     let f2: &([isize; 3],) = f1;
-   |                              ^^ expected array of 3 elements, found slice
+   |                              ^^ expected array `[isize; 3]`, found slice `[isize]`
    |
-   = note: expected type `&([isize; 3],)`
-              found type `&([isize],)`
+   = note: expected reference `&([isize; 3],)`
+              found reference `&([isize],)`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/dst/dst-bad-coercions.stderr b/src/test/ui/dst/dst-bad-coercions.stderr
index e4bc6ee0010..6058594d64d 100644
--- a/src/test/ui/dst/dst-bad-coercions.stderr
+++ b/src/test/ui/dst/dst-bad-coercions.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/dst-bad-coercions.rs:14:17
    |
 LL |     let y: &S = x;
-   |                 ^ expected &S, found *-ptr
+   |                 ^ expected `&S`, found *-ptr
    |
-   = note: expected type `&S`
-              found type `*const S`
+   = note: expected reference `&S`
+            found raw pointer `*const S`
 
 error[E0308]: mismatched types
   --> $DIR/dst-bad-coercions.rs:15:21
@@ -13,20 +13,20 @@ error[E0308]: mismatched types
 LL |     let y: &dyn T = x;
    |                     ^
    |                     |
-   |                     expected &dyn T, found *-ptr
+   |                     expected `&dyn T`, found *-ptr
    |                     help: consider borrowing here: `&x`
    |
-   = note: expected type `&dyn T`
-              found type `*const S`
+   = note: expected reference `&dyn T`
+            found raw pointer `*const S`
 
 error[E0308]: mismatched types
   --> $DIR/dst-bad-coercions.rs:19:17
    |
 LL |     let y: &S = x;
-   |                 ^ expected &S, found *-ptr
+   |                 ^ expected `&S`, found *-ptr
    |
-   = note: expected type `&S`
-              found type `*mut S`
+   = note: expected reference `&S`
+            found raw pointer `*mut S`
 
 error[E0308]: mismatched types
   --> $DIR/dst-bad-coercions.rs:20:21
@@ -34,11 +34,11 @@ error[E0308]: mismatched types
 LL |     let y: &dyn T = x;
    |                     ^
    |                     |
-   |                     expected &dyn T, found *-ptr
+   |                     expected `&dyn T`, found *-ptr
    |                     help: consider borrowing here: `&x`
    |
-   = note: expected type `&dyn T`
-              found type `*mut S`
+   = note: expected reference `&dyn T`
+            found raw pointer `*mut S`
 
 error[E0308]: mismatched types
   --> $DIR/dst-bad-coercions.rs:23:25
@@ -46,8 +46,8 @@ error[E0308]: mismatched types
 LL |     let x: &mut dyn T = &S;
    |                         ^^ types differ in mutability
    |
-   = note: expected type `&mut dyn T`
-              found type `&S`
+   = note: expected mutable reference `&mut dyn T`
+                      found reference `&S`
 
 error[E0308]: mismatched types
   --> $DIR/dst-bad-coercions.rs:24:25
@@ -55,8 +55,8 @@ error[E0308]: mismatched types
 LL |     let x: *mut dyn T = &S;
    |                         ^^ types differ in mutability
    |
-   = note: expected type `*mut dyn T`
-              found type `&S`
+   = note: expected raw pointer `*mut dyn T`
+                found reference `&S`
 
 error[E0308]: mismatched types
   --> $DIR/dst-bad-coercions.rs:25:21
@@ -64,8 +64,8 @@ error[E0308]: mismatched types
 LL |     let x: *mut S = &S;
    |                     ^^ types differ in mutability
    |
-   = note: expected type `*mut S`
-              found type `&S`
+   = note: expected raw pointer `*mut S`
+                found reference `&S`
 
 error: aborting due to 7 previous errors
 
diff --git a/src/test/ui/elide-errors-on-mismatched-tuple.stderr b/src/test/ui/elide-errors-on-mismatched-tuple.stderr
index 1ef9d7ae982..122c71bebc4 100644
--- a/src/test/ui/elide-errors-on-mismatched-tuple.stderr
+++ b/src/test/ui/elide-errors-on-mismatched-tuple.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let (a, b, c) = (A::new(), A::new()); // This tuple is 2 elements, should be three
    |         ^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements
    |
-   = note: expected type `(A, A)`
-              found type `(_, _, _)`
+   = note: expected tuple `(A, A)`
+              found tuple `(_, _, _)`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0070.stderr b/src/test/ui/error-codes/E0070.stderr
index 40186137b0a..845833bc82f 100644
--- a/src/test/ui/error-codes/E0070.stderr
+++ b/src/test/ui/error-codes/E0070.stderr
@@ -14,10 +14,7 @@ error[E0308]: mismatched types
   --> $DIR/E0070.rs:8:25
    |
 LL |     some_other_func() = 4;
-   |                         ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |                         ^ expected `()`, found integer
 
 error[E0070]: invalid left-hand side expression
   --> $DIR/E0070.rs:8:5
diff --git a/src/test/ui/error-codes/E0271.stderr b/src/test/ui/error-codes/E0271.stderr
index 378e5e36306..b2dcdf8ee2e 100644
--- a/src/test/ui/error-codes/E0271.stderr
+++ b/src/test/ui/error-codes/E0271.stderr
@@ -5,10 +5,7 @@ LL | fn foo<T>(t: T) where T: Trait<AssociatedType=u32> {
    |    ---                         ------------------ required by this bound in `foo`
 ...
 LL |     foo(3_i8);
-   |     ^^^ expected u32, found reference
-   |
-   = note: expected type `u32`
-              found type `&'static str`
+   |     ^^^ expected `u32`, found `&str`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0308-4.stderr b/src/test/ui/error-codes/E0308-4.stderr
index 3c51106cae8..127fdaadbc5 100644
--- a/src/test/ui/error-codes/E0308-4.stderr
+++ b/src/test/ui/error-codes/E0308-4.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL |     match x {
    |           - this match expression has type `u8`
 LL |         0u8..=3i8 => (),
-   |         ^^^^^^^^^ expected u8, found i8
+   |         ^^^^^^^^^ expected `u8`, found `i8`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0308.stderr b/src/test/ui/error-codes/E0308.stderr
index bd9834ceb9f..b71fb95e706 100644
--- a/src/test/ui/error-codes/E0308.stderr
+++ b/src/test/ui/error-codes/E0308.stderr
@@ -2,10 +2,10 @@ error[E0308]: intrinsic has wrong type
   --> $DIR/E0308.rs:4:5
    |
 LL |     fn size_of<T>();
-   |     ^^^^^^^^^^^^^^^^ expected (), found usize
+   |     ^^^^^^^^^^^^^^^^ expected `()`, found `usize`
    |
-   = note: expected type `extern "rust-intrinsic" fn()`
-              found type `extern "rust-intrinsic" fn() -> usize`
+   = note: expected fn pointer `extern "rust-intrinsic" fn()`
+              found fn pointer `extern "rust-intrinsic" fn() -> usize`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/estr-subtyping.stderr b/src/test/ui/estr-subtyping.stderr
index 29f210803dd..e5dbab6441c 100644
--- a/src/test/ui/estr-subtyping.stderr
+++ b/src/test/ui/estr-subtyping.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |    wants_uniq(x);
    |               ^
    |               |
-   |               expected struct `std::string::String`, found &str
+   |               expected struct `std::string::String`, found `&str`
    |               help: try using a conversion method: `x.to_string()`
-   |
-   = note: expected type `std::string::String`
-              found type `&str`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr
index 4ecd8515ee1..2029cfaf75d 100644
--- a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr
+++ b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr
@@ -12,8 +12,8 @@ LL |     match [5..4, 99..105, 43..44] {
 LL |         [_, 99.., _] => {},
    |             ^^^^ expected struct `std::ops::Range`, found integer
    |
-   = note: expected type `std::ops::Range<{integer}>`
-              found type `{integer}`
+   = note: expected struct `std::ops::Range<{integer}>`
+                found type `{integer}`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr
index 922d2692315..6a88d05837a 100644
--- a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr
+++ b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr
@@ -18,8 +18,8 @@ LL |     match [5..4, 99..105, 43..44] {
 LL |         [_, 99..] => {},
    |             ^^^^ expected struct `std::ops::Range`, found integer
    |
-   = note: expected type `std::ops::Range<{integer}>`
-              found type `{integer}`
+   = note: expected struct `std::ops::Range<{integer}>`
+                found type `{integer}`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr
index 8907b875f8e..5c49fbe4c5c 100644
--- a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr
+++ b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr
@@ -12,8 +12,8 @@ LL |     match [5..4, 99..105, 43..44] {
 LL |         [..9, 99..100, _] => {},
    |          ^^^ expected struct `std::ops::Range`, found integer
    |
-   = note: expected type `std::ops::Range<{integer}>`
-              found type `{integer}`
+   = note: expected struct `std::ops::Range<{integer}>`
+                found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:15
@@ -23,8 +23,8 @@ LL |     match [5..4, 99..105, 43..44] {
 LL |         [..9, 99..100, _] => {},
    |               ^^^^^^^ expected struct `std::ops::Range`, found integer
    |
-   = note: expected type `std::ops::Range<{integer}>`
-              found type `{integer}`
+   = note: expected struct `std::ops::Range<{integer}>`
+                found type `{integer}`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/explicit/explicit-self-lifetime-mismatch.rs b/src/test/ui/explicit/explicit-self-lifetime-mismatch.rs
index 9ab8e13893b..a9a6f50fb8e 100644
--- a/src/test/ui/explicit/explicit-self-lifetime-mismatch.rs
+++ b/src/test/ui/explicit/explicit-self-lifetime-mismatch.rs
@@ -7,12 +7,12 @@ impl<'a,'b> Foo<'a,'b> {
     fn bar(self:
            Foo<'b,'a>
     //~^ ERROR mismatched `self` parameter type
-    //~| expected type `Foo<'a, 'b>`
-    //~| found type `Foo<'b, 'a>`
+    //~| expected struct `Foo<'a, 'b>`
+    //~| found struct `Foo<'b, 'a>`
     //~| lifetime mismatch
     //~| ERROR mismatched `self` parameter type
-    //~| expected type `Foo<'a, 'b>`
-    //~| found type `Foo<'b, 'a>`
+    //~| expected struct `Foo<'a, 'b>`
+    //~| found struct `Foo<'b, 'a>`
     //~| lifetime mismatch
            ) {}
 }
diff --git a/src/test/ui/explicit/explicit-self-lifetime-mismatch.stderr b/src/test/ui/explicit/explicit-self-lifetime-mismatch.stderr
index cbd6422e5df..5c976098ae3 100644
--- a/src/test/ui/explicit/explicit-self-lifetime-mismatch.stderr
+++ b/src/test/ui/explicit/explicit-self-lifetime-mismatch.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched `self` parameter type
 LL |            Foo<'b,'a>
    |            ^^^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `Foo<'a, 'b>`
-              found type `Foo<'b, 'a>`
+   = note: expected struct `Foo<'a, 'b>`
+              found struct `Foo<'b, 'a>`
 note: the lifetime `'b` as defined on the impl at 6:9...
   --> $DIR/explicit-self-lifetime-mismatch.rs:6:9
    |
@@ -23,8 +23,8 @@ error[E0308]: mismatched `self` parameter type
 LL |            Foo<'b,'a>
    |            ^^^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `Foo<'a, 'b>`
-              found type `Foo<'b, 'a>`
+   = note: expected struct `Foo<'a, 'b>`
+              found struct `Foo<'b, 'a>`
 note: the lifetime `'a` as defined on the impl at 6:6...
   --> $DIR/explicit-self-lifetime-mismatch.rs:6:6
    |
diff --git a/src/test/ui/extern/extern-main-fn.stderr b/src/test/ui/extern/extern-main-fn.stderr
index 14f064060a6..6f6983d4283 100644
--- a/src/test/ui/extern/extern-main-fn.stderr
+++ b/src/test/ui/extern/extern-main-fn.stderr
@@ -4,8 +4,8 @@ error[E0580]: main function has wrong type
 LL | extern fn main() {}
    | ^^^^^^^^^^^^^^^^ expected "Rust" fn, found "C" fn
    |
-   = note: expected type `fn()`
-              found type `extern "C" fn()`
+   = note: expected fn pointer `fn()`
+              found fn pointer `extern "C" fn()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/extern/extern-types-distinct-types.stderr b/src/test/ui/extern/extern-types-distinct-types.stderr
index eb632ee395f..2e258d687d3 100644
--- a/src/test/ui/extern/extern-types-distinct-types.stderr
+++ b/src/test/ui/extern/extern-types-distinct-types.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     r
    |     ^ expected extern type `B`, found extern type `A`
    |
-   = note: expected type `&B`
-              found type `&A`
+   = note: expected reference `&B`
+              found reference `&A`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/float-literal-inference-restrictions.stderr b/src/test/ui/float-literal-inference-restrictions.stderr
index 08513507ecf..e6f84f4f354 100644
--- a/src/test/ui/float-literal-inference-restrictions.stderr
+++ b/src/test/ui/float-literal-inference-restrictions.stderr
@@ -4,17 +4,14 @@ error[E0308]: mismatched types
 LL |     let x: f32 = 1;
    |                  ^
    |                  |
-   |                  expected f32, found integer
+   |                  expected `f32`, found integer
    |                  help: use a float literal: `1.0`
-   |
-   = note: expected type `f32`
-              found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/float-literal-inference-restrictions.rs:3:18
    |
 LL |     let y: f32 = 1f64;
-   |                  ^^^^ expected f32, found f64
+   |                  ^^^^ expected `f32`, found `f64`
    |
 help: change the type of the numeric literal from `f64` to `f32`
    |
diff --git a/src/test/ui/fn/fn-bad-block-type.stderr b/src/test/ui/fn/fn-bad-block-type.stderr
index 5abee94653a..13ebfd1e203 100644
--- a/src/test/ui/fn/fn-bad-block-type.stderr
+++ b/src/test/ui/fn/fn-bad-block-type.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/fn-bad-block-type.rs:3:19
    |
 LL | fn f() -> isize { true }
-   |           -----   ^^^^ expected isize, found bool
+   |           -----   ^^^^ expected `isize`, found `bool`
    |           |
    |           expected `isize` because of return type
 
diff --git a/src/test/ui/fn/fn-compare-mismatch.stderr b/src/test/ui/fn/fn-compare-mismatch.stderr
index 8915b747b73..fa74d027f1e 100644
--- a/src/test/ui/fn/fn-compare-mismatch.stderr
+++ b/src/test/ui/fn/fn-compare-mismatch.stderr
@@ -21,8 +21,8 @@ error[E0308]: mismatched types
 LL |     let x = f == g;
    |                  ^ expected fn item, found a different fn item
    |
-   = note: expected type `fn() {main::f}`
-              found type `fn() {main::g}`
+   = note: expected fn item `fn() {main::f}`
+              found fn item `fn() {main::g}`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/fn/fn-item-type.rs b/src/test/ui/fn/fn-item-type.rs
index e71172d7229..18146d52551 100644
--- a/src/test/ui/fn/fn-item-type.rs
+++ b/src/test/ui/fn/fn-item-type.rs
@@ -12,22 +12,22 @@ impl<T> Foo for T { /* `foo` is still default here */ }
 fn main() {
     eq(foo::<u8>, bar::<u8>);
     //~^ ERROR mismatched types
-    //~|  expected type `fn(isize) -> isize {foo::<u8>}`
-    //~|  found type `fn(isize) -> isize {bar::<u8>}`
+    //~|  expected fn item `fn(isize) -> isize {foo::<u8>}`
+    //~|  found fn item `fn(isize) -> isize {bar::<u8>}`
     //~|  expected fn item, found a different fn item
 
     eq(foo::<u8>, foo::<i8>);
     //~^ ERROR mismatched types
-    //~| expected u8, found i8
+    //~| expected `u8`, found `i8`
 
     eq(bar::<String>, bar::<Vec<u8>>);
     //~^ ERROR mismatched types
-    //~|  expected type `fn(isize) -> isize {bar::<std::string::String>}`
-    //~|  found type `fn(isize) -> isize {bar::<std::vec::Vec<u8>>}`
+    //~|  expected fn item `fn(isize) -> isize {bar::<std::string::String>}`
+    //~|  found fn item `fn(isize) -> isize {bar::<std::vec::Vec<u8>>}`
     //~|  expected struct `std::string::String`, found struct `std::vec::Vec`
 
     // Make sure we distinguish between trait methods correctly.
     eq(<u8 as Foo>::foo, <u16 as Foo>::foo);
     //~^ ERROR mismatched types
-    //~| expected u8, found u16
+    //~| expected `u8`, found `u16`
 }
diff --git a/src/test/ui/fn/fn-item-type.stderr b/src/test/ui/fn/fn-item-type.stderr
index d52646c0c4b..e25e9c21c9f 100644
--- a/src/test/ui/fn/fn-item-type.stderr
+++ b/src/test/ui/fn/fn-item-type.stderr
@@ -4,17 +4,17 @@ error[E0308]: mismatched types
 LL |     eq(foo::<u8>, bar::<u8>);
    |                   ^^^^^^^^^ expected fn item, found a different fn item
    |
-   = note: expected type `fn(isize) -> isize {foo::<u8>}`
-              found type `fn(isize) -> isize {bar::<u8>}`
+   = note: expected fn item `fn(isize) -> isize {foo::<u8>}`
+              found fn item `fn(isize) -> isize {bar::<u8>}`
 
 error[E0308]: mismatched types
   --> $DIR/fn-item-type.rs:19:19
    |
 LL |     eq(foo::<u8>, foo::<i8>);
-   |                   ^^^^^^^^^ expected u8, found i8
+   |                   ^^^^^^^^^ expected `u8`, found `i8`
    |
-   = note: expected type `fn(isize) -> isize {foo::<u8>}`
-              found type `fn(isize) -> isize {foo::<i8>}`
+   = note: expected fn item `fn(isize) -> isize {foo::<u8>}`
+              found fn item `fn(isize) -> isize {foo::<i8>}`
 
 error[E0308]: mismatched types
   --> $DIR/fn-item-type.rs:23:23
@@ -22,17 +22,17 @@ error[E0308]: mismatched types
 LL |     eq(bar::<String>, bar::<Vec<u8>>);
    |                       ^^^^^^^^^^^^^^ expected struct `std::string::String`, found struct `std::vec::Vec`
    |
-   = note: expected type `fn(isize) -> isize {bar::<std::string::String>}`
-              found type `fn(isize) -> isize {bar::<std::vec::Vec<u8>>}`
+   = note: expected fn item `fn(isize) -> isize {bar::<std::string::String>}`
+              found fn item `fn(isize) -> isize {bar::<std::vec::Vec<u8>>}`
 
 error[E0308]: mismatched types
   --> $DIR/fn-item-type.rs:30:26
    |
 LL |     eq(<u8 as Foo>::foo, <u16 as Foo>::foo);
-   |                          ^^^^^^^^^^^^^^^^^ expected u8, found u16
+   |                          ^^^^^^^^^^^^^^^^^ expected `u8`, found `u16`
    |
-   = note: expected type `fn() {<u8 as Foo>::foo}`
-              found type `fn() {<u16 as Foo>::foo}`
+   = note: expected fn item `fn() {<u8 as Foo>::foo}`
+              found fn item `fn() {<u16 as Foo>::foo}`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/fn/fn-trait-formatting.rs b/src/test/ui/fn/fn-trait-formatting.rs
index 5c16c1a7e88..63ab8e88e44 100644
--- a/src/test/ui/fn/fn-trait-formatting.rs
+++ b/src/test/ui/fn/fn-trait-formatting.rs
@@ -5,16 +5,16 @@ 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 `()`
-    //~| found type `std::boxed::Box<dyn std::ops::FnOnce(isize)>`
+    //~| 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 `()`
-    //~| found type `std::boxed::Box<dyn std::ops::Fn(isize, isize)>`
+    //~| 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 `()`
-    //~| found type `std::boxed::Box<dyn std::ops::FnMut() -> isize>`
+    //~| expected unit type `()`
+    //~| found struct `std::boxed::Box<dyn std::ops::FnMut() -> isize>`
 
     needs_fn(1);
     //~^ ERROR expected a `std::ops::Fn<(isize,)>` closure, found `{integer}`
diff --git a/src/test/ui/fn/fn-trait-formatting.stderr b/src/test/ui/fn/fn-trait-formatting.stderr
index f891b9c6439..5e7d6ad9534 100644
--- a/src/test/ui/fn/fn-trait-formatting.stderr
+++ b/src/test/ui/fn/fn-trait-formatting.stderr
@@ -2,28 +2,28 @@ error[E0308]: mismatched types
   --> $DIR/fn-trait-formatting.rs:6:17
    |
 LL |     let _: () = (box |_: isize| {}) as Box<dyn FnOnce(isize)>;
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box`
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `std::boxed::Box`
    |
-   = note: expected type `()`
-              found type `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
    |
 LL |     let _: () = (box |_: isize, isize| {}) as Box<dyn Fn(isize, isize)>;
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box`
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `std::boxed::Box`
    |
-   = note: expected type `()`
-              found type `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
    |
 LL |     let _: () = (box || -> isize { unimplemented!() }) as Box<dyn FnMut() -> isize>;
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box`
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `std::boxed::Box`
    |
-   = note: expected type `()`
-              found type `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/fully-qualified-type/fully-qualified-type-name1.rs b/src/test/ui/fully-qualified-type/fully-qualified-type-name1.rs
index 7e5b884103e..b4f9a38ff35 100644
--- a/src/test/ui/fully-qualified-type/fully-qualified-type-name1.rs
+++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name1.rs
@@ -4,7 +4,7 @@ fn main() {
     let x: Option<usize>;
     x = 5;
     //~^ ERROR mismatched types
-    //~| expected type `std::option::Option<usize>`
+    //~| expected enum `std::option::Option<usize>`
     //~| found type `{integer}`
     //~| expected enum `std::option::Option`, found integer
 }
diff --git a/src/test/ui/fully-qualified-type/fully-qualified-type-name1.stderr b/src/test/ui/fully-qualified-type/fully-qualified-type-name1.stderr
index e488b1f6b0c..6a550b93be2 100644
--- a/src/test/ui/fully-qualified-type/fully-qualified-type-name1.stderr
+++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name1.stderr
@@ -7,7 +7,7 @@ LL |     x = 5;
    |         expected enum `std::option::Option`, found integer
    |         help: try using a variant of the expected enum: `Some(5)`
    |
-   = note: expected type `std::option::Option<usize>`
+   = note: expected enum `std::option::Option<usize>`
               found type `{integer}`
 
 error: aborting due to previous error
diff --git a/src/test/ui/fully-qualified-type/fully-qualified-type-name2.rs b/src/test/ui/fully-qualified-type/fully-qualified-type-name2.rs
index 21eda1a9012..94a9f4e5692 100644
--- a/src/test/ui/fully-qualified-type/fully-qualified-type-name2.rs
+++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name2.rs
@@ -11,8 +11,6 @@ mod y {
 fn bar(x: x::Foo) -> y::Foo {
     return x;
     //~^ ERROR mismatched types
-    //~| expected type `y::Foo`
-    //~| found type `x::Foo`
     //~| expected enum `y::Foo`, found enum `x::Foo`
 }
 
diff --git a/src/test/ui/fully-qualified-type/fully-qualified-type-name2.stderr b/src/test/ui/fully-qualified-type/fully-qualified-type-name2.stderr
index 47bb5e475b4..aed7f72c660 100644
--- a/src/test/ui/fully-qualified-type/fully-qualified-type-name2.stderr
+++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name2.stderr
@@ -5,9 +5,6 @@ LL | fn bar(x: x::Foo) -> y::Foo {
    |                      ------ expected `y::Foo` because of return type
 LL |     return x;
    |            ^ expected enum `y::Foo`, found enum `x::Foo`
-   |
-   = note: expected type `y::Foo`
-              found type `x::Foo`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/fully-qualified-type/fully-qualified-type-name4.rs b/src/test/ui/fully-qualified-type/fully-qualified-type-name4.rs
index 88910a7bb20..30cb3ee48e7 100644
--- a/src/test/ui/fully-qualified-type/fully-qualified-type-name4.rs
+++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name4.rs
@@ -5,9 +5,9 @@ use std::option::Option;
 fn bar(x: usize) -> Option<usize> {
     return x;
     //~^ ERROR mismatched types
-    //~| expected type `std::option::Option<usize>`
+    //~| expected enum `std::option::Option<usize>`
     //~| found type `usize`
-    //~| expected enum `std::option::Option`, found usize
+    //~| expected enum `std::option::Option`, found `usize`
 }
 
 fn main() {
diff --git a/src/test/ui/fully-qualified-type/fully-qualified-type-name4.stderr b/src/test/ui/fully-qualified-type/fully-qualified-type-name4.stderr
index b341879ab91..b388f38a7fa 100644
--- a/src/test/ui/fully-qualified-type/fully-qualified-type-name4.stderr
+++ b/src/test/ui/fully-qualified-type/fully-qualified-type-name4.stderr
@@ -4,9 +4,9 @@ error[E0308]: mismatched types
 LL | fn bar(x: usize) -> Option<usize> {
    |                     ------------- expected `std::option::Option<usize>` because of return type
 LL |     return x;
-   |            ^ expected enum `std::option::Option`, found usize
+   |            ^ expected enum `std::option::Option`, found `usize`
    |
-   = note: expected type `std::option::Option<usize>`
+   = note: expected enum `std::option::Option<usize>`
               found type `usize`
 
 error: aborting due to previous error
diff --git a/src/test/ui/generator/type-mismatch-signature-deduction.stderr b/src/test/ui/generator/type-mismatch-signature-deduction.stderr
index 35d3f95c3e9..8606ecd33da 100644
--- a/src/test/ui/generator/type-mismatch-signature-deduction.stderr
+++ b/src/test/ui/generator/type-mismatch-signature-deduction.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/type-mismatch-signature-deduction.rs:8:20
    |
 LL |             return Ok(6);
-   |                    ^^^^^ expected i32, found enum `std::result::Result`
+   |                    ^^^^^ expected `i32`, found enum `std::result::Result`
    |
    = note: expected type `i32`
-              found type `std::result::Result<{integer}, _>`
+              found enum `std::result::Result<{integer}, _>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/generic/generic-arg-mismatch-recover.stderr b/src/test/ui/generic/generic-arg-mismatch-recover.stderr
index fe36e807c77..4b86212e486 100644
--- a/src/test/ui/generic/generic-arg-mismatch-recover.stderr
+++ b/src/test/ui/generic/generic-arg-mismatch-recover.stderr
@@ -8,10 +8,10 @@ error[E0308]: mismatched types
   --> $DIR/generic-arg-mismatch-recover.rs:6:33
    |
 LL |     Foo::<'static, 'static, ()>(&0);
-   |                                 ^^ expected (), found integer
+   |                                 ^^ expected `()`, found integer
    |
-   = note: expected type `&'static ()`
-              found type `&{integer}`
+   = note: expected reference `&'static ()`
+              found reference `&{integer}`
 
 error[E0107]: wrong number of lifetime arguments: expected 1, found 2
   --> $DIR/generic-arg-mismatch-recover.rs:9:20
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 7e074aa2a6b..45dc85a252f 100644
--- a/src/test/ui/generic/generic-type-params-name-repr.rs
+++ b/src/test/ui/generic/generic-type-params-name-repr.rs
@@ -12,40 +12,40 @@ fn main() {
     // Ensure that the printed type doesn't include the default type params...
     let _: Foo<isize> = ();
     //~^ ERROR mismatched types
-    //~| expected type `Foo<isize>`
-    //~| found type `()`
-    //~| expected struct `Foo`, found ()
+    //~| expected struct `Foo`, found `()`
+    //~| expected struct `Foo<isize>`
+    //~| found unit type `()`
 
     // ...even when they're present, but the same types as the defaults.
     let _: Foo<isize, B, C> = ();
     //~^ ERROR mismatched types
-    //~| expected type `Foo<isize>`
-    //~| found type `()`
-    //~| expected struct `Foo`, found ()
+    //~| expected struct `Foo`, found `()`
+    //~| expected struct `Foo<isize>`
+    //~| found unit type `()`
 
     // Including cases where the default is using previous type params.
     let _: HashMap<String, isize> = ();
     //~^ ERROR mismatched types
-    //~| expected type `HashMap<std::string::String, isize>`
-    //~| found type `()`
-    //~| expected struct `HashMap`, found ()
+    //~| expected struct `HashMap`, found `()`
+    //~| expected struct `HashMap<std::string::String, isize>`
+    //~| found unit type `()`
     let _: HashMap<String, isize, Hash<String>> = ();
     //~^ ERROR mismatched types
-    //~| expected type `HashMap<std::string::String, isize>`
-    //~| found type `()`
-    //~| expected struct `HashMap`, found ()
+    //~| expected struct `HashMap`, found `()`
+    //~| expected struct `HashMap<std::string::String, isize>`
+    //~| found unit type `()`
 
     // But not when there's a different type in between.
     let _: Foo<A, isize, C> = ();
     //~^ ERROR mismatched types
-    //~| expected type `Foo<A, isize>`
-    //~| found type `()`
-    //~| expected struct `Foo`, found ()
+    //~| expected struct `Foo`, found `()`
+    //~| expected struct `Foo<A, isize>`
+    //~| found unit type `()`
 
     // And don't print <> at all when there's just defaults.
     let _: Foo<A, B, C> = ();
     //~^ ERROR mismatched types
-    //~| expected type `Foo`
-    //~| found type `()`
-    //~| expected struct `Foo`, found ()
+    //~| expected struct `Foo`, found `()`
+    //~| expected struct `Foo`
+    //~| 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 2aa9cafb8bf..f20bd1846d7 100644
--- a/src/test/ui/generic/generic-type-params-name-repr.stderr
+++ b/src/test/ui/generic/generic-type-params-name-repr.stderr
@@ -2,55 +2,55 @@ error[E0308]: mismatched types
   --> $DIR/generic-type-params-name-repr.rs:13:25
    |
 LL |     let _: Foo<isize> = ();
-   |                         ^^ expected struct `Foo`, found ()
+   |                         ^^ expected struct `Foo`, found `()`
    |
-   = note: expected type `Foo<isize>`
-              found type `()`
+   = note: expected struct `Foo<isize>`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/generic-type-params-name-repr.rs:20:31
    |
 LL |     let _: Foo<isize, B, C> = ();
-   |                               ^^ expected struct `Foo`, found ()
+   |                               ^^ expected struct `Foo`, found `()`
    |
-   = note: expected type `Foo<isize>`
-              found type `()`
+   = note: expected struct `Foo<isize>`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/generic-type-params-name-repr.rs:27:37
    |
 LL |     let _: HashMap<String, isize> = ();
-   |                                     ^^ expected struct `HashMap`, found ()
+   |                                     ^^ expected struct `HashMap`, found `()`
    |
-   = note: expected type `HashMap<std::string::String, isize>`
-              found type `()`
+   = note: expected struct `HashMap<std::string::String, isize>`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/generic-type-params-name-repr.rs:32:51
    |
 LL |     let _: HashMap<String, isize, Hash<String>> = ();
-   |                                                   ^^ expected struct `HashMap`, found ()
+   |                                                   ^^ expected struct `HashMap`, found `()`
    |
-   = note: expected type `HashMap<std::string::String, isize>`
-              found type `()`
+   = note: expected struct `HashMap<std::string::String, isize>`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/generic-type-params-name-repr.rs:39:31
    |
 LL |     let _: Foo<A, isize, C> = ();
-   |                               ^^ expected struct `Foo`, found ()
+   |                               ^^ expected struct `Foo`, found `()`
    |
-   = note: expected type `Foo<A, isize>`
-              found type `()`
+   = note: expected struct `Foo<A, isize>`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/generic-type-params-name-repr.rs:46:27
    |
 LL |     let _: Foo<A, B, C> = ();
-   |                           ^^ expected struct `Foo`, found ()
+   |                           ^^ expected struct `Foo`, found `()`
    |
-   = note: expected type `Foo`
-              found type `()`
+   = note: expected struct `Foo`
+           found unit type `()`
 
 error: aborting due to 6 previous errors
 
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr
index 8e2b0b8c600..c8521a54e6c 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr
@@ -8,8 +8,8 @@ LL | / check! { bound_a_b_ret_a_vs_bound_a_ret_a: (for<'a,'b> fn(&'a u32, &'b u3
 LL | |                                             for<'a>    fn(&'a u32, &'a u32) -> &'a u32) }
    | |_________________________________________________________________________________________- in this macro invocation
    |
-   = note: expected type `std::option::Option<for<'a, 'b> fn(&'a u32, &'b u32) -> &'a u32>`
-              found type `std::option::Option<for<'a> fn(&'a u32, &'a u32) -> &'a u32>`
+   = note: expected enum `std::option::Option<for<'a, 'b> fn(&'a u32, &'b u32) -> &'a u32>`
+              found enum `std::option::Option<for<'a> fn(&'a u32, &'a u32) -> &'a u32>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr
index dbb50181390..3ad802c5450 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr
@@ -8,8 +8,8 @@ LL | / check! { bound_a_b_vs_bound_a: (for<'a,'b> fn(&'a u32, &'b u32),
 LL | |                                 for<'a>    fn(&'a u32, &'a u32)) }
    | |__________________________________________________________________- in this macro invocation
    |
-   = note: expected type `std::option::Option<for<'a, 'b> fn(&'a u32, &'b u32)>`
-              found type `std::option::Option<for<'a> fn(&'a u32, &'a u32)>`
+   = note: expected enum `std::option::Option<for<'a, 'b> fn(&'a u32, &'b u32)>`
+              found enum `std::option::Option<for<'a> fn(&'a u32, &'a u32)>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr
index db9892b48a6..3d09633367c 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr
@@ -8,8 +8,8 @@ LL | / check! { bound_a_vs_free_x: (for<'a> fn(&'a u32),
 LL | |                              fn(&'x u32)) }
    | |___________________________________________- in this macro invocation
    |
-   = note: expected type `std::option::Option<for<'a> fn(&'a u32)>`
-              found type `std::option::Option<fn(&'x u32)>`
+   = note: expected enum `std::option::Option<for<'a> fn(&'a u32)>`
+              found enum `std::option::Option<fn(&'x u32)>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr
index e9fb73411bd..8b623a4c0be 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr
@@ -8,8 +8,8 @@ LL | / check! { bound_co_a_b_vs_bound_co_a: (for<'a,'b> fn(Co<'a>, Co<'b>),
 LL | |                                       for<'a>    fn(Co<'a>, Co<'a>)) }
    | |______________________________________________________________________- in this macro invocation
    |
-   = note: expected type `std::option::Option<for<'a, 'b> fn(Co<'a>, Co<'b>)>`
-              found type `std::option::Option<for<'a> fn(Co<'a>, Co<'a>)>`
+   = note: expected enum `std::option::Option<for<'a, 'b> fn(Co<'a>, Co<'b>)>`
+              found enum `std::option::Option<for<'a> fn(Co<'a>, Co<'a>)>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr
index d0e80faa68e..f12bff69691 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr
@@ -8,8 +8,8 @@ LL | / check! { bound_co_a_co_b_ret_contra_a: (for<'a,'b> fn(Co<'a>, Co<'b>) ->
 LL | |                                         for<'a>    fn(Co<'a>, Co<'a>) -> Contra<'a>) }
    | |______________________________________________________________________________________- in this macro invocation
    |
-   = note: expected type `std::option::Option<for<'a, 'b> fn(Co<'a>, Co<'b>) -> Contra<'a>>`
-              found type `std::option::Option<for<'a> fn(Co<'a>, Co<'a>) -> Contra<'a>>`
+   = note: expected enum `std::option::Option<for<'a, 'b> fn(Co<'a>, Co<'b>) -> Contra<'a>>`
+              found enum `std::option::Option<for<'a> fn(Co<'a>, Co<'a>) -> Contra<'a>>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr
index 3605ecf4f86..37ba44cf2e9 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr
@@ -8,8 +8,8 @@ LL | / check! { bound_contra_a_contra_b_ret_co_a: (for<'a,'b> fn(Contra<'a>, Con
 LL | |                                             for<'a>    fn(Contra<'a>, Contra<'a>) -> Co<'a>) }
    | |______________________________________________________________________________________________- in this macro invocation
    |
-   = note: expected type `std::option::Option<for<'a, 'b> fn(Contra<'a>, Contra<'b>) -> Co<'a>>`
-              found type `std::option::Option<for<'a> fn(Contra<'a>, Contra<'a>) -> Co<'a>>`
+   = note: expected enum `std::option::Option<for<'a, 'b> fn(Contra<'a>, Contra<'b>) -> Co<'a>>`
+              found enum `std::option::Option<for<'a> fn(Contra<'a>, Contra<'a>) -> Co<'a>>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr
index fae6e9b5c89..a00bbea6d18 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr
@@ -8,8 +8,8 @@ LL | / check! { bound_inv_a_b_vs_bound_inv_a: (for<'a,'b> fn(Inv<'a>, Inv<'b>),
 LL | |                                         for<'a>    fn(Inv<'a>, Inv<'a>)) }
    | |__________________________________________________________________________- in this macro invocation
    |
-   = note: expected type `std::option::Option<for<'a, 'b> fn(Inv<'a>, Inv<'b>)>`
-              found type `std::option::Option<for<'a> fn(Inv<'a>, Inv<'a>)>`
+   = note: expected enum `std::option::Option<for<'a, 'b> fn(Inv<'a>, Inv<'b>)>`
+              found enum `std::option::Option<for<'a> fn(Inv<'a>, Inv<'a>)>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr b/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr
index 76d97dd2f58..561f3519176 100644
--- a/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.free_inv_x_vs_free_inv_y.stderr
@@ -8,8 +8,8 @@ LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>),
 LL | |                                     fn(Inv<'y>)) }
    | |__________________________________________________- in this macro invocation
    |
-   = note: expected type `std::option::Option<fn(Inv<'y>)>`
-              found type `std::option::Option<fn(Inv<'x>)>`
+   = note: expected enum `std::option::Option<fn(Inv<'y>)>`
+              found enum `std::option::Option<fn(Inv<'x>)>`
 note: the lifetime `'x` as defined on the function body at 32:20...
   --> $DIR/hr-subtype.rs:32:20
    |
@@ -39,8 +39,8 @@ LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>),
 LL | |                                     fn(Inv<'y>)) }
    | |__________________________________________________- in this macro invocation
    |
-   = note: expected type `std::option::Option<fn(Inv<'x>)>`
-              found type `std::option::Option<fn(Inv<'y>)>`
+   = note: expected enum `std::option::Option<fn(Inv<'x>)>`
+              found enum `std::option::Option<fn(Inv<'y>)>`
 note: the lifetime `'x` as defined on the function body at 38:22...
   --> $DIR/hr-subtype.rs:38:22
    |
diff --git a/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr b/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr
index 74f4212b246..082627050b3 100644
--- a/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_y.stderr
@@ -8,8 +8,8 @@ LL | / check! { free_x_vs_free_y: (fn(&'x u32),
 LL | |                             fn(&'y u32)) }
    | |__________________________________________- in this macro invocation
    |
-   = note: expected type `std::option::Option<fn(&'x u32)>`
-              found type `std::option::Option<fn(&'y u32)>`
+   = note: expected enum `std::option::Option<fn(&'x u32)>`
+              found enum `std::option::Option<fn(&'y u32)>`
 note: the lifetime `'x` as defined on the function body at 38:22...
   --> $DIR/hr-subtype.rs:38:22
    |
diff --git a/src/test/ui/hrtb/hrtb-exists-forall-fn.stderr b/src/test/ui/hrtb/hrtb-exists-forall-fn.stderr
index d893cd606f1..8534ee99c1f 100644
--- a/src/test/ui/hrtb/hrtb-exists-forall-fn.stderr
+++ b/src/test/ui/hrtb/hrtb-exists-forall-fn.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let _: for<'b> fn(&'b u32) = foo();
    |                                  ^^^^^ expected concrete lifetime, found bound lifetime parameter 'b
    |
-   = note: expected type `for<'b> fn(&'b u32)`
-              found type `fn(&u32)`
+   = note: expected fn pointer `for<'b> fn(&'b u32)`
+              found fn pointer `fn(&u32)`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr b/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr
index fd6fce938b2..759c7302d13 100644
--- a/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr
+++ b/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr
@@ -4,8 +4,8 @@ error[E0271]: type mismatch resolving `for<'r> <L<[closure@$DIR/issue-62203-hrtb
 LL |     let v = Unit2.m(
    |                   ^ expected struct `Unit4`, found associated type
    |
-   = note: expected type `Unit4`
-              found type `<_ as Ty<'_>>::V`
+   = note:       expected struct `Unit4`
+           found associated type `<_ as Ty<'_>>::V`
    = note: consider constraining the associated type `<_ as Ty<'_>>::V` to `Unit4`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
 
@@ -15,8 +15,6 @@ error[E0271]: type mismatch resolving `<[closure@$DIR/issue-62203-hrtb-ice.rs:42
 LL |     let v = Unit2.m(
    |                   ^ expected struct `Unit4`, found struct `Unit3`
    |
-   = note: expected type `Unit4`
-              found type `Unit3`
    = note: required because of the requirements on the impl of `for<'r> T0<'r, (<Unit2 as Ty<'r>>::V,)>` for `L<[closure@$DIR/issue-62203-hrtb-ice.rs:42:17: 42:39]>`
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/if-else-type-mismatch.stderr b/src/test/ui/if-else-type-mismatch.stderr
index b418c961189..14e8f87393b 100644
--- a/src/test/ui/if-else-type-mismatch.stderr
+++ b/src/test/ui/if-else-type-mismatch.stderr
@@ -7,23 +7,17 @@ LL | |         1i32
    | |         ---- expected because of this
 LL | |     } else {
 LL | |         2u32
-   | |         ^^^^ expected i32, found u32
+   | |         ^^^^ expected `i32`, found `u32`
 LL | |     };
    | |_____- if and else have incompatible types
-   |
-   = note: expected type `i32`
-              found type `u32`
 
 error[E0308]: if and else have incompatible types
   --> $DIR/if-else-type-mismatch.rs:8:38
    |
 LL |     let _ = if true { 42i32 } else { 42u32 };
-   |                       -----          ^^^^^ expected i32, found u32
+   |                       -----          ^^^^^ expected `i32`, found `u32`
    |                       |
    |                       expected because of this
-   |
-   = note: expected type `i32`
-              found type `u32`
 
 error[E0308]: if and else have incompatible types
   --> $DIR/if-else-type-mismatch.rs:13:9
@@ -37,12 +31,9 @@ LL | |         3u32;
    | |         expected because of this
 LL | |     } else {
 LL | |         4u32
-   | |         ^^^^ expected (), found u32
+   | |         ^^^^ expected `()`, found `u32`
 LL | |     };
    | |_____- if and else have incompatible types
-   |
-   = note: expected type `()`
-              found type `u32`
 
 error[E0308]: if and else have incompatible types
   --> $DIR/if-else-type-mismatch.rs:19:9
@@ -56,12 +47,9 @@ LL | |         6u32;
    | |         ^^^^-
    | |         |   |
    | |         |   help: consider removing this semicolon
-   | |         expected u32, found ()
+   | |         expected `u32`, found `()`
 LL | |     };
    | |_____- if and else have incompatible types
-   |
-   = note: expected type `u32`
-              found type `()`
 
 error[E0308]: if and else have incompatible types
   --> $DIR/if-else-type-mismatch.rs:25:9
@@ -72,12 +60,9 @@ LL | |         7i32;
    | |         ----- expected because of this
 LL | |     } else {
 LL | |         8u32
-   | |         ^^^^ expected (), found u32
+   | |         ^^^^ expected `()`, found `u32`
 LL | |     };
    | |_____- if and else have incompatible types
-   |
-   = note: expected type `()`
-              found type `u32`
 
 error[E0308]: if and else have incompatible types
   --> $DIR/if-else-type-mismatch.rs:31:9
@@ -88,12 +73,9 @@ LL | |         9i32
    | |         ---- expected because of this
 LL | |     } else {
 LL | |         10u32;
-   | |         ^^^^^^ expected i32, found ()
+   | |         ^^^^^^ expected `i32`, found `()`
 LL | |     };
    | |_____- if and else have incompatible types
-   |
-   = note: expected type `i32`
-              found type `()`
 
 error[E0308]: if and else have incompatible types
   --> $DIR/if-else-type-mismatch.rs:37:9
@@ -104,10 +86,7 @@ LL | |
 LL | |     } else {
    | |_____- expected because of this
 LL |           11u32
-   |           ^^^^^ expected (), found u32
-   |
-   = note: expected type `()`
-              found type `u32`
+   |           ^^^^^ expected `()`, found `u32`
 
 error[E0308]: if and else have incompatible types
   --> $DIR/if-else-type-mismatch.rs:42:12
@@ -120,10 +99,7 @@ LL |       } else {
    |  ____________^
 LL | |
 LL | |     };
-   | |_____^ expected i32, found ()
-   |
-   = note: expected type `i32`
-              found type `()`
+   | |_____^ expected `i32`, found `()`
 
 error: aborting due to 8 previous errors
 
diff --git a/src/test/ui/if/if-branch-types.rs b/src/test/ui/if/if-branch-types.rs
index b79a49eb5de..5c693194a76 100644
--- a/src/test/ui/if/if-branch-types.rs
+++ b/src/test/ui/if/if-branch-types.rs
@@ -1,5 +1,5 @@
 fn main() {
     let x = if true { 10i32 } else { 10u32 };
     //~^ ERROR if and else have incompatible types
-    //~| expected i32, found u32
+    //~| expected `i32`, found `u32`
 }
diff --git a/src/test/ui/if/if-branch-types.stderr b/src/test/ui/if/if-branch-types.stderr
index 74b925f72ff..b5eacf5860f 100644
--- a/src/test/ui/if/if-branch-types.stderr
+++ b/src/test/ui/if/if-branch-types.stderr
@@ -2,12 +2,9 @@ error[E0308]: if and else have incompatible types
   --> $DIR/if-branch-types.rs:2:38
    |
 LL |     let x = if true { 10i32 } else { 10u32 };
-   |                       -----          ^^^^^ expected i32, found u32
+   |                       -----          ^^^^^ expected `i32`, found `u32`
    |                       |
    |                       expected because of this
-   |
-   = note: expected type `i32`
-              found type `u32`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/if/if-let-arm-types.rs b/src/test/ui/if/if-let-arm-types.rs
index 0f8815f0479..cae4f0974c6 100644
--- a/src/test/ui/if/if-let-arm-types.rs
+++ b/src/test/ui/if/if-let-arm-types.rs
@@ -7,6 +7,5 @@ fn main() {
         1
     };
     //~^^ ERROR: if and else have incompatible types
-    //~| NOTE expected (), found integer
-    //~| NOTE expected type `()`
+    //~| NOTE expected `()`, found integer
 }
diff --git a/src/test/ui/if/if-let-arm-types.stderr b/src/test/ui/if/if-let-arm-types.stderr
index ff88de20f76..da93dfc9995 100644
--- a/src/test/ui/if/if-let-arm-types.stderr
+++ b/src/test/ui/if/if-let-arm-types.stderr
@@ -8,12 +8,9 @@ LL | |         ()
 LL | |
 LL | |     } else {
 LL | |         1
-   | |         ^ expected (), found integer
+   | |         ^ expected `()`, found integer
 LL | |     };
    | |_____- if and else have incompatible types
-   |
-   = note: expected type `()`
-              found type `{integer}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/if/if-no-match-bindings.stderr b/src/test/ui/if/if-no-match-bindings.stderr
index 0936f3b9e38..3f382e023a7 100644
--- a/src/test/ui/if/if-no-match-bindings.stderr
+++ b/src/test/ui/if/if-no-match-bindings.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |     if b_ref() {}
    |        ^^^^^^^
    |        |
-   |        expected bool, found &bool
+   |        expected `bool`, found `&bool`
    |        help: consider dereferencing the borrow: `*b_ref()`
-   |
-   = note: expected type `bool`
-              found type `&bool`
 
 error[E0308]: mismatched types
   --> $DIR/if-no-match-bindings.rs:19:8
@@ -16,11 +13,8 @@ error[E0308]: mismatched types
 LL |     if b_mut_ref() {}
    |        ^^^^^^^^^^^
    |        |
-   |        expected bool, found &mut bool
+   |        expected `bool`, found `&mut bool`
    |        help: consider dereferencing the borrow: `*b_mut_ref()`
-   |
-   = note: expected type `bool`
-              found type `&mut bool`
 
 error[E0308]: mismatched types
   --> $DIR/if-no-match-bindings.rs:20:8
@@ -28,11 +22,8 @@ error[E0308]: mismatched types
 LL |     if &true {}
    |        ^^^^^
    |        |
-   |        expected bool, found &bool
+   |        expected `bool`, found `&bool`
    |        help: consider removing the borrow: `true`
-   |
-   = note: expected type `bool`
-              found type `&bool`
 
 error[E0308]: mismatched types
   --> $DIR/if-no-match-bindings.rs:21:8
@@ -40,11 +31,8 @@ error[E0308]: mismatched types
 LL |     if &mut true {}
    |        ^^^^^^^^^
    |        |
-   |        expected bool, found &mut bool
+   |        expected `bool`, found `&mut bool`
    |        help: consider removing the borrow: `true`
-   |
-   = note: expected type `bool`
-              found type `&mut bool`
 
 error[E0308]: mismatched types
   --> $DIR/if-no-match-bindings.rs:24:11
@@ -52,11 +40,8 @@ error[E0308]: mismatched types
 LL |     while b_ref() {}
    |           ^^^^^^^
    |           |
-   |           expected bool, found &bool
+   |           expected `bool`, found `&bool`
    |           help: consider dereferencing the borrow: `*b_ref()`
-   |
-   = note: expected type `bool`
-              found type `&bool`
 
 error[E0308]: mismatched types
   --> $DIR/if-no-match-bindings.rs:25:11
@@ -64,11 +49,8 @@ error[E0308]: mismatched types
 LL |     while b_mut_ref() {}
    |           ^^^^^^^^^^^
    |           |
-   |           expected bool, found &mut bool
+   |           expected `bool`, found `&mut bool`
    |           help: consider dereferencing the borrow: `*b_mut_ref()`
-   |
-   = note: expected type `bool`
-              found type `&mut bool`
 
 error[E0308]: mismatched types
   --> $DIR/if-no-match-bindings.rs:26:11
@@ -76,11 +58,8 @@ error[E0308]: mismatched types
 LL |     while &true {}
    |           ^^^^^
    |           |
-   |           expected bool, found &bool
+   |           expected `bool`, found `&bool`
    |           help: consider removing the borrow: `true`
-   |
-   = note: expected type `bool`
-              found type `&bool`
 
 error[E0308]: mismatched types
   --> $DIR/if-no-match-bindings.rs:27:11
@@ -88,11 +67,8 @@ error[E0308]: mismatched types
 LL |     while &mut true {}
    |           ^^^^^^^^^
    |           |
-   |           expected bool, found &mut bool
+   |           expected `bool`, found `&mut bool`
    |           help: consider removing the borrow: `true`
-   |
-   = note: expected type `bool`
-              found type `&mut bool`
 
 error: aborting due to 8 previous errors
 
diff --git a/src/test/ui/if/if-typeck.stderr b/src/test/ui/if/if-typeck.stderr
index 714d3ebcdb0..74ed0ed0ae6 100644
--- a/src/test/ui/if/if-typeck.stderr
+++ b/src/test/ui/if/if-typeck.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/if-typeck.rs:9:8
    |
 LL |     if f { }
-   |        ^ expected bool, found fn item
+   |        ^ expected `bool`, found fn item
    |
    = note: expected type `bool`
-              found type `fn() {f}`
+           found fn item `fn() {f}`
 
 error: aborting due to previous error
 
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..9c7e7002360 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
@@ -6,10 +6,8 @@ LL |   fn foo(bar: usize) -> usize {
 LL | /     if bar % 5 == 0 {
 LL | |         return 3;
 LL | |     }
-   | |_____^ expected usize, found ()
+   | |_____^ expected `usize`, found `()`
    |
-   = note: expected type `usize`
-              found type `()`
    = note: `if` expressions without `else` evaluate to `()`
    = help: consider adding an `else` block that evaluates to the expected type
 
@@ -22,10 +20,8 @@ LL |       let x: usize = if bar % 5 == 0 {
    | |         expected because of this assignment
 LL | |         return 3;
 LL | |     };
-   | |_____^ expected usize, found ()
+   | |_____^ expected `usize`, found `()`
    |
-   = note: expected type `usize`
-              found type `()`
    = note: `if` expressions without `else` evaluate to `()`
    = help: consider adding an `else` block that evaluates to the expected type
 
@@ -37,10 +33,8 @@ LL |   fn foo3(bar: usize) -> usize {
 LL | /     if bar % 5 == 0 {
 LL | |         3
 LL | |     }
-   | |_____^ expected usize, found ()
+   | |_____^ expected `usize`, found `()`
    |
-   = note: expected type `usize`
-              found type `()`
    = note: `if` expressions without `else` evaluate to `()`
    = help: consider adding an `else` block that evaluates to the expected type
 
@@ -52,10 +46,8 @@ LL |   fn foo_let(bar: usize) -> usize {
 LL | /     if let 0 = 1 {
 LL | |         return 3;
 LL | |     }
-   | |_____^ expected usize, found ()
+   | |_____^ expected `usize`, found `()`
    |
-   = note: expected type `usize`
-              found type `()`
    = note: `if` expressions without `else` evaluate to `()`
    = help: consider adding an `else` block that evaluates to the expected type
 
@@ -68,10 +60,8 @@ LL |       let x: usize = if let 0 = 1 {
    | |         expected because of this assignment
 LL | |         return 3;
 LL | |     };
-   | |_____^ expected usize, found ()
+   | |_____^ expected `usize`, found `()`
    |
-   = note: expected type `usize`
-              found type `()`
    = note: `if` expressions without `else` evaluate to `()`
    = help: consider adding an `else` block that evaluates to the expected type
 
@@ -83,10 +73,8 @@ LL |   fn foo3_let(bar: usize) -> usize {
 LL | /     if let 0 = 1 {
 LL | |         3
 LL | |     }
-   | |_____^ expected usize, found ()
+   | |_____^ expected `usize`, found `()`
    |
-   = note: expected type `usize`
-              found 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..e5fb7b26321 100644
--- a/src/test/ui/if/if-without-else-result.rs
+++ b/src/test/ui/if/if-without-else-result.rs
@@ -1,8 +1,6 @@
 fn main() {
     let a = if true { true };
     //~^ ERROR if may be missing an else clause [E0317]
-    //~| expected type `()`
-    //~| found type `bool`
-    //~| expected (), found 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..66a8185774e 100644
--- a/src/test/ui/if/if-without-else-result.stderr
+++ b/src/test/ui/if/if-without-else-result.stderr
@@ -5,10 +5,8 @@ LL |     let a = if true { true };
    |             ^^^^^^^^^^----^^
    |             |         |
    |             |         found here
-   |             expected (), found bool
+   |             expected `()`, found `bool`
    |
-   = note: expected 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/if/ifmt-bad-arg.stderr b/src/test/ui/if/ifmt-bad-arg.stderr
index d65ffd85060..07917c2a540 100644
--- a/src/test/ui/if/ifmt-bad-arg.stderr
+++ b/src/test/ui/if/ifmt-bad-arg.stderr
@@ -300,19 +300,19 @@ error[E0308]: mismatched types
   --> $DIR/ifmt-bad-arg.rs:78:32
    |
 LL |     println!("{} {:.*} {}", 1, 3.2, 4);
-   |                                ^^^ expected usize, found floating-point number
+   |                                ^^^ expected `usize`, found floating-point number
    |
-   = note: expected type `&usize`
-              found type `&{float}`
+   = note: expected reference `&usize`
+              found reference `&{float}`
 
 error[E0308]: mismatched types
   --> $DIR/ifmt-bad-arg.rs:81:35
    |
 LL |     println!("{} {:07$.*} {}", 1, 3.2, 4);
-   |                                   ^^^ expected usize, found floating-point number
+   |                                   ^^^ expected `usize`, found floating-point number
    |
-   = note: expected type `&usize`
-              found type `&{float}`
+   = note: expected reference `&usize`
+              found reference `&{float}`
 
 error: aborting due to 36 previous errors
 
diff --git a/src/test/ui/impl-trait/bound-normalization-fail.stderr b/src/test/ui/impl-trait/bound-normalization-fail.stderr
index 99c6a8cdd6d..fc4cddd0216 100644
--- a/src/test/ui/impl-trait/bound-normalization-fail.stderr
+++ b/src/test/ui/impl-trait/bound-normalization-fail.stderr
@@ -10,10 +10,10 @@ error[E0271]: type mismatch resolving `<Foo<()> as FooLike>::Output == <T as imp
   --> $DIR/bound-normalization-fail.rs:28:32
    |
 LL |     fn foo_fail<T: Trait>() -> impl FooLike<Output=T::Assoc> {
-   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found associated type
+   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
    |
-   = note: expected type `()`
-              found type `<T as impl_trait::Trait>::Assoc`
+   = note:         expected type `()`
+           found associated type `<T as impl_trait::Trait>::Assoc`
    = note: consider constraining the associated type `<T as impl_trait::Trait>::Assoc` to `()`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
    = note: the return type of a function must have a statically known size
@@ -28,10 +28,10 @@ error[E0271]: type mismatch resolving `<Foo<()> as FooLike>::Output == <T as lif
   --> $DIR/bound-normalization-fail.rs:44:41
    |
 LL |     fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike<Output=T::Assoc> {
-   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found associated type
+   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type
    |
-   = note: expected type `()`
-              found type `<T as lifetimes::Trait<'static>>::Assoc`
+   = note:         expected type `()`
+           found associated type `<T as lifetimes::Trait<'static>>::Assoc`
    = note: consider constraining the associated type `<T as lifetimes::Trait<'static>>::Assoc` to `()`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
    = note: the return type of a function must have a statically known size
diff --git a/src/test/ui/impl-trait/equality.rs b/src/test/ui/impl-trait/equality.rs
index f6b0853284d..14b0eeb739a 100644
--- a/src/test/ui/impl-trait/equality.rs
+++ b/src/test/ui/impl-trait/equality.rs
@@ -14,7 +14,7 @@ fn two(x: bool) -> impl Foo {
     }
     0_u32
     //~^ ERROR mismatched types
-    //~| expected i32, found u32
+    //~| expected `i32`, found `u32`
 }
 
 fn sum_to(n: u32) -> impl Foo {
diff --git a/src/test/ui/impl-trait/equality.stderr b/src/test/ui/impl-trait/equality.stderr
index 7bb2d7d47a5..e53524e58d6 100644
--- a/src/test/ui/impl-trait/equality.stderr
+++ b/src/test/ui/impl-trait/equality.stderr
@@ -8,10 +8,7 @@ LL |         return 1_i32;
    |                ----- ...is found to be `i32` here
 LL |     }
 LL |     0_u32
-   |     ^^^^^ expected i32, found u32
-   |
-   = note: expected type `i32`
-              found type `u32`
+   |     ^^^^^ expected `i32`, found `u32`
 
 error[E0277]: cannot add `impl Foo` to `u32`
   --> $DIR/equality.rs:24:11
diff --git a/src/test/ui/impl-trait/equality2.rs b/src/test/ui/impl-trait/equality2.rs
index a01779e8fcd..abce8c8c204 100644
--- a/src/test/ui/impl-trait/equality2.rs
+++ b/src/test/ui/impl-trait/equality2.rs
@@ -25,20 +25,20 @@ fn main() {
     let _: u32 = hide(0_u32);
     //~^ ERROR mismatched types
     //~| expected type `u32`
-    //~| found type `impl Foo`
-    //~| expected u32, found opaque type
+    //~| found opaque type `impl Foo`
+    //~| expected `u32`, found opaque type
 
     let _: i32 = Leak::leak(hide(0_i32));
     //~^ ERROR mismatched types
     //~| expected type `i32`
-    //~| found type `<impl Foo as Leak>::T`
-    //~| expected i32, found associated type
+    //~| found associated type `<impl Foo as Leak>::T`
+    //~| expected `i32`, found associated type
 
     let mut x = (hide(0_u32), hide(0_i32));
     x = (x.1,
     //~^ ERROR mismatched types
-    //~| expected u32, found i32
+    //~| expected `u32`, found `i32`
          x.0);
     //~^ ERROR mismatched types
-    //~| expected i32, found u32
+    //~| expected `i32`, found `u32`
 }
diff --git a/src/test/ui/impl-trait/equality2.stderr b/src/test/ui/impl-trait/equality2.stderr
index e30e2626e9f..7a656fca28b 100644
--- a/src/test/ui/impl-trait/equality2.stderr
+++ b/src/test/ui/impl-trait/equality2.stderr
@@ -2,19 +2,19 @@ error[E0308]: mismatched types
   --> $DIR/equality2.rs:25:18
    |
 LL |     let _: u32 = hide(0_u32);
-   |                  ^^^^^^^^^^^ expected u32, found opaque type
+   |                  ^^^^^^^^^^^ expected `u32`, found opaque type
    |
-   = note: expected type `u32`
-              found type `impl Foo`
+   = note:     expected type `u32`
+           found opaque type `impl Foo`
 
 error[E0308]: mismatched types
   --> $DIR/equality2.rs:31:18
    |
 LL |     let _: i32 = Leak::leak(hide(0_i32));
-   |                  ^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found associated type
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found associated type
    |
-   = note: expected type `i32`
-              found type `<impl Foo as Leak>::T`
+   = note:         expected type `i32`
+           found associated type `<impl Foo as Leak>::T`
    = note: consider constraining the associated type `<impl Foo as Leak>::T` to `i32`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
 
@@ -22,19 +22,19 @@ error[E0308]: mismatched types
   --> $DIR/equality2.rs:38:10
    |
 LL |     x = (x.1,
-   |          ^^^ expected u32, found i32
+   |          ^^^ expected `u32`, found `i32`
    |
-   = note: expected type `impl Foo` (u32)
-              found type `impl Foo` (i32)
+   = note: expected opaque type `impl Foo` (`u32`)
+              found opaque type `impl Foo` (`i32`)
 
 error[E0308]: mismatched types
   --> $DIR/equality2.rs:41:10
    |
 LL |          x.0);
-   |          ^^^ expected i32, found u32
+   |          ^^^ expected `i32`, found `u32`
    |
-   = note: expected type `impl Foo` (i32)
-              found type `impl Foo` (u32)
+   = note: expected opaque type `impl Foo` (`i32`)
+              found opaque type `impl Foo` (`u32`)
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/impl-trait/impl-generic-mismatch-ab.stderr b/src/test/ui/impl-trait/impl-generic-mismatch-ab.stderr
index 7cb4677a2b1..638a0093fb2 100644
--- a/src/test/ui/impl-trait/impl-generic-mismatch-ab.stderr
+++ b/src/test/ui/impl-trait/impl-generic-mismatch-ab.stderr
@@ -9,8 +9,8 @@ LL |     fn foo<B: Debug>(&self, a: &impl Debug, b: &B) { }
    |            |
    |            expected type parameter
    |
-   = note: expected type `fn(&(), &B, &impl Debug)`
-              found type `fn(&(), &impl Debug, &B)`
+   = note: expected fn pointer `fn(&(), &B, &impl Debug)`
+              found fn pointer `fn(&(), &impl Debug, &B)`
    = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
 
diff --git a/src/test/ui/impl-trait/trait_type.stderr b/src/test/ui/impl-trait/trait_type.stderr
index 151dc681621..d95b62e469e 100644
--- a/src/test/ui/impl-trait/trait_type.stderr
+++ b/src/test/ui/impl-trait/trait_type.stderr
@@ -4,8 +4,8 @@ error[E0053]: method `fmt` has an incompatible type for trait
 LL |    fn fmt(&self, x: &str) -> () { }
    |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability
    |
-   = note: expected type `fn(&MyType, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
-              found type `fn(&MyType, &str)`
+   = note: expected fn pointer `fn(&MyType, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>`
+              found fn pointer `fn(&MyType, &str)`
 
 error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fmt::Display::fmt` has 2
   --> $DIR/trait_type.rs:12:11
diff --git a/src/test/ui/impl-trait/universal-mismatched-type.stderr b/src/test/ui/impl-trait/universal-mismatched-type.stderr
index ae20a5aa883..3ffa2b55712 100644
--- a/src/test/ui/impl-trait/universal-mismatched-type.stderr
+++ b/src/test/ui/impl-trait/universal-mismatched-type.stderr
@@ -8,8 +8,8 @@ LL | fn foo(x: impl Debug) -> String {
 LL |     x
    |     ^ expected struct `std::string::String`, found type parameter `impl Debug`
    |
-   = note: expected type `std::string::String`
-              found type `impl Debug`
+   = note:      expected struct `std::string::String`
+           found type parameter `impl Debug`
    = 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/impl-trait/universal-two-impl-traits.stderr b/src/test/ui/impl-trait/universal-two-impl-traits.stderr
index f540d319a27..7c120235fd1 100644
--- a/src/test/ui/impl-trait/universal-two-impl-traits.stderr
+++ b/src/test/ui/impl-trait/universal-two-impl-traits.stderr
@@ -9,8 +9,8 @@ LL |     let mut a = x;
 LL |     a = y;
    |         ^ expected type parameter `impl Debug`, found a different type parameter `impl Debug`
    |
-   = note: expected type `impl Debug` (type parameter `impl Debug`)
-              found type `impl Debug` (type parameter `impl Debug`)
+   = note: expected type parameter `impl Debug` (type parameter `impl Debug`)
+              found type parameter `impl Debug` (type parameter `impl Debug`)
    = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
 
diff --git a/src/test/ui/include-macros/mismatched-types.stderr b/src/test/ui/include-macros/mismatched-types.stderr
index 33204f1cfce..33daf372f98 100644
--- a/src/test/ui/include-macros/mismatched-types.stderr
+++ b/src/test/ui/include-macros/mismatched-types.stderr
@@ -2,19 +2,19 @@ error[E0308]: mismatched types
   --> $DIR/mismatched-types.rs:2:20
    |
 LL |     let b: &[u8] = include_str!("file.txt");
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found str
+   |                    ^^^^^^^^^^^^^^^^^^^^^^^^ expected slice `[u8]`, found `str`
    |
-   = note: expected type `&[u8]`
-              found type `&'static str`
+   = note: expected reference `&[u8]`
+              found reference `&'static str`
 
 error[E0308]: mismatched types
   --> $DIR/mismatched-types.rs:3:19
    |
 LL |     let s: &str = include_bytes!("file.txt");
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected str, found array of 0 elements
+   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `str`, found array `[u8; 0]`
    |
-   = note: expected type `&str`
-              found type `&'static [u8; 0]`
+   = note: expected reference `&str`
+              found reference `&'static [u8; 0]`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/indexing-requires-a-uint.stderr b/src/test/ui/indexing-requires-a-uint.stderr
index 7010a3ccbea..70614cbbf9f 100644
--- a/src/test/ui/indexing-requires-a-uint.stderr
+++ b/src/test/ui/indexing-requires-a-uint.stderr
@@ -11,7 +11,7 @@ error[E0308]: mismatched types
   --> $DIR/indexing-requires-a-uint.rs:12:18
    |
 LL |     bar::<isize>(i);  // i should not be re-coerced back to an isize
-   |                  ^ expected isize, found usize
+   |                  ^ expected `isize`, found `usize`
    |
 help: you can convert an `usize` to `isize` and panic if the converted value wouldn't fit
    |
diff --git a/src/test/ui/integer-literal-suffix-inference.rs b/src/test/ui/integer-literal-suffix-inference.rs
index 2da3286c700..3f4bedc4c22 100644
--- a/src/test/ui/integer-literal-suffix-inference.rs
+++ b/src/test/ui/integer-literal-suffix-inference.rs
@@ -31,132 +31,132 @@ fn main() {
     id_i8(a8); // ok
     id_i8(a16);
     //~^ ERROR mismatched types
-    //~| expected i8, found i16
+    //~| expected `i8`, found `i16`
     id_i8(a32);
     //~^ ERROR mismatched types
-    //~| expected i8, found i32
+    //~| expected `i8`, found `i32`
     id_i8(a64);
     //~^ ERROR mismatched types
-    //~| expected i8, found i64
+    //~| expected `i8`, found `i64`
 
     id_i16(a8);
     //~^ ERROR mismatched types
-    //~| expected i16, found i8
+    //~| expected `i16`, found `i8`
     id_i16(a16); // ok
     id_i16(a32);
     //~^ ERROR mismatched types
-    //~| expected i16, found i32
+    //~| expected `i16`, found `i32`
     id_i16(a64);
     //~^ ERROR mismatched types
-    //~| expected i16, found i64
+    //~| expected `i16`, found `i64`
 
     id_i32(a8);
     //~^ ERROR mismatched types
-    //~| expected i32, found i8
+    //~| expected `i32`, found `i8`
     id_i32(a16);
     //~^ ERROR mismatched types
-    //~| expected i32, found i16
+    //~| expected `i32`, found `i16`
     id_i32(a32); // ok
     id_i32(a64);
     //~^ ERROR mismatched types
-    //~| expected i32, found i64
+    //~| expected `i32`, found `i64`
 
     id_i64(a8);
     //~^ ERROR mismatched types
-    //~| expected i64, found i8
+    //~| expected `i64`, found `i8`
     id_i64(a16);
     //~^ ERROR mismatched types
-    //~| expected i64, found i16
+    //~| expected `i64`, found `i16`
     id_i64(a32);
     //~^ ERROR mismatched types
-    //~| expected i64, found i32
+    //~| expected `i64`, found `i32`
     id_i64(a64); // ok
 
     id_i8(c8); // ok
     id_i8(c16);
     //~^ ERROR mismatched types
-    //~| expected i8, found i16
+    //~| expected `i8`, found `i16`
     id_i8(c32);
     //~^ ERROR mismatched types
-    //~| expected i8, found i32
+    //~| expected `i8`, found `i32`
     id_i8(c64);
     //~^ ERROR mismatched types
-    //~| expected i8, found i64
+    //~| expected `i8`, found `i64`
 
     id_i16(c8);
     //~^ ERROR mismatched types
-    //~| expected i16, found i8
+    //~| expected `i16`, found `i8`
     id_i16(c16); // ok
     id_i16(c32);
     //~^ ERROR mismatched types
-    //~| expected i16, found i32
+    //~| expected `i16`, found `i32`
     id_i16(c64);
     //~^ ERROR mismatched types
-    //~| expected i16, found i64
+    //~| expected `i16`, found `i64`
 
     id_i32(c8);
     //~^ ERROR mismatched types
-    //~| expected i32, found i8
+    //~| expected `i32`, found `i8`
     id_i32(c16);
     //~^ ERROR mismatched types
-    //~| expected i32, found i16
+    //~| expected `i32`, found `i16`
     id_i32(c32); // ok
     id_i32(c64);
     //~^ ERROR mismatched types
-    //~| expected i32, found i64
+    //~| expected `i32`, found `i64`
 
     id_i64(a8);
     //~^ ERROR mismatched types
-    //~| expected i64, found i8
+    //~| expected `i64`, found `i8`
     id_i64(a16);
     //~^ ERROR mismatched types
-    //~| expected i64, found i16
+    //~| expected `i64`, found `i16`
     id_i64(a32);
     //~^ ERROR mismatched types
-    //~| expected i64, found i32
+    //~| expected `i64`, found `i32`
     id_i64(a64); // ok
 
     id_u8(b8); // ok
     id_u8(b16);
     //~^ ERROR mismatched types
-    //~| expected u8, found u16
+    //~| expected `u8`, found `u16`
     id_u8(b32);
     //~^ ERROR mismatched types
-    //~| expected u8, found u32
+    //~| expected `u8`, found `u32`
     id_u8(b64);
     //~^ ERROR mismatched types
-    //~| expected u8, found u64
+    //~| expected `u8`, found `u64`
 
     id_u16(b8);
     //~^ ERROR mismatched types
-    //~| expected u16, found u8
+    //~| expected `u16`, found `u8`
     id_u16(b16); // ok
     id_u16(b32);
     //~^ ERROR mismatched types
-    //~| expected u16, found u32
+    //~| expected `u16`, found `u32`
     id_u16(b64);
     //~^ ERROR mismatched types
-    //~| expected u16, found u64
+    //~| expected `u16`, found `u64`
 
     id_u32(b8);
     //~^ ERROR mismatched types
-    //~| expected u32, found u8
+    //~| expected `u32`, found `u8`
     id_u32(b16);
     //~^ ERROR mismatched types
-    //~| expected u32, found u16
+    //~| expected `u32`, found `u16`
     id_u32(b32); // ok
     id_u32(b64);
     //~^ ERROR mismatched types
-    //~| expected u32, found u64
+    //~| expected `u32`, found `u64`
 
     id_u64(b8);
     //~^ ERROR mismatched types
-    //~| expected u64, found u8
+    //~| expected `u64`, found `u8`
     id_u64(b16);
     //~^ ERROR mismatched types
-    //~| expected u64, found u16
+    //~| expected `u64`, found `u16`
     id_u64(b32);
     //~^ ERROR mismatched types
-    //~| expected u64, found u32
+    //~| expected `u64`, found `u32`
     id_u64(b64); // ok
 }
diff --git a/src/test/ui/integer-literal-suffix-inference.stderr b/src/test/ui/integer-literal-suffix-inference.stderr
index bbb57d97c39..a34f0645c6b 100644
--- a/src/test/ui/integer-literal-suffix-inference.stderr
+++ b/src/test/ui/integer-literal-suffix-inference.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:32:11
    |
 LL |     id_i8(a16);
-   |           ^^^ expected i8, found i16
+   |           ^^^ expected `i8`, found `i16`
    |
 help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit
    |
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:35:11
    |
 LL |     id_i8(a32);
-   |           ^^^ expected i8, found i32
+   |           ^^^ expected `i8`, found `i32`
    |
 help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit
    |
@@ -24,7 +24,7 @@ error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:38:11
    |
 LL |     id_i8(a64);
-   |           ^^^ expected i8, found i64
+   |           ^^^ expected `i8`, found `i64`
    |
 help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit
    |
@@ -37,14 +37,14 @@ error[E0308]: mismatched types
 LL |     id_i16(a8);
    |            ^^
    |            |
-   |            expected i16, found i8
+   |            expected `i16`, found `i8`
    |            help: you can convert an `i8` to `i16`: `a8.into()`
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:46:12
    |
 LL |     id_i16(a32);
-   |            ^^^ expected i16, found i32
+   |            ^^^ expected `i16`, found `i32`
    |
 help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit
    |
@@ -55,7 +55,7 @@ error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:49:12
    |
 LL |     id_i16(a64);
-   |            ^^^ expected i16, found i64
+   |            ^^^ expected `i16`, found `i64`
    |
 help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit
    |
@@ -68,7 +68,7 @@ error[E0308]: mismatched types
 LL |     id_i32(a8);
    |            ^^
    |            |
-   |            expected i32, found i8
+   |            expected `i32`, found `i8`
    |            help: you can convert an `i8` to `i32`: `a8.into()`
 
 error[E0308]: mismatched types
@@ -77,14 +77,14 @@ error[E0308]: mismatched types
 LL |     id_i32(a16);
    |            ^^^
    |            |
-   |            expected i32, found i16
+   |            expected `i32`, found `i16`
    |            help: you can convert an `i16` to `i32`: `a16.into()`
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:60:12
    |
 LL |     id_i32(a64);
-   |            ^^^ expected i32, found i64
+   |            ^^^ expected `i32`, found `i64`
    |
 help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
    |
@@ -97,7 +97,7 @@ error[E0308]: mismatched types
 LL |     id_i64(a8);
    |            ^^
    |            |
-   |            expected i64, found i8
+   |            expected `i64`, found `i8`
    |            help: you can convert an `i8` to `i64`: `a8.into()`
 
 error[E0308]: mismatched types
@@ -106,7 +106,7 @@ error[E0308]: mismatched types
 LL |     id_i64(a16);
    |            ^^^
    |            |
-   |            expected i64, found i16
+   |            expected `i64`, found `i16`
    |            help: you can convert an `i16` to `i64`: `a16.into()`
 
 error[E0308]: mismatched types
@@ -115,14 +115,14 @@ error[E0308]: mismatched types
 LL |     id_i64(a32);
    |            ^^^
    |            |
-   |            expected i64, found i32
+   |            expected `i64`, found `i32`
    |            help: you can convert an `i32` to `i64`: `a32.into()`
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:76:11
    |
 LL |     id_i8(c16);
-   |           ^^^ expected i8, found i16
+   |           ^^^ expected `i8`, found `i16`
    |
 help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit
    |
@@ -133,7 +133,7 @@ error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:79:11
    |
 LL |     id_i8(c32);
-   |           ^^^ expected i8, found i32
+   |           ^^^ expected `i8`, found `i32`
    |
 help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit
    |
@@ -144,7 +144,7 @@ error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:82:11
    |
 LL |     id_i8(c64);
-   |           ^^^ expected i8, found i64
+   |           ^^^ expected `i8`, found `i64`
    |
 help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit
    |
@@ -157,14 +157,14 @@ error[E0308]: mismatched types
 LL |     id_i16(c8);
    |            ^^
    |            |
-   |            expected i16, found i8
+   |            expected `i16`, found `i8`
    |            help: you can convert an `i8` to `i16`: `c8.into()`
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:90:12
    |
 LL |     id_i16(c32);
-   |            ^^^ expected i16, found i32
+   |            ^^^ expected `i16`, found `i32`
    |
 help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit
    |
@@ -175,7 +175,7 @@ error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:93:12
    |
 LL |     id_i16(c64);
-   |            ^^^ expected i16, found i64
+   |            ^^^ expected `i16`, found `i64`
    |
 help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit
    |
@@ -188,7 +188,7 @@ error[E0308]: mismatched types
 LL |     id_i32(c8);
    |            ^^
    |            |
-   |            expected i32, found i8
+   |            expected `i32`, found `i8`
    |            help: you can convert an `i8` to `i32`: `c8.into()`
 
 error[E0308]: mismatched types
@@ -197,14 +197,14 @@ error[E0308]: mismatched types
 LL |     id_i32(c16);
    |            ^^^
    |            |
-   |            expected i32, found i16
+   |            expected `i32`, found `i16`
    |            help: you can convert an `i16` to `i32`: `c16.into()`
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:104:12
    |
 LL |     id_i32(c64);
-   |            ^^^ expected i32, found i64
+   |            ^^^ expected `i32`, found `i64`
    |
 help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
    |
@@ -217,7 +217,7 @@ error[E0308]: mismatched types
 LL |     id_i64(a8);
    |            ^^
    |            |
-   |            expected i64, found i8
+   |            expected `i64`, found `i8`
    |            help: you can convert an `i8` to `i64`: `a8.into()`
 
 error[E0308]: mismatched types
@@ -226,7 +226,7 @@ error[E0308]: mismatched types
 LL |     id_i64(a16);
    |            ^^^
    |            |
-   |            expected i64, found i16
+   |            expected `i64`, found `i16`
    |            help: you can convert an `i16` to `i64`: `a16.into()`
 
 error[E0308]: mismatched types
@@ -235,14 +235,14 @@ error[E0308]: mismatched types
 LL |     id_i64(a32);
    |            ^^^
    |            |
-   |            expected i64, found i32
+   |            expected `i64`, found `i32`
    |            help: you can convert an `i32` to `i64`: `a32.into()`
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:120:11
    |
 LL |     id_u8(b16);
-   |           ^^^ expected u8, found u16
+   |           ^^^ expected `u8`, found `u16`
    |
 help: you can convert an `u16` to `u8` and panic if the converted value wouldn't fit
    |
@@ -253,7 +253,7 @@ error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:123:11
    |
 LL |     id_u8(b32);
-   |           ^^^ expected u8, found u32
+   |           ^^^ expected `u8`, found `u32`
    |
 help: you can convert an `u32` to `u8` and panic if the converted value wouldn't fit
    |
@@ -264,7 +264,7 @@ error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:126:11
    |
 LL |     id_u8(b64);
-   |           ^^^ expected u8, found u64
+   |           ^^^ expected `u8`, found `u64`
    |
 help: you can convert an `u64` to `u8` and panic if the converted value wouldn't fit
    |
@@ -277,14 +277,14 @@ error[E0308]: mismatched types
 LL |     id_u16(b8);
    |            ^^
    |            |
-   |            expected u16, found u8
+   |            expected `u16`, found `u8`
    |            help: you can convert an `u8` to `u16`: `b8.into()`
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:134:12
    |
 LL |     id_u16(b32);
-   |            ^^^ expected u16, found u32
+   |            ^^^ expected `u16`, found `u32`
    |
 help: you can convert an `u32` to `u16` and panic if the converted value wouldn't fit
    |
@@ -295,7 +295,7 @@ error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:137:12
    |
 LL |     id_u16(b64);
-   |            ^^^ expected u16, found u64
+   |            ^^^ expected `u16`, found `u64`
    |
 help: you can convert an `u64` to `u16` and panic if the converted value wouldn't fit
    |
@@ -308,7 +308,7 @@ error[E0308]: mismatched types
 LL |     id_u32(b8);
    |            ^^
    |            |
-   |            expected u32, found u8
+   |            expected `u32`, found `u8`
    |            help: you can convert an `u8` to `u32`: `b8.into()`
 
 error[E0308]: mismatched types
@@ -317,14 +317,14 @@ error[E0308]: mismatched types
 LL |     id_u32(b16);
    |            ^^^
    |            |
-   |            expected u32, found u16
+   |            expected `u32`, found `u16`
    |            help: you can convert an `u16` to `u32`: `b16.into()`
 
 error[E0308]: mismatched types
   --> $DIR/integer-literal-suffix-inference.rs:148:12
    |
 LL |     id_u32(b64);
-   |            ^^^ expected u32, found u64
+   |            ^^^ expected `u32`, found `u64`
    |
 help: you can convert an `u64` to `u32` and panic if the converted value wouldn't fit
    |
@@ -337,7 +337,7 @@ error[E0308]: mismatched types
 LL |     id_u64(b8);
    |            ^^
    |            |
-   |            expected u64, found u8
+   |            expected `u64`, found `u8`
    |            help: you can convert an `u8` to `u64`: `b8.into()`
 
 error[E0308]: mismatched types
@@ -346,7 +346,7 @@ error[E0308]: mismatched types
 LL |     id_u64(b16);
    |            ^^^
    |            |
-   |            expected u64, found u16
+   |            expected `u64`, found `u16`
    |            help: you can convert an `u16` to `u64`: `b16.into()`
 
 error[E0308]: mismatched types
@@ -355,7 +355,7 @@ error[E0308]: mismatched types
 LL |     id_u64(b32);
    |            ^^^
    |            |
-   |            expected u64, found u32
+   |            expected `u64`, found `u32`
    |            help: you can convert an `u32` to `u64`: `b32.into()`
 
 error: aborting due to 36 previous errors
diff --git a/src/test/ui/integral-variable-unification-error.rs b/src/test/ui/integral-variable-unification-error.rs
index 3eefcdea3d9..5200b4a829d 100644
--- a/src/test/ui/integral-variable-unification-error.rs
+++ b/src/test/ui/integral-variable-unification-error.rs
@@ -2,7 +2,5 @@ fn main() {
     let mut x = 2;
     x = 5.0;
     //~^ ERROR mismatched types
-    //~| expected type `{integer}`
-    //~| found type `{float}`
     //~| expected integer, found floating-point number
 }
diff --git a/src/test/ui/integral-variable-unification-error.stderr b/src/test/ui/integral-variable-unification-error.stderr
index 262203b7b8e..b49bff1b0d8 100644
--- a/src/test/ui/integral-variable-unification-error.stderr
+++ b/src/test/ui/integral-variable-unification-error.stderr
@@ -3,9 +3,6 @@ error[E0308]: mismatched types
    |
 LL |     x = 5.0;
    |         ^^^ expected integer, found floating-point number
-   |
-   = note: expected type `{integer}`
-              found type `{float}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-10176.rs b/src/test/ui/issues/issue-10176.rs
index ff0619b489d..6277aa05eb3 100644
--- a/src/test/ui/issues/issue-10176.rs
+++ b/src/test/ui/issues/issue-10176.rs
@@ -2,8 +2,8 @@ fn f() -> isize {
     (return 1, return 2)
 //~^ ERROR mismatched types
 //~| expected type `isize`
-//~| found type `(!, !)`
-//~| expected isize, found tuple
+//~| found tuple `(!, !)`
+//~| expected `isize`, found tuple
 }
 
 fn main() {}
diff --git a/src/test/ui/issues/issue-10176.stderr b/src/test/ui/issues/issue-10176.stderr
index 45482447ebe..cd5361ffad3 100644
--- a/src/test/ui/issues/issue-10176.stderr
+++ b/src/test/ui/issues/issue-10176.stderr
@@ -4,10 +4,10 @@ error[E0308]: mismatched types
 LL | fn f() -> isize {
    |           ----- expected `isize` because of return type
 LL |     (return 1, return 2)
-   |     ^^^^^^^^^^^^^^^^^^^^ expected isize, found tuple
+   |     ^^^^^^^^^^^^^^^^^^^^ expected `isize`, found tuple
    |
    = note: expected type `isize`
-              found type `(!, !)`
+             found tuple `(!, !)`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-10764.stderr b/src/test/ui/issues/issue-10764.stderr
index c5f1887b796..b0bafc9942e 100644
--- a/src/test/ui/issues/issue-10764.stderr
+++ b/src/test/ui/issues/issue-10764.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL | fn main() { f(bar) }
    |               ^^^ expected "Rust" fn, found "C" fn
    |
-   = note: expected type `fn()`
-              found type `extern "C" fn() {bar}`
+   = note: expected fn pointer `fn()`
+                 found fn item `extern "C" fn() {bar}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-11319.rs b/src/test/ui/issues/issue-11319.rs
index 726c437355e..8c2bafe63bd 100644
--- a/src/test/ui/issues/issue-11319.rs
+++ b/src/test/ui/issues/issue-11319.rs
@@ -7,8 +7,7 @@ fn main() {
         //~^ NOTE this is found to be of type `bool`
         None    => (),
         //~^ ERROR match arms have incompatible types
-        //~| NOTE expected bool, found ()
-        //~| NOTE expected type `bool`
+        //~| NOTE expected `bool`, found `()`
         _       => true
     }
 }
diff --git a/src/test/ui/issues/issue-11319.stderr b/src/test/ui/issues/issue-11319.stderr
index 6179f9d3fe0..7663a32883c 100644
--- a/src/test/ui/issues/issue-11319.stderr
+++ b/src/test/ui/issues/issue-11319.stderr
@@ -10,14 +10,11 @@ LL | |         Some(2) => true,
    | |                    ---- this is found to be of type `bool`
 LL | |
 LL | |         None    => (),
-   | |                    ^^ expected bool, found ()
+   | |                    ^^ expected `bool`, found `()`
 ...  |
 LL | |         _       => true
 LL | |     }
    | |_____- `match` arms have incompatible types
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-11374.stderr b/src/test/ui/issues/issue-11374.stderr
index 8d7e6c81f4f..bc7d1247502 100644
--- a/src/test/ui/issues/issue-11374.stderr
+++ b/src/test/ui/issues/issue-11374.stderr
@@ -4,11 +4,11 @@ error[E0308]: mismatched types
 LL |     c.read_to(v);
    |               ^
    |               |
-   |               expected &mut [u8], found struct `std::vec::Vec`
+   |               expected `&mut [u8]`, found struct `std::vec::Vec`
    |               help: consider mutably borrowing here: `&mut v`
    |
-   = note: expected type `&mut [u8]`
-              found type `std::vec::Vec<_>`
+   = note: expected mutable reference `&mut [u8]`
+                         found struct `std::vec::Vec<_>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-11515.stderr b/src/test/ui/issues/issue-11515.stderr
index 0ab0c7dba0b..b53563d7b65 100644
--- a/src/test/ui/issues/issue-11515.stderr
+++ b/src/test/ui/issues/issue-11515.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let test = box Test { func: closure };
    |                                 ^^^^^^^ expected trait `std::ops::FnMut`, found trait `std::ops::Fn`
    |
-   = note: expected type `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>`
-              found type `std::boxed::Box<(dyn std::ops::Fn() + 'static)>`
+   = note: expected struct `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>`
+              found struct `std::boxed::Box<(dyn std::ops::Fn() + 'static)>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-11844.stderr b/src/test/ui/issues/issue-11844.stderr
index 1c4321f1b4a..1b22d6f45cf 100644
--- a/src/test/ui/issues/issue-11844.stderr
+++ b/src/test/ui/issues/issue-11844.stderr
@@ -6,8 +6,8 @@ LL |     match a {
 LL |         Ok(a) =>
    |         ^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
    |
-   = note: expected type `std::option::Option<std::boxed::Box<{integer}>>`
-              found type `std::result::Result<_, _>`
+   = note: expected enum `std::option::Option<std::boxed::Box<{integer}>>`
+              found enum `std::result::Result<_, _>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-12552.stderr b/src/test/ui/issues/issue-12552.stderr
index 6eaac1b3577..ecafef259d3 100644
--- a/src/test/ui/issues/issue-12552.stderr
+++ b/src/test/ui/issues/issue-12552.stderr
@@ -6,8 +6,8 @@ LL |   match t {
 LL |     Some(k) => match k {
    |     ^^^^^^^ expected enum `std::result::Result`, found enum `std::option::Option`
    |
-   = note: expected type `std::result::Result<_, {integer}>`
-              found type `std::option::Option<_>`
+   = note: expected enum `std::result::Result<_, {integer}>`
+              found enum `std::option::Option<_>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-12552.rs:9:5
@@ -15,8 +15,8 @@ error[E0308]: mismatched types
 LL |     None => ()
    |     ^^^^ expected enum `std::result::Result`, found enum `std::option::Option`
    |
-   = note: expected type `std::result::Result<_, {integer}>`
-              found type `std::option::Option<_>`
+   = note: expected enum `std::result::Result<_, {integer}>`
+              found enum `std::option::Option<_>`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-12997-2.stderr b/src/test/ui/issues/issue-12997-2.stderr
index df8c936b824..01f8e348836 100644
--- a/src/test/ui/issues/issue-12997-2.stderr
+++ b/src/test/ui/issues/issue-12997-2.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-12997-2.rs:8:1
    |
 LL | fn bar(x: isize) { }
-   | ^^^^^^^^^^^^^^^^^^^^ expected isize, found mutable reference
-   |
-   = note: expected type `isize`
-              found type `&mut test::Bencher`
+   | ^^^^^^^^^^^^^^^^^^^^ expected `isize`, found `&mut test::Bencher`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-13033.rs b/src/test/ui/issues/issue-13033.rs
index e5274eb823d..7631831a81a 100644
--- a/src/test/ui/issues/issue-13033.rs
+++ b/src/test/ui/issues/issue-13033.rs
@@ -7,8 +7,8 @@ struct Baz;
 impl Foo for Baz {
     fn bar(&mut self, other: &dyn Foo) {}
     //~^ ERROR method `bar` has an incompatible type for trait
-    //~| expected type `fn(&mut Baz, &mut dyn Foo)`
-    //~| found type `fn(&mut Baz, &dyn Foo)`
+    //~| expected fn pointer `fn(&mut Baz, &mut dyn Foo)`
+    //~| found fn pointer `fn(&mut Baz, &dyn Foo)`
 }
 
 fn main() {}
diff --git a/src/test/ui/issues/issue-13033.stderr b/src/test/ui/issues/issue-13033.stderr
index 195d0c39b29..a8473c8a524 100644
--- a/src/test/ui/issues/issue-13033.stderr
+++ b/src/test/ui/issues/issue-13033.stderr
@@ -7,8 +7,8 @@ LL |     fn bar(&mut self, other: &mut dyn Foo);
 LL |     fn bar(&mut self, other: &dyn Foo) {}
    |                              ^^^^^^^^ types differ in mutability
    |
-   = note: expected type `fn(&mut Baz, &mut dyn Foo)`
-              found type `fn(&mut Baz, &dyn Foo)`
+   = note: expected fn pointer `fn(&mut Baz, &mut dyn Foo)`
+              found fn pointer `fn(&mut Baz, &dyn Foo)`
 help: consider change the type to match the mutability in trait
    |
 LL |     fn bar(&mut self, other: &mut dyn Foo) {}
diff --git a/src/test/ui/issues/issue-13359.rs b/src/test/ui/issues/issue-13359.rs
index 7409426dc39..9129790c501 100644
--- a/src/test/ui/issues/issue-13359.rs
+++ b/src/test/ui/issues/issue-13359.rs
@@ -5,9 +5,9 @@ fn bar(_s: u32) { }
 fn main() {
     foo(1*(1 as isize));
     //~^ ERROR mismatched types
-    //~| expected i16, found isize
+    //~| expected `i16`, found `isize`
 
     bar(1*(1 as usize));
     //~^ ERROR mismatched types
-    //~| expected u32, found usize
+    //~| expected `u32`, found `usize`
 }
diff --git a/src/test/ui/issues/issue-13359.stderr b/src/test/ui/issues/issue-13359.stderr
index 76c5f39fe10..68258a8888a 100644
--- a/src/test/ui/issues/issue-13359.stderr
+++ b/src/test/ui/issues/issue-13359.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-13359.rs:6:9
    |
 LL |     foo(1*(1 as isize));
-   |         ^^^^^^^^^^^^^^ expected i16, found isize
+   |         ^^^^^^^^^^^^^^ expected `i16`, found `isize`
    |
 help: you can convert an `isize` to `i16` and panic if the converted value wouldn't fit
    |
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-13359.rs:10:9
    |
 LL |     bar(1*(1 as usize));
-   |         ^^^^^^^^^^^^^^ expected u32, found usize
+   |         ^^^^^^^^^^^^^^ expected `u32`, found `usize`
    |
 help: you can convert an `usize` to `u32` and panic if the converted value wouldn't fit
    |
diff --git a/src/test/ui/issues/issue-13407.stderr b/src/test/ui/issues/issue-13407.stderr
index ddd99e6a3c9..5a465cc533b 100644
--- a/src/test/ui/issues/issue-13407.stderr
+++ b/src/test/ui/issues/issue-13407.stderr
@@ -9,9 +9,6 @@ error[E0308]: mismatched types
    |
 LL |     A::C = 1;
    |            ^ expected struct `A::C`, found integer
-   |
-   = note: expected type `A::C`
-              found type `{integer}`
 
 error[E0070]: invalid left-hand side expression
   --> $DIR/issue-13407.rs:6:5
diff --git a/src/test/ui/issues/issue-13446.stderr b/src/test/ui/issues/issue-13446.stderr
index a27bfeda64c..13c35dd84f7 100644
--- a/src/test/ui/issues/issue-13446.stderr
+++ b/src/test/ui/issues/issue-13446.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/issue-13446.rs:3:26
    |
 LL | static VEC: [u32; 256] = vec![];
-   |                          ^^^^^^ expected array of 256 elements, found struct `std::vec::Vec`
+   |                          ^^^^^^ expected array `[u32; 256]`, found struct `std::vec::Vec`
    |
-   = note: expected type `[u32; 256]`
-              found type `std::vec::Vec<_>`
+   = note: expected array `[u32; 256]`
+             found struct `std::vec::Vec<_>`
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error: aborting due to previous error
diff --git a/src/test/ui/issues/issue-13466.rs b/src/test/ui/issues/issue-13466.rs
index c285bfa107d..411e7cbeebd 100644
--- a/src/test/ui/issues/issue-13466.rs
+++ b/src/test/ui/issues/issue-13466.rs
@@ -7,14 +7,14 @@ pub fn main() {
     let _x: usize = match Some(1) {
         Ok(u) => u,
         //~^ ERROR mismatched types
-        //~| expected type `std::option::Option<{integer}>`
-        //~| found type `std::result::Result<_, _>`
+        //~| expected enum `std::option::Option<{integer}>`
+        //~| found enum `std::result::Result<_, _>`
         //~| expected enum `std::option::Option`, found enum `std::result::Result`
 
         Err(e) => panic!(e)
         //~^ ERROR mismatched types
-        //~| expected type `std::option::Option<{integer}>`
-        //~| found type `std::result::Result<_, _>`
+        //~| expected enum `std::option::Option<{integer}>`
+        //~| found enum `std::result::Result<_, _>`
         //~| expected enum `std::option::Option`, found enum `std::result::Result`
     };
 }
diff --git a/src/test/ui/issues/issue-13466.stderr b/src/test/ui/issues/issue-13466.stderr
index 66255891f46..fc20615757a 100644
--- a/src/test/ui/issues/issue-13466.stderr
+++ b/src/test/ui/issues/issue-13466.stderr
@@ -6,8 +6,8 @@ LL |     let _x: usize = match Some(1) {
 LL |         Ok(u) => u,
    |         ^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
    |
-   = note: expected type `std::option::Option<{integer}>`
-              found type `std::result::Result<_, _>`
+   = note: expected enum `std::option::Option<{integer}>`
+              found enum `std::result::Result<_, _>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-13466.rs:14:9
@@ -18,8 +18,8 @@ LL |     let _x: usize = match Some(1) {
 LL |         Err(e) => panic!(e)
    |         ^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
    |
-   = note: expected type `std::option::Option<{integer}>`
-              found type `std::result::Result<_, _>`
+   = note: expected enum `std::option::Option<{integer}>`
+              found enum `std::result::Result<_, _>`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-1362.stderr b/src/test/ui/issues/issue-1362.stderr
index 7ffbbbce7a8..de67a72a639 100644
--- a/src/test/ui/issues/issue-1362.stderr
+++ b/src/test/ui/issues/issue-1362.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-1362.rs:4:16
    |
 LL |   let x: u32 = 20i32;
-   |                ^^^^^ expected u32, found i32
+   |                ^^^^^ expected `u32`, found `i32`
    |
 help: change the type of the numeric literal from `i32` to `u32`
    |
diff --git a/src/test/ui/issues/issue-13853.stderr b/src/test/ui/issues/issue-13853.stderr
index 67721356208..cdb261a238e 100644
--- a/src/test/ui/issues/issue-13853.stderr
+++ b/src/test/ui/issues/issue-13853.stderr
@@ -7,8 +7,8 @@ LL |     fn nodes<'a, I: Iterator<Item=&'a N>>(&self) -> I
 LL |         self.iter()
    |         ^^^^^^^^^^^ expected type parameter `I`, found struct `std::slice::Iter`
    |
-   = note: expected type `I`
-              found type `std::slice::Iter<'_, N>`
+   = note: expected type parameter `I`
+                      found struct `std::slice::Iter<'_, N>`
    = 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
 
@@ -27,8 +27,8 @@ LL |     iterate(graph);
    |             expected reference, found struct `std::vec::Vec`
    |             help: consider borrowing here: `&graph`
    |
-   = note: expected type `&_`
-              found type `std::vec::Vec<Stuff>`
+   = note: expected reference `&_`
+                 found struct `std::vec::Vec<Stuff>`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/issues/issue-14091.stderr b/src/test/ui/issues/issue-14091.stderr
index 24a076624ed..7db47347808 100644
--- a/src/test/ui/issues/issue-14091.stderr
+++ b/src/test/ui/issues/issue-14091.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-14091.rs:2:5
    |
 LL |     assert!(1,1);
-   |     ^^^^^^^^^^^^^ expected bool, found integer
-   |
-   = note: expected type `bool`
-              found type `{integer}`
+   |     ^^^^^^^^^^^^^ expected `bool`, found integer
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-1448-2.stderr b/src/test/ui/issues/issue-1448-2.stderr
index 28c561462d4..9cf2f09e177 100644
--- a/src/test/ui/issues/issue-1448-2.stderr
+++ b/src/test/ui/issues/issue-1448-2.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-1448-2.rs:6:24
    |
 LL |     println!("{}", foo(10i32));
-   |                        ^^^^^ expected u32, found i32
+   |                        ^^^^^ expected `u32`, found `i32`
    |
 help: change the type of the numeric literal from `i32` to `u32`
    |
diff --git a/src/test/ui/issues/issue-14541.rs b/src/test/ui/issues/issue-14541.rs
index 705c3d326c6..555ec9f9868 100644
--- a/src/test/ui/issues/issue-14541.rs
+++ b/src/test/ui/issues/issue-14541.rs
@@ -4,8 +4,6 @@ struct Vec3 { y: f32, z: f32 }
 fn make(v: Vec2) {
     let Vec3 { y: _, z: _ } = v;
     //~^ ERROR mismatched types
-    //~| expected type `Vec2`
-    //~| found type `Vec3`
     //~| expected struct `Vec2`, found struct `Vec3`
 }
 
diff --git a/src/test/ui/issues/issue-14541.stderr b/src/test/ui/issues/issue-14541.stderr
index aa0ae5ce443..c5512e03007 100644
--- a/src/test/ui/issues/issue-14541.stderr
+++ b/src/test/ui/issues/issue-14541.stderr
@@ -3,9 +3,6 @@ error[E0308]: mismatched types
    |
 LL |     let Vec3 { y: _, z: _ } = v;
    |         ^^^^^^^^^^^^^^^^^^^ expected struct `Vec2`, found struct `Vec3`
-   |
-   = note: expected type `Vec2`
-              found type `Vec3`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-15094.rs b/src/test/ui/issues/issue-15094.rs
index dea85df5efe..71b75a6e7e0 100644
--- a/src/test/ui/issues/issue-15094.rs
+++ b/src/test/ui/issues/issue-15094.rs
@@ -10,8 +10,8 @@ impl<T: fmt::Debug> ops::FnOnce<(),> for Debuger<T> {
     type Output = ();
     fn call_once(self, _args: ()) {
     //~^ ERROR `call_once` has an incompatible type for trait
-    //~| expected type `extern "rust-call" fn
-    //~| found type `fn
+    //~| expected fn pointer `extern "rust-call" fn
+    //~| found fn pointer `fn
         println!("{:?}", self.x);
     }
 }
diff --git a/src/test/ui/issues/issue-15094.stderr b/src/test/ui/issues/issue-15094.stderr
index 07e147132f7..7b392fe1ac7 100644
--- a/src/test/ui/issues/issue-15094.stderr
+++ b/src/test/ui/issues/issue-15094.stderr
@@ -4,8 +4,8 @@ error[E0053]: method `call_once` has an incompatible type for trait
 LL |     fn call_once(self, _args: ()) {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected "rust-call" fn, found "Rust" fn
    |
-   = note: expected type `extern "rust-call" fn(Debuger<T>, ())`
-              found type `fn(Debuger<T>, ())`
+   = note: expected fn pointer `extern "rust-call" fn(Debuger<T>, ())`
+              found fn pointer `fn(Debuger<T>, ())`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-15783.rs b/src/test/ui/issues/issue-15783.rs
index 5189f550cfb..0c1db02a8e6 100644
--- a/src/test/ui/issues/issue-15783.rs
+++ b/src/test/ui/issues/issue-15783.rs
@@ -7,8 +7,8 @@ fn main() {
     let x = Some(&[name]);
     let msg = foo(x);
     //~^ ERROR mismatched types
-    //~| expected type `std::option::Option<&[&str]>`
-    //~| found type `std::option::Option<&[&str; 1]>`
-    //~| expected slice, found array of 1 element
+    //~| expected enum `std::option::Option<&[&str]>`
+    //~| found enum `std::option::Option<&[&str; 1]>`
+    //~| expected slice `[&str]`, found array `[&str; 1]`
     assert_eq!(msg, 3);
 }
diff --git a/src/test/ui/issues/issue-15783.stderr b/src/test/ui/issues/issue-15783.stderr
index 1d54b2830d6..74a96df5b1b 100644
--- a/src/test/ui/issues/issue-15783.stderr
+++ b/src/test/ui/issues/issue-15783.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/issue-15783.rs:8:19
    |
 LL |     let msg = foo(x);
-   |                   ^ expected slice, found array of 1 element
+   |                   ^ expected slice `[&str]`, found array `[&str; 1]`
    |
-   = note: expected type `std::option::Option<&[&str]>`
-              found type `std::option::Option<&[&str; 1]>`
+   = note: expected enum `std::option::Option<&[&str]>`
+              found enum `std::option::Option<&[&str; 1]>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-15896.rs b/src/test/ui/issues/issue-15896.rs
index 3054af7b930..a11c9d07f6f 100644
--- a/src/test/ui/issues/issue-15896.rs
+++ b/src/test/ui/issues/issue-15896.rs
@@ -10,8 +10,6 @@ fn main() {
         E::B(
           Tau{t: x},
           //~^ ERROR mismatched types
-          //~| expected type `main::R`
-          //~| found type `main::Tau`
           //~| expected enum `main::R`, found struct `main::Tau`
           _) => x,
     };
diff --git a/src/test/ui/issues/issue-15896.stderr b/src/test/ui/issues/issue-15896.stderr
index de9757d5d32..f553be9df55 100644
--- a/src/test/ui/issues/issue-15896.stderr
+++ b/src/test/ui/issues/issue-15896.stderr
@@ -6,9 +6,6 @@ LL |     let u = match e {
 LL |         E::B(
 LL |           Tau{t: x},
    |           ^^^^^^^^^ expected enum `main::R`, found struct `main::Tau`
-   |
-   = note: expected type `main::R`
-              found type `main::Tau`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-16338.rs b/src/test/ui/issues/issue-16338.rs
index 7567740f28b..321b3576cd6 100644
--- a/src/test/ui/issues/issue-16338.rs
+++ b/src/test/ui/issues/issue-16338.rs
@@ -6,5 +6,5 @@ struct Slice<T> {
 fn main() {
     let Slice { data: data, len: len } = "foo";
     //~^ ERROR mismatched types
-    //~| found type `Slice<_>`
+    //~| found struct `Slice<_>`
 }
diff --git a/src/test/ui/issues/issue-16338.stderr b/src/test/ui/issues/issue-16338.stderr
index af8c39d24ec..c35edb0c8c0 100644
--- a/src/test/ui/issues/issue-16338.stderr
+++ b/src/test/ui/issues/issue-16338.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/issue-16338.rs:7:9
    |
 LL |     let Slice { data: data, len: len } = "foo";
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected str, found struct `Slice`
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `str`, found struct `Slice`
    |
    = note: expected type `str`
-              found type `Slice<_>`
+            found struct `Slice<_>`
 
 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 7135b7d82ef..332352ca727 100644
--- a/src/test/ui/issues/issue-16401.rs
+++ b/src/test/ui/issues/issue-16401.rs
@@ -7,9 +7,9 @@ fn main() {
     match () {
         Slice { data: data, len: len } => (),
         //~^ ERROR mismatched types
-        //~| expected type `()`
-        //~| found type `Slice<_>`
-        //~| expected (), found struct `Slice`
+        //~| 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 1779d0befd8..d3d6108be9d 100644
--- a/src/test/ui/issues/issue-16401.stderr
+++ b/src/test/ui/issues/issue-16401.stderr
@@ -4,10 +4,10 @@ error[E0308]: mismatched types
 LL |     match () {
    |           -- this match expression has type `()`
 LL |         Slice { data: data, len: len } => (),
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `Slice`
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `Slice`
    |
-   = note: expected type `()`
-              found type `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 d39b5683fee..72a8cd9823a 100644
--- a/src/test/ui/issues/issue-17033.rs
+++ b/src/test/ui/issues/issue-17033.rs
@@ -1,8 +1,6 @@
 fn f<'r>(p: &'r mut fn(p: &mut ())) {
     (*p)(()) //~  ERROR mismatched types
-             //~| expected type `&mut ()`
-             //~| found type `()`
-             //~| expected &mut (), found ()
+             //~| expected `&mut ()`, found `()`
 }
 
 fn main() {}
diff --git a/src/test/ui/issues/issue-17033.stderr b/src/test/ui/issues/issue-17033.stderr
index ba78aa2bc6a..518fc30142c 100644
--- a/src/test/ui/issues/issue-17033.stderr
+++ b/src/test/ui/issues/issue-17033.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |     (*p)(())
    |          ^^
    |          |
-   |          expected &mut (), found ()
+   |          expected `&mut ()`, found `()`
    |          help: consider mutably borrowing here: `&mut ()`
-   |
-   = note: expected type `&mut ()`
-              found 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-17728.stderr b/src/test/ui/issues/issue-17728.stderr
index 945dfc26b20..527168dbe6c 100644
--- a/src/test/ui/issues/issue-17728.stderr
+++ b/src/test/ui/issues/issue-17728.stderr
@@ -24,8 +24,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 2 previous errors
 
diff --git a/src/test/ui/issues/issue-17740.rs b/src/test/ui/issues/issue-17740.rs
index b47568400c3..3b868555fc5 100644
--- a/src/test/ui/issues/issue-17740.rs
+++ b/src/test/ui/issues/issue-17740.rs
@@ -5,12 +5,12 @@ struct Foo<'a> {
 impl <'a> Foo<'a>{
     fn bar(self: &mut Foo) {
     //~^ mismatched `self` parameter type
-    //~| expected type `Foo<'a>`
-    //~| found type `Foo<'_>`
+    //~| expected struct `Foo<'a>`
+    //~| found struct `Foo<'_>`
     //~| lifetime mismatch
     //~| mismatched `self` parameter type
-    //~| expected type `Foo<'a>`
-    //~| found type `Foo<'_>`
+    //~| expected struct `Foo<'a>`
+    //~| found struct `Foo<'_>`
     //~| lifetime mismatch
     }
 }
diff --git a/src/test/ui/issues/issue-17740.stderr b/src/test/ui/issues/issue-17740.stderr
index d392ea3c1b8..cd1d7f821c7 100644
--- a/src/test/ui/issues/issue-17740.stderr
+++ b/src/test/ui/issues/issue-17740.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched `self` parameter type
 LL |     fn bar(self: &mut Foo) {
    |                  ^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `Foo<'a>`
-              found type `Foo<'_>`
+   = note: expected struct `Foo<'a>`
+              found struct `Foo<'_>`
 note: the anonymous lifetime #2 defined on the method body at 6:5...
   --> $DIR/issue-17740.rs:6:5
    |
@@ -29,8 +29,8 @@ error[E0308]: mismatched `self` parameter type
 LL |     fn bar(self: &mut Foo) {
    |                  ^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `Foo<'a>`
-              found type `Foo<'_>`
+   = note: expected struct `Foo<'a>`
+              found struct `Foo<'_>`
 note: the lifetime `'a` as defined on the impl at 5:7...
   --> $DIR/issue-17740.rs:5:7
    |
diff --git a/src/test/ui/issues/issue-17905-2.stderr b/src/test/ui/issues/issue-17905-2.stderr
index 04be62dc661..f347c26f066 100644
--- a/src/test/ui/issues/issue-17905-2.stderr
+++ b/src/test/ui/issues/issue-17905-2.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched `self` parameter type
 LL |     fn say(self: &Pair<&str, isize>) {
    |                  ^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `Pair<&str, _>`
-              found type `Pair<&str, _>`
+   = note: expected struct `Pair<&str, _>`
+              found struct `Pair<&str, _>`
 note: the anonymous lifetime #2 defined on the method body at 8:5...
   --> $DIR/issue-17905-2.rs:8:5
    |
@@ -27,8 +27,8 @@ error[E0308]: mismatched `self` parameter type
 LL |     fn say(self: &Pair<&str, isize>) {
    |                  ^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `Pair<&str, _>`
-              found type `Pair<&str, _>`
+   = note: expected struct `Pair<&str, _>`
+              found struct `Pair<&str, _>`
 note: the lifetime `'_` as defined on the impl at 5:5...
   --> $DIR/issue-17905-2.rs:5:5
    |
diff --git a/src/test/ui/issues/issue-19991.rs b/src/test/ui/issues/issue-19991.rs
index e9094ecc015..62d5a6de760 100644
--- a/src/test/ui/issues/issue-19991.rs
+++ b/src/test/ui/issues/issue-19991.rs
@@ -3,9 +3,7 @@
 
 fn main() {
     if let Some(homura) = Some("madoka") { //~  ERROR missing an else clause
-                                           //~| expected type `()`
-                                           //~| found type `{integer}`
-                                           //~| expected (), found 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..b78f4a6d293 100644
--- a/src/test/ui/issues/issue-19991.stderr
+++ b/src/test/ui/issues/issue-19991.stderr
@@ -3,15 +3,11 @@ error[E0317]: if may be missing an else clause
    |
 LL | /     if let Some(homura) = Some("madoka") {
 LL | |
-LL | |
-LL | |
 LL | |         765
    | |         --- found here
 LL | |     };
-   | |_____^ expected (), found integer
+   | |_____^ expected `()`, found integer
    |
-   = note: expected 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-20225.rs b/src/test/ui/issues/issue-20225.rs
index b15f2a631fd..0c8e6e402e2 100644
--- a/src/test/ui/issues/issue-20225.rs
+++ b/src/test/ui/issues/issue-20225.rs
@@ -5,13 +5,11 @@ struct Foo;
 impl<'a, T> Fn<(&'a T,)> for Foo {
   extern "rust-call" fn call(&self, (_,): (T,)) {}
   //~^ ERROR: has an incompatible type for trait
-  //~| expected reference
 }
 
 impl<'a, T> FnMut<(&'a T,)> for Foo {
   extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
   //~^ ERROR: has an incompatible type for trait
-  //~| expected reference
 }
 
 impl<'a, T> FnOnce<(&'a T,)> for Foo {
@@ -19,7 +17,6 @@ impl<'a, T> FnOnce<(&'a T,)> for Foo {
 
   extern "rust-call" fn call_once(self, (_,): (T,)) {}
   //~^ ERROR: has an incompatible type for trait
-  //~| expected reference
 }
 
 fn main() {}
diff --git a/src/test/ui/issues/issue-20225.stderr b/src/test/ui/issues/issue-20225.stderr
index 40093b13edf..1c5911e05f7 100644
--- a/src/test/ui/issues/issue-20225.stderr
+++ b/src/test/ui/issues/issue-20225.stderr
@@ -4,37 +4,37 @@ error[E0053]: method `call` has an incompatible type for trait
 LL | impl<'a, T> Fn<(&'a T,)> for Foo {
    |          - this type parameter
 LL |   extern "rust-call" fn call(&self, (_,): (T,)) {}
-   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter `T`
+   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&T`, found type parameter `T`
    |
-   = note: expected type `extern "rust-call" fn(&Foo, (&'a T,))`
-              found type `extern "rust-call" fn(&Foo, (T,))`
+   = note: expected fn pointer `extern "rust-call" fn(&Foo, (&'a T,))`
+              found fn pointer `extern "rust-call" fn(&Foo, (T,))`
    = 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
 
 error[E0053]: method `call_mut` has an incompatible type for trait
-  --> $DIR/issue-20225.rs:12:3
+  --> $DIR/issue-20225.rs:11:3
    |
 LL | impl<'a, T> FnMut<(&'a T,)> for Foo {
    |          - this type parameter
 LL |   extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
-   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter `T`
+   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&T`, found type parameter `T`
    |
-   = note: expected type `extern "rust-call" fn(&mut Foo, (&'a T,))`
-              found type `extern "rust-call" fn(&mut Foo, (T,))`
+   = note: expected fn pointer `extern "rust-call" fn(&mut Foo, (&'a T,))`
+              found fn pointer `extern "rust-call" fn(&mut Foo, (T,))`
    = 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
 
 error[E0053]: method `call_once` has an incompatible type for trait
-  --> $DIR/issue-20225.rs:20:3
+  --> $DIR/issue-20225.rs:18:3
    |
 LL | impl<'a, T> FnOnce<(&'a T,)> for Foo {
    |          - this type parameter
 ...
 LL |   extern "rust-call" fn call_once(self, (_,): (T,)) {}
-   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected reference, found type parameter `T`
+   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&T`, found type parameter `T`
    |
-   = note: expected type `extern "rust-call" fn(Foo, (&'a T,))`
-              found type `extern "rust-call" fn(Foo, (T,))`
+   = note: expected fn pointer `extern "rust-call" fn(Foo, (&'a T,))`
+              found fn pointer `extern "rust-call" fn(Foo, (T,))`
    = 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/issues/issue-21332.stderr b/src/test/ui/issues/issue-21332.stderr
index 693b2be6c00..ace3e014647 100644
--- a/src/test/ui/issues/issue-21332.stderr
+++ b/src/test/ui/issues/issue-21332.stderr
@@ -4,8 +4,8 @@ error[E0053]: method `next` has an incompatible type for trait
 LL |     fn next(&mut self) -> Result<i32, i32> { Ok(7) }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
    |
-   = note: expected type `fn(&mut S) -> std::option::Option<i32>`
-              found type `fn(&mut S) -> std::result::Result<i32, i32>`
+   = note: expected fn pointer `fn(&mut S) -> std::option::Option<i32>`
+              found fn pointer `fn(&mut S) -> std::result::Result<i32, i32>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-22684.stderr b/src/test/ui/issues/issue-22684.stderr
index 738123ec4d4..46524bc2c18 100644
--- a/src/test/ui/issues/issue-22684.stderr
+++ b/src/test/ui/issues/issue-22684.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-22684.rs:17:17
    |
 LL |     let _: () = foo::Foo.bar();
-   |                 ^^^^^^^^^^^^^^ expected (), found bool
-   |
-   = note: expected type `()`
-              found type `bool`
+   |                 ^^^^^^^^^^^^^^ expected `()`, found `bool`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-23589.stderr b/src/test/ui/issues/issue-23589.stderr
index c3b419fe939..d126e1bf0b5 100644
--- a/src/test/ui/issues/issue-23589.stderr
+++ b/src/test/ui/issues/issue-23589.stderr
@@ -11,10 +11,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-23589.rs:2:29
    |
 LL |     let v: Vec(&str) = vec!['1', '2'];
-   |                             ^^^ expected &str, found char
-   |
-   = note: expected type `&str`
-              found type `char`
+   |                             ^^^ expected `&str`, found `char`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-24036.stderr b/src/test/ui/issues/issue-24036.stderr
index fa9935fcf61..04817f2596a 100644
--- a/src/test/ui/issues/issue-24036.stderr
+++ b/src/test/ui/issues/issue-24036.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     x = |c| c + 1;
    |         ^^^^^^^^^ expected closure, found a different closure
    |
-   = note: expected type `[closure@$DIR/issue-24036.rs:2:17: 2:26]`
-              found type `[closure@$DIR/issue-24036.rs:3:9: 3:18]`
+   = note: expected closure `[closure@$DIR/issue-24036.rs:2:17: 2:26]`
+              found closure `[closure@$DIR/issue-24036.rs:3:9: 3:18]`
    = note: no two closures, even if identical, have the same type
    = help: consider boxing your closure and/or using it as a trait object
 
@@ -23,7 +23,7 @@ LL | |     };
    | |_____- `match` arms have incompatible types
    |
    = note: expected type `[closure@$DIR/issue-24036.rs:9:14: 9:23]`
-              found type `[closure@$DIR/issue-24036.rs:10:14: 10:23]`
+           found closure `[closure@$DIR/issue-24036.rs:10:14: 10:23]`
    = note: no two closures, even if identical, have the same type
    = help: consider boxing your closure and/or using it as a trait object
 
diff --git a/src/test/ui/issues/issue-24204.stderr b/src/test/ui/issues/issue-24204.stderr
index ace5b5f72fc..3eb1f1b4f6e 100644
--- a/src/test/ui/issues/issue-24204.stderr
+++ b/src/test/ui/issues/issue-24204.stderr
@@ -7,8 +7,8 @@ LL | trait Trait: Sized {
 LL | fn test<T: Trait<B=i32>>(b: i32) -> T where T::A: MultiDispatch<i32> { T::new(b) }
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter `T`, found associated type
    |
-   = note: expected type `T`
-              found type `<<T as Trait>::A as MultiDispatch<i32>>::O`
+   = note: expected type parameter `T`
+             found associated type `<<T as Trait>::A as MultiDispatch<i32>>::O`
    = note: you might be missing a type parameter or trait bound
 
 error: aborting due to previous error
diff --git a/src/test/ui/issues/issue-24322.stderr b/src/test/ui/issues/issue-24322.stderr
index def373cf2c0..fb0c7a0d809 100644
--- a/src/test/ui/issues/issue-24322.stderr
+++ b/src/test/ui/issues/issue-24322.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let x: &fn(&B) -> u32 = &B::func;
    |                             ^^^^^^^^ expected fn pointer, found fn item
    |
-   = note: expected type `&for<'r> fn(&'r B) -> u32`
-              found type `&for<'r> fn(&'r B) -> u32 {B::func}`
+   = note: expected reference `&for<'r> fn(&'r B) -> u32`
+              found reference `&for<'r> fn(&'r B) -> u32 {B::func}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-24819.stderr b/src/test/ui/issues/issue-24819.stderr
index 5f1cd0a255f..1166a887f86 100644
--- a/src/test/ui/issues/issue-24819.stderr
+++ b/src/test/ui/issues/issue-24819.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     foo(&mut v);
    |         ^^^^^^ expected struct `std::collections::HashSet`, found struct `std::vec::Vec`
    |
-   = note: expected type `&mut std::collections::HashSet<u32>`
-              found type `&mut std::vec::Vec<_>`
+   = note: expected mutable reference `&mut std::collections::HashSet<u32>`
+              found mutable reference `&mut std::vec::Vec<_>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-27008.rs b/src/test/ui/issues/issue-27008.rs
index b37ea6f01ba..e04de33f6ef 100644
--- a/src/test/ui/issues/issue-27008.rs
+++ b/src/test/ui/issues/issue-27008.rs
@@ -3,7 +3,5 @@ struct S;
 fn main() {
     let b = [0; S];
     //~^ ERROR mismatched types
-    //~| expected type `usize`
-    //~| found type `S`
-    //~| expected usize, found struct `S`
+    //~| expected `usize`, found struct `S`
 }
diff --git a/src/test/ui/issues/issue-27008.stderr b/src/test/ui/issues/issue-27008.stderr
index c45d757ff0a..5b7e74c1c30 100644
--- a/src/test/ui/issues/issue-27008.stderr
+++ b/src/test/ui/issues/issue-27008.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-27008.rs:4:17
    |
 LL |     let b = [0; S];
-   |                 ^ expected usize, found struct `S`
-   |
-   = note: expected type `usize`
-              found type `S`
+   |                 ^ expected `usize`, found struct `S`
 
 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..71e4d785014 100644
--- a/src/test/ui/issues/issue-27042.stderr
+++ b/src/test/ui/issues/issue-27042.stderr
@@ -14,11 +14,8 @@ error[E0308]: mismatched types
 LL |         loop { break };
    |                ^^^^^
    |                |
-   |                expected i32, found ()
+   |                expected `i32`, found `()`
    |                help: give it a value of the expected type: `break 42`
-   |
-   = note: expected type `i32`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/issue-27042.rs:8:9
@@ -26,30 +23,21 @@ error[E0308]: mismatched types
 LL | /         'b:
 LL | |
 LL | |         while true { break }; // but here we cite the whole loop
-   | |____________________________^ expected i32, found ()
-   |
-   = note: expected type `i32`
-              found type `()`
+   | |____________________________^ expected `i32`, found `()`
 
 error[E0308]: mismatched types
   --> $DIR/issue-27042.rs:12:9
    |
 LL | /         'c:
 LL | |         for _ in None { break }; // but here we cite the whole loop
-   | |_______________________________^ expected i32, found ()
-   |
-   = note: expected type `i32`
-              found type `()`
+   | |_______________________________^ expected `i32`, found `()`
 
 error[E0308]: mismatched types
   --> $DIR/issue-27042.rs:15:9
    |
 LL | /         'd:
 LL | |         while let Some(_) = None { break };
-   | |__________________________________________^ expected i32, found ()
-   |
-   = note: expected type `i32`
-              found type `()`
+   | |__________________________________________^ expected `i32`, found `()`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/issues/issue-29084.rs b/src/test/ui/issues/issue-29084.rs
index 86b348d8285..d1625268669 100644
--- a/src/test/ui/issues/issue-29084.rs
+++ b/src/test/ui/issues/issue-29084.rs
@@ -3,9 +3,7 @@ macro_rules! foo {
         fn bar(d: u8) { }
         bar(&mut $d);
         //~^ ERROR mismatched types
-        //~| expected u8, found &mut u8
-        //~| expected type `u8`
-        //~| found type `&mut u8`
+        //~| expected `u8`, found `&mut u8`
     }}
 }
 
diff --git a/src/test/ui/issues/issue-29084.stderr b/src/test/ui/issues/issue-29084.stderr
index cb4bf6a08ef..3e7ea745ce4 100644
--- a/src/test/ui/issues/issue-29084.stderr
+++ b/src/test/ui/issues/issue-29084.stderr
@@ -2,13 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/issue-29084.rs:4:13
    |
 LL |         bar(&mut $d);
-   |             ^^^^^^^ expected u8, found &mut u8
+   |             ^^^^^^^ expected `u8`, found `&mut u8`
 ...
 LL |     foo!(0u8);
    |     ---------- in this macro invocation
-   |
-   = note: expected type `u8`
-              found type `&mut u8`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-2951.rs b/src/test/ui/issues/issue-2951.rs
index cc52dab0245..1798e3e7519 100644
--- a/src/test/ui/issues/issue-2951.rs
+++ b/src/test/ui/issues/issue-2951.rs
@@ -2,9 +2,9 @@ fn foo<T, U>(x: T, y: U) {
     let mut xx = x;
     xx = y;
     //~^  ERROR mismatched types
-    //~| expected type `T`
-    //~| found type `U`
     //~| expected type parameter `T`, found type parameter `U`
+    //~| expected type parameter `T`
+    //~| found type parameter `U`
 }
 
 fn main() {
diff --git a/src/test/ui/issues/issue-2951.stderr b/src/test/ui/issues/issue-2951.stderr
index 41457175290..b966b339389 100644
--- a/src/test/ui/issues/issue-2951.stderr
+++ b/src/test/ui/issues/issue-2951.stderr
@@ -9,8 +9,8 @@ LL |     let mut xx = x;
 LL |     xx = y;
    |          ^ expected type parameter `T`, found type parameter `U`
    |
-   = note: expected type `T`
-              found type `U`
+   = note: expected type parameter `T`
+              found type parameter `U`
    = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
 
diff --git a/src/test/ui/issues/issue-30225.stderr b/src/test/ui/issues/issue-30225.stderr
index 64a56e3237d..ccd05fa6bfb 100644
--- a/src/test/ui/issues/issue-30225.stderr
+++ b/src/test/ui/issues/issue-30225.stderr
@@ -3,9 +3,6 @@ error[E0308]: mismatched types
    |
 LL |     u = v; // mark $0 and $1 in a subtype relationship
    |         ^ expected struct `A`, found struct `B`
-   |
-   = note: expected type `A`
-              found type `B`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-31173.rs b/src/test/ui/issues/issue-31173.rs
index 6df80664575..26195318380 100644
--- a/src/test/ui/issues/issue-31173.rs
+++ b/src/test/ui/issues/issue-31173.rs
@@ -10,7 +10,7 @@ pub fn get_tok(it: &mut IntoIter<u8>) {
         .cloned()
         //~^ ERROR type mismatch resolving
         //~| expected type `u8`
-        //~| found type `&_`
+        //~| found reference `&_`
         .collect(); //~ ERROR no method named `collect`
 }
 
diff --git a/src/test/ui/issues/issue-31173.stderr b/src/test/ui/issues/issue-31173.stderr
index 6d03b781093..38cf3c4f930 100644
--- a/src/test/ui/issues/issue-31173.stderr
+++ b/src/test/ui/issues/issue-31173.stderr
@@ -2,10 +2,10 @@ error[E0271]: type mismatch resolving `<std::iter::TakeWhile<&mut std::vec::Into
   --> $DIR/issue-31173.rs:10:10
    |
 LL |         .cloned()
-   |          ^^^^^^ expected u8, found reference
+   |          ^^^^^^ expected `u8`, found reference
    |
-   = note: expected type `u8`
-              found type `&_`
+   = note:   expected type `u8`
+           found reference `&_`
 
 error[E0599]: no method named `collect` found for type `std::iter::Cloned<std::iter::TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6 found_e:_]>>` in the current scope
   --> $DIR/issue-31173.rs:14:10
diff --git a/src/test/ui/issues/issue-31910.rs b/src/test/ui/issues/issue-31910.rs
index c62ed89c4ad..e0655d3f6db 100644
--- a/src/test/ui/issues/issue-31910.rs
+++ b/src/test/ui/issues/issue-31910.rs
@@ -1,7 +1,7 @@
 enum Enum<T: Trait> {
     X = Trait::Number,
     //~^ ERROR mismatched types
-    //~| expected isize, found i32
+    //~| expected `isize`, found `i32`
 }
 
 trait Trait {
diff --git a/src/test/ui/issues/issue-31910.stderr b/src/test/ui/issues/issue-31910.stderr
index 19b67ef2a72..c5c988cdaa7 100644
--- a/src/test/ui/issues/issue-31910.stderr
+++ b/src/test/ui/issues/issue-31910.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-31910.rs:2:9
    |
 LL |     X = Trait::Number,
-   |         ^^^^^^^^^^^^^ expected isize, found i32
+   |         ^^^^^^^^^^^^^ expected `isize`, found `i32`
    |
 help: you can convert an `i32` to `isize` and panic if the converted value wouldn't fit
    |
diff --git a/src/test/ui/issues/issue-32323.stderr b/src/test/ui/issues/issue-32323.stderr
index 9c11a02923c..7c0928b1924 100644
--- a/src/test/ui/issues/issue-32323.stderr
+++ b/src/test/ui/issues/issue-32323.stderr
@@ -2,12 +2,12 @@ error[E0308]: mismatched types
   --> $DIR/issue-32323.rs:5:30
    |
 LL | pub fn f<'a, T: Tr<'a>>() -> <T as Tr<'a>>::Out {}
-   |        -                     ^^^^^^^^^^^^^^^^^^ expected associated type, found ()
+   |        -                     ^^^^^^^^^^^^^^^^^^ expected associated type, found `()`
    |        |
    |        implicitly returns `()` as its body has no tail or `return` expression
    |
-   = note: expected type `<T as Tr<'a>>::Out`
-              found type `()`
+   = note: expected associated type `<T as Tr<'a>>::Out`
+                    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-33504.stderr b/src/test/ui/issues/issue-33504.stderr
index 7af555eaa2c..522df6a07c2 100644
--- a/src/test/ui/issues/issue-33504.stderr
+++ b/src/test/ui/issues/issue-33504.stderr
@@ -3,9 +3,6 @@ error[E0308]: mismatched types
    |
 LL |         let Test = 1;
    |             ^^^^ expected integer, found struct `Test`
-   |
-   = note: expected type `{integer}`
-              found type `Test`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-33941.stderr b/src/test/ui/issues/issue-33941.stderr
index 596921e526d..734ae78f362 100644
--- a/src/test/ui/issues/issue-33941.stderr
+++ b/src/test/ui/issues/issue-33941.stderr
@@ -4,8 +4,8 @@ error[E0271]: type mismatch resolving `<std::collections::hash_map::Iter<'_, _,
 LL |     for _ in HashMap::new().iter().cloned() {}
    |                                    ^^^^^^ expected tuple, found reference
    |
-   = note: expected type `(&_, &_)`
-              found type `&_`
+   = note:  expected tuple `(&_, &_)`
+           found reference `&_`
 
 error[E0271]: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as std::iter::Iterator>::Item == &_`
   --> $DIR/issue-33941.rs:4:14
@@ -13,8 +13,8 @@ error[E0271]: type mismatch resolving `<std::collections::hash_map::Iter<'_, _,
 LL |     for _ in HashMap::new().iter().cloned() {}
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected tuple, found reference
    |
-   = note: expected type `(&_, &_)`
-              found type `&_`
+   = note:  expected tuple `(&_, &_)`
+           found reference `&_`
    = note: required because of the requirements on the impl of `std::iter::Iterator` for `std::iter::Cloned<std::collections::hash_map::Iter<'_, _, _>>`
 
 error: aborting due to 2 previous errors
diff --git a/src/test/ui/issues/issue-34334.stderr b/src/test/ui/issues/issue-34334.stderr
index a3749487ac9..fc90e0674cf 100644
--- a/src/test/ui/issues/issue-34334.stderr
+++ b/src/test/ui/issues/issue-34334.stderr
@@ -29,10 +29,10 @@ error[E0308]: mismatched types
   --> $DIR/issue-34334.rs:2:31
    |
 LL |     let sr: Vec<(u32, _, _) = vec![];
-   |                               ^^^^^^ expected bool, found struct `std::vec::Vec`
+   |                               ^^^^^^ expected `bool`, found struct `std::vec::Vec`
    |
    = note: expected type `bool`
-              found type `std::vec::Vec<_>`
+            found struct `std::vec::Vec<_>`
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error[E0070]: invalid left-hand side expression
diff --git a/src/test/ui/issues/issue-3477.rs b/src/test/ui/issues/issue-3477.rs
index ae17e7d1e41..3817d0e6a3e 100644
--- a/src/test/ui/issues/issue-3477.rs
+++ b/src/test/ui/issues/issue-3477.rs
@@ -1,5 +1,5 @@
 fn main() {
     let _p: char = 100;
     //~^ ERROR mismatched types
-    //~| expected char, found u8
+    //~| expected `char`, found `u8`
 }
diff --git a/src/test/ui/issues/issue-3477.stderr b/src/test/ui/issues/issue-3477.stderr
index 1b7f597d50e..6510c215fcf 100644
--- a/src/test/ui/issues/issue-3477.stderr
+++ b/src/test/ui/issues/issue-3477.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-3477.rs:2:20
    |
 LL |     let _p: char = 100;
-   |                    ^^^ expected char, found u8
+   |                    ^^^ expected `char`, found `u8`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-35241.stderr b/src/test/ui/issues/issue-35241.stderr
index 586146cbaa4..4a52a292ef3 100644
--- a/src/test/ui/issues/issue-35241.stderr
+++ b/src/test/ui/issues/issue-35241.stderr
@@ -11,8 +11,8 @@ LL | fn test() -> Foo { Foo }
    |              |     help: use parentheses to instantiate this tuple struct: `Foo(_)`
    |              expected `Foo` because of return type
    |
-   = note: expected type `Foo`
-              found type `fn(u32) -> Foo {Foo}`
+   = note: expected struct `Foo`
+             found fn item `fn(u32) -> Foo {Foo}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-35869.stderr b/src/test/ui/issues/issue-35869.stderr
index 4ef840d019f..be21569315b 100644
--- a/src/test/ui/issues/issue-35869.stderr
+++ b/src/test/ui/issues/issue-35869.stderr
@@ -5,10 +5,10 @@ LL |     fn foo(_: fn(u8) -> ());
    |               ------------ type in trait
 ...
 LL |     fn foo(_: fn(u16) -> ()) {}
-   |               ^^^^^^^^^^^^^ expected u8, found u16
+   |               ^^^^^^^^^^^^^ expected `u8`, found `u16`
    |
-   = note: expected type `fn(fn(u8))`
-              found type `fn(fn(u16))`
+   = note: expected fn pointer `fn(fn(u8))`
+              found fn pointer `fn(fn(u16))`
 
 error[E0053]: method `bar` has an incompatible type for trait
   --> $DIR/issue-35869.rs:13:15
@@ -17,10 +17,10 @@ LL |     fn bar(_: Option<u8>);
    |               ---------- type in trait
 ...
 LL |     fn bar(_: Option<u16>) {}
-   |               ^^^^^^^^^^^ expected u8, found u16
+   |               ^^^^^^^^^^^ expected `u8`, found `u16`
    |
-   = note: expected type `fn(std::option::Option<u8>)`
-              found type `fn(std::option::Option<u16>)`
+   = note: expected fn pointer `fn(std::option::Option<u8>)`
+              found fn pointer `fn(std::option::Option<u16>)`
 
 error[E0053]: method `baz` has an incompatible type for trait
   --> $DIR/issue-35869.rs:15:15
@@ -29,10 +29,10 @@ LL |     fn baz(_: (u8, u16));
    |               --------- type in trait
 ...
 LL |     fn baz(_: (u16, u16)) {}
-   |               ^^^^^^^^^^ expected u8, found u16
+   |               ^^^^^^^^^^ expected `u8`, found `u16`
    |
-   = note: expected type `fn((u8, u16))`
-              found type `fn((u16, u16))`
+   = note: expected fn pointer `fn((u8, u16))`
+              found fn pointer `fn((u16, u16))`
 
 error[E0053]: method `qux` has an incompatible type for trait
   --> $DIR/issue-35869.rs:17:17
@@ -41,10 +41,10 @@ LL |     fn qux() -> u8;
    |                 -- type in trait
 ...
 LL |     fn qux() -> u16 { 5u16 }
-   |                 ^^^ expected u8, found u16
+   |                 ^^^ expected `u8`, found `u16`
    |
-   = note: expected type `fn() -> u8`
-              found type `fn() -> u16`
+   = note: expected fn pointer `fn() -> u8`
+              found fn pointer `fn() -> u16`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/issues/issue-3680.rs b/src/test/ui/issues/issue-3680.rs
index 3604203082d..64050c72f2c 100644
--- a/src/test/ui/issues/issue-3680.rs
+++ b/src/test/ui/issues/issue-3680.rs
@@ -2,8 +2,8 @@ fn main() {
     match None {
         Err(_) => ()
         //~^ ERROR mismatched types
-        //~| expected type `std::option::Option<_>`
-        //~| found type `std::result::Result<_, _>`
+        //~| expected enum `std::option::Option<_>`
+        //~| found enum `std::result::Result<_, _>`
         //~| expected enum `std::option::Option`, found enum `std::result::Result`
     }
 }
diff --git a/src/test/ui/issues/issue-3680.stderr b/src/test/ui/issues/issue-3680.stderr
index 51903cfadab..8856f0e3a48 100644
--- a/src/test/ui/issues/issue-3680.stderr
+++ b/src/test/ui/issues/issue-3680.stderr
@@ -6,8 +6,8 @@ LL |     match None {
 LL |         Err(_) => ()
    |         ^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
    |
-   = note: expected type `std::option::Option<_>`
-              found type `std::result::Result<_, _>`
+   = note: expected enum `std::option::Option<_>`
+              found enum `std::result::Result<_, _>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-37026.stderr b/src/test/ui/issues/issue-37026.stderr
index 1f81264ffdb..00952356b18 100644
--- a/src/test/ui/issues/issue-37026.stderr
+++ b/src/test/ui/issues/issue-37026.stderr
@@ -2,19 +2,13 @@ error[E0308]: mismatched types
   --> $DIR/issue-37026.rs:6:9
    |
 LL |     let empty_struct::XEmpty2 = ();
-   |         ^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `empty_struct::XEmpty2`
-   |
-   = note: expected type `()`
-              found type `empty_struct::XEmpty2`
+   |         ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `empty_struct::XEmpty2`
 
 error[E0308]: mismatched types
   --> $DIR/issue-37026.rs:7:9
    |
 LL |     let empty_struct::XEmpty6(..) = ();
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `empty_struct::XEmpty6`
-   |
-   = note: expected type `()`
-              found type `empty_struct::XEmpty6`
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, 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..8a9529a68b7 100644
--- a/src/test/ui/issues/issue-37665.stderr
+++ b/src/test/ui/issues/issue-37665.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-37665.rs:10:17
    |
 LL |     let x: () = 0;
-   |                 ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |                 ^ expected `()`, found integer
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-37884.stderr b/src/test/ui/issues/issue-37884.stderr
index 8e75d7be066..61cb3d7c58f 100644
--- a/src/test/ui/issues/issue-37884.stderr
+++ b/src/test/ui/issues/issue-37884.stderr
@@ -9,8 +9,8 @@ LL | |         Some(&mut self.0)
 LL | |     }
    | |_____^ lifetime mismatch
    |
-   = note: expected type `fn(&mut RepeatMut<'a, T>) -> std::option::Option<&mut T>`
-              found type `fn(&'a mut RepeatMut<'a, T>) -> std::option::Option<&mut T>`
+   = note: expected fn pointer `fn(&mut RepeatMut<'a, T>) -> std::option::Option<&mut T>`
+              found fn pointer `fn(&'a mut RepeatMut<'a, T>) -> std::option::Option<&mut T>`
 note: the anonymous lifetime #1 defined on the method body at 6:5...
   --> $DIR/issue-37884.rs:6:5
    |
diff --git a/src/test/ui/issues/issue-38940.stderr b/src/test/ui/issues/issue-38940.stderr
index 4851c01a347..707fcc7e919 100644
--- a/src/test/ui/issues/issue-38940.stderr
+++ b/src/test/ui/issues/issue-38940.stderr
@@ -12,8 +12,8 @@ error[E0308]: mismatched types
 LL |     let x: &Bottom = &t;
    |                      ^^ expected struct `Bottom`, found struct `Top`
    |
-   = note: expected type `&Bottom`
-              found type `&Top`
+   = note: expected reference `&Bottom`
+              found reference `&Top`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-39970.stderr b/src/test/ui/issues/issue-39970.stderr
index f15f771fa9f..6f342b459c0 100644
--- a/src/test/ui/issues/issue-39970.stderr
+++ b/src/test/ui/issues/issue-39970.stderr
@@ -5,10 +5,8 @@ LL |     fn visit() {}
    |     ---------- required by `Visit::visit`
 ...
 LL |     <() as Visit>::visit();
-   |     ^^^^^^^^^^^^^^^^^^^^ expected &(), found ()
+   |     ^^^^^^^^^^^^^^^^^^^^ expected `&()`, found `()`
    |
-   = note: expected type `&()`
-              found 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-39974.rs b/src/test/ui/issues/issue-39974.rs
index 5c89a0dc0be..503647ef4a8 100644
--- a/src/test/ui/issues/issue-39974.rs
+++ b/src/test/ui/issues/issue-39974.rs
@@ -3,7 +3,7 @@ const LENGTH: f64 = 2;
 struct Thing {
     f: [[f64; 2]; LENGTH],
     //~^ ERROR mismatched types
-    //~| expected usize, found f64
+    //~| expected `usize`, found `f64`
 }
 
 fn main() {
diff --git a/src/test/ui/issues/issue-39974.stderr b/src/test/ui/issues/issue-39974.stderr
index 41bfb6dbb85..56365e51e0a 100644
--- a/src/test/ui/issues/issue-39974.stderr
+++ b/src/test/ui/issues/issue-39974.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-39974.rs:4:19
    |
 LL |     f: [[f64; 2]; LENGTH],
-   |                   ^^^^^^ expected usize, found f64
+   |                   ^^^^^^ expected `usize`, found `f64`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-40000.stderr b/src/test/ui/issues/issue-40000.stderr
index c48fb24ea17..983fdb13083 100644
--- a/src/test/ui/issues/issue-40000.stderr
+++ b/src/test/ui/issues/issue-40000.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     foo(bar);
    |         ^^^ expected concrete lifetime, found bound lifetime parameter
    |
-   = note: expected type `std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r i32) + 'static)>`
-              found type `std::boxed::Box<dyn std::ops::Fn(_)>`
+   = note: expected struct `std::boxed::Box<(dyn for<'r> std::ops::Fn(&'r i32) + 'static)>`
+              found struct `std::boxed::Box<dyn std::ops::Fn(_)>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-40749.rs b/src/test/ui/issues/issue-40749.rs
index 14908c3653e..87ff5a650fe 100644
--- a/src/test/ui/issues/issue-40749.rs
+++ b/src/test/ui/issues/issue-40749.rs
@@ -2,5 +2,5 @@ fn main() {
     [0; ..10];
     //~^ ERROR mismatched types
     //~| expected type `usize`
-    //~| found type `std::ops::RangeTo<{integer}>`
+    //~| found struct `std::ops::RangeTo<{integer}>`
 }
diff --git a/src/test/ui/issues/issue-40749.stderr b/src/test/ui/issues/issue-40749.stderr
index be050d4470c..4170a96bddf 100644
--- a/src/test/ui/issues/issue-40749.stderr
+++ b/src/test/ui/issues/issue-40749.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/issue-40749.rs:2:9
    |
 LL |     [0; ..10];
-   |         ^^^^ expected usize, found struct `std::ops::RangeTo`
+   |         ^^^^ expected `usize`, found struct `std::ops::RangeTo`
    |
    = note: expected type `usize`
-              found type `std::ops::RangeTo<{integer}>`
+            found struct `std::ops::RangeTo<{integer}>`
 
 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..62307d387c8 100644
--- a/src/test/ui/issues/issue-41549.stderr
+++ b/src/test/ui/issues/issue-41549.stderr
@@ -2,10 +2,7 @@ error[E0326]: implemented const `CONST` has an incompatible type for trait
   --> $DIR/issue-41549.rs:9:18
    |
 LL |     const CONST: () = ();
-   |                  ^^ expected u32, found ()
-   |
-   = note: expected type `u32`
-              found type `()`
+   |                  ^^ expected `u32`, found `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-41742.stderr b/src/test/ui/issues/issue-41742.stderr
index f205abf5576..61a0ae5fa91 100644
--- a/src/test/ui/issues/issue-41742.stderr
+++ b/src/test/ui/issues/issue-41742.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-41742.rs:24:7
    |
 LL |     H["?"].f();
-   |       ^^^ expected u32, found reference
-   |
-   = note: expected type `u32`
-              found type `&'static str`
+   |       ^^^ expected `u32`, found `&str`
 
 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..2d655e4b7e7 100644
--- a/src/test/ui/issues/issue-4201.rs
+++ b/src/test/ui/issues/issue-4201.rs
@@ -3,9 +3,7 @@ fn main() {
         0
     } else if false {
 //~^ ERROR if may be missing an else clause
-//~| expected type `()`
-//~| found type `{integer}`
-//~| expected (), found 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..aacc426783d 100644
--- a/src/test/ui/issues/issue-4201.stderr
+++ b/src/test/ui/issues/issue-4201.stderr
@@ -5,15 +5,11 @@ LL |       } else if false {
    |  ____________^
 LL | |
 LL | |
-LL | |
-LL | |
 LL | |         1
    | |         - found here
 LL | |     };
-   | |_____^ expected (), found integer
+   | |_____^ expected `()`, found integer
    |
-   = note: expected 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..0ed3d27c65b 100644
--- a/src/test/ui/issues/issue-43162.stderr
+++ b/src/test/ui/issues/issue-43162.stderr
@@ -14,15 +14,12 @@ error[E0308]: mismatched types
   --> $DIR/issue-43162.rs:1:13
    |
 LL | fn foo() -> bool {
-   |    ---      ^^^^ expected bool, found ()
+   |    ---      ^^^^ expected `bool`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
 LL |
 LL |     break true;
    |               - help: consider removing this semicolon
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/issues/issue-43420-no-over-suggest.stderr b/src/test/ui/issues/issue-43420-no-over-suggest.stderr
index 7a3722e4bd7..27aebc548e1 100644
--- a/src/test/ui/issues/issue-43420-no-over-suggest.stderr
+++ b/src/test/ui/issues/issue-43420-no-over-suggest.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/issue-43420-no-over-suggest.rs:8:9
    |
 LL |     foo(&a);
-   |         ^^ expected slice, found struct `std::vec::Vec`
+   |         ^^ expected slice `[u16]`, found struct `std::vec::Vec`
    |
-   = note: expected type `&[u16]`
-              found type `&std::vec::Vec<u8>`
+   = note: expected reference `&[u16]`
+              found reference `&std::vec::Vec<u8>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-44023.stderr b/src/test/ui/issues/issue-44023.stderr
index 258ffe558e9..fc54e7c62bb 100644
--- a/src/test/ui/issues/issue-44023.stderr
+++ b/src/test/ui/issues/issue-44023.stderr
@@ -2,12 +2,9 @@ error[E0308]: mismatched types
   --> $DIR/issue-44023.rs:5:36
    |
 LL | fn საჭმელად_გემრიელი_სადილი ( ) -> isize {
-   |    ------------------------        ^^^^^ expected isize, found ()
+   |    ------------------------        ^^^^^ expected `isize`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
-   |
-   = note: expected type `isize`
-              found type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-4517.rs b/src/test/ui/issues/issue-4517.rs
index bbe81f3fc78..caf85d44aac 100644
--- a/src/test/ui/issues/issue-4517.rs
+++ b/src/test/ui/issues/issue-4517.rs
@@ -4,7 +4,5 @@ fn main() {
     let foo: [u8; 4] = [1; 4];
     bar(foo);
     //~^ ERROR mismatched types
-    //~| expected type `usize`
-    //~| found type `[u8; 4]`
-    //~| expected usize, found array of 4 elements
+    //~| expected `usize`, found array `[u8; 4]`
 }
diff --git a/src/test/ui/issues/issue-4517.stderr b/src/test/ui/issues/issue-4517.stderr
index 7d88e550440..1ae97b69c6c 100644
--- a/src/test/ui/issues/issue-4517.stderr
+++ b/src/test/ui/issues/issue-4517.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-4517.rs:5:9
    |
 LL |     bar(foo);
-   |         ^^^ expected usize, found array of 4 elements
-   |
-   = note: expected type `usize`
-              found type `[u8; 4]`
+   |         ^^^ expected `usize`, found array `[u8; 4]`
 
 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 07e90c56748..a861c38b001 100644
--- a/src/test/ui/issues/issue-46112.stderr
+++ b/src/test/ui/issues/issue-46112.stderr
@@ -4,11 +4,11 @@ error[E0308]: mismatched types
 LL | fn main() { test(Ok(())); }
    |                     ^^
    |                     |
-   |                     expected enum `std::option::Option`, found ()
+   |                     expected enum `std::option::Option`, found `()`
    |                     help: try using a variant of the expected enum: `Some(())`
    |
-   = note: expected type `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-46302.stderr b/src/test/ui/issues/issue-46302.stderr
index 8eb3a4dda34..a6f97c3c9af 100644
--- a/src/test/ui/issues/issue-46302.stderr
+++ b/src/test/ui/issues/issue-46302.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |   let u: &str = if true { s[..2] } else { s };
    |                           ^^^^^^
    |                           |
-   |                           expected &str, found str
+   |                           expected `&str`, found `str`
    |                           help: consider borrowing here: `&s[..2]`
-   |
-   = note: expected type `&str`
-              found type `str`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.stderr b/src/test/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.stderr
index 1eeca3e75b0..2d666e2b66c 100644
--- a/src/test/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.stderr
+++ b/src/test/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |     light_flows_our_war_of_mocking_words(behold as usize);
    |                                          ^^^^^^^^^^^^^^^
    |                                          |
-   |                                          expected &usize, found usize
+   |                                          expected `&usize`, found `usize`
    |                                          help: consider borrowing here: `&(behold as usize)`
-   |
-   = note: expected type `&usize`
-              found type `usize`
 
 error[E0308]: mismatched types
   --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:14:42
@@ -16,11 +13,8 @@ error[E0308]: mismatched types
 LL |     light_flows_our_war_of_mocking_words(with_tears + 4);
    |                                          ^^^^^^^^^^^^^^
    |                                          |
-   |                                          expected &usize, found usize
+   |                                          expected `&usize`, found `usize`
    |                                          help: consider borrowing here: `&(with_tears + 4)`
-   |
-   = note: expected type `&usize`
-              found type `usize`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-47486.stderr b/src/test/ui/issues/issue-47486.stderr
index af6e3010f79..cf95d309c63 100644
--- a/src/test/ui/issues/issue-47486.stderr
+++ b/src/test/ui/issues/issue-47486.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-47486.rs:2:10
    |
 LL |     () < std::mem::size_of::<_>();
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found usize
-   |
-   = note: expected type `()`
-              found type `usize`
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found `usize`
 
 error[E0282]: type annotations needed
   --> $DIR/issue-47486.rs:3:11
diff --git a/src/test/ui/issues/issue-48364.stderr b/src/test/ui/issues/issue-48364.stderr
index 7a1ba5bb193..e5bb9298cd5 100644
--- a/src/test/ui/issues/issue-48364.stderr
+++ b/src/test/ui/issues/issue-48364.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/issue-48364.rs:2:21
    |
 LL |     b"".starts_with(stringify!(foo))
-   |                     ^^^^^^^^^^^^^^^ expected slice, found str
+   |                     ^^^^^^^^^^^^^^^ expected slice `[u8]`, found `str`
    |
-   = note: expected type `&[u8]`
-              found type `&'static str`
+   = note: expected reference `&[u8]`
+              found reference `&'static str`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-48838.stderr b/src/test/ui/issues/issue-48838.stderr
index 3007d67336b..712a7bc33f8 100644
--- a/src/test/ui/issues/issue-48838.stderr
+++ b/src/test/ui/issues/issue-48838.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/issue-48838.rs:2:14
    |
 LL |     Square = |x| x,
-   |              ^^^^^ expected isize, found closure
+   |              ^^^^^ expected `isize`, found closure
    |
    = note: expected type `isize`
-              found type `[closure@$DIR/issue-48838.rs:2:14: 2:19]`
+           found closure `[closure@$DIR/issue-48838.rs:2:14: 2:19]`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-4968.rs b/src/test/ui/issues/issue-4968.rs
index 383b9ecd466..634bd698d77 100644
--- a/src/test/ui/issues/issue-4968.rs
+++ b/src/test/ui/issues/issue-4968.rs
@@ -5,6 +5,6 @@ fn main() {
     match 42 { A => () }
     //~^ ERROR mismatched types
     //~| expected type `{integer}`
-    //~| found type `(isize, isize)`
+    //~| found tuple `(isize, isize)`
     //~| expected integer, found tuple
 }
diff --git a/src/test/ui/issues/issue-4968.stderr b/src/test/ui/issues/issue-4968.stderr
index a925783723b..35435d0e618 100644
--- a/src/test/ui/issues/issue-4968.stderr
+++ b/src/test/ui/issues/issue-4968.stderr
@@ -5,7 +5,7 @@ LL |     match 42 { A => () }
    |                ^ expected integer, found tuple
    |
    = note: expected type `{integer}`
-              found type `(isize, isize)`
+             found tuple `(isize, isize)`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-50577.stderr b/src/test/ui/issues/issue-50577.stderr
index 055a71f468d..0a150fbf53a 100644
--- a/src/test/ui/issues/issue-50577.stderr
+++ b/src/test/ui/issues/issue-50577.stderr
@@ -28,11 +28,9 @@ error[E0317]: if may be missing an else clause
 LL |         Drop = assert_eq!(1, 1)
    |                ^^^^^^^^^^^^^^^^
    |                |
-   |                expected (), found isize
+   |                expected `()`, found `isize`
    |                found here
    |
-   = note: expected 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..c2630b664b5 100644
--- a/src/test/ui/issues/issue-50585.stderr
+++ b/src/test/ui/issues/issue-50585.stderr
@@ -8,10 +8,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-50585.rs:2:18
    |
 LL |     |y: Vec<[(); for x in 0..2 {}]>| {};
-   |                  ^^^^^^^^^^^^^^^^ expected usize, found ()
-   |
-   = note: expected type `usize`
-              found type `()`
+   |                  ^^^^^^^^^^^^^^^^ expected `usize`, found `()`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-50600.stderr b/src/test/ui/issues/issue-50600.stderr
index 2d97c2781c2..08d9a839920 100644
--- a/src/test/ui/issues/issue-50600.stderr
+++ b/src/test/ui/issues/issue-50600.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/issue-50600.rs:2:13
    |
 LL |     fn([u8; |x: u8| {}]),
-   |             ^^^^^^^^^^ expected usize, found closure
+   |             ^^^^^^^^^^ expected `usize`, found closure
    |
    = note: expected type `usize`
-              found type `[closure@$DIR/issue-50600.rs:2:13: 2:23]`
+           found closure `[closure@$DIR/issue-50600.rs:2:13: 2:23]`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-50688.stderr b/src/test/ui/issues/issue-50688.stderr
index 13eec8361ba..1f348c4cf1f 100644
--- a/src/test/ui/issues/issue-50688.stderr
+++ b/src/test/ui/issues/issue-50688.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/issue-50688.rs:2:9
    |
 LL |     [1; || {}];
-   |         ^^^^^ expected usize, found closure
+   |         ^^^^^ expected `usize`, found closure
    |
    = note: expected type `usize`
-              found type `[closure@$DIR/issue-50688.rs:2:9: 2:14]`
+           found closure `[closure@$DIR/issue-50688.rs:2:9: 2:14]`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-5100.rs b/src/test/ui/issues/issue-5100.rs
index 505dfbb27de..71dd237cad5 100644
--- a/src/test/ui/issues/issue-5100.rs
+++ b/src/test/ui/issues/issue-5100.rs
@@ -7,41 +7,41 @@ fn main() {
     match (true, false) {
         A::B => (),
 //~^ ERROR mismatched types
-//~| expected type `(bool, bool)`
-//~| found type `A`
 //~| expected tuple, found enum `A`
+//~| expected tuple `(bool, bool)`
+//~| found enum `A`
         _ => ()
     }
 
     match (true, false) {
         (true, false, false) => ()
 //~^ ERROR mismatched types
-//~| expected type `(bool, bool)`
-//~| found type `(_, _, _)`
 //~| expected a tuple with 2 elements, found one with 3 elements
+//~| expected tuple `(bool, bool)`
+//~| found tuple `(_, _, _)`
     }
 
     match (true, false) {
         (true, false, false) => ()
 //~^ ERROR mismatched types
-//~| expected type `(bool, bool)`
-//~| found type `(_, _, _)`
 //~| expected a tuple with 2 elements, found one with 3 elements
+//~| expected tuple `(bool, bool)`
+//~| found tuple `(_, _, _)`
     }
 
     match (true, false) {
         box (true, false) => ()
 //~^ ERROR mismatched types
-//~| expected type `(bool, bool)`
-//~| found type `std::boxed::Box<_>`
+//~| expected tuple `(bool, bool)`
+//~| found struct `std::boxed::Box<_>`
     }
 
     match (true, false) {
         &(true, false) => ()
 //~^ ERROR mismatched types
-//~| expected type `(bool, bool)`
-//~| found type `&_`
 //~| expected tuple, found reference
+//~| expected tuple `(bool, bool)`
+//~| found reference `&_`
     }
 
 
@@ -53,5 +53,5 @@ fn main() {
 
     // Make sure none of the errors above were fatal
     let x: char = true; //~  ERROR mismatched types
-                        //~| expected char, found bool
+                        //~| expected `char`, found `bool`
 }
diff --git a/src/test/ui/issues/issue-5100.stderr b/src/test/ui/issues/issue-5100.stderr
index b50d24671a8..bcbcefef3b1 100644
--- a/src/test/ui/issues/issue-5100.stderr
+++ b/src/test/ui/issues/issue-5100.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |         A::B => (),
    |         ^^^^ expected tuple, found enum `A`
    |
-   = note: expected type `(bool, bool)`
-              found type `A`
+   = note: expected tuple `(bool, bool)`
+               found enum `A`
 
 error[E0308]: mismatched types
   --> $DIR/issue-5100.rs:17:9
@@ -13,8 +13,8 @@ error[E0308]: mismatched types
 LL |         (true, false, false) => ()
    |         ^^^^^^^^^^^^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements
    |
-   = note: expected type `(bool, bool)`
-              found type `(_, _, _)`
+   = note: expected tuple `(bool, bool)`
+              found tuple `(_, _, _)`
 
 error[E0308]: mismatched types
   --> $DIR/issue-5100.rs:25:9
@@ -22,8 +22,8 @@ error[E0308]: mismatched types
 LL |         (true, false, false) => ()
    |         ^^^^^^^^^^^^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements
    |
-   = note: expected type `(bool, bool)`
-              found type `(_, _, _)`
+   = note: expected tuple `(bool, bool)`
+              found tuple `(_, _, _)`
 
 error[E0308]: mismatched types
   --> $DIR/issue-5100.rs:33:9
@@ -33,8 +33,8 @@ LL |     match (true, false) {
 LL |         box (true, false) => ()
    |         ^^^^^^^^^^^^^^^^^ expected tuple, found struct `std::boxed::Box`
    |
-   = note: expected type `(bool, bool)`
-              found type `std::boxed::Box<_>`
+   = note: expected tuple `(bool, bool)`
+             found struct `std::boxed::Box<_>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-5100.rs:40:9
@@ -42,8 +42,8 @@ error[E0308]: mismatched types
 LL |         &(true, false) => ()
    |         ^^^^^^^^^^^^^^ expected tuple, found reference
    |
-   = note: expected type `(bool, bool)`
-              found type `&_`
+   = note:  expected tuple `(bool, bool)`
+           found reference `&_`
 
 error[E0618]: expected function, found `(char, char)`
   --> $DIR/issue-5100.rs:48:14
@@ -57,7 +57,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-5100.rs:55:19
    |
 LL |     let x: char = true;
-   |                   ^^^^ expected char, found bool
+   |                   ^^^^ expected `char`, found `bool`
 
 error: aborting due to 7 previous errors
 
diff --git a/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr b/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr
index bf453571479..aef6dc54747 100644
--- a/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr
+++ b/src/test/ui/issues/issue-51632-try-desugar-incompatible-types.stderr
@@ -5,9 +5,9 @@ LL |     missing_discourses()?
    |     ^^^^^^^^^^^^^^^^^^^^-
    |     |                   |
    |     |                   help: try removing this `?`
-   |     expected enum `std::result::Result`, found isize
+   |     expected enum `std::result::Result`, found `isize`
    |
-   = note: expected type `std::result::Result<isize, ()>`
+   = note: expected enum `std::result::Result<isize, ()>`
               found type `isize`
 
 error: aborting due to previous error
diff --git a/src/test/ui/issues/issue-5216.stderr b/src/test/ui/issues/issue-5216.stderr
index ccfe7e04a2c..21d9333735c 100644
--- a/src/test/ui/issues/issue-5216.stderr
+++ b/src/test/ui/issues/issue-5216.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL | pub static C: S = S(f);
    |                     ^ expected struct `std::boxed::Box`, found fn item
    |
-   = note: expected type `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>`
-              found type `fn() {f}`
+   = note: expected struct `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>`
+             found fn item `fn() {f}`
 
 error[E0308]: mismatched types
   --> $DIR/issue-5216.rs:8:19
@@ -13,8 +13,8 @@ error[E0308]: mismatched types
 LL | pub static D: T = g;
    |                   ^ expected struct `std::boxed::Box`, found fn item
    |
-   = note: expected type `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>`
-              found type `fn() {g}`
+   = note: expected struct `std::boxed::Box<(dyn std::ops::FnMut() + 'static)>`
+             found fn item `fn() {g}`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-52533-1.stderr b/src/test/ui/issues/issue-52533-1.stderr
index c719c00ef22..dd37d3e5593 100644
--- a/src/test/ui/issues/issue-52533-1.stderr
+++ b/src/test/ui/issues/issue-52533-1.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     gimme(|x, y| y)
    |                  ^ lifetime mismatch
    |
-   = note: expected type `&Foo<'_, '_, u32>`
-              found type `&Foo<'_, '_, u32>`
+   = note: expected reference `&Foo<'_, '_, u32>`
+              found reference `&Foo<'_, '_, u32>`
 note: the anonymous lifetime #4 defined on the body at 9:11...
   --> $DIR/issue-52533-1.rs:9:11
    |
diff --git a/src/test/ui/issues/issue-53348.rs b/src/test/ui/issues/issue-53348.rs
index 733413f0e17..bbfdd9c5389 100644
--- a/src/test/ui/issues/issue-53348.rs
+++ b/src/test/ui/issues/issue-53348.rs
@@ -9,8 +9,7 @@ fn main() {
     for i in v {
         a = *i.to_string();
         //~^ ERROR mismatched types
-        //~| NOTE expected struct `std::string::String`, found str
-        //~| NOTE expected type
+        //~| NOTE expected struct `std::string::String`, found `str`
         v2.push(a);
     }
 }
diff --git a/src/test/ui/issues/issue-53348.stderr b/src/test/ui/issues/issue-53348.stderr
index ca07b1de435..433fe40ea03 100644
--- a/src/test/ui/issues/issue-53348.stderr
+++ b/src/test/ui/issues/issue-53348.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-53348.rs:10:13
    |
 LL |         a = *i.to_string();
-   |             ^^^^^^^^^^^^^^ expected struct `std::string::String`, found str
-   |
-   = note: expected type `std::string::String`
-              found type `str`
+   |             ^^^^^^^^^^^^^^ expected struct `std::string::String`, found `str`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-5358-1.rs b/src/test/ui/issues/issue-5358-1.rs
index 6b23be2030d..f5e32e78d87 100644
--- a/src/test/ui/issues/issue-5358-1.rs
+++ b/src/test/ui/issues/issue-5358-1.rs
@@ -5,9 +5,9 @@ fn main() {
     match S(Either::Left(5)) {
         Either::Right(_) => {}
         //~^ ERROR mismatched types
-        //~| expected type `S`
-        //~| found type `Either<_, _>`
         //~| expected struct `S`, found enum `Either`
+        //~| expected struct `S`
+        //~| found enum `Either<_, _>`
         _ => {}
     }
 }
diff --git a/src/test/ui/issues/issue-5358-1.stderr b/src/test/ui/issues/issue-5358-1.stderr
index 649a0c1581a..ec79d874d03 100644
--- a/src/test/ui/issues/issue-5358-1.stderr
+++ b/src/test/ui/issues/issue-5358-1.stderr
@@ -6,8 +6,8 @@ LL |     match S(Either::Left(5)) {
 LL |         Either::Right(_) => {}
    |         ^^^^^^^^^^^^^^^^ expected struct `S`, found enum `Either`
    |
-   = note: expected type `S`
-              found type `Either<_, _>`
+   = note: expected struct `S`
+                found enum `Either<_, _>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-53692.stderr b/src/test/ui/issues/issue-53692.stderr
index 2928d4461c5..50a202d1489 100644
--- a/src/test/ui/issues/issue-53692.stderr
+++ b/src/test/ui/issues/issue-53692.stderr
@@ -4,11 +4,11 @@ error[E0308]: mismatched types
 LL |         let items_clone: Vec<i32> = ref_items.clone();
    |                                     ^^^^^^^^^^^^^^^^^
    |                                     |
-   |                                     expected struct `std::vec::Vec`, found &[i32]
+   |                                     expected struct `std::vec::Vec`, found `&[i32]`
    |                                     help: try using a conversion method: `ref_items.to_vec()`
    |
-   = note: expected type `std::vec::Vec<i32>`
-              found type `&[i32]`
+   = note: expected struct `std::vec::Vec<i32>`
+           found reference `&[i32]`
 
 error[E0308]: mismatched types
   --> $DIR/issue-53692.rs:11:30
@@ -16,11 +16,8 @@ error[E0308]: mismatched types
 LL |         let string: String = s.clone();
    |                              ^^^^^^^^^
    |                              |
-   |                              expected struct `std::string::String`, found &str
+   |                              expected struct `std::string::String`, found `&str`
    |                              help: try using a conversion method: `s.to_string()`
-   |
-   = note: expected type `std::string::String`
-              found type `&str`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-56943.stderr b/src/test/ui/issues/issue-56943.stderr
index 27202051524..7fd124046dc 100644
--- a/src/test/ui/issues/issue-56943.stderr
+++ b/src/test/ui/issues/issue-56943.stderr
@@ -3,9 +3,6 @@ error[E0308]: mismatched types
    |
 LL |     let _: issue_56943::S = issue_56943::S2;
    |                             ^^^^^^^^^^^^^^^ expected struct `issue_56943::S`, found struct `issue_56943::S2`
-   |
-   = note: expected type `issue_56943::S`
-              found type `issue_56943::S2`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-57741-1.stderr b/src/test/ui/issues/issue-57741-1.stderr
index d36424b83b4..db6fa9db8ff 100644
--- a/src/test/ui/issues/issue-57741-1.stderr
+++ b/src/test/ui/issues/issue-57741-1.stderr
@@ -6,8 +6,8 @@ LL |     let y = match x {
 LL |         S::A { a } | S::B { b: a } => a,
    |         ^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `S`
    |
-   = note: expected type `std::boxed::Box<u32>`
-              found type `S`
+   = note: expected struct `std::boxed::Box<u32>`
+                found enum `S`
 
 error[E0308]: mismatched types
   --> $DIR/issue-57741-1.rs:14:22
@@ -17,8 +17,8 @@ LL |     let y = match x {
 LL |         S::A { a } | S::B { b: a } => a,
    |                      ^^^^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `S`
    |
-   = note: expected type `std::boxed::Box<u32>`
-              found type `S`
+   = note: expected struct `std::boxed::Box<u32>`
+                found enum `S`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-57741.stderr b/src/test/ui/issues/issue-57741.stderr
index a26b1d20ca3..c36dea7bf55 100644
--- a/src/test/ui/issues/issue-57741.stderr
+++ b/src/test/ui/issues/issue-57741.stderr
@@ -9,8 +9,8 @@ LL |     let y = match x {
 LL |         T::A(a) | T::B(a) => a,
    |         ^^^^^^^ expected struct `std::boxed::Box`, found enum `T`
    |
-   = note: expected type `std::boxed::Box<T>`
-              found type `T`
+   = note: expected struct `std::boxed::Box<T>`
+                found enum `T`
 
 error[E0308]: mismatched types
   --> $DIR/issue-57741.rs:20:19
@@ -23,8 +23,8 @@ LL |     let y = match x {
 LL |         T::A(a) | T::B(a) => a,
    |                   ^^^^^^^ expected struct `std::boxed::Box`, found enum `T`
    |
-   = note: expected type `std::boxed::Box<T>`
-              found type `T`
+   = note: expected struct `std::boxed::Box<T>`
+                found enum `T`
 
 error[E0308]: mismatched types
   --> $DIR/issue-57741.rs:27:9
@@ -37,8 +37,8 @@ LL |     let y = match x {
 LL |         S::A { a } | S::B { b: a } => a,
    |         ^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `S`
    |
-   = note: expected type `std::boxed::Box<S>`
-              found type `S`
+   = note: expected struct `std::boxed::Box<S>`
+                found enum `S`
 
 error[E0308]: mismatched types
   --> $DIR/issue-57741.rs:27:22
@@ -51,8 +51,8 @@ LL |     let y = match x {
 LL |         S::A { a } | S::B { b: a } => a,
    |                      ^^^^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `S`
    |
-   = note: expected type `std::boxed::Box<S>`
-              found type `S`
+   = note: expected struct `std::boxed::Box<S>`
+                found enum `S`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/issues/issue-59488.stderr b/src/test/ui/issues/issue-59488.stderr
index 2397d583488..35ada71a1f1 100644
--- a/src/test/ui/issues/issue-59488.stderr
+++ b/src/test/ui/issues/issue-59488.stderr
@@ -13,8 +13,8 @@ error[E0308]: mismatched types
 LL |     foo > 12;
    |           ^^ expected fn item, found integer
    |
-   = note: expected type `fn() -> i32 {foo}`
-              found type `i32`
+   = note: expected fn item `fn() -> i32 {foo}`
+                 found type `i32`
 
 error[E0369]: binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}`
   --> $DIR/issue-59488.rs:18:9
@@ -31,8 +31,8 @@ error[E0308]: mismatched types
 LL |     bar > 13;
    |           ^^ expected fn item, found integer
    |
-   = note: expected type `fn(i64) -> i64 {bar}`
-              found type `i64`
+   = note: expected fn item `fn(i64) -> i64 {bar}`
+                 found type `i64`
 
 error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
   --> $DIR/issue-59488.rs:22:9
@@ -67,8 +67,8 @@ error[E0308]: mismatched types
 LL |     foo > bar;
    |           ^^^ expected fn item, found a different fn item
    |
-   = note: expected type `fn() -> i32 {foo}`
-              found type `fn(i64) -> i64 {bar}`
+   = note: expected fn item `fn() -> i32 {foo}`
+              found fn item `fn(i64) -> i64 {bar}`
 
 error[E0369]: binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}`
   --> $DIR/issue-59488.rs:30:5
diff --git a/src/test/ui/issues/issue-59756.stderr b/src/test/ui/issues/issue-59756.stderr
index d46232874fd..150916c0366 100644
--- a/src/test/ui/issues/issue-59756.stderr
+++ b/src/test/ui/issues/issue-59756.stderr
@@ -7,8 +7,8 @@ LL |     foo()?
    |     |    help: try removing this `?`
    |     expected enum `std::result::Result`, found struct `A`
    |
-   = note: expected type `std::result::Result<A, B>`
-              found type `A`
+   = note: expected enum `std::result::Result<A, B>`
+            found struct `A`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-61106.stderr b/src/test/ui/issues/issue-61106.stderr
index ca67d514928..163aa816ab7 100644
--- a/src/test/ui/issues/issue-61106.stderr
+++ b/src/test/ui/issues/issue-61106.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |     foo(x.clone());
    |         ^^^^^^^^^
    |         |
-   |         expected &str, found struct `std::string::String`
+   |         expected `&str`, found struct `std::string::String`
    |         help: consider borrowing here: `&x`
-   |
-   = note: expected type `&str`
-              found type `std::string::String`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-61882.stderr b/src/test/ui/issues/issue-61882.stderr
index a14e1a4dd4d..09ffe8e64b1 100644
--- a/src/test/ui/issues/issue-61882.stderr
+++ b/src/test/ui/issues/issue-61882.stderr
@@ -2,19 +2,16 @@ error[E0308]: mismatched types
   --> $DIR/issue-61882.rs:4:27
    |
 LL |     const B: A<u8> = Self(0);
-   |                           ^ expected bool, found integer
-   |
-   = note: expected type `bool`
-              found type `{integer}`
+   |                           ^ expected `bool`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/issue-61882.rs:4:22
    |
 LL |     const B: A<u8> = Self(0);
-   |                      ^^^^^^^ expected u8, found bool
+   |                      ^^^^^^^ expected `u8`, found `bool`
    |
-   = note: expected type `A<u8>`
-              found type `A<bool>`
+   = note: expected struct `A<u8>`
+              found struct `A<bool>`
 
 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 ecf729e1032..6537867bbf5 100644
--- a/src/test/ui/issues/issue-6458-4.stderr
+++ b/src/test/ui/issues/issue-6458-4.stderr
@@ -2,14 +2,14 @@ error[E0308]: mismatched types
   --> $DIR/issue-6458-4.rs:1:20
    |
 LL | fn foo(b: bool) -> Result<bool,String> {
-   |    ---             ^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found ()
+   |    ---             ^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
 LL |     Err("bar".to_string());
    |                           - help: consider removing this semicolon
    |
-   = note: expected type `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/issues/issue-7061.rs b/src/test/ui/issues/issue-7061.rs
index 66ae90034e7..ef61eac7baa 100644
--- a/src/test/ui/issues/issue-7061.rs
+++ b/src/test/ui/issues/issue-7061.rs
@@ -3,8 +3,8 @@ struct BarStruct;
 impl<'a> BarStruct {
     fn foo(&'a mut self) -> Box<BarStruct> { self }
     //~^ ERROR mismatched types
-    //~| expected type `std::boxed::Box<BarStruct>`
-    //~| found type `&'a mut BarStruct`
+    //~| expected struct `std::boxed::Box<BarStruct>`
+    //~| found mutable reference `&'a mut BarStruct`
 }
 
 fn main() {}
diff --git a/src/test/ui/issues/issue-7061.stderr b/src/test/ui/issues/issue-7061.stderr
index 96c539f629e..bf1450ca765 100644
--- a/src/test/ui/issues/issue-7061.stderr
+++ b/src/test/ui/issues/issue-7061.stderr
@@ -2,12 +2,12 @@ error[E0308]: mismatched types
   --> $DIR/issue-7061.rs:4:46
    |
 LL |     fn foo(&'a mut self) -> Box<BarStruct> { self }
-   |                             --------------   ^^^^ expected struct `std::boxed::Box`, found mutable reference
+   |                             --------------   ^^^^ expected struct `std::boxed::Box`, found `&mut BarStruct`
    |                             |
    |                             expected `std::boxed::Box<BarStruct>` because of return type
    |
-   = note: expected type `std::boxed::Box<BarStruct>`
-              found type `&'a mut BarStruct`
+   = note:         expected struct `std::boxed::Box<BarStruct>`
+           found mutable reference `&'a mut BarStruct`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-7092.rs b/src/test/ui/issues/issue-7092.rs
index b49a262f896..09fa6c52508 100644
--- a/src/test/ui/issues/issue-7092.rs
+++ b/src/test/ui/issues/issue-7092.rs
@@ -5,9 +5,9 @@ fn foo(x: Whatever) {
     match x {
         Some(field) =>
 //~^ ERROR mismatched types
-//~| expected type `Whatever`
-//~| found type `std::option::Option<_>`
 //~| expected enum `Whatever`, found enum `std::option::Option`
+//~| expected enum `Whatever`
+//~| found enum `std::option::Option<_>`
             field.access(),
     }
 }
diff --git a/src/test/ui/issues/issue-7092.stderr b/src/test/ui/issues/issue-7092.stderr
index 7bb68202874..05c00da16b1 100644
--- a/src/test/ui/issues/issue-7092.stderr
+++ b/src/test/ui/issues/issue-7092.stderr
@@ -6,8 +6,8 @@ LL |     match x {
 LL |         Some(field) =>
    |         ^^^^^^^^^^^ expected enum `Whatever`, found enum `std::option::Option`
    |
-   = note: expected type `Whatever`
-              found type `std::option::Option<_>`
+   = note: expected enum `Whatever`
+              found enum `std::option::Option<_>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-7867.rs b/src/test/ui/issues/issue-7867.rs
index a1997fbf19a..3074052f14f 100644
--- a/src/test/ui/issues/issue-7867.rs
+++ b/src/test/ui/issues/issue-7867.rs
@@ -6,9 +6,9 @@ fn main() {
     match (true, false) {
         A::B => (),
         //~^ ERROR mismatched types
-        //~| expected type `(bool, bool)`
-        //~| found type `A`
         //~| expected tuple, found enum `A`
+        //~| expected tuple `(bool, bool)`
+        //~| found enum `A`
         _ => ()
     }
 }
diff --git a/src/test/ui/issues/issue-7867.stderr b/src/test/ui/issues/issue-7867.stderr
index 1d3a0ff0659..58e82facf80 100644
--- a/src/test/ui/issues/issue-7867.stderr
+++ b/src/test/ui/issues/issue-7867.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |         A::B => (),
    |         ^^^^ expected tuple, found enum `A`
    |
-   = note: expected type `(bool, bool)`
-              found type `A`
+   = note: expected tuple `(bool, bool)`
+               found enum `A`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-8761.rs b/src/test/ui/issues/issue-8761.rs
index e69927c8457..1453c3d757f 100644
--- a/src/test/ui/issues/issue-8761.rs
+++ b/src/test/ui/issues/issue-8761.rs
@@ -1,10 +1,10 @@
 enum Foo {
     A = 1i64,
     //~^ ERROR mismatched types
-    //~| expected isize, found i64
+    //~| expected `isize`, found `i64`
     B = 2u8
     //~^ ERROR mismatched types
-    //~| expected isize, found u8
+    //~| expected `isize`, found `u8`
 }
 
 fn main() {}
diff --git a/src/test/ui/issues/issue-8761.stderr b/src/test/ui/issues/issue-8761.stderr
index 5a657575c1d..836520a28ef 100644
--- a/src/test/ui/issues/issue-8761.stderr
+++ b/src/test/ui/issues/issue-8761.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-8761.rs:2:9
    |
 LL |     A = 1i64,
-   |         ^^^^ expected isize, found i64
+   |         ^^^^ expected `isize`, found `i64`
    |
 help: change the type of the numeric literal from `i64` to `isize`
    |
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-8761.rs:5:9
    |
 LL |     B = 2u8
-   |         ^^^ expected isize, found u8
+   |         ^^^ expected `isize`, found `u8`
    |
 help: change the type of the numeric literal from `u8` to `isize`
    |
diff --git a/src/test/ui/issues/issue-9575.stderr b/src/test/ui/issues/issue-9575.stderr
index 1483e427a6a..6203c2fa84e 100644
--- a/src/test/ui/issues/issue-9575.stderr
+++ b/src/test/ui/issues/issue-9575.stderr
@@ -4,8 +4,8 @@ error[E0308]: start function has wrong type
 LL | fn start(argc: isize, argv: *const *const u8, crate_map: *const u8) -> isize {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters
    |
-   = note: expected type `fn(isize, *const *const u8) -> isize`
-              found type `fn(isize, *const *const u8, *const u8) -> isize`
+   = note: expected fn pointer `fn(isize, *const *const u8) -> isize`
+              found fn pointer `fn(isize, *const *const u8, *const u8) -> isize`
 
 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 39f6b69bbec..494bbd7f284 100644
--- a/src/test/ui/json-bom-plus-crlf-multifile.stderr
+++ b/src/test/ui/json-bom-plus-crlf-multifile.stderr
@@ -15,8 +15,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":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let s : String = 1;  // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `std::string::String`
-   found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let s : String = 1;  // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:17:22: error[E0308]: mismatched types
+"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let s : String = 1;  // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let s : String = 1;  // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:17:22: error[E0308]: mismatched types
 "}
 {"message":"mismatched types","code":{"code":"E0308","explanation":"This error occurs when the compiler was unable to infer the concrete type of a
 variable. It can occur for several cases, the most common of which is a
@@ -35,8 +34,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":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `std::string::String`
-   found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let s : String = 1","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:19:22: error[E0308]: mismatched types
+"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let s : String = 1","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:19:22: error[E0308]: mismatched types
 "}
 {"message":"mismatched types","code":{"code":"E0308","explanation":"This error occurs when the compiler was unable to infer the concrete type of a
 variable. It can occur for several cases, the most common of which is a
@@ -55,8 +53,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":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1;  // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `std::string::String`
-   found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1;  // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:23:1: error[E0308]: mismatched types
+"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1;  // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf-multifile-aux.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1;  // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf-multifile-aux.rs:23:1: error[E0308]: mismatched types
 "}
 {"message":"mismatched types","code":{"code":"E0308","explanation":"This error occurs when the compiler was unable to infer the concrete type of a
 variable. It can occur for several cases, the most common of which is a
@@ -75,8 +72,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 type `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
+"},"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":[],"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 d62140e4de7..ea21a6b8961 100644
--- a/src/test/ui/json-bom-plus-crlf.stderr
+++ b/src/test/ui/json-bom-plus-crlf.stderr
@@ -15,8 +15,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":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let s : String = 1;  // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `std::string::String`
-   found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let s : String = 1;  // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:17:22: error[E0308]: mismatched types
+"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let s : String = 1;  // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":621,"byte_end":622,"line_start":17,"line_end":17,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let s : String = 1;  // Error in the middle of line.","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:17:22: error[E0308]: mismatched types
 "}
 {"message":"mismatched types","code":{"code":"E0308","explanation":"This error occurs when the compiler was unable to infer the concrete type of a
 variable. It can occur for several cases, the most common of which is a
@@ -35,8 +34,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":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `std::string::String`
-   found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let s : String = 1","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:19:22: error[E0308]: mismatched types
+"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let s : String = 1","highlight_start":22,"highlight_end":23}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":681,"byte_end":682,"line_start":19,"line_end":19,"column_start":22,"column_end":23,"is_primary":true,"text":[{"text":"    let s : String = 1","highlight_start":22,"highlight_end":23}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:19:22: error[E0308]: mismatched types
 "}
 {"message":"mismatched types","code":{"code":"E0308","explanation":"This error occurs when the compiler was unable to infer the concrete type of a
 variable. It can occur for several cases, the most common of which is a
@@ -55,8 +53,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":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1;  // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `std::string::String`
-   found type `{integer}`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1;  // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:23:1: error[E0308]: mismatched types
+"},"level":"error","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1;  // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":"expected struct `std::string::String`, found integer","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"try using a conversion method","code":null,"level":"help","spans":[{"file_name":"$DIR/json-bom-plus-crlf.rs","byte_start":745,"byte_end":746,"line_start":23,"line_end":23,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"1;  // Error after the newline.","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":"1.to_string()","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"$DIR/json-bom-plus-crlf.rs:23:1: error[E0308]: mismatched types
 "}
 {"message":"mismatched types","code":{"code":"E0308","explanation":"This error occurs when the compiler was unable to infer the concrete type of a
 variable. It can occur for several cases, the most common of which is a
@@ -75,8 +72,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 type `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
+"},"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":[],"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/keyword/keyword-false-as-identifier.stderr b/src/test/ui/keyword/keyword-false-as-identifier.stderr
index 95446045998..fcc30064018 100644
--- a/src/test/ui/keyword/keyword-false-as-identifier.stderr
+++ b/src/test/ui/keyword/keyword-false-as-identifier.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/keyword-false-as-identifier.rs:2:9
    |
 LL |     let false = 22;
-   |         ^^^^^ expected integer, found bool
-   |
-   = note: expected type `{integer}`
-              found type `bool`
+   |         ^^^^^ expected integer, found `bool`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/keyword/keyword-true-as-identifier.stderr b/src/test/ui/keyword/keyword-true-as-identifier.stderr
index 36b1d882a34..b8cc2ffd2a8 100644
--- a/src/test/ui/keyword/keyword-true-as-identifier.stderr
+++ b/src/test/ui/keyword/keyword-true-as-identifier.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/keyword-true-as-identifier.rs:2:9
    |
 LL |     let true = 22;
-   |         ^^^^ expected integer, found bool
-   |
-   = note: expected type `{integer}`
-              found type `bool`
+   |         ^^^^ expected integer, found `bool`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr
index b4011990b68..93160a1c5e5 100644
--- a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr
+++ b/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     ref_obj(x)
    |             ^ lifetime mismatch
    |
-   = note: expected type `&std::boxed::Box<(dyn std::ops::Fn() + 'static)>`
-              found type `&std::boxed::Box<(dyn std::ops::Fn() + 'a)>`
+   = note: expected reference `&std::boxed::Box<(dyn std::ops::Fn() + 'static)>`
+              found reference `&std::boxed::Box<(dyn std::ops::Fn() + 'a)>`
 note: the lifetime `'a` as defined on the function body at 32:10...
   --> $DIR/lifetime-bound-will-change-warning.rs:32:10
    |
@@ -19,8 +19,8 @@ error[E0308]: mismatched types
 LL |     lib::ref_obj(x)
    |                  ^ lifetime mismatch
    |
-   = note: expected type `&std::boxed::Box<(dyn std::ops::Fn() + 'static)>`
-              found type `&std::boxed::Box<(dyn std::ops::Fn() + 'a)>`
+   = note: expected reference `&std::boxed::Box<(dyn std::ops::Fn() + 'static)>`
+              found reference `&std::boxed::Box<(dyn std::ops::Fn() + 'a)>`
 note: the lifetime `'a` as defined on the function body at 37:12...
   --> $DIR/lifetime-bound-will-change-warning.rs:37:12
    |
diff --git a/src/test/ui/liveness/liveness-closure-require-ret.stderr b/src/test/ui/liveness/liveness-closure-require-ret.stderr
index e8f185a5cb2..07b2ef6cd1b 100644
--- a/src/test/ui/liveness/liveness-closure-require-ret.stderr
+++ b/src/test/ui/liveness/liveness-closure-require-ret.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/liveness-closure-require-ret.rs:2:37
    |
 LL | fn main() { println!("{}", force(|| {})); }
-   |                                     ^^ expected isize, found ()
-   |
-   = note: expected type `isize`
-              found type `()`
+   |                                     ^^ expected `isize`, found `()`
 
 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..95070322bdd 100644
--- a/src/test/ui/liveness/liveness-forgot-ret.stderr
+++ b/src/test/ui/liveness/liveness-forgot-ret.stderr
@@ -2,12 +2,9 @@ error[E0308]: mismatched types
   --> $DIR/liveness-forgot-ret.rs:3:19
    |
 LL | fn f(a: isize) -> isize { if god_exists(a) { return 5; }; }
-   |    -              ^^^^^ expected isize, found ()
+   |    -              ^^^^^ expected `isize`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
-   |
-   = note: expected type `isize`
-              found 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..2adc2d43809 100644
--- a/src/test/ui/liveness/liveness-issue-2163.stderr
+++ b/src/test/ui/liveness/liveness-issue-2163.stderr
@@ -5,10 +5,7 @@ LL |       a.iter().all(|_| -> bool {
    |  ______________________________^
 LL | |
 LL | |     });
-   | |_____^ expected bool, found ()
-   |
-   = note: expected type `bool`
-              found type `()`
+   | |_____^ expected `bool`, found `()`
 
 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..afdb733cd03 100644
--- a/src/test/ui/liveness/liveness-missing-ret2.stderr
+++ b/src/test/ui/liveness/liveness-missing-ret2.stderr
@@ -2,12 +2,9 @@ error[E0308]: mismatched types
   --> $DIR/liveness-missing-ret2.rs:1:11
    |
 LL | fn f() -> isize {
-   |    -      ^^^^^ expected isize, found ()
+   |    -      ^^^^^ expected `isize`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
-   |
-   = note: expected type `isize`
-              found 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..6b4de6618c5 100644
--- a/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr
+++ b/src/test/ui/liveness/liveness-return-last-stmt-semi.stderr
@@ -4,49 +4,37 @@ error[E0308]: mismatched types
 LL | macro_rules! test { () => { fn foo() -> i32 { 1; } } }
    |                                ---      ^^^    - help: consider removing this semicolon
    |                                |        |
-   |                                |        expected i32, found ()
+   |                                |        expected `i32`, found `()`
    |                                implicitly returns `()` as its body has no tail or `return` expression
 ...
 LL |     test!();
    |     -------- in this macro invocation
-   |
-   = note: expected type `i32`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/liveness-return-last-stmt-semi.rs:7:19
    |
 LL | fn no_return() -> i32 {}
-   |    ---------      ^^^ expected i32, found ()
+   |    ---------      ^^^ expected `i32`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
-   |
-   = note: expected type `i32`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/liveness-return-last-stmt-semi.rs:9:19
    |
 LL | fn bar(x: u32) -> u32 {
-   |    ---            ^^^ expected u32, found ()
+   |    ---            ^^^ expected `u32`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
 LL |     x * 2;
    |          - help: consider removing this semicolon
-   |
-   = note: expected type `u32`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/liveness-return-last-stmt-semi.rs:13:19
    |
 LL | fn baz(x: u64) -> u32 {
-   |    ---            ^^^ expected u32, found ()
+   |    ---            ^^^ expected `u32`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
-   |
-   = note: expected type `u32`
-              found 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 8c4bcd3a9b7..1707a179ad0 100644
--- a/src/test/ui/loops/loop-break-value.stderr
+++ b/src/test/ui/loops/loop-break-value.stderr
@@ -98,64 +98,49 @@ error[E0308]: mismatched types
   --> $DIR/loop-break-value.rs:2:31
    |
 LL |     let val: ! = loop { break break; };
-   |                               ^^^^^ expected !, found ()
+   |                               ^^^^^ expected `!`, found `()`
    |
-   = note: expected type `!`
-              found type `()`
+   = note:   expected type `!`
+           found unit type `()`
 
 error[E0308]: mismatched types
   --> $DIR/loop-break-value.rs:9:19
    |
 LL |             break 123;
-   |                   ^^^ expected &str, found integer
-   |
-   = note: expected type `&str`
-              found type `{integer}`
+   |                   ^^^ expected `&str`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/loop-break-value.rs:14:15
    |
 LL |         break "asdf";
-   |               ^^^^^^ expected i32, found reference
-   |
-   = note: expected type `i32`
-              found type `&'static str`
+   |               ^^^^^^ expected `i32`, found `&str`
 
 error[E0308]: mismatched types
   --> $DIR/loop-break-value.rs:19:31
    |
 LL |             break 'outer_loop "nope";
-   |                               ^^^^^^ expected i32, found reference
-   |
-   = note: expected type `i32`
-              found type `&'static str`
+   |                               ^^^^^^ expected `i32`, found `&str`
 
 error[E0308]: mismatched types
   --> $DIR/loop-break-value.rs:71:26
    |
 LL |                 break 'c 123;
-   |                          ^^^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |                          ^^^ expected `()`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/loop-break-value.rs:78:15
    |
 LL |         break (break, break);
-   |               ^^^^^^^^^^^^^^ expected (), found tuple
+   |               ^^^^^^^^^^^^^^ expected `()`, found tuple
    |
-   = note: expected type `()`
-              found type `(!, !)`
+   = note: expected unit type `()`
+                  found tuple `(!, !)`
 
 error[E0308]: mismatched types
   --> $DIR/loop-break-value.rs:83:15
    |
 LL |         break 2;
-   |               ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |               ^ expected `()`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/loop-break-value.rs:88:9
@@ -163,11 +148,8 @@ error[E0308]: mismatched types
 LL |         break;
    |         ^^^^^
    |         |
-   |         expected integer, found ()
+   |         expected integer, found `()`
    |         help: give it a value of the expected type: `break value`
-   |
-   = note: expected type `{integer}`
-              found 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..aa04d330f25 100644
--- a/src/test/ui/loops/loop-labeled-break-value.stderr
+++ b/src/test/ui/loops/loop-labeled-break-value.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |         let _: i32 = loop { break };
    |                             ^^^^^
    |                             |
-   |                             expected i32, found ()
+   |                             expected `i32`, found `()`
    |                             help: give it a value of the expected type: `break 42`
-   |
-   = note: expected type `i32`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/loop-labeled-break-value.rs:6:37
@@ -16,11 +13,8 @@ error[E0308]: mismatched types
 LL |         let _: i32 = 'inner: loop { break 'inner };
    |                                     ^^^^^^^^^^^^
    |                                     |
-   |                                     expected i32, found ()
+   |                                     expected `i32`, found `()`
    |                                     help: give it a value of the expected type: `break 'inner 42`
-   |
-   = note: expected type `i32`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/loop-labeled-break-value.rs:9:45
@@ -28,11 +22,8 @@ error[E0308]: mismatched types
 LL |         let _: i32 = 'inner2: loop { loop { break 'inner2 } };
    |                                             ^^^^^^^^^^^^^
    |                                             |
-   |                                             expected i32, found ()
+   |                                             expected `i32`, found `()`
    |                                             help: give it a value of the expected type: `break 'inner2 42`
-   |
-   = note: expected type `i32`
-              found 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..5030a2935b9 100644
--- a/src/test/ui/loops/loop-properly-diverging-2.stderr
+++ b/src/test/ui/loops/loop-properly-diverging-2.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |   let x: i32 = loop { break };
    |                       ^^^^^
    |                       |
-   |                       expected i32, found ()
+   |                       expected `i32`, found `()`
    |                       help: give it a value of the expected type: `break 42`
-   |
-   = note: expected type `i32`
-              found type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/lub-glb/old-lub-glb-hr.stderr b/src/test/ui/lub-glb/old-lub-glb-hr.stderr
index 475c1801ca1..1dce9df96df 100644
--- a/src/test/ui/lub-glb/old-lub-glb-hr.stderr
+++ b/src/test/ui/lub-glb/old-lub-glb-hr.stderr
@@ -10,8 +10,8 @@ LL | |         _ => y,
 LL | |     };
    | |_____- `match` arms have incompatible types
    |
-   = note: expected type `for<'r, 's> fn(&'r u8, &'s u8)`
-              found type `for<'a> fn(&'a u8, &'a u8)`
+   = note:    expected type `for<'r, 's> fn(&'r u8, &'s u8)`
+           found fn pointer `for<'a> fn(&'a u8, &'a u8)`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/lub-glb/old-lub-glb-object.stderr b/src/test/ui/lub-glb/old-lub-glb-object.stderr
index e02ede399e6..18de7a40ee1 100644
--- a/src/test/ui/lub-glb/old-lub-glb-object.stderr
+++ b/src/test/ui/lub-glb/old-lub-glb-object.stderr
@@ -10,8 +10,8 @@ LL | |         _ => y,
 LL | |     };
    | |_____- `match` arms have incompatible types
    |
-   = note: expected type `&dyn for<'a, 'b> Foo<&'a u8, &'b u8>`
-              found type `&dyn for<'a> Foo<&'a u8, &'a u8>`
+   = note:   expected type `&dyn for<'a, 'b> Foo<&'a u8, &'b u8>`
+           found reference `&dyn for<'a> Foo<&'a u8, &'a u8>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/main-wrong-type.stderr b/src/test/ui/main-wrong-type.stderr
index c00c67af572..e75d4d7acfd 100644
--- a/src/test/ui/main-wrong-type.stderr
+++ b/src/test/ui/main-wrong-type.stderr
@@ -4,8 +4,8 @@ error[E0580]: main function has wrong type
 LL | fn main(foo: S) {
    | ^^^^^^^^^^^^^^^ incorrect number of function parameters
    |
-   = note: expected type `fn()`
-              found type `fn(S)`
+   = note: expected fn pointer `fn()`
+              found fn pointer `fn(S)`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/match/match-arm-resolving-to-never.stderr b/src/test/ui/match/match-arm-resolving-to-never.stderr
index 24ce97f86e7..4482d5c6a79 100644
--- a/src/test/ui/match/match-arm-resolving-to-never.stderr
+++ b/src/test/ui/match/match-arm-resolving-to-never.stderr
@@ -9,12 +9,10 @@ LL | |         E::D => 4,
 LL | |         E::E => unimplemented!(""),
    | |                 ------------------ this and all prior arms are found to be of type `{integer}`
 LL | |         E::F => "",
-   | |                 ^^ expected integer, found reference
+   | |                 ^^ expected integer, found `&str`
 LL | |     };
    | |_____- `match` arms have incompatible types
    |
-   = note: expected type `{integer}`
-              found type `&'static str`
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error: aborting due to previous error
diff --git a/src/test/ui/match/match-ill-type2.stderr b/src/test/ui/match/match-ill-type2.stderr
index 83fae10d4cb..1cf61ebad43 100644
--- a/src/test/ui/match/match-ill-type2.stderr
+++ b/src/test/ui/match/match-ill-type2.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/match-ill-type2.rs:4:9
    |
 LL |         2u32 => 1,
-   |         ^^^^ expected i32, found u32
+   |         ^^^^ expected `i32`, found `u32`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/match/match-range-fail.rs b/src/test/ui/match/match-range-fail.rs
index 252d4cbf162..c0cdbe342a0 100644
--- a/src/test/ui/match/match-range-fail.rs
+++ b/src/test/ui/match/match-range-fail.rs
@@ -19,6 +19,4 @@ fn main() {
         _ => { }
     };
     //~^^^ ERROR mismatched types
-    //~| expected type `{integer}`
-    //~| found type `char`
 }
diff --git a/src/test/ui/match/match-range-fail.stderr b/src/test/ui/match/match-range-fail.stderr
index 25fa9c2f618..adaaf29aae4 100644
--- a/src/test/ui/match/match-range-fail.stderr
+++ b/src/test/ui/match/match-range-fail.stderr
@@ -28,10 +28,7 @@ error[E0308]: mismatched types
   --> $DIR/match-range-fail.rs:18:9
    |
 LL |         'c' ..= 100 => { }
-   |         ^^^^^^^^^^^ expected integer, found char
-   |
-   = note: expected type `{integer}`
-              found type `char`
+   |         ^^^^^^^^^^^ expected integer, found `char`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/match/match-ref-mut-invariance.stderr b/src/test/ui/match/match-ref-mut-invariance.stderr
index 0a020989d6f..3e9f729dc09 100644
--- a/src/test/ui/match/match-ref-mut-invariance.stderr
+++ b/src/test/ui/match/match-ref-mut-invariance.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |         match self.0 { ref mut x => x }
    |                                     ^ lifetime mismatch
    |
-   = note: expected type `&'a mut &'a i32`
-              found type `&'a mut &'b i32`
+   = note: expected mutable reference `&'a mut &'a i32`
+              found mutable reference `&'a mut &'b i32`
 note: the lifetime `'a` as defined on the method body at 9:12...
   --> $DIR/match-ref-mut-invariance.rs:9:12
    |
diff --git a/src/test/ui/match/match-ref-mut-let-invariance.stderr b/src/test/ui/match/match-ref-mut-let-invariance.stderr
index 1bea9bce11e..303aba3422c 100644
--- a/src/test/ui/match/match-ref-mut-let-invariance.stderr
+++ b/src/test/ui/match/match-ref-mut-let-invariance.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |         x
    |         ^ lifetime mismatch
    |
-   = note: expected type `&'a mut &'a i32`
-              found type `&'a mut &'b i32`
+   = note: expected mutable reference `&'a mut &'a i32`
+              found mutable reference `&'a mut &'b i32`
 note: the lifetime `'a` as defined on the method body at 9:12...
   --> $DIR/match-ref-mut-let-invariance.rs:9:12
    |
diff --git a/src/test/ui/match/match-struct.rs b/src/test/ui/match/match-struct.rs
index 5961e09a200..7a54c54b98c 100644
--- a/src/test/ui/match/match-struct.rs
+++ b/src/test/ui/match/match-struct.rs
@@ -5,8 +5,6 @@ fn main() {
     match (S { a: 1 }) {
         E::C(_) => (),
         //~^ ERROR mismatched types
-        //~| expected type `S`
-        //~| found type `E`
         //~| expected struct `S`, found enum `E`
         _ => ()
     }
diff --git a/src/test/ui/match/match-struct.stderr b/src/test/ui/match/match-struct.stderr
index 2a24a293e98..c23451d51ec 100644
--- a/src/test/ui/match/match-struct.stderr
+++ b/src/test/ui/match/match-struct.stderr
@@ -5,9 +5,6 @@ LL |     match (S { a: 1 }) {
    |           ------------ this match expression has type `S`
 LL |         E::C(_) => (),
    |         ^^^^^^^ expected struct `S`, found enum `E`
-   |
-   = note: expected type `S`
-              found type `E`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/match/match-tag-nullary.stderr b/src/test/ui/match/match-tag-nullary.stderr
index 902ccc94dde..4b6260b2199 100644
--- a/src/test/ui/match/match-tag-nullary.stderr
+++ b/src/test/ui/match/match-tag-nullary.stderr
@@ -3,9 +3,6 @@ error[E0308]: mismatched types
    |
 LL | fn main() { let x: A = A::A; match x { B::B => { } } }
    |                                        ^^^^ expected enum `A`, found enum `B`
-   |
-   = note: expected type `A`
-              found type `B`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/match/match-tag-unary.stderr b/src/test/ui/match/match-tag-unary.stderr
index da599c37407..db5dcd2be3b 100644
--- a/src/test/ui/match/match-tag-unary.stderr
+++ b/src/test/ui/match/match-tag-unary.stderr
@@ -5,9 +5,6 @@ LL | fn main() { let x: A = A::A(0); match x { B::B(y) => { } } }
    |                                       -   ^^^^^^^ expected enum `A`, found enum `B`
    |                                       |
    |                                       this match expression has type `A`
-   |
-   = note: expected type `A`
-              found type `B`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/match/match-type-err-first-arm.rs b/src/test/ui/match/match-type-err-first-arm.rs
index 8dfbf1019e9..d73c7e8402f 100644
--- a/src/test/ui/match/match-type-err-first-arm.rs
+++ b/src/test/ui/match/match-type-err-first-arm.rs
@@ -7,7 +7,7 @@ fn test_func1(n: i32) -> i32 { //~ NOTE expected `i32` because of return type
     match n {
         12 => 'b',
         //~^ ERROR mismatched types
-        //~| NOTE expected i32, found char
+        //~| NOTE expected `i32`, found `char`
         _ => 42,
     }
 }
@@ -17,8 +17,7 @@ fn test_func2(n: i32) -> i32 {
         12 => 'b', //~ NOTE this is found to be of type `char`
         _ => 42,
         //~^ ERROR match arms have incompatible types
-        //~| NOTE expected char, found integer
-        //~| NOTE expected type `char`
+        //~| NOTE expected `char`, found integer
     };
     x
 }
@@ -34,8 +33,7 @@ fn test_func3(n: i32) -> i32 {
         //~^ NOTE this and all prior arms are found to be of type `char`
         _ => 42,
         //~^ ERROR match arms have incompatible types
-        //~| NOTE expected char, found integer
-        //~| NOTE expected type `char`
+        //~| NOTE expected `char`, found integer
     };
     x
 }
@@ -47,7 +45,6 @@ fn test_func4() {
         },
         None => {}
         //~^ ERROR match arms have incompatible types
-        //~| NOTE expected u32, found ()
-        //~| NOTE expected type `u32`
+        //~| NOTE expected `u32`, found `()`
     };
 }
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..1b3d8c61c86 100644
--- a/src/test/ui/match/match-type-err-first-arm.stderr
+++ b/src/test/ui/match/match-type-err-first-arm.stderr
@@ -5,7 +5,7 @@ LL | fn test_func1(n: i32) -> i32 {
    |                          --- expected `i32` because of return type
 LL |     match n {
 LL |         12 => 'b',
-   |               ^^^ expected i32, found char
+   |               ^^^ expected `i32`, found `char`
 
 error[E0308]: match arms have incompatible types
   --> $DIR/match-type-err-first-arm.rs:18:14
@@ -15,18 +15,14 @@ LL |       let x = match n {
 LL | |         12 => 'b',
    | |               --- this is found to be of type `char`
 LL | |         _ => 42,
-   | |              ^^ expected char, found integer
-LL | |
+   | |              ^^ expected `char`, found integer
 LL | |
 LL | |
 LL | |     };
    | |_____- `match` arms have incompatible types
-   |
-   = note: expected type `char`
-              found type `{integer}`
 
 error[E0308]: match arms have incompatible types
-  --> $DIR/match-type-err-first-arm.rs:35:14
+  --> $DIR/match-type-err-first-arm.rs:34:14
    |
 LL |       let x = match n {
    |  _____________-
@@ -38,17 +34,14 @@ LL | |         6 => 'b',
    | |              --- this and all prior arms are found to be of type `char`
 LL | |
 LL | |         _ => 42,
-   | |              ^^ expected char, found integer
-...  |
+   | |              ^^ expected `char`, found integer
+LL | |
 LL | |
 LL | |     };
    | |_____- `match` arms have incompatible types
-   |
-   = note: expected type `char`
-              found type `{integer}`
 
 error[E0308]: match arms have incompatible types
-  --> $DIR/match-type-err-first-arm.rs:48:17
+  --> $DIR/match-type-err-first-arm.rs:46:17
    |
 LL | /     match Some(0u32) {
 LL | |         Some(x) => {
@@ -56,14 +49,11 @@ LL | |             x
    | |             - this is found to be of type `u32`
 LL | |         },
 LL | |         None => {}
-   | |                 ^^ expected u32, found ()
-...  |
+   | |                 ^^ expected `u32`, found `()`
+LL | |
 LL | |
 LL | |     };
    | |_____- `match` arms have incompatible types
-   |
-   = note: expected type `u32`
-              found type `()`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/meta-expected-error-correct-rev.a.stderr b/src/test/ui/meta-expected-error-correct-rev.a.stderr
index 968b87288c0..535dbde612c 100644
--- a/src/test/ui/meta-expected-error-correct-rev.a.stderr
+++ b/src/test/ui/meta-expected-error-correct-rev.a.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/meta-expected-error-correct-rev.rs:7:18
    |
 LL |     let x: u32 = 22_usize;
-   |                  ^^^^^^^^ expected u32, found usize
+   |                  ^^^^^^^^ expected `u32`, found `usize`
    |
 help: change the type of the numeric literal from `usize` to `u32`
    |
diff --git a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr
index 8dfbde92f64..87e95c24080 100644
--- a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr
+++ b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr
@@ -10,7 +10,7 @@ error[E0308]: mismatched types
   --> $DIR/method-ambig-one-trait-unknown-int-type.rs:33:20
    |
 LL |     let y: usize = x.foo();
-   |                    ^^^^^^^ expected usize, found isize
+   |                    ^^^^^^^ expected `usize`, found `isize`
    |
 help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
    |
diff --git a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs
index a5dae1c71cd..5ceba646784 100644
--- a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs
+++ b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs
@@ -83,7 +83,7 @@ fn objectcandidate_impl() {
 
     // Observe the type of `z` is `u32`
     let _seetype: () = z; //~ ERROR mismatched types
-    //~| expected (), found u32
+    //~| expected `()`, found `u32`
 }
 
 fn traitcandidate_impl() {
@@ -100,7 +100,7 @@ fn traitcandidate_impl() {
 
     // Observe the type of `z` is `u64`
     let _seetype: () = z; //~ ERROR mismatched types
-    //~| expected (), found u64
+    //~| expected `()`, found `u64`
 }
 
 fn traitcandidate_impl_with_nuisance() {
@@ -135,7 +135,7 @@ fn neither_impl() {
 
     // Observe the type of `z` is `u8`
     let _seetype: () = z; //~ ERROR mismatched types
-    //~| expected (), found u8
+    //~| expected `()`, found `u8`
 }
 
 fn both_impls() {
@@ -153,7 +153,7 @@ fn both_impls() {
 
     // Observe the type of `z` is `u32`
     let _seetype: () = z; //~ ERROR mismatched types
-    //~| expected (), found u32
+    //~| expected `()`, found `u32`
 }
 
 
@@ -170,7 +170,7 @@ fn both_impls_with_nuisance() {
 
     // Observe the type of `z` is `u32`
     let _seetype: () = z; //~ ERROR mismatched types
-    //~| expected (), found u32
+    //~| expected `()`, found `u32`
 }
 
 fn main() {
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..bfec363eb99 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
@@ -2,19 +2,13 @@ error[E0308]: mismatched types
   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:85:24
    |
 LL |     let _seetype: () = z;
-   |                        ^ expected (), found u32
-   |
-   = note: expected type `()`
-              found type `u32`
+   |                        ^ expected `()`, found `u32`
 
 error[E0308]: mismatched types
   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:102:24
    |
 LL |     let _seetype: () = z;
-   |                        ^ expected (), found u64
-   |
-   = note: expected type `()`
-              found type `u64`
+   |                        ^ expected `()`, found `u64`
 
 error[E0034]: multiple applicable items in scope
   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:120:15
@@ -45,28 +39,19 @@ error[E0308]: mismatched types
   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:137:24
    |
 LL |     let _seetype: () = z;
-   |                        ^ expected (), found u8
-   |
-   = note: expected type `()`
-              found type `u8`
+   |                        ^ expected `()`, found `u8`
 
 error[E0308]: mismatched types
   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:155:24
    |
 LL |     let _seetype: () = z;
-   |                        ^ expected (), found u32
-   |
-   = note: expected type `()`
-              found type `u32`
+   |                        ^ expected `()`, found `u32`
 
 error[E0308]: mismatched types
   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:172:24
    |
 LL |     let _seetype: () = z;
-   |                        ^ expected (), found u32
-   |
-   = note: expected type `()`
-              found type `u32`
+   |                        ^ expected `()`, found `u32`
 
 error: aborting due to 6 previous errors
 
diff --git a/src/test/ui/methods/method-self-arg-1.rs b/src/test/ui/methods/method-self-arg-1.rs
index 4a78ad780c4..f589f20d81d 100644
--- a/src/test/ui/methods/method-self-arg-1.rs
+++ b/src/test/ui/methods/method-self-arg-1.rs
@@ -9,11 +9,9 @@ impl Foo {
 fn main() {
     let x = Foo;
     Foo::bar(x); //~  ERROR mismatched types
-                 //~| expected type `&Foo`
-                 //~| found type `Foo`
-                 //~| expected &Foo, found struct `Foo`
+                 //~| expected `&Foo`, found struct `Foo`
     Foo::bar(&42); //~  ERROR mismatched types
-                      //~| expected type `&Foo`
-                      //~| found type `&{integer}`
                       //~| expected struct `Foo`, found integer
+                      //~| expected reference `&Foo`
+                      //~| found reference `&{integer}`
 }
diff --git a/src/test/ui/methods/method-self-arg-1.stderr b/src/test/ui/methods/method-self-arg-1.stderr
index 8485a5403ff..17ea61fc4bd 100644
--- a/src/test/ui/methods/method-self-arg-1.stderr
+++ b/src/test/ui/methods/method-self-arg-1.stderr
@@ -4,20 +4,17 @@ error[E0308]: mismatched types
 LL |     Foo::bar(x);
    |              ^
    |              |
-   |              expected &Foo, found struct `Foo`
+   |              expected `&Foo`, found struct `Foo`
    |              help: consider borrowing here: `&x`
-   |
-   = note: expected type `&Foo`
-              found type `Foo`
 
 error[E0308]: mismatched types
-  --> $DIR/method-self-arg-1.rs:15:14
+  --> $DIR/method-self-arg-1.rs:13:14
    |
 LL |     Foo::bar(&42);
    |              ^^^ expected struct `Foo`, found integer
    |
-   = note: expected type `&Foo`
-              found type `&{integer}`
+   = note: expected reference `&Foo`
+              found reference `&{integer}`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/mir-unpretty.stderr b/src/test/ui/mir-unpretty.stderr
index 6e5dac22669..5384dedb65a 100644
--- a/src/test/ui/mir-unpretty.stderr
+++ b/src/test/ui/mir-unpretty.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/mir-unpretty.rs:4:17
    |
 LL |     let x: () = 0;
-   |                 ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |                 ^ expected `()`, found integer
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/mismatched_types/E0053.stderr b/src/test/ui/mismatched_types/E0053.stderr
index 582772d6fb3..fef83e6bbe2 100644
--- a/src/test/ui/mismatched_types/E0053.stderr
+++ b/src/test/ui/mismatched_types/E0053.stderr
@@ -5,10 +5,10 @@ LL |     fn foo(x: u16);
    |               --- type in trait
 ...
 LL |     fn foo(x: i16) { }
-   |               ^^^ expected u16, found i16
+   |               ^^^ expected `u16`, found `i16`
    |
-   = note: expected type `fn(u16)`
-              found type `fn(i16)`
+   = note: expected fn pointer `fn(u16)`
+              found fn pointer `fn(i16)`
 
 error[E0053]: method `bar` has an incompatible type for trait
   --> $DIR/E0053.rs:11:12
@@ -19,8 +19,8 @@ LL |     fn bar(&self);
 LL |     fn bar(&mut self) { }
    |            ^^^^^^^^^ types differ in mutability
    |
-   = note: expected type `fn(&Bar)`
-              found type `fn(&mut Bar)`
+   = note: expected fn pointer `fn(&Bar)`
+              found fn pointer `fn(&mut Bar)`
 help: consider change the type to match the mutability in trait
    |
 LL |     fn bar(&self) { }
diff --git a/src/test/ui/mismatched_types/E0409.stderr b/src/test/ui/mismatched_types/E0409.stderr
index e3919bf2602..098fd74a39d 100644
--- a/src/test/ui/mismatched_types/E0409.stderr
+++ b/src/test/ui/mismatched_types/E0409.stderr
@@ -10,10 +10,7 @@ error[E0308]: mismatched types
   --> $DIR/E0409.rs:5:23
    |
 LL |         (0, ref y) | (y, 0) => {}
-   |                       ^ expected &{integer}, found integer
-   |
-   = note: expected type `&{integer}`
-              found type `{integer}`
+   |                       ^ expected `&{integer}`, found integer
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/mismatched_types/abridged.stderr b/src/test/ui/mismatched_types/abridged.stderr
index ded12d89c09..c2081878629 100644
--- a/src/test/ui/mismatched_types/abridged.stderr
+++ b/src/test/ui/mismatched_types/abridged.stderr
@@ -6,8 +6,8 @@ LL | fn a() -> Foo {
 LL |     Some(Foo { bar: 1 })
    |     ^^^^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `std::option::Option`
    |
-   = note: expected type `Foo`
-              found type `std::option::Option<Foo>`
+   = note: expected struct `Foo`
+                found enum `std::option::Option<Foo>`
 
 error[E0308]: mismatched types
   --> $DIR/abridged.rs:20:5
@@ -17,8 +17,8 @@ LL | fn a2() -> Foo {
 LL |     Ok(Foo { bar: 1})
    |     ^^^^^^^^^^^^^^^^^ expected struct `Foo`, found enum `std::result::Result`
    |
-   = note: expected type `Foo`
-              found type `std::result::Result<Foo, _>`
+   = note: expected struct `Foo`
+                found enum `std::result::Result<Foo, _>`
 
 error[E0308]: mismatched types
   --> $DIR/abridged.rs:24:5
@@ -28,8 +28,8 @@ LL | fn b() -> Option<Foo> {
 LL |     Foo { bar: 1 }
    |     ^^^^^^^^^^^^^^ expected enum `std::option::Option`, found struct `Foo`
    |
-   = note: expected type `std::option::Option<Foo>`
-              found type `Foo`
+   = note: expected enum `std::option::Option<Foo>`
+            found struct `Foo`
 
 error[E0308]: mismatched types
   --> $DIR/abridged.rs:28:5
@@ -39,8 +39,8 @@ LL | fn c() -> Result<Foo, Bar> {
 LL |     Foo { bar: 1 }
    |     ^^^^^^^^^^^^^^ expected enum `std::result::Result`, found struct `Foo`
    |
-   = note: expected type `std::result::Result<Foo, Bar>`
-              found type `Foo`
+   = note: expected enum `std::result::Result<Foo, Bar>`
+            found struct `Foo`
 
 error[E0308]: mismatched types
   --> $DIR/abridged.rs:39:5
@@ -51,8 +51,8 @@ LL | fn d() -> X<X<String, String>, String> {
 LL |     x
    |     ^ expected struct `std::string::String`, found integer
    |
-   = note: expected type `X<X<_, std::string::String>, std::string::String>`
-              found type `X<X<_, {integer}>, {integer}>`
+   = note: expected struct `X<X<_, std::string::String>, std::string::String>`
+              found struct `X<X<_, {integer}>, {integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/abridged.rs:50:5
@@ -63,8 +63,8 @@ LL | fn e() -> X<X<String, String>, String> {
 LL |     x
    |     ^ expected struct `std::string::String`, found integer
    |
-   = note: expected type `X<X<_, std::string::String>, _>`
-              found type `X<X<_, {integer}>, _>`
+   = note: expected struct `X<X<_, std::string::String>, _>`
+              found struct `X<X<_, {integer}>, _>`
 
 error[E0308]: mismatched types
   --> $DIR/abridged.rs:54:5
@@ -76,9 +76,6 @@ LL |     1+2
    |     |
    |     expected struct `std::string::String`, found integer
    |     help: try using a conversion method: `(1+2).to_string()`
-   |
-   = note: expected type `std::string::String`
-              found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/abridged.rs:59:5
@@ -90,9 +87,6 @@ LL |     -2
    |     |
    |     expected struct `std::string::String`, found integer
    |     help: try using a conversion method: `(-2).to_string()`
-   |
-   = note: expected type `std::string::String`
-              found type `{integer}`
 
 error: aborting due to 8 previous errors
 
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..f36fe64bffb 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
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/for-loop-has-unit-body.rs:3:9
    |
 LL |         x
-   |         ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |         ^ expected `()`, found 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 b826ca66c68..c25e2687b75 100644
--- a/src/test/ui/mismatched_types/issue-19109.stderr
+++ b/src/test/ui/mismatched_types/issue-19109.stderr
@@ -4,10 +4,10 @@ error[E0308]: mismatched types
 LL | fn function(t: &mut dyn Trait) {
    |                                - help: try adding a return type: `-> *mut dyn Trait`
 LL |     t as *mut dyn Trait
-   |     ^^^^^^^^^^^^^^^^^^^ expected (), found *-ptr
+   |     ^^^^^^^^^^^^^^^^^^^ expected `()`, found *-ptr
    |
-   = note: expected type `()`
-              found type `*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/issue-26480.stderr b/src/test/ui/mismatched_types/issue-26480.stderr
index 9d5cd6eeb55..d4dcb9a39a4 100644
--- a/src/test/ui/mismatched_types/issue-26480.stderr
+++ b/src/test/ui/mismatched_types/issue-26480.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-26480.rs:16:19
    |
 LL |                   $arr.len() * size_of($arr[0]));
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u64, found usize
+   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `usize`
 ...
 LL |     write!(hello);
    |     -------------- in this macro invocation
diff --git a/src/test/ui/mismatched_types/issue-35030.stderr b/src/test/ui/mismatched_types/issue-35030.stderr
index 39eca93f88d..6fb04ef5c99 100644
--- a/src/test/ui/mismatched_types/issue-35030.stderr
+++ b/src/test/ui/mismatched_types/issue-35030.stderr
@@ -5,10 +5,10 @@ LL | impl<bool> Parser<bool> for bool {
    |      ---- this type parameter
 LL |     fn parse(text: &str) -> Option<bool> {
 LL |         Some(true)
-   |              ^^^^ expected type parameter `bool`, found bool
+   |              ^^^^ expected type parameter `bool`, found `bool`
    |
-   = note: expected type `bool` (type parameter `bool`)
-              found type `bool` (bool)
+   = note: expected type parameter `bool` (type parameter `bool`)
+                        found type `bool` (`bool`)
    = 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/mismatched_types/issue-38371.stderr b/src/test/ui/mismatched_types/issue-38371.stderr
index 79a0807c337..802a2fef6bd 100644
--- a/src/test/ui/mismatched_types/issue-38371.stderr
+++ b/src/test/ui/mismatched_types/issue-38371.stderr
@@ -7,8 +7,8 @@ LL | fn foo(&foo: Foo) {
    |        expected struct `Foo`, found reference
    |        help: did you mean `foo`: `&Foo`
    |
-   = note: expected type `Foo`
-              found type `&_`
+   = note: expected struct `Foo`
+           found reference `&_`
 
 error[E0308]: mismatched types
   --> $DIR/issue-38371.rs:18:9
@@ -16,20 +16,20 @@ error[E0308]: mismatched types
 LL | fn agh(&&bar: &u32) {
    |         ^^^^
    |         |
-   |         expected u32, found reference
+   |         expected `u32`, found reference
    |         help: you can probably remove the explicit borrow: `bar`
    |
-   = note: expected type `u32`
-              found type `&_`
+   = note:   expected type `u32`
+           found reference `&_`
 
 error[E0308]: mismatched types
   --> $DIR/issue-38371.rs:21:8
    |
 LL | fn bgh(&&bar: u32) {
-   |        ^^^^^ expected u32, found reference
+   |        ^^^^^ expected `u32`, found reference
    |
-   = note: expected type `u32`
-              found type `&_`
+   = note:   expected type `u32`
+           found reference `&_`
 
 error[E0529]: expected an array or slice, found `u32`
   --> $DIR/issue-38371.rs:24:9
diff --git a/src/test/ui/mismatched_types/main.stderr b/src/test/ui/mismatched_types/main.stderr
index 1d53cfdd252..51c8e5f5d4a 100644
--- a/src/test/ui/mismatched_types/main.stderr
+++ b/src/test/ui/mismatched_types/main.stderr
@@ -4,10 +4,7 @@ error[E0308]: mismatched types
 LL |       let x: u32 = (
    |  __________________^
 LL | |     );
-   | |_____^ expected u32, found ()
-   |
-   = note: expected type `u32`
-              found type `()`
+   | |_____^ expected `u32`, found `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/mismatched_types/numeric-literal-cast.stderr b/src/test/ui/mismatched_types/numeric-literal-cast.stderr
index 47ba1d26be5..22a6df89025 100644
--- a/src/test/ui/mismatched_types/numeric-literal-cast.stderr
+++ b/src/test/ui/mismatched_types/numeric-literal-cast.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-literal-cast.rs:6:9
    |
 LL |     foo(1u8);
-   |         ^^^ expected u16, found u8
+   |         ^^^ expected `u16`, found `u8`
    |
 help: change the type of the numeric literal from `u8` to `u16`
    |
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-literal-cast.rs:8:10
    |
 LL |     foo1(2f32);
-   |          ^^^^ expected f64, found f32
+   |          ^^^^ expected `f64`, found `f32`
    |
 help: change the type of the numeric literal from `f32` to `f64`
    |
@@ -24,7 +24,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-literal-cast.rs:10:10
    |
 LL |     foo2(3i16);
-   |          ^^^^ expected i32, found i16
+   |          ^^^^ expected `i32`, found `i16`
    |
 help: change the type of the numeric literal from `i16` to `i32`
    |
diff --git a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr
index bcb316e2bfb..5a5dd056261 100644
--- a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr
+++ b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/overloaded-calls-bad.rs:28:17
    |
 LL |     let ans = s("what");
-   |                 ^^^^^^ expected isize, found reference
-   |
-   = note: expected type `isize`
-              found type `&'static str`
+   |                 ^^^^^^ expected `isize`, found `&str`
 
 error[E0057]: this function takes 1 parameter but 0 parameters were supplied
   --> $DIR/overloaded-calls-bad.rs:29:15
diff --git a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr b/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr
index 6475cce5aa6..d9dd186624f 100644
--- a/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr
+++ b/src/test/ui/mismatched_types/trait-bounds-cant-coerce.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     a(x);
    |       ^ expected trait `Foo + std::marker::Send`, found trait `Foo`
    |
-   = note: expected type `std::boxed::Box<(dyn Foo + std::marker::Send + 'static)>`
-              found type `std::boxed::Box<(dyn Foo + 'static)>`
+   = note: expected struct `std::boxed::Box<(dyn Foo + std::marker::Send + 'static)>`
+              found struct `std::boxed::Box<(dyn Foo + 'static)>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr b/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr
index 8ea3567b948..b20fddb05ac 100644
--- a/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr
+++ b/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr
@@ -5,10 +5,10 @@ LL |     fn foo(x: u16);
    |               --- type in trait
 ...
 LL |     fn foo(x: i16) { }
-   |               ^^^ expected u16, found i16
+   |               ^^^ expected `u16`, found `i16`
    |
-   = note: expected type `fn(u16)`
-              found type `fn(i16)`
+   = note: expected fn pointer `fn(u16)`
+              found fn pointer `fn(i16)`
 
 error[E0053]: method `bar` has an incompatible type for trait
   --> $DIR/trait-impl-fn-incompatibility.rs:12:28
@@ -19,8 +19,8 @@ LL |     fn bar(&mut self, bar: &mut Bar);
 LL |     fn bar(&mut self, bar: &Bar) { }
    |                            ^^^^ types differ in mutability
    |
-   = note: expected type `fn(&mut Bar, &mut Bar)`
-              found type `fn(&mut Bar, &Bar)`
+   = note: expected fn pointer `fn(&mut Bar, &mut Bar)`
+              found fn pointer `fn(&mut Bar, &Bar)`
 help: consider change the type to match the mutability in trait
    |
 LL |     fn bar(&mut self, bar: &mut Bar) { }
diff --git a/src/test/ui/missing/missing-return.stderr b/src/test/ui/missing/missing-return.stderr
index 3c8ecdcfbcb..ff7f261e03c 100644
--- a/src/test/ui/missing/missing-return.stderr
+++ b/src/test/ui/missing/missing-return.stderr
@@ -2,12 +2,9 @@ error[E0308]: mismatched types
   --> $DIR/missing-return.rs:3:11
    |
 LL | fn f() -> isize { }
-   |    -      ^^^^^ expected isize, found ()
+   |    -      ^^^^^ expected `isize`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
-   |
-   = note: expected type `isize`
-              found type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/mut/mut-cross-borrowing.stderr b/src/test/ui/mut/mut-cross-borrowing.stderr
index e2eea195daf..c262d1336a2 100644
--- a/src/test/ui/mut/mut-cross-borrowing.stderr
+++ b/src/test/ui/mut/mut-cross-borrowing.stderr
@@ -4,11 +4,11 @@ error[E0308]: mismatched types
 LL |     f(x)
    |       ^
    |       |
-   |       expected &mut isize, found struct `std::boxed::Box`
+   |       expected `&mut isize`, found struct `std::boxed::Box`
    |       help: consider mutably borrowing here: `&mut x`
    |
-   = note: expected type `&mut isize`
-              found type `std::boxed::Box<{integer}>`
+   = note: expected mutable reference `&mut isize`
+                         found struct `std::boxed::Box<{integer}>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/mut/mut-pattern-mismatched.rs b/src/test/ui/mut/mut-pattern-mismatched.rs
index 17bf75419b7..700261fe40b 100644
--- a/src/test/ui/mut/mut-pattern-mismatched.rs
+++ b/src/test/ui/mut/mut-pattern-mismatched.rs
@@ -4,8 +4,8 @@ fn main() {
     // (separate lines to ensure the spans are accurate)
 
      let &_ //~  ERROR mismatched types
-            //~| expected type `&mut {integer}`
-            //~| found type `&_`
+            //~| expected mutable reference `&mut {integer}`
+            //~| found reference `&_`
             //~| types differ in mutability
         = foo;
     let &mut _ = foo;
@@ -13,8 +13,8 @@ fn main() {
     let bar = &1;
     let &_ = bar;
     let &mut _ //~  ERROR mismatched types
-               //~| expected type `&{integer}`
-               //~| found type `&mut _`
+               //~| expected reference `&{integer}`
+               //~| found mutable reference `&mut _`
                //~| types differ in mutability
          = bar;
 }
diff --git a/src/test/ui/mut/mut-pattern-mismatched.stderr b/src/test/ui/mut/mut-pattern-mismatched.stderr
index d1adc991519..ccc8ac1278c 100644
--- a/src/test/ui/mut/mut-pattern-mismatched.stderr
+++ b/src/test/ui/mut/mut-pattern-mismatched.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |      let &_
    |          ^^ types differ in mutability
    |
-   = note: expected type `&mut {integer}`
-              found type `&_`
+   = note: expected mutable reference `&mut {integer}`
+                      found reference `&_`
 
 error[E0308]: mismatched types
   --> $DIR/mut-pattern-mismatched.rs:15:9
@@ -13,8 +13,8 @@ error[E0308]: mismatched types
 LL |     let &mut _
    |         ^^^^^^ types differ in mutability
    |
-   = note: expected type `&{integer}`
-              found type `&mut _`
+   = note:      expected reference `&{integer}`
+           found mutable reference `&mut _`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/never_type/call-fn-never-arg-wrong-type.stderr b/src/test/ui/never_type/call-fn-never-arg-wrong-type.stderr
index e5cbdcbe73b..69049fc8db6 100644
--- a/src/test/ui/never_type/call-fn-never-arg-wrong-type.stderr
+++ b/src/test/ui/never_type/call-fn-never-arg-wrong-type.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/call-fn-never-arg-wrong-type.rs:8:9
    |
 LL |     foo("wow");
-   |         ^^^^^ expected !, found reference
+   |         ^^^^^ expected `!`, found `&str`
    |
-   = note: expected type `!`
-              found type `&'static str`
+   = note:   expected type `!`
+           found reference `&'static str`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/never_type/never-assign-wrong-type.stderr b/src/test/ui/never_type/never-assign-wrong-type.stderr
index 32c9fab6590..d4b1f0973cc 100644
--- a/src/test/ui/never_type/never-assign-wrong-type.stderr
+++ b/src/test/ui/never_type/never-assign-wrong-type.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/never-assign-wrong-type.rs:6:16
    |
 LL |     let x: ! = "hello";
-   |                ^^^^^^^ expected !, found reference
+   |                ^^^^^^^ expected `!`, found `&str`
    |
-   = note: expected type `!`
-              found type `&'static str`
+   = note:   expected type `!`
+           found reference `&'static str`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/nll/trait-associated-constant.stderr b/src/test/ui/nll/trait-associated-constant.stderr
index ecf9748af9e..5158420c737 100644
--- a/src/test/ui/nll/trait-associated-constant.stderr
+++ b/src/test/ui/nll/trait-associated-constant.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     const AC: Option<&'c str> = None;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `std::option::Option<&'b str>`
-              found type `std::option::Option<&'c str>`
+   = note: expected enum `std::option::Option<&'b str>`
+              found enum `std::option::Option<&'c str>`
 note: the lifetime `'c` as defined on the impl at 20:18...
   --> $DIR/trait-associated-constant.rs:20:18
    |
diff --git a/src/test/ui/noexporttypeexe.rs b/src/test/ui/noexporttypeexe.rs
index 651c92830ed..0a8b40b08fe 100644
--- a/src/test/ui/noexporttypeexe.rs
+++ b/src/test/ui/noexporttypeexe.rs
@@ -10,6 +10,6 @@ fn main() {
   let x: isize = noexporttypelib::foo();
     //~^ ERROR mismatched types
     //~| expected type `isize`
-    //~| found type `std::option::Option<isize>`
-    //~| expected isize, found enum `std::option::Option`
+    //~| found enum `std::option::Option<isize>`
+    //~| expected `isize`, found enum `std::option::Option`
 }
diff --git a/src/test/ui/noexporttypeexe.stderr b/src/test/ui/noexporttypeexe.stderr
index 329787fe744..18fb1755eb1 100644
--- a/src/test/ui/noexporttypeexe.stderr
+++ b/src/test/ui/noexporttypeexe.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/noexporttypeexe.rs:10:18
    |
 LL |   let x: isize = noexporttypelib::foo();
-   |                  ^^^^^^^^^^^^^^^^^^^^^^ expected isize, found enum `std::option::Option`
+   |                  ^^^^^^^^^^^^^^^^^^^^^^ expected `isize`, found enum `std::option::Option`
    |
    = note: expected type `isize`
-              found type `std::option::Option<isize>`
+              found enum `std::option::Option<isize>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/numeric/const-scope.stderr b/src/test/ui/numeric/const-scope.stderr
index c8849505922..c6ddb35ddf5 100644
--- a/src/test/ui/numeric/const-scope.stderr
+++ b/src/test/ui/numeric/const-scope.stderr
@@ -2,31 +2,31 @@ error[E0308]: mismatched types
   --> $DIR/const-scope.rs:1:16
    |
 LL | const C: i32 = 1i8;
-   |                ^^^ expected i32, found i8
+   |                ^^^ expected `i32`, found `i8`
 
 error[E0308]: mismatched types
   --> $DIR/const-scope.rs:2:15
    |
 LL | const D: i8 = C;
-   |               ^ expected i8, found i32
+   |               ^ expected `i8`, found `i32`
 
 error[E0308]: mismatched types
   --> $DIR/const-scope.rs:5:18
    |
 LL |     let c: i32 = 1i8;
-   |                  ^^^ expected i32, found i8
+   |                  ^^^ expected `i32`, found `i8`
 
 error[E0308]: mismatched types
   --> $DIR/const-scope.rs:6:17
    |
 LL |     let d: i8 = c;
-   |                 ^ expected i8, found i32
+   |                 ^ expected `i8`, found `i32`
 
 error[E0308]: mismatched types
   --> $DIR/const-scope.rs:10:18
    |
 LL |     let c: i32 = 1i8;
-   |                  ^^^ expected i32, found i8
+   |                  ^^^ expected `i32`, found `i8`
    |
 help: change the type of the numeric literal from `i8` to `i32`
    |
@@ -37,7 +37,7 @@ error[E0308]: mismatched types
   --> $DIR/const-scope.rs:11:17
    |
 LL |     let d: i8 = c;
-   |                 ^ expected i8, found i32
+   |                 ^ expected `i8`, found `i32`
    |
 help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit
    |
diff --git a/src/test/ui/numeric/len.stderr b/src/test/ui/numeric/len.stderr
index 1e8bff7f04a..dba6c723829 100644
--- a/src/test/ui/numeric/len.stderr
+++ b/src/test/ui/numeric/len.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/len.rs:3:10
    |
 LL |     test(array.len());
-   |          ^^^^^^^^^^^ expected u32, found usize
+   |          ^^^^^^^^^^^ expected `u32`, found `usize`
    |
 help: you can convert an `usize` to `u32` and panic if the converted value wouldn't fit
    |
diff --git a/src/test/ui/numeric/numeric-cast-2.stderr b/src/test/ui/numeric/numeric-cast-2.stderr
index 9f08985bdb3..133db19780c 100644
--- a/src/test/ui/numeric/numeric-cast-2.stderr
+++ b/src/test/ui/numeric/numeric-cast-2.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast-2.rs:5:18
    |
 LL |     let x: u16 = foo();
-   |                  ^^^^^ expected u16, found i32
+   |                  ^^^^^ expected `u16`, found `i32`
    |
 help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit
    |
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast-2.rs:7:18
    |
 LL |     let y: i64 = x + x;
-   |                  ^^^^^ expected i64, found u16
+   |                  ^^^^^ expected `i64`, found `u16`
    |
 help: you can convert an `u16` to `i64` and panic if the converted value wouldn't fit
    |
@@ -24,7 +24,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast-2.rs:9:18
    |
 LL |     let z: i32 = x + x;
-   |                  ^^^^^ expected i32, found u16
+   |                  ^^^^^ expected `i32`, found `u16`
    |
 help: you can convert an `u16` to `i32` and panic if the converted value wouldn't fit
    |
diff --git a/src/test/ui/numeric/numeric-cast-without-suggestion.stderr b/src/test/ui/numeric/numeric-cast-without-suggestion.stderr
index a79eaea16eb..a96518a3434 100644
--- a/src/test/ui/numeric/numeric-cast-without-suggestion.stderr
+++ b/src/test/ui/numeric/numeric-cast-without-suggestion.stderr
@@ -2,127 +2,127 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:17:18
    |
 LL |     foo::<usize>(x_f64);
-   |                  ^^^^^ expected usize, found f64
+   |                  ^^^^^ expected `usize`, found `f64`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:18:18
    |
 LL |     foo::<usize>(x_f32);
-   |                  ^^^^^ expected usize, found f32
+   |                  ^^^^^ expected `usize`, found `f32`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:19:18
    |
 LL |     foo::<isize>(x_f64);
-   |                  ^^^^^ expected isize, found f64
+   |                  ^^^^^ expected `isize`, found `f64`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:20:18
    |
 LL |     foo::<isize>(x_f32);
-   |                  ^^^^^ expected isize, found f32
+   |                  ^^^^^ expected `isize`, found `f32`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:21:16
    |
 LL |     foo::<u64>(x_f64);
-   |                ^^^^^ expected u64, found f64
+   |                ^^^^^ expected `u64`, found `f64`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:22:16
    |
 LL |     foo::<u64>(x_f32);
-   |                ^^^^^ expected u64, found f32
+   |                ^^^^^ expected `u64`, found `f32`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:23:16
    |
 LL |     foo::<i64>(x_f64);
-   |                ^^^^^ expected i64, found f64
+   |                ^^^^^ expected `i64`, found `f64`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:24:16
    |
 LL |     foo::<i64>(x_f32);
-   |                ^^^^^ expected i64, found f32
+   |                ^^^^^ expected `i64`, found `f32`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:25:16
    |
 LL |     foo::<u32>(x_f64);
-   |                ^^^^^ expected u32, found f64
+   |                ^^^^^ expected `u32`, found `f64`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:26:16
    |
 LL |     foo::<u32>(x_f32);
-   |                ^^^^^ expected u32, found f32
+   |                ^^^^^ expected `u32`, found `f32`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:27:16
    |
 LL |     foo::<i32>(x_f64);
-   |                ^^^^^ expected i32, found f64
+   |                ^^^^^ expected `i32`, found `f64`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:28:16
    |
 LL |     foo::<i32>(x_f32);
-   |                ^^^^^ expected i32, found f32
+   |                ^^^^^ expected `i32`, found `f32`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:29:16
    |
 LL |     foo::<u16>(x_f64);
-   |                ^^^^^ expected u16, found f64
+   |                ^^^^^ expected `u16`, found `f64`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:30:16
    |
 LL |     foo::<u16>(x_f32);
-   |                ^^^^^ expected u16, found f32
+   |                ^^^^^ expected `u16`, found `f32`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:31:16
    |
 LL |     foo::<i16>(x_f64);
-   |                ^^^^^ expected i16, found f64
+   |                ^^^^^ expected `i16`, found `f64`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:32:16
    |
 LL |     foo::<i16>(x_f32);
-   |                ^^^^^ expected i16, found f32
+   |                ^^^^^ expected `i16`, found `f32`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:33:15
    |
 LL |     foo::<u8>(x_f64);
-   |               ^^^^^ expected u8, found f64
+   |               ^^^^^ expected `u8`, found `f64`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:34:15
    |
 LL |     foo::<u8>(x_f32);
-   |               ^^^^^ expected u8, found f32
+   |               ^^^^^ expected `u8`, found `f32`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:35:15
    |
 LL |     foo::<i8>(x_f64);
-   |               ^^^^^ expected i8, found f64
+   |               ^^^^^ expected `i8`, found `f64`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:36:15
    |
 LL |     foo::<i8>(x_f32);
-   |               ^^^^^ expected i8, found f32
+   |               ^^^^^ expected `i8`, found `f32`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast-without-suggestion.rs:37:16
    |
 LL |     foo::<f32>(x_f64);
-   |                ^^^^^ expected f32, found f64
+   |                ^^^^^ expected `f32`, found `f64`
 
 error: aborting due to 21 previous errors
 
diff --git a/src/test/ui/numeric/numeric-cast.stderr b/src/test/ui/numeric/numeric-cast.stderr
index 983ea084025..eef40cbdbe4 100644
--- a/src/test/ui/numeric/numeric-cast.stderr
+++ b/src/test/ui/numeric/numeric-cast.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:23:18
    |
 LL |     foo::<usize>(x_u64);
-   |                  ^^^^^ expected usize, found u64
+   |                  ^^^^^ expected `usize`, found `u64`
    |
 help: you can convert an `u64` to `usize` and panic if the converted value wouldn't fit
    |
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:25:18
    |
 LL |     foo::<usize>(x_u32);
-   |                  ^^^^^ expected usize, found u32
+   |                  ^^^^^ expected `usize`, found `u32`
    |
 help: you can convert an `u32` to `usize` and panic if the converted value wouldn't fit
    |
@@ -24,7 +24,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:27:18
    |
 LL |     foo::<usize>(x_u16);
-   |                  ^^^^^ expected usize, found u16
+   |                  ^^^^^ expected `usize`, found `u16`
    |
 help: you can convert an `u16` to `usize` and panic if the converted value wouldn't fit
    |
@@ -35,7 +35,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:29:18
    |
 LL |     foo::<usize>(x_u8);
-   |                  ^^^^ expected usize, found u8
+   |                  ^^^^ expected `usize`, found `u8`
    |
 help: you can convert an `u8` to `usize` and panic if the converted value wouldn't fit
    |
@@ -46,7 +46,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:31:18
    |
 LL |     foo::<usize>(x_isize);
-   |                  ^^^^^^^ expected usize, found isize
+   |                  ^^^^^^^ expected `usize`, found `isize`
    |
 help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
    |
@@ -57,7 +57,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:33:18
    |
 LL |     foo::<usize>(x_i64);
-   |                  ^^^^^ expected usize, found i64
+   |                  ^^^^^ expected `usize`, found `i64`
    |
 help: you can convert an `i64` to `usize` and panic if the converted value wouldn't fit
    |
@@ -68,7 +68,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:35:18
    |
 LL |     foo::<usize>(x_i32);
-   |                  ^^^^^ expected usize, found i32
+   |                  ^^^^^ expected `usize`, found `i32`
    |
 help: you can convert an `i32` to `usize` and panic if the converted value wouldn't fit
    |
@@ -79,7 +79,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:37:18
    |
 LL |     foo::<usize>(x_i16);
-   |                  ^^^^^ expected usize, found i16
+   |                  ^^^^^ expected `usize`, found `i16`
    |
 help: you can convert an `i16` to `usize` and panic if the converted value wouldn't fit
    |
@@ -90,7 +90,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:39:18
    |
 LL |     foo::<usize>(x_i8);
-   |                  ^^^^ expected usize, found i8
+   |                  ^^^^ expected `usize`, found `i8`
    |
 help: you can convert an `i8` to `usize` and panic if the converted value wouldn't fit
    |
@@ -101,7 +101,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:44:18
    |
 LL |     foo::<isize>(x_usize);
-   |                  ^^^^^^^ expected isize, found usize
+   |                  ^^^^^^^ expected `isize`, found `usize`
    |
 help: you can convert an `usize` to `isize` and panic if the converted value wouldn't fit
    |
@@ -112,7 +112,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:46:18
    |
 LL |     foo::<isize>(x_u64);
-   |                  ^^^^^ expected isize, found u64
+   |                  ^^^^^ expected `isize`, found `u64`
    |
 help: you can convert an `u64` to `isize` and panic if the converted value wouldn't fit
    |
@@ -123,7 +123,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:48:18
    |
 LL |     foo::<isize>(x_u32);
-   |                  ^^^^^ expected isize, found u32
+   |                  ^^^^^ expected `isize`, found `u32`
    |
 help: you can convert an `u32` to `isize` and panic if the converted value wouldn't fit
    |
@@ -134,7 +134,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:50:18
    |
 LL |     foo::<isize>(x_u16);
-   |                  ^^^^^ expected isize, found u16
+   |                  ^^^^^ expected `isize`, found `u16`
    |
 help: you can convert an `u16` to `isize` and panic if the converted value wouldn't fit
    |
@@ -145,7 +145,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:52:18
    |
 LL |     foo::<isize>(x_u8);
-   |                  ^^^^ expected isize, found u8
+   |                  ^^^^ expected `isize`, found `u8`
    |
 help: you can convert an `u8` to `isize` and panic if the converted value wouldn't fit
    |
@@ -156,7 +156,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:55:18
    |
 LL |     foo::<isize>(x_i64);
-   |                  ^^^^^ expected isize, found i64
+   |                  ^^^^^ expected `isize`, found `i64`
    |
 help: you can convert an `i64` to `isize` and panic if the converted value wouldn't fit
    |
@@ -167,7 +167,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:57:18
    |
 LL |     foo::<isize>(x_i32);
-   |                  ^^^^^ expected isize, found i32
+   |                  ^^^^^ expected `isize`, found `i32`
    |
 help: you can convert an `i32` to `isize` and panic if the converted value wouldn't fit
    |
@@ -178,7 +178,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:59:18
    |
 LL |     foo::<isize>(x_i16);
-   |                  ^^^^^ expected isize, found i16
+   |                  ^^^^^ expected `isize`, found `i16`
    |
 help: you can convert an `i16` to `isize` and panic if the converted value wouldn't fit
    |
@@ -189,7 +189,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:61:18
    |
 LL |     foo::<isize>(x_i8);
-   |                  ^^^^ expected isize, found i8
+   |                  ^^^^ expected `isize`, found `i8`
    |
 help: you can convert an `i8` to `isize` and panic if the converted value wouldn't fit
    |
@@ -200,7 +200,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:66:16
    |
 LL |     foo::<u64>(x_usize);
-   |                ^^^^^^^ expected u64, found usize
+   |                ^^^^^^^ expected `u64`, found `usize`
    |
 help: you can convert an `usize` to `u64` and panic if the converted value wouldn't fit
    |
@@ -213,7 +213,7 @@ error[E0308]: mismatched types
 LL |     foo::<u64>(x_u32);
    |                ^^^^^
    |                |
-   |                expected u64, found u32
+   |                expected `u64`, found `u32`
    |                help: you can convert an `u32` to `u64`: `x_u32.into()`
 
 error[E0308]: mismatched types
@@ -222,7 +222,7 @@ error[E0308]: mismatched types
 LL |     foo::<u64>(x_u16);
    |                ^^^^^
    |                |
-   |                expected u64, found u16
+   |                expected `u64`, found `u16`
    |                help: you can convert an `u16` to `u64`: `x_u16.into()`
 
 error[E0308]: mismatched types
@@ -231,14 +231,14 @@ error[E0308]: mismatched types
 LL |     foo::<u64>(x_u8);
    |                ^^^^
    |                |
-   |                expected u64, found u8
+   |                expected `u64`, found `u8`
    |                help: you can convert an `u8` to `u64`: `x_u8.into()`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:75:16
    |
 LL |     foo::<u64>(x_isize);
-   |                ^^^^^^^ expected u64, found isize
+   |                ^^^^^^^ expected `u64`, found `isize`
    |
 help: you can convert an `isize` to `u64` and panic if the converted value wouldn't fit
    |
@@ -249,7 +249,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:77:16
    |
 LL |     foo::<u64>(x_i64);
-   |                ^^^^^ expected u64, found i64
+   |                ^^^^^ expected `u64`, found `i64`
    |
 help: you can convert an `i64` to `u64` and panic if the converted value wouldn't fit
    |
@@ -260,7 +260,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:79:16
    |
 LL |     foo::<u64>(x_i32);
-   |                ^^^^^ expected u64, found i32
+   |                ^^^^^ expected `u64`, found `i32`
    |
 help: you can convert an `i32` to `u64` and panic if the converted value wouldn't fit
    |
@@ -271,7 +271,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:81:16
    |
 LL |     foo::<u64>(x_i16);
-   |                ^^^^^ expected u64, found i16
+   |                ^^^^^ expected `u64`, found `i16`
    |
 help: you can convert an `i16` to `u64` and panic if the converted value wouldn't fit
    |
@@ -282,7 +282,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:83:16
    |
 LL |     foo::<u64>(x_i8);
-   |                ^^^^ expected u64, found i8
+   |                ^^^^ expected `u64`, found `i8`
    |
 help: you can convert an `i8` to `u64` and panic if the converted value wouldn't fit
    |
@@ -293,7 +293,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:88:16
    |
 LL |     foo::<i64>(x_usize);
-   |                ^^^^^^^ expected i64, found usize
+   |                ^^^^^^^ expected `i64`, found `usize`
    |
 help: you can convert an `usize` to `i64` and panic if the converted value wouldn't fit
    |
@@ -304,7 +304,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:90:16
    |
 LL |     foo::<i64>(x_u64);
-   |                ^^^^^ expected i64, found u64
+   |                ^^^^^ expected `i64`, found `u64`
    |
 help: you can convert an `u64` to `i64` and panic if the converted value wouldn't fit
    |
@@ -315,7 +315,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:92:16
    |
 LL |     foo::<i64>(x_u32);
-   |                ^^^^^ expected i64, found u32
+   |                ^^^^^ expected `i64`, found `u32`
    |
 help: you can convert an `u32` to `i64` and panic if the converted value wouldn't fit
    |
@@ -326,7 +326,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:94:16
    |
 LL |     foo::<i64>(x_u16);
-   |                ^^^^^ expected i64, found u16
+   |                ^^^^^ expected `i64`, found `u16`
    |
 help: you can convert an `u16` to `i64` and panic if the converted value wouldn't fit
    |
@@ -337,7 +337,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:96:16
    |
 LL |     foo::<i64>(x_u8);
-   |                ^^^^ expected i64, found u8
+   |                ^^^^ expected `i64`, found `u8`
    |
 help: you can convert an `u8` to `i64` and panic if the converted value wouldn't fit
    |
@@ -348,7 +348,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:98:16
    |
 LL |     foo::<i64>(x_isize);
-   |                ^^^^^^^ expected i64, found isize
+   |                ^^^^^^^ expected `i64`, found `isize`
    |
 help: you can convert an `isize` to `i64` and panic if the converted value wouldn't fit
    |
@@ -361,7 +361,7 @@ error[E0308]: mismatched types
 LL |     foo::<i64>(x_i32);
    |                ^^^^^
    |                |
-   |                expected i64, found i32
+   |                expected `i64`, found `i32`
    |                help: you can convert an `i32` to `i64`: `x_i32.into()`
 
 error[E0308]: mismatched types
@@ -370,7 +370,7 @@ error[E0308]: mismatched types
 LL |     foo::<i64>(x_i16);
    |                ^^^^^
    |                |
-   |                expected i64, found i16
+   |                expected `i64`, found `i16`
    |                help: you can convert an `i16` to `i64`: `x_i16.into()`
 
 error[E0308]: mismatched types
@@ -379,14 +379,14 @@ error[E0308]: mismatched types
 LL |     foo::<i64>(x_i8);
    |                ^^^^
    |                |
-   |                expected i64, found i8
+   |                expected `i64`, found `i8`
    |                help: you can convert an `i8` to `i64`: `x_i8.into()`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:110:16
    |
 LL |     foo::<u32>(x_usize);
-   |                ^^^^^^^ expected u32, found usize
+   |                ^^^^^^^ expected `u32`, found `usize`
    |
 help: you can convert an `usize` to `u32` and panic if the converted value wouldn't fit
    |
@@ -397,7 +397,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:112:16
    |
 LL |     foo::<u32>(x_u64);
-   |                ^^^^^ expected u32, found u64
+   |                ^^^^^ expected `u32`, found `u64`
    |
 help: you can convert an `u64` to `u32` and panic if the converted value wouldn't fit
    |
@@ -410,7 +410,7 @@ error[E0308]: mismatched types
 LL |     foo::<u32>(x_u16);
    |                ^^^^^
    |                |
-   |                expected u32, found u16
+   |                expected `u32`, found `u16`
    |                help: you can convert an `u16` to `u32`: `x_u16.into()`
 
 error[E0308]: mismatched types
@@ -419,14 +419,14 @@ error[E0308]: mismatched types
 LL |     foo::<u32>(x_u8);
    |                ^^^^
    |                |
-   |                expected u32, found u8
+   |                expected `u32`, found `u8`
    |                help: you can convert an `u8` to `u32`: `x_u8.into()`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:119:16
    |
 LL |     foo::<u32>(x_isize);
-   |                ^^^^^^^ expected u32, found isize
+   |                ^^^^^^^ expected `u32`, found `isize`
    |
 help: you can convert an `isize` to `u32` and panic if the converted value wouldn't fit
    |
@@ -437,7 +437,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:121:16
    |
 LL |     foo::<u32>(x_i64);
-   |                ^^^^^ expected u32, found i64
+   |                ^^^^^ expected `u32`, found `i64`
    |
 help: you can convert an `i64` to `u32` and panic if the converted value wouldn't fit
    |
@@ -448,7 +448,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:123:16
    |
 LL |     foo::<u32>(x_i32);
-   |                ^^^^^ expected u32, found i32
+   |                ^^^^^ expected `u32`, found `i32`
    |
 help: you can convert an `i32` to `u32` and panic if the converted value wouldn't fit
    |
@@ -459,7 +459,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:125:16
    |
 LL |     foo::<u32>(x_i16);
-   |                ^^^^^ expected u32, found i16
+   |                ^^^^^ expected `u32`, found `i16`
    |
 help: you can convert an `i16` to `u32` and panic if the converted value wouldn't fit
    |
@@ -470,7 +470,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:127:16
    |
 LL |     foo::<u32>(x_i8);
-   |                ^^^^ expected u32, found i8
+   |                ^^^^ expected `u32`, found `i8`
    |
 help: you can convert an `i8` to `u32` and panic if the converted value wouldn't fit
    |
@@ -481,7 +481,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:132:16
    |
 LL |     foo::<i32>(x_usize);
-   |                ^^^^^^^ expected i32, found usize
+   |                ^^^^^^^ expected `i32`, found `usize`
    |
 help: you can convert an `usize` to `i32` and panic if the converted value wouldn't fit
    |
@@ -492,7 +492,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:134:16
    |
 LL |     foo::<i32>(x_u64);
-   |                ^^^^^ expected i32, found u64
+   |                ^^^^^ expected `i32`, found `u64`
    |
 help: you can convert an `u64` to `i32` and panic if the converted value wouldn't fit
    |
@@ -503,7 +503,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:136:16
    |
 LL |     foo::<i32>(x_u32);
-   |                ^^^^^ expected i32, found u32
+   |                ^^^^^ expected `i32`, found `u32`
    |
 help: you can convert an `u32` to `i32` and panic if the converted value wouldn't fit
    |
@@ -514,7 +514,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:138:16
    |
 LL |     foo::<i32>(x_u16);
-   |                ^^^^^ expected i32, found u16
+   |                ^^^^^ expected `i32`, found `u16`
    |
 help: you can convert an `u16` to `i32` and panic if the converted value wouldn't fit
    |
@@ -525,7 +525,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:140:16
    |
 LL |     foo::<i32>(x_u8);
-   |                ^^^^ expected i32, found u8
+   |                ^^^^ expected `i32`, found `u8`
    |
 help: you can convert an `u8` to `i32` and panic if the converted value wouldn't fit
    |
@@ -536,7 +536,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:142:16
    |
 LL |     foo::<i32>(x_isize);
-   |                ^^^^^^^ expected i32, found isize
+   |                ^^^^^^^ expected `i32`, found `isize`
    |
 help: you can convert an `isize` to `i32` and panic if the converted value wouldn't fit
    |
@@ -547,7 +547,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:144:16
    |
 LL |     foo::<i32>(x_i64);
-   |                ^^^^^ expected i32, found i64
+   |                ^^^^^ expected `i32`, found `i64`
    |
 help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
    |
@@ -560,7 +560,7 @@ error[E0308]: mismatched types
 LL |     foo::<i32>(x_i16);
    |                ^^^^^
    |                |
-   |                expected i32, found i16
+   |                expected `i32`, found `i16`
    |                help: you can convert an `i16` to `i32`: `x_i16.into()`
 
 error[E0308]: mismatched types
@@ -569,14 +569,14 @@ error[E0308]: mismatched types
 LL |     foo::<i32>(x_i8);
    |                ^^^^
    |                |
-   |                expected i32, found i8
+   |                expected `i32`, found `i8`
    |                help: you can convert an `i8` to `i32`: `x_i8.into()`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:154:16
    |
 LL |     foo::<u16>(x_usize);
-   |                ^^^^^^^ expected u16, found usize
+   |                ^^^^^^^ expected `u16`, found `usize`
    |
 help: you can convert an `usize` to `u16` and panic if the converted value wouldn't fit
    |
@@ -587,7 +587,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:156:16
    |
 LL |     foo::<u16>(x_u64);
-   |                ^^^^^ expected u16, found u64
+   |                ^^^^^ expected `u16`, found `u64`
    |
 help: you can convert an `u64` to `u16` and panic if the converted value wouldn't fit
    |
@@ -598,7 +598,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:158:16
    |
 LL |     foo::<u16>(x_u32);
-   |                ^^^^^ expected u16, found u32
+   |                ^^^^^ expected `u16`, found `u32`
    |
 help: you can convert an `u32` to `u16` and panic if the converted value wouldn't fit
    |
@@ -611,14 +611,14 @@ error[E0308]: mismatched types
 LL |     foo::<u16>(x_u8);
    |                ^^^^
    |                |
-   |                expected u16, found u8
+   |                expected `u16`, found `u8`
    |                help: you can convert an `u8` to `u16`: `x_u8.into()`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:163:16
    |
 LL |     foo::<u16>(x_isize);
-   |                ^^^^^^^ expected u16, found isize
+   |                ^^^^^^^ expected `u16`, found `isize`
    |
 help: you can convert an `isize` to `u16` and panic if the converted value wouldn't fit
    |
@@ -629,7 +629,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:165:16
    |
 LL |     foo::<u16>(x_i64);
-   |                ^^^^^ expected u16, found i64
+   |                ^^^^^ expected `u16`, found `i64`
    |
 help: you can convert an `i64` to `u16` and panic if the converted value wouldn't fit
    |
@@ -640,7 +640,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:167:16
    |
 LL |     foo::<u16>(x_i32);
-   |                ^^^^^ expected u16, found i32
+   |                ^^^^^ expected `u16`, found `i32`
    |
 help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit
    |
@@ -651,7 +651,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:169:16
    |
 LL |     foo::<u16>(x_i16);
-   |                ^^^^^ expected u16, found i16
+   |                ^^^^^ expected `u16`, found `i16`
    |
 help: you can convert an `i16` to `u16` and panic if the converted value wouldn't fit
    |
@@ -662,7 +662,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:171:16
    |
 LL |     foo::<u16>(x_i8);
-   |                ^^^^ expected u16, found i8
+   |                ^^^^ expected `u16`, found `i8`
    |
 help: you can convert an `i8` to `u16` and panic if the converted value wouldn't fit
    |
@@ -673,7 +673,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:176:16
    |
 LL |     foo::<i16>(x_usize);
-   |                ^^^^^^^ expected i16, found usize
+   |                ^^^^^^^ expected `i16`, found `usize`
    |
 help: you can convert an `usize` to `i16` and panic if the converted value wouldn't fit
    |
@@ -684,7 +684,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:178:16
    |
 LL |     foo::<i16>(x_u64);
-   |                ^^^^^ expected i16, found u64
+   |                ^^^^^ expected `i16`, found `u64`
    |
 help: you can convert an `u64` to `i16` and panic if the converted value wouldn't fit
    |
@@ -695,7 +695,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:180:16
    |
 LL |     foo::<i16>(x_u32);
-   |                ^^^^^ expected i16, found u32
+   |                ^^^^^ expected `i16`, found `u32`
    |
 help: you can convert an `u32` to `i16` and panic if the converted value wouldn't fit
    |
@@ -706,7 +706,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:182:16
    |
 LL |     foo::<i16>(x_u16);
-   |                ^^^^^ expected i16, found u16
+   |                ^^^^^ expected `i16`, found `u16`
    |
 help: you can convert an `u16` to `i16` and panic if the converted value wouldn't fit
    |
@@ -717,7 +717,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:184:16
    |
 LL |     foo::<i16>(x_u8);
-   |                ^^^^ expected i16, found u8
+   |                ^^^^ expected `i16`, found `u8`
    |
 help: you can convert an `u8` to `i16` and panic if the converted value wouldn't fit
    |
@@ -728,7 +728,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:186:16
    |
 LL |     foo::<i16>(x_isize);
-   |                ^^^^^^^ expected i16, found isize
+   |                ^^^^^^^ expected `i16`, found `isize`
    |
 help: you can convert an `isize` to `i16` and panic if the converted value wouldn't fit
    |
@@ -739,7 +739,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:188:16
    |
 LL |     foo::<i16>(x_i64);
-   |                ^^^^^ expected i16, found i64
+   |                ^^^^^ expected `i16`, found `i64`
    |
 help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit
    |
@@ -750,7 +750,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:190:16
    |
 LL |     foo::<i16>(x_i32);
-   |                ^^^^^ expected i16, found i32
+   |                ^^^^^ expected `i16`, found `i32`
    |
 help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit
    |
@@ -763,14 +763,14 @@ error[E0308]: mismatched types
 LL |     foo::<i16>(x_i8);
    |                ^^^^
    |                |
-   |                expected i16, found i8
+   |                expected `i16`, found `i8`
    |                help: you can convert an `i8` to `i16`: `x_i8.into()`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:198:15
    |
 LL |     foo::<u8>(x_usize);
-   |               ^^^^^^^ expected u8, found usize
+   |               ^^^^^^^ expected `u8`, found `usize`
    |
 help: you can convert an `usize` to `u8` and panic if the converted value wouldn't fit
    |
@@ -781,7 +781,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:200:15
    |
 LL |     foo::<u8>(x_u64);
-   |               ^^^^^ expected u8, found u64
+   |               ^^^^^ expected `u8`, found `u64`
    |
 help: you can convert an `u64` to `u8` and panic if the converted value wouldn't fit
    |
@@ -792,7 +792,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:202:15
    |
 LL |     foo::<u8>(x_u32);
-   |               ^^^^^ expected u8, found u32
+   |               ^^^^^ expected `u8`, found `u32`
    |
 help: you can convert an `u32` to `u8` and panic if the converted value wouldn't fit
    |
@@ -803,7 +803,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:204:15
    |
 LL |     foo::<u8>(x_u16);
-   |               ^^^^^ expected u8, found u16
+   |               ^^^^^ expected `u8`, found `u16`
    |
 help: you can convert an `u16` to `u8` and panic if the converted value wouldn't fit
    |
@@ -814,7 +814,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:207:15
    |
 LL |     foo::<u8>(x_isize);
-   |               ^^^^^^^ expected u8, found isize
+   |               ^^^^^^^ expected `u8`, found `isize`
    |
 help: you can convert an `isize` to `u8` and panic if the converted value wouldn't fit
    |
@@ -825,7 +825,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:209:15
    |
 LL |     foo::<u8>(x_i64);
-   |               ^^^^^ expected u8, found i64
+   |               ^^^^^ expected `u8`, found `i64`
    |
 help: you can convert an `i64` to `u8` and panic if the converted value wouldn't fit
    |
@@ -836,7 +836,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:211:15
    |
 LL |     foo::<u8>(x_i32);
-   |               ^^^^^ expected u8, found i32
+   |               ^^^^^ expected `u8`, found `i32`
    |
 help: you can convert an `i32` to `u8` and panic if the converted value wouldn't fit
    |
@@ -847,7 +847,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:213:15
    |
 LL |     foo::<u8>(x_i16);
-   |               ^^^^^ expected u8, found i16
+   |               ^^^^^ expected `u8`, found `i16`
    |
 help: you can convert an `i16` to `u8` and panic if the converted value wouldn't fit
    |
@@ -858,7 +858,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:215:15
    |
 LL |     foo::<u8>(x_i8);
-   |               ^^^^ expected u8, found i8
+   |               ^^^^ expected `u8`, found `i8`
    |
 help: you can convert an `i8` to `u8` and panic if the converted value wouldn't fit
    |
@@ -869,7 +869,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:220:15
    |
 LL |     foo::<i8>(x_usize);
-   |               ^^^^^^^ expected i8, found usize
+   |               ^^^^^^^ expected `i8`, found `usize`
    |
 help: you can convert an `usize` to `i8` and panic if the converted value wouldn't fit
    |
@@ -880,7 +880,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:222:15
    |
 LL |     foo::<i8>(x_u64);
-   |               ^^^^^ expected i8, found u64
+   |               ^^^^^ expected `i8`, found `u64`
    |
 help: you can convert an `u64` to `i8` and panic if the converted value wouldn't fit
    |
@@ -891,7 +891,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:224:15
    |
 LL |     foo::<i8>(x_u32);
-   |               ^^^^^ expected i8, found u32
+   |               ^^^^^ expected `i8`, found `u32`
    |
 help: you can convert an `u32` to `i8` and panic if the converted value wouldn't fit
    |
@@ -902,7 +902,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:226:15
    |
 LL |     foo::<i8>(x_u16);
-   |               ^^^^^ expected i8, found u16
+   |               ^^^^^ expected `i8`, found `u16`
    |
 help: you can convert an `u16` to `i8` and panic if the converted value wouldn't fit
    |
@@ -913,7 +913,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:228:15
    |
 LL |     foo::<i8>(x_u8);
-   |               ^^^^ expected i8, found u8
+   |               ^^^^ expected `i8`, found `u8`
    |
 help: you can convert an `u8` to `i8` and panic if the converted value wouldn't fit
    |
@@ -924,7 +924,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:230:15
    |
 LL |     foo::<i8>(x_isize);
-   |               ^^^^^^^ expected i8, found isize
+   |               ^^^^^^^ expected `i8`, found `isize`
    |
 help: you can convert an `isize` to `i8` and panic if the converted value wouldn't fit
    |
@@ -935,7 +935,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:232:15
    |
 LL |     foo::<i8>(x_i64);
-   |               ^^^^^ expected i8, found i64
+   |               ^^^^^ expected `i8`, found `i64`
    |
 help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit
    |
@@ -946,7 +946,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:234:15
    |
 LL |     foo::<i8>(x_i32);
-   |               ^^^^^ expected i8, found i32
+   |               ^^^^^ expected `i8`, found `i32`
    |
 help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit
    |
@@ -957,7 +957,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:236:15
    |
 LL |     foo::<i8>(x_i16);
-   |               ^^^^^ expected i8, found i16
+   |               ^^^^^ expected `i8`, found `i16`
    |
 help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit
    |
@@ -968,7 +968,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:242:16
    |
 LL |     foo::<f64>(x_usize);
-   |                ^^^^^^^ expected f64, found usize
+   |                ^^^^^^^ expected `f64`, found `usize`
    |
 help: you can cast an `usize to `f64`, producing the floating point representation of the integer,
    |                                              rounded if necessary
@@ -979,7 +979,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:244:16
    |
 LL |     foo::<f64>(x_u64);
-   |                ^^^^^ expected f64, found u64
+   |                ^^^^^ expected `f64`, found `u64`
    |
 help: you can cast an `u64 to `f64`, producing the floating point representation of the integer,
    |                                              rounded if necessary
@@ -990,7 +990,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:246:16
    |
 LL |     foo::<f64>(x_u32);
-   |                ^^^^^ expected f64, found u32
+   |                ^^^^^ expected `f64`, found `u32`
    |
 help: you can convert an `u32` to `f64`, producing the floating point representation of the integer
    |
@@ -1001,7 +1001,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:248:16
    |
 LL |     foo::<f64>(x_u16);
-   |                ^^^^^ expected f64, found u16
+   |                ^^^^^ expected `f64`, found `u16`
    |
 help: you can convert an `u16` to `f64`, producing the floating point representation of the integer
    |
@@ -1012,7 +1012,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:250:16
    |
 LL |     foo::<f64>(x_u8);
-   |                ^^^^ expected f64, found u8
+   |                ^^^^ expected `f64`, found `u8`
    |
 help: you can convert an `u8` to `f64`, producing the floating point representation of the integer
    |
@@ -1023,7 +1023,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:252:16
    |
 LL |     foo::<f64>(x_isize);
-   |                ^^^^^^^ expected f64, found isize
+   |                ^^^^^^^ expected `f64`, found `isize`
    |
 help: you can convert an `isize` to `f64`, producing the floating point representation of the integer, rounded if necessary
    |
@@ -1034,7 +1034,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:254:16
    |
 LL |     foo::<f64>(x_i64);
-   |                ^^^^^ expected f64, found i64
+   |                ^^^^^ expected `f64`, found `i64`
    |
 help: you can convert an `i64` to `f64`, producing the floating point representation of the integer, rounded if necessary
    |
@@ -1045,7 +1045,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:256:16
    |
 LL |     foo::<f64>(x_i32);
-   |                ^^^^^ expected f64, found i32
+   |                ^^^^^ expected `f64`, found `i32`
    |
 help: you can convert an `i32` to `f64`, producing the floating point representation of the integer
    |
@@ -1056,7 +1056,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:258:16
    |
 LL |     foo::<f64>(x_i16);
-   |                ^^^^^ expected f64, found i16
+   |                ^^^^^ expected `f64`, found `i16`
    |
 help: you can convert an `i16` to `f64`, producing the floating point representation of the integer
    |
@@ -1067,7 +1067,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:260:16
    |
 LL |     foo::<f64>(x_i8);
-   |                ^^^^ expected f64, found i8
+   |                ^^^^ expected `f64`, found `i8`
    |
 help: you can convert an `i8` to `f64`, producing the floating point representation of the integer
    |
@@ -1080,14 +1080,14 @@ error[E0308]: mismatched types
 LL |     foo::<f64>(x_f32);
    |                ^^^^^
    |                |
-   |                expected f64, found f32
+   |                expected `f64`, found `f32`
    |                help: you can convert an `f32` to `f64`: `x_f32.into()`
 
 error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:266:16
    |
 LL |     foo::<f32>(x_usize);
-   |                ^^^^^^^ expected f32, found usize
+   |                ^^^^^^^ expected `f32`, found `usize`
    |
 help: you can cast an `usize to `f32`, producing the floating point representation of the integer,
    |                                              rounded if necessary
@@ -1098,7 +1098,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:268:16
    |
 LL |     foo::<f32>(x_u64);
-   |                ^^^^^ expected f32, found u64
+   |                ^^^^^ expected `f32`, found `u64`
    |
 help: you can cast an `u64 to `f32`, producing the floating point representation of the integer,
    |                                              rounded if necessary
@@ -1109,7 +1109,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:270:16
    |
 LL |     foo::<f32>(x_u32);
-   |                ^^^^^ expected f32, found u32
+   |                ^^^^^ expected `f32`, found `u32`
    |
 help: you can cast an `u32 to `f32`, producing the floating point representation of the integer,
    |                                              rounded if necessary
@@ -1120,7 +1120,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:272:16
    |
 LL |     foo::<f32>(x_u16);
-   |                ^^^^^ expected f32, found u16
+   |                ^^^^^ expected `f32`, found `u16`
    |
 help: you can convert an `u16` to `f32`, producing the floating point representation of the integer
    |
@@ -1131,7 +1131,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:274:16
    |
 LL |     foo::<f32>(x_u8);
-   |                ^^^^ expected f32, found u8
+   |                ^^^^ expected `f32`, found `u8`
    |
 help: you can convert an `u8` to `f32`, producing the floating point representation of the integer
    |
@@ -1142,7 +1142,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:276:16
    |
 LL |     foo::<f32>(x_isize);
-   |                ^^^^^^^ expected f32, found isize
+   |                ^^^^^^^ expected `f32`, found `isize`
    |
 help: you can convert an `isize` to `f32`, producing the floating point representation of the integer, rounded if necessary
    |
@@ -1153,7 +1153,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:278:16
    |
 LL |     foo::<f32>(x_i64);
-   |                ^^^^^ expected f32, found i64
+   |                ^^^^^ expected `f32`, found `i64`
    |
 help: you can convert an `i64` to `f32`, producing the floating point representation of the integer, rounded if necessary
    |
@@ -1164,7 +1164,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:280:16
    |
 LL |     foo::<f32>(x_i32);
-   |                ^^^^^ expected f32, found i32
+   |                ^^^^^ expected `f32`, found `i32`
    |
 help: you can convert an `i32` to `f32`, producing the floating point representation of the integer, rounded if necessary
    |
@@ -1175,7 +1175,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:282:16
    |
 LL |     foo::<f32>(x_i16);
-   |                ^^^^^ expected f32, found i16
+   |                ^^^^^ expected `f32`, found `i16`
    |
 help: you can convert an `i16` to `f32`, producing the floating point representation of the integer
    |
@@ -1186,7 +1186,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-cast.rs:284:16
    |
 LL |     foo::<f32>(x_i8);
-   |                ^^^^ expected f32, found i8
+   |                ^^^^ expected `f32`, found `i8`
    |
 help: you can convert an `i8` to `f32`, producing the floating point representation of the integer
    |
@@ -1199,7 +1199,7 @@ error[E0308]: mismatched types
 LL |     foo::<u32>(x_u8 as u16);
    |                ^^^^^^^^^^^
    |                |
-   |                expected u32, found u16
+   |                expected `u32`, found `u16`
    |                help: you can convert an `u16` to `u32`: `(x_u8 as u16).into()`
 
 error[E0308]: mismatched types
@@ -1208,7 +1208,7 @@ error[E0308]: mismatched types
 LL |     foo::<i32>(-x_i8);
    |                ^^^^^
    |                |
-   |                expected i32, found i8
+   |                expected `i32`, found `i8`
    |                help: you can convert an `i8` to `i32`: `(-x_i8).into()`
 
 error: aborting due to 113 previous errors
diff --git a/src/test/ui/numeric/numeric-suffix.stderr b/src/test/ui/numeric/numeric-suffix.stderr
index 9bcae4a1888..00f6e1abe43 100644
--- a/src/test/ui/numeric/numeric-suffix.stderr
+++ b/src/test/ui/numeric/numeric-suffix.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:7:18
    |
 LL |     foo::<usize>(42_u64);
-   |                  ^^^^^^ expected usize, found u64
+   |                  ^^^^^^ expected `usize`, found `u64`
    |
 help: change the type of the numeric literal from `u64` to `usize`
    |
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:9:18
    |
 LL |     foo::<usize>(42_u32);
-   |                  ^^^^^^ expected usize, found u32
+   |                  ^^^^^^ expected `usize`, found `u32`
    |
 help: change the type of the numeric literal from `u32` to `usize`
    |
@@ -24,7 +24,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:11:18
    |
 LL |     foo::<usize>(42_u16);
-   |                  ^^^^^^ expected usize, found u16
+   |                  ^^^^^^ expected `usize`, found `u16`
    |
 help: change the type of the numeric literal from `u16` to `usize`
    |
@@ -35,7 +35,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:13:18
    |
 LL |     foo::<usize>(42_u8);
-   |                  ^^^^^ expected usize, found u8
+   |                  ^^^^^ expected `usize`, found `u8`
    |
 help: change the type of the numeric literal from `u8` to `usize`
    |
@@ -46,7 +46,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:15:18
    |
 LL |     foo::<usize>(42_isize);
-   |                  ^^^^^^^^ expected usize, found isize
+   |                  ^^^^^^^^ expected `usize`, found `isize`
    |
 help: change the type of the numeric literal from `isize` to `usize`
    |
@@ -57,7 +57,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:17:18
    |
 LL |     foo::<usize>(42_i64);
-   |                  ^^^^^^ expected usize, found i64
+   |                  ^^^^^^ expected `usize`, found `i64`
    |
 help: change the type of the numeric literal from `i64` to `usize`
    |
@@ -68,7 +68,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:19:18
    |
 LL |     foo::<usize>(42_i32);
-   |                  ^^^^^^ expected usize, found i32
+   |                  ^^^^^^ expected `usize`, found `i32`
    |
 help: change the type of the numeric literal from `i32` to `usize`
    |
@@ -79,7 +79,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:21:18
    |
 LL |     foo::<usize>(42_i16);
-   |                  ^^^^^^ expected usize, found i16
+   |                  ^^^^^^ expected `usize`, found `i16`
    |
 help: change the type of the numeric literal from `i16` to `usize`
    |
@@ -90,7 +90,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:23:18
    |
 LL |     foo::<usize>(42_i8);
-   |                  ^^^^^ expected usize, found i8
+   |                  ^^^^^ expected `usize`, found `i8`
    |
 help: change the type of the numeric literal from `i8` to `usize`
    |
@@ -101,7 +101,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:25:18
    |
 LL |     foo::<usize>(42.0_f64);
-   |                  ^^^^^^^^ expected usize, found f64
+   |                  ^^^^^^^^ expected `usize`, found `f64`
    |
 help: change the type of the numeric literal from `f64` to `usize`
    |
@@ -112,7 +112,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:27:18
    |
 LL |     foo::<usize>(42.0_f32);
-   |                  ^^^^^^^^ expected usize, found f32
+   |                  ^^^^^^^^ expected `usize`, found `f32`
    |
 help: change the type of the numeric literal from `f32` to `usize`
    |
@@ -123,7 +123,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:30:18
    |
 LL |     foo::<isize>(42_usize);
-   |                  ^^^^^^^^ expected isize, found usize
+   |                  ^^^^^^^^ expected `isize`, found `usize`
    |
 help: change the type of the numeric literal from `usize` to `isize`
    |
@@ -134,7 +134,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:32:18
    |
 LL |     foo::<isize>(42_u64);
-   |                  ^^^^^^ expected isize, found u64
+   |                  ^^^^^^ expected `isize`, found `u64`
    |
 help: change the type of the numeric literal from `u64` to `isize`
    |
@@ -145,7 +145,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:34:18
    |
 LL |     foo::<isize>(42_u32);
-   |                  ^^^^^^ expected isize, found u32
+   |                  ^^^^^^ expected `isize`, found `u32`
    |
 help: change the type of the numeric literal from `u32` to `isize`
    |
@@ -156,7 +156,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:36:18
    |
 LL |     foo::<isize>(42_u16);
-   |                  ^^^^^^ expected isize, found u16
+   |                  ^^^^^^ expected `isize`, found `u16`
    |
 help: change the type of the numeric literal from `u16` to `isize`
    |
@@ -167,7 +167,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:38:18
    |
 LL |     foo::<isize>(42_u8);
-   |                  ^^^^^ expected isize, found u8
+   |                  ^^^^^ expected `isize`, found `u8`
    |
 help: change the type of the numeric literal from `u8` to `isize`
    |
@@ -178,7 +178,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:41:18
    |
 LL |     foo::<isize>(42_i64);
-   |                  ^^^^^^ expected isize, found i64
+   |                  ^^^^^^ expected `isize`, found `i64`
    |
 help: change the type of the numeric literal from `i64` to `isize`
    |
@@ -189,7 +189,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:43:18
    |
 LL |     foo::<isize>(42_i32);
-   |                  ^^^^^^ expected isize, found i32
+   |                  ^^^^^^ expected `isize`, found `i32`
    |
 help: change the type of the numeric literal from `i32` to `isize`
    |
@@ -200,7 +200,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:45:18
    |
 LL |     foo::<isize>(42_i16);
-   |                  ^^^^^^ expected isize, found i16
+   |                  ^^^^^^ expected `isize`, found `i16`
    |
 help: change the type of the numeric literal from `i16` to `isize`
    |
@@ -211,7 +211,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:47:18
    |
 LL |     foo::<isize>(42_i8);
-   |                  ^^^^^ expected isize, found i8
+   |                  ^^^^^ expected `isize`, found `i8`
    |
 help: change the type of the numeric literal from `i8` to `isize`
    |
@@ -222,7 +222,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:49:18
    |
 LL |     foo::<isize>(42.0_f64);
-   |                  ^^^^^^^^ expected isize, found f64
+   |                  ^^^^^^^^ expected `isize`, found `f64`
    |
 help: change the type of the numeric literal from `f64` to `isize`
    |
@@ -233,7 +233,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:51:18
    |
 LL |     foo::<isize>(42.0_f32);
-   |                  ^^^^^^^^ expected isize, found f32
+   |                  ^^^^^^^^ expected `isize`, found `f32`
    |
 help: change the type of the numeric literal from `f32` to `isize`
    |
@@ -244,7 +244,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:54:16
    |
 LL |     foo::<u64>(42_usize);
-   |                ^^^^^^^^ expected u64, found usize
+   |                ^^^^^^^^ expected `u64`, found `usize`
    |
 help: change the type of the numeric literal from `usize` to `u64`
    |
@@ -255,7 +255,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:57:16
    |
 LL |     foo::<u64>(42_u32);
-   |                ^^^^^^ expected u64, found u32
+   |                ^^^^^^ expected `u64`, found `u32`
    |
 help: change the type of the numeric literal from `u32` to `u64`
    |
@@ -266,7 +266,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:59:16
    |
 LL |     foo::<u64>(42_u16);
-   |                ^^^^^^ expected u64, found u16
+   |                ^^^^^^ expected `u64`, found `u16`
    |
 help: change the type of the numeric literal from `u16` to `u64`
    |
@@ -277,7 +277,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:61:16
    |
 LL |     foo::<u64>(42_u8);
-   |                ^^^^^ expected u64, found u8
+   |                ^^^^^ expected `u64`, found `u8`
    |
 help: change the type of the numeric literal from `u8` to `u64`
    |
@@ -288,7 +288,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:63:16
    |
 LL |     foo::<u64>(42_isize);
-   |                ^^^^^^^^ expected u64, found isize
+   |                ^^^^^^^^ expected `u64`, found `isize`
    |
 help: change the type of the numeric literal from `isize` to `u64`
    |
@@ -299,7 +299,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:65:16
    |
 LL |     foo::<u64>(42_i64);
-   |                ^^^^^^ expected u64, found i64
+   |                ^^^^^^ expected `u64`, found `i64`
    |
 help: change the type of the numeric literal from `i64` to `u64`
    |
@@ -310,7 +310,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:67:16
    |
 LL |     foo::<u64>(42_i32);
-   |                ^^^^^^ expected u64, found i32
+   |                ^^^^^^ expected `u64`, found `i32`
    |
 help: change the type of the numeric literal from `i32` to `u64`
    |
@@ -321,7 +321,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:69:16
    |
 LL |     foo::<u64>(42_i16);
-   |                ^^^^^^ expected u64, found i16
+   |                ^^^^^^ expected `u64`, found `i16`
    |
 help: change the type of the numeric literal from `i16` to `u64`
    |
@@ -332,7 +332,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:71:16
    |
 LL |     foo::<u64>(42_i8);
-   |                ^^^^^ expected u64, found i8
+   |                ^^^^^ expected `u64`, found `i8`
    |
 help: change the type of the numeric literal from `i8` to `u64`
    |
@@ -343,7 +343,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:73:16
    |
 LL |     foo::<u64>(42.0_f64);
-   |                ^^^^^^^^ expected u64, found f64
+   |                ^^^^^^^^ expected `u64`, found `f64`
    |
 help: change the type of the numeric literal from `f64` to `u64`
    |
@@ -354,7 +354,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:75:16
    |
 LL |     foo::<u64>(42.0_f32);
-   |                ^^^^^^^^ expected u64, found f32
+   |                ^^^^^^^^ expected `u64`, found `f32`
    |
 help: change the type of the numeric literal from `f32` to `u64`
    |
@@ -365,7 +365,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:78:16
    |
 LL |     foo::<i64>(42_usize);
-   |                ^^^^^^^^ expected i64, found usize
+   |                ^^^^^^^^ expected `i64`, found `usize`
    |
 help: change the type of the numeric literal from `usize` to `i64`
    |
@@ -376,7 +376,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:80:16
    |
 LL |     foo::<i64>(42_u64);
-   |                ^^^^^^ expected i64, found u64
+   |                ^^^^^^ expected `i64`, found `u64`
    |
 help: change the type of the numeric literal from `u64` to `i64`
    |
@@ -387,7 +387,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:82:16
    |
 LL |     foo::<i64>(42_u32);
-   |                ^^^^^^ expected i64, found u32
+   |                ^^^^^^ expected `i64`, found `u32`
    |
 help: change the type of the numeric literal from `u32` to `i64`
    |
@@ -398,7 +398,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:84:16
    |
 LL |     foo::<i64>(42_u16);
-   |                ^^^^^^ expected i64, found u16
+   |                ^^^^^^ expected `i64`, found `u16`
    |
 help: change the type of the numeric literal from `u16` to `i64`
    |
@@ -409,7 +409,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:86:16
    |
 LL |     foo::<i64>(42_u8);
-   |                ^^^^^ expected i64, found u8
+   |                ^^^^^ expected `i64`, found `u8`
    |
 help: change the type of the numeric literal from `u8` to `i64`
    |
@@ -420,7 +420,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:88:16
    |
 LL |     foo::<i64>(42_isize);
-   |                ^^^^^^^^ expected i64, found isize
+   |                ^^^^^^^^ expected `i64`, found `isize`
    |
 help: change the type of the numeric literal from `isize` to `i64`
    |
@@ -431,7 +431,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:91:16
    |
 LL |     foo::<i64>(42_i32);
-   |                ^^^^^^ expected i64, found i32
+   |                ^^^^^^ expected `i64`, found `i32`
    |
 help: change the type of the numeric literal from `i32` to `i64`
    |
@@ -442,7 +442,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:93:16
    |
 LL |     foo::<i64>(42_i16);
-   |                ^^^^^^ expected i64, found i16
+   |                ^^^^^^ expected `i64`, found `i16`
    |
 help: change the type of the numeric literal from `i16` to `i64`
    |
@@ -453,7 +453,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:95:16
    |
 LL |     foo::<i64>(42_i8);
-   |                ^^^^^ expected i64, found i8
+   |                ^^^^^ expected `i64`, found `i8`
    |
 help: change the type of the numeric literal from `i8` to `i64`
    |
@@ -464,7 +464,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:97:16
    |
 LL |     foo::<i64>(42.0_f64);
-   |                ^^^^^^^^ expected i64, found f64
+   |                ^^^^^^^^ expected `i64`, found `f64`
    |
 help: change the type of the numeric literal from `f64` to `i64`
    |
@@ -475,7 +475,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:99:16
    |
 LL |     foo::<i64>(42.0_f32);
-   |                ^^^^^^^^ expected i64, found f32
+   |                ^^^^^^^^ expected `i64`, found `f32`
    |
 help: change the type of the numeric literal from `f32` to `i64`
    |
@@ -486,7 +486,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:102:16
    |
 LL |     foo::<u32>(42_usize);
-   |                ^^^^^^^^ expected u32, found usize
+   |                ^^^^^^^^ expected `u32`, found `usize`
    |
 help: change the type of the numeric literal from `usize` to `u32`
    |
@@ -497,7 +497,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:104:16
    |
 LL |     foo::<u32>(42_u64);
-   |                ^^^^^^ expected u32, found u64
+   |                ^^^^^^ expected `u32`, found `u64`
    |
 help: change the type of the numeric literal from `u64` to `u32`
    |
@@ -508,7 +508,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:107:16
    |
 LL |     foo::<u32>(42_u16);
-   |                ^^^^^^ expected u32, found u16
+   |                ^^^^^^ expected `u32`, found `u16`
    |
 help: change the type of the numeric literal from `u16` to `u32`
    |
@@ -519,7 +519,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:109:16
    |
 LL |     foo::<u32>(42_u8);
-   |                ^^^^^ expected u32, found u8
+   |                ^^^^^ expected `u32`, found `u8`
    |
 help: change the type of the numeric literal from `u8` to `u32`
    |
@@ -530,7 +530,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:111:16
    |
 LL |     foo::<u32>(42_isize);
-   |                ^^^^^^^^ expected u32, found isize
+   |                ^^^^^^^^ expected `u32`, found `isize`
    |
 help: change the type of the numeric literal from `isize` to `u32`
    |
@@ -541,7 +541,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:113:16
    |
 LL |     foo::<u32>(42_i64);
-   |                ^^^^^^ expected u32, found i64
+   |                ^^^^^^ expected `u32`, found `i64`
    |
 help: change the type of the numeric literal from `i64` to `u32`
    |
@@ -552,7 +552,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:115:16
    |
 LL |     foo::<u32>(42_i32);
-   |                ^^^^^^ expected u32, found i32
+   |                ^^^^^^ expected `u32`, found `i32`
    |
 help: change the type of the numeric literal from `i32` to `u32`
    |
@@ -563,7 +563,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:117:16
    |
 LL |     foo::<u32>(42_i16);
-   |                ^^^^^^ expected u32, found i16
+   |                ^^^^^^ expected `u32`, found `i16`
    |
 help: change the type of the numeric literal from `i16` to `u32`
    |
@@ -574,7 +574,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:119:16
    |
 LL |     foo::<u32>(42_i8);
-   |                ^^^^^ expected u32, found i8
+   |                ^^^^^ expected `u32`, found `i8`
    |
 help: change the type of the numeric literal from `i8` to `u32`
    |
@@ -585,7 +585,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:121:16
    |
 LL |     foo::<u32>(42.0_f64);
-   |                ^^^^^^^^ expected u32, found f64
+   |                ^^^^^^^^ expected `u32`, found `f64`
    |
 help: change the type of the numeric literal from `f64` to `u32`
    |
@@ -596,7 +596,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:123:16
    |
 LL |     foo::<u32>(42.0_f32);
-   |                ^^^^^^^^ expected u32, found f32
+   |                ^^^^^^^^ expected `u32`, found `f32`
    |
 help: change the type of the numeric literal from `f32` to `u32`
    |
@@ -607,7 +607,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:126:16
    |
 LL |     foo::<i32>(42_usize);
-   |                ^^^^^^^^ expected i32, found usize
+   |                ^^^^^^^^ expected `i32`, found `usize`
    |
 help: change the type of the numeric literal from `usize` to `i32`
    |
@@ -618,7 +618,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:128:16
    |
 LL |     foo::<i32>(42_u64);
-   |                ^^^^^^ expected i32, found u64
+   |                ^^^^^^ expected `i32`, found `u64`
    |
 help: change the type of the numeric literal from `u64` to `i32`
    |
@@ -629,7 +629,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:130:16
    |
 LL |     foo::<i32>(42_u32);
-   |                ^^^^^^ expected i32, found u32
+   |                ^^^^^^ expected `i32`, found `u32`
    |
 help: change the type of the numeric literal from `u32` to `i32`
    |
@@ -640,7 +640,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:132:16
    |
 LL |     foo::<i32>(42_u16);
-   |                ^^^^^^ expected i32, found u16
+   |                ^^^^^^ expected `i32`, found `u16`
    |
 help: change the type of the numeric literal from `u16` to `i32`
    |
@@ -651,7 +651,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:134:16
    |
 LL |     foo::<i32>(42_u8);
-   |                ^^^^^ expected i32, found u8
+   |                ^^^^^ expected `i32`, found `u8`
    |
 help: change the type of the numeric literal from `u8` to `i32`
    |
@@ -662,7 +662,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:136:16
    |
 LL |     foo::<i32>(42_isize);
-   |                ^^^^^^^^ expected i32, found isize
+   |                ^^^^^^^^ expected `i32`, found `isize`
    |
 help: change the type of the numeric literal from `isize` to `i32`
    |
@@ -673,7 +673,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:138:16
    |
 LL |     foo::<i32>(42_i64);
-   |                ^^^^^^ expected i32, found i64
+   |                ^^^^^^ expected `i32`, found `i64`
    |
 help: change the type of the numeric literal from `i64` to `i32`
    |
@@ -684,7 +684,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:141:16
    |
 LL |     foo::<i32>(42_i16);
-   |                ^^^^^^ expected i32, found i16
+   |                ^^^^^^ expected `i32`, found `i16`
    |
 help: change the type of the numeric literal from `i16` to `i32`
    |
@@ -695,7 +695,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:143:16
    |
 LL |     foo::<i32>(42_i8);
-   |                ^^^^^ expected i32, found i8
+   |                ^^^^^ expected `i32`, found `i8`
    |
 help: change the type of the numeric literal from `i8` to `i32`
    |
@@ -706,7 +706,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:145:16
    |
 LL |     foo::<i32>(42.0_f64);
-   |                ^^^^^^^^ expected i32, found f64
+   |                ^^^^^^^^ expected `i32`, found `f64`
    |
 help: change the type of the numeric literal from `f64` to `i32`
    |
@@ -717,7 +717,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:147:16
    |
 LL |     foo::<i32>(42.0_f32);
-   |                ^^^^^^^^ expected i32, found f32
+   |                ^^^^^^^^ expected `i32`, found `f32`
    |
 help: change the type of the numeric literal from `f32` to `i32`
    |
@@ -728,7 +728,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:150:16
    |
 LL |     foo::<u16>(42_usize);
-   |                ^^^^^^^^ expected u16, found usize
+   |                ^^^^^^^^ expected `u16`, found `usize`
    |
 help: change the type of the numeric literal from `usize` to `u16`
    |
@@ -739,7 +739,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:152:16
    |
 LL |     foo::<u16>(42_u64);
-   |                ^^^^^^ expected u16, found u64
+   |                ^^^^^^ expected `u16`, found `u64`
    |
 help: change the type of the numeric literal from `u64` to `u16`
    |
@@ -750,7 +750,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:154:16
    |
 LL |     foo::<u16>(42_u32);
-   |                ^^^^^^ expected u16, found u32
+   |                ^^^^^^ expected `u16`, found `u32`
    |
 help: change the type of the numeric literal from `u32` to `u16`
    |
@@ -761,7 +761,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:157:16
    |
 LL |     foo::<u16>(42_u8);
-   |                ^^^^^ expected u16, found u8
+   |                ^^^^^ expected `u16`, found `u8`
    |
 help: change the type of the numeric literal from `u8` to `u16`
    |
@@ -772,7 +772,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:159:16
    |
 LL |     foo::<u16>(42_isize);
-   |                ^^^^^^^^ expected u16, found isize
+   |                ^^^^^^^^ expected `u16`, found `isize`
    |
 help: change the type of the numeric literal from `isize` to `u16`
    |
@@ -783,7 +783,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:161:16
    |
 LL |     foo::<u16>(42_i64);
-   |                ^^^^^^ expected u16, found i64
+   |                ^^^^^^ expected `u16`, found `i64`
    |
 help: change the type of the numeric literal from `i64` to `u16`
    |
@@ -794,7 +794,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:163:16
    |
 LL |     foo::<u16>(42_i32);
-   |                ^^^^^^ expected u16, found i32
+   |                ^^^^^^ expected `u16`, found `i32`
    |
 help: change the type of the numeric literal from `i32` to `u16`
    |
@@ -805,7 +805,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:165:16
    |
 LL |     foo::<u16>(42_i16);
-   |                ^^^^^^ expected u16, found i16
+   |                ^^^^^^ expected `u16`, found `i16`
    |
 help: change the type of the numeric literal from `i16` to `u16`
    |
@@ -816,7 +816,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:167:16
    |
 LL |     foo::<u16>(42_i8);
-   |                ^^^^^ expected u16, found i8
+   |                ^^^^^ expected `u16`, found `i8`
    |
 help: change the type of the numeric literal from `i8` to `u16`
    |
@@ -827,7 +827,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:169:16
    |
 LL |     foo::<u16>(42.0_f64);
-   |                ^^^^^^^^ expected u16, found f64
+   |                ^^^^^^^^ expected `u16`, found `f64`
    |
 help: change the type of the numeric literal from `f64` to `u16`
    |
@@ -838,7 +838,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:171:16
    |
 LL |     foo::<u16>(42.0_f32);
-   |                ^^^^^^^^ expected u16, found f32
+   |                ^^^^^^^^ expected `u16`, found `f32`
    |
 help: change the type of the numeric literal from `f32` to `u16`
    |
@@ -849,7 +849,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:174:16
    |
 LL |     foo::<i16>(42_usize);
-   |                ^^^^^^^^ expected i16, found usize
+   |                ^^^^^^^^ expected `i16`, found `usize`
    |
 help: change the type of the numeric literal from `usize` to `i16`
    |
@@ -860,7 +860,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:176:16
    |
 LL |     foo::<i16>(42_u64);
-   |                ^^^^^^ expected i16, found u64
+   |                ^^^^^^ expected `i16`, found `u64`
    |
 help: change the type of the numeric literal from `u64` to `i16`
    |
@@ -871,7 +871,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:178:16
    |
 LL |     foo::<i16>(42_u32);
-   |                ^^^^^^ expected i16, found u32
+   |                ^^^^^^ expected `i16`, found `u32`
    |
 help: change the type of the numeric literal from `u32` to `i16`
    |
@@ -882,7 +882,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:180:16
    |
 LL |     foo::<i16>(42_u16);
-   |                ^^^^^^ expected i16, found u16
+   |                ^^^^^^ expected `i16`, found `u16`
    |
 help: change the type of the numeric literal from `u16` to `i16`
    |
@@ -893,7 +893,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:182:16
    |
 LL |     foo::<i16>(42_u8);
-   |                ^^^^^ expected i16, found u8
+   |                ^^^^^ expected `i16`, found `u8`
    |
 help: change the type of the numeric literal from `u8` to `i16`
    |
@@ -904,7 +904,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:184:16
    |
 LL |     foo::<i16>(42_isize);
-   |                ^^^^^^^^ expected i16, found isize
+   |                ^^^^^^^^ expected `i16`, found `isize`
    |
 help: change the type of the numeric literal from `isize` to `i16`
    |
@@ -915,7 +915,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:186:16
    |
 LL |     foo::<i16>(42_i64);
-   |                ^^^^^^ expected i16, found i64
+   |                ^^^^^^ expected `i16`, found `i64`
    |
 help: change the type of the numeric literal from `i64` to `i16`
    |
@@ -926,7 +926,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:188:16
    |
 LL |     foo::<i16>(42_i32);
-   |                ^^^^^^ expected i16, found i32
+   |                ^^^^^^ expected `i16`, found `i32`
    |
 help: change the type of the numeric literal from `i32` to `i16`
    |
@@ -937,7 +937,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:191:16
    |
 LL |     foo::<i16>(42_i8);
-   |                ^^^^^ expected i16, found i8
+   |                ^^^^^ expected `i16`, found `i8`
    |
 help: change the type of the numeric literal from `i8` to `i16`
    |
@@ -948,7 +948,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:193:16
    |
 LL |     foo::<i16>(42.0_f64);
-   |                ^^^^^^^^ expected i16, found f64
+   |                ^^^^^^^^ expected `i16`, found `f64`
    |
 help: change the type of the numeric literal from `f64` to `i16`
    |
@@ -959,7 +959,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:195:16
    |
 LL |     foo::<i16>(42.0_f32);
-   |                ^^^^^^^^ expected i16, found f32
+   |                ^^^^^^^^ expected `i16`, found `f32`
    |
 help: change the type of the numeric literal from `f32` to `i16`
    |
@@ -970,7 +970,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:198:15
    |
 LL |     foo::<u8>(42_usize);
-   |               ^^^^^^^^ expected u8, found usize
+   |               ^^^^^^^^ expected `u8`, found `usize`
    |
 help: change the type of the numeric literal from `usize` to `u8`
    |
@@ -981,7 +981,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:200:15
    |
 LL |     foo::<u8>(42_u64);
-   |               ^^^^^^ expected u8, found u64
+   |               ^^^^^^ expected `u8`, found `u64`
    |
 help: change the type of the numeric literal from `u64` to `u8`
    |
@@ -992,7 +992,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:202:15
    |
 LL |     foo::<u8>(42_u32);
-   |               ^^^^^^ expected u8, found u32
+   |               ^^^^^^ expected `u8`, found `u32`
    |
 help: change the type of the numeric literal from `u32` to `u8`
    |
@@ -1003,7 +1003,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:204:15
    |
 LL |     foo::<u8>(42_u16);
-   |               ^^^^^^ expected u8, found u16
+   |               ^^^^^^ expected `u8`, found `u16`
    |
 help: change the type of the numeric literal from `u16` to `u8`
    |
@@ -1014,7 +1014,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:207:15
    |
 LL |     foo::<u8>(42_isize);
-   |               ^^^^^^^^ expected u8, found isize
+   |               ^^^^^^^^ expected `u8`, found `isize`
    |
 help: change the type of the numeric literal from `isize` to `u8`
    |
@@ -1025,7 +1025,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:209:15
    |
 LL |     foo::<u8>(42_i64);
-   |               ^^^^^^ expected u8, found i64
+   |               ^^^^^^ expected `u8`, found `i64`
    |
 help: change the type of the numeric literal from `i64` to `u8`
    |
@@ -1036,7 +1036,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:211:15
    |
 LL |     foo::<u8>(42_i32);
-   |               ^^^^^^ expected u8, found i32
+   |               ^^^^^^ expected `u8`, found `i32`
    |
 help: change the type of the numeric literal from `i32` to `u8`
    |
@@ -1047,7 +1047,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:213:15
    |
 LL |     foo::<u8>(42_i16);
-   |               ^^^^^^ expected u8, found i16
+   |               ^^^^^^ expected `u8`, found `i16`
    |
 help: change the type of the numeric literal from `i16` to `u8`
    |
@@ -1058,7 +1058,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:215:15
    |
 LL |     foo::<u8>(42_i8);
-   |               ^^^^^ expected u8, found i8
+   |               ^^^^^ expected `u8`, found `i8`
    |
 help: change the type of the numeric literal from `i8` to `u8`
    |
@@ -1069,7 +1069,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:217:15
    |
 LL |     foo::<u8>(42.0_f64);
-   |               ^^^^^^^^ expected u8, found f64
+   |               ^^^^^^^^ expected `u8`, found `f64`
    |
 help: change the type of the numeric literal from `f64` to `u8`
    |
@@ -1080,7 +1080,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:219:15
    |
 LL |     foo::<u8>(42.0_f32);
-   |               ^^^^^^^^ expected u8, found f32
+   |               ^^^^^^^^ expected `u8`, found `f32`
    |
 help: change the type of the numeric literal from `f32` to `u8`
    |
@@ -1091,7 +1091,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:222:15
    |
 LL |     foo::<i8>(42_usize);
-   |               ^^^^^^^^ expected i8, found usize
+   |               ^^^^^^^^ expected `i8`, found `usize`
    |
 help: change the type of the numeric literal from `usize` to `i8`
    |
@@ -1102,7 +1102,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:224:15
    |
 LL |     foo::<i8>(42_u64);
-   |               ^^^^^^ expected i8, found u64
+   |               ^^^^^^ expected `i8`, found `u64`
    |
 help: change the type of the numeric literal from `u64` to `i8`
    |
@@ -1113,7 +1113,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:226:15
    |
 LL |     foo::<i8>(42_u32);
-   |               ^^^^^^ expected i8, found u32
+   |               ^^^^^^ expected `i8`, found `u32`
    |
 help: change the type of the numeric literal from `u32` to `i8`
    |
@@ -1124,7 +1124,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:228:15
    |
 LL |     foo::<i8>(42_u16);
-   |               ^^^^^^ expected i8, found u16
+   |               ^^^^^^ expected `i8`, found `u16`
    |
 help: change the type of the numeric literal from `u16` to `i8`
    |
@@ -1135,7 +1135,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:230:15
    |
 LL |     foo::<i8>(42_u8);
-   |               ^^^^^ expected i8, found u8
+   |               ^^^^^ expected `i8`, found `u8`
    |
 help: change the type of the numeric literal from `u8` to `i8`
    |
@@ -1146,7 +1146,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:232:15
    |
 LL |     foo::<i8>(42_isize);
-   |               ^^^^^^^^ expected i8, found isize
+   |               ^^^^^^^^ expected `i8`, found `isize`
    |
 help: change the type of the numeric literal from `isize` to `i8`
    |
@@ -1157,7 +1157,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:234:15
    |
 LL |     foo::<i8>(42_i64);
-   |               ^^^^^^ expected i8, found i64
+   |               ^^^^^^ expected `i8`, found `i64`
    |
 help: change the type of the numeric literal from `i64` to `i8`
    |
@@ -1168,7 +1168,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:236:15
    |
 LL |     foo::<i8>(42_i32);
-   |               ^^^^^^ expected i8, found i32
+   |               ^^^^^^ expected `i8`, found `i32`
    |
 help: change the type of the numeric literal from `i32` to `i8`
    |
@@ -1179,7 +1179,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:238:15
    |
 LL |     foo::<i8>(42_i16);
-   |               ^^^^^^ expected i8, found i16
+   |               ^^^^^^ expected `i8`, found `i16`
    |
 help: change the type of the numeric literal from `i16` to `i8`
    |
@@ -1190,7 +1190,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:241:15
    |
 LL |     foo::<i8>(42.0_f64);
-   |               ^^^^^^^^ expected i8, found f64
+   |               ^^^^^^^^ expected `i8`, found `f64`
    |
 help: change the type of the numeric literal from `f64` to `i8`
    |
@@ -1201,7 +1201,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:243:15
    |
 LL |     foo::<i8>(42.0_f32);
-   |               ^^^^^^^^ expected i8, found f32
+   |               ^^^^^^^^ expected `i8`, found `f32`
    |
 help: change the type of the numeric literal from `f32` to `i8`
    |
@@ -1212,7 +1212,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:246:16
    |
 LL |     foo::<f64>(42_usize);
-   |                ^^^^^^^^ expected f64, found usize
+   |                ^^^^^^^^ expected `f64`, found `usize`
    |
 help: change the type of the numeric literal from `usize` to `f64`
    |
@@ -1223,7 +1223,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:248:16
    |
 LL |     foo::<f64>(42_u64);
-   |                ^^^^^^ expected f64, found u64
+   |                ^^^^^^ expected `f64`, found `u64`
    |
 help: change the type of the numeric literal from `u64` to `f64`
    |
@@ -1234,7 +1234,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:250:16
    |
 LL |     foo::<f64>(42_u32);
-   |                ^^^^^^ expected f64, found u32
+   |                ^^^^^^ expected `f64`, found `u32`
    |
 help: you can convert an `u32` to `f64`, producing the floating point representation of the integer
    |
@@ -1245,7 +1245,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:252:16
    |
 LL |     foo::<f64>(42_u16);
-   |                ^^^^^^ expected f64, found u16
+   |                ^^^^^^ expected `f64`, found `u16`
    |
 help: you can convert an `u16` to `f64`, producing the floating point representation of the integer
    |
@@ -1256,7 +1256,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:254:16
    |
 LL |     foo::<f64>(42_u8);
-   |                ^^^^^ expected f64, found u8
+   |                ^^^^^ expected `f64`, found `u8`
    |
 help: you can convert an `u8` to `f64`, producing the floating point representation of the integer
    |
@@ -1267,7 +1267,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:256:16
    |
 LL |     foo::<f64>(42_isize);
-   |                ^^^^^^^^ expected f64, found isize
+   |                ^^^^^^^^ expected `f64`, found `isize`
    |
 help: change the type of the numeric literal from `isize` to `f64`
    |
@@ -1278,7 +1278,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:258:16
    |
 LL |     foo::<f64>(42_i64);
-   |                ^^^^^^ expected f64, found i64
+   |                ^^^^^^ expected `f64`, found `i64`
    |
 help: change the type of the numeric literal from `i64` to `f64`
    |
@@ -1289,7 +1289,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:260:16
    |
 LL |     foo::<f64>(42_i32);
-   |                ^^^^^^ expected f64, found i32
+   |                ^^^^^^ expected `f64`, found `i32`
    |
 help: you can convert an `i32` to `f64`, producing the floating point representation of the integer
    |
@@ -1300,7 +1300,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:262:16
    |
 LL |     foo::<f64>(42_i16);
-   |                ^^^^^^ expected f64, found i16
+   |                ^^^^^^ expected `f64`, found `i16`
    |
 help: you can convert an `i16` to `f64`, producing the floating point representation of the integer
    |
@@ -1311,7 +1311,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:264:16
    |
 LL |     foo::<f64>(42_i8);
-   |                ^^^^^ expected f64, found i8
+   |                ^^^^^ expected `f64`, found `i8`
    |
 help: you can convert an `i8` to `f64`, producing the floating point representation of the integer
    |
@@ -1322,7 +1322,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:267:16
    |
 LL |     foo::<f64>(42.0_f32);
-   |                ^^^^^^^^ expected f64, found f32
+   |                ^^^^^^^^ expected `f64`, found `f32`
    |
 help: change the type of the numeric literal from `f32` to `f64`
    |
@@ -1333,7 +1333,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:270:16
    |
 LL |     foo::<f32>(42_usize);
-   |                ^^^^^^^^ expected f32, found usize
+   |                ^^^^^^^^ expected `f32`, found `usize`
    |
 help: change the type of the numeric literal from `usize` to `f32`
    |
@@ -1344,7 +1344,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:272:16
    |
 LL |     foo::<f32>(42_u64);
-   |                ^^^^^^ expected f32, found u64
+   |                ^^^^^^ expected `f32`, found `u64`
    |
 help: change the type of the numeric literal from `u64` to `f32`
    |
@@ -1355,7 +1355,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:274:16
    |
 LL |     foo::<f32>(42_u32);
-   |                ^^^^^^ expected f32, found u32
+   |                ^^^^^^ expected `f32`, found `u32`
    |
 help: change the type of the numeric literal from `u32` to `f32`
    |
@@ -1366,7 +1366,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:276:16
    |
 LL |     foo::<f32>(42_u16);
-   |                ^^^^^^ expected f32, found u16
+   |                ^^^^^^ expected `f32`, found `u16`
    |
 help: you can convert an `u16` to `f32`, producing the floating point representation of the integer
    |
@@ -1377,7 +1377,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:278:16
    |
 LL |     foo::<f32>(42_u8);
-   |                ^^^^^ expected f32, found u8
+   |                ^^^^^ expected `f32`, found `u8`
    |
 help: you can convert an `u8` to `f32`, producing the floating point representation of the integer
    |
@@ -1388,7 +1388,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:280:16
    |
 LL |     foo::<f32>(42_isize);
-   |                ^^^^^^^^ expected f32, found isize
+   |                ^^^^^^^^ expected `f32`, found `isize`
    |
 help: change the type of the numeric literal from `isize` to `f32`
    |
@@ -1399,7 +1399,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:282:16
    |
 LL |     foo::<f32>(42_i64);
-   |                ^^^^^^ expected f32, found i64
+   |                ^^^^^^ expected `f32`, found `i64`
    |
 help: change the type of the numeric literal from `i64` to `f32`
    |
@@ -1410,7 +1410,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:284:16
    |
 LL |     foo::<f32>(42_i32);
-   |                ^^^^^^ expected f32, found i32
+   |                ^^^^^^ expected `f32`, found `i32`
    |
 help: change the type of the numeric literal from `i32` to `f32`
    |
@@ -1421,7 +1421,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:286:16
    |
 LL |     foo::<f32>(42_i16);
-   |                ^^^^^^ expected f32, found i16
+   |                ^^^^^^ expected `f32`, found `i16`
    |
 help: you can convert an `i16` to `f32`, producing the floating point representation of the integer
    |
@@ -1432,7 +1432,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:288:16
    |
 LL |     foo::<f32>(42_i8);
-   |                ^^^^^ expected f32, found i8
+   |                ^^^^^ expected `f32`, found `i8`
    |
 help: you can convert an `i8` to `f32`, producing the floating point representation of the integer
    |
@@ -1443,7 +1443,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-suffix.rs:290:16
    |
 LL |     foo::<f32>(42.0_f64);
-   |                ^^^^^^^^ expected f32, found f64
+   |                ^^^^^^^^ expected `f32`, found `f64`
    |
 help: change the type of the numeric literal from `f64` to `f32`
    |
@@ -1456,7 +1456,7 @@ error[E0308]: mismatched types
 LL |     foo::<u32>(42_u8 as u16);
    |                ^^^^^^^^^^^^
    |                |
-   |                expected u32, found u16
+   |                expected `u32`, found `u16`
    |                help: you can convert an `u16` to `u32`: `(42_u8 as u16).into()`
 
 error[E0308]: mismatched types
@@ -1465,7 +1465,7 @@ error[E0308]: mismatched types
 LL |     foo::<i32>(-42_i8);
    |                ^^^^^^
    |                |
-   |                expected i32, found i8
+   |                expected `i32`, found `i8`
    |                help: you can convert an `i8` to `i32`: `(-42_i8).into()`
 
 error: aborting due to 134 previous errors
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr
index 99f0ce0602b..86ec58d3f06 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr
+++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-box-error.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     ss.t = t;
    |            ^ lifetime mismatch
    |
-   = note: expected type `&'a std::boxed::Box<(dyn Test + 'static)>`
-              found type `&'a std::boxed::Box<(dyn Test + 'a)>`
+   = note: expected reference `&'a std::boxed::Box<(dyn Test + 'static)>`
+              found reference `&'a std::boxed::Box<(dyn Test + 'a)>`
 note: the lifetime `'a` as defined on the function body at 14:6...
   --> $DIR/object-lifetime-default-from-rptr-box-error.rs:14:6
    |
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr
index 07d4d8c8ed4..65f8a32f06d 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr
+++ b/src/test/ui/object-lifetime/object-lifetime-default-from-rptr-struct-error.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     ss.t = t;
    |            ^ lifetime mismatch
    |
-   = note: expected type `&'a MyBox<(dyn Test + 'static)>`
-              found type `&'a MyBox<(dyn Test + 'a)>`
+   = note: expected reference `&'a MyBox<(dyn Test + 'static)>`
+              found reference `&'a MyBox<(dyn Test + 'a)>`
 note: the lifetime `'a` as defined on the function body at 20:6...
   --> $DIR/object-lifetime-default-from-rptr-struct-error.rs:20:6
    |
diff --git a/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr b/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr
index 89579fb1df3..404717ff55e 100644
--- a/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr
+++ b/src/test/ui/object-lifetime/object-lifetime-default-mybox.stderr
@@ -16,8 +16,8 @@ error[E0308]: mismatched types
 LL |     load0(ss)
    |           ^^ lifetime mismatch
    |
-   = note: expected type `&MyBox<(dyn SomeTrait + 'static)>`
-              found type `&MyBox<(dyn SomeTrait + 'a)>`
+   = note: expected reference `&MyBox<(dyn SomeTrait + 'static)>`
+              found reference `&MyBox<(dyn SomeTrait + 'a)>`
 note: the lifetime `'a` as defined on the function body at 30:10...
   --> $DIR/object-lifetime-default-mybox.rs:30:10
    |
diff --git a/src/test/ui/or-patterns/consistent-bindings.stderr b/src/test/ui/or-patterns/consistent-bindings.stderr
index 7f5e670c257..433a02dfb31 100644
--- a/src/test/ui/or-patterns/consistent-bindings.stderr
+++ b/src/test/ui/or-patterns/consistent-bindings.stderr
@@ -10,10 +10,7 @@ error[E0308]: mismatched types
   --> $DIR/consistent-bindings.rs:44:9
    |
 LL |     let () = 0;
-   |         ^^ expected integer, found ()
-   |
-   = note: expected type `{integer}`
-              found type `()`
+   |         ^^ expected integer, found `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/or-patterns/issue-64879-trailing-before-guard.stderr b/src/test/ui/or-patterns/issue-64879-trailing-before-guard.stderr
index db6670fc5b1..94435f2118b 100644
--- a/src/test/ui/or-patterns/issue-64879-trailing-before-guard.stderr
+++ b/src/test/ui/or-patterns/issue-64879-trailing-before-guard.stderr
@@ -10,10 +10,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-64879-trailing-before-guard.rs:12:42
    |
 LL |             let recovery_witness: bool = 0;
-   |                                          ^ expected bool, found integer
-   |
-   = note: expected type `bool`
-              found type `{integer}`
+   |                                          ^ expected `bool`, found integer
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/or-patterns/or-pattern-mismatch.stderr b/src/test/ui/or-patterns/or-pattern-mismatch.stderr
index 731b2090a7b..253f3ef7725 100644
--- a/src/test/ui/or-patterns/or-pattern-mismatch.stderr
+++ b/src/test/ui/or-patterns/or-pattern-mismatch.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/or-pattern-mismatch.rs:3:68
    |
 LL | fn main() { match Blah::A(1, 1, 2) { Blah::A(_, x, y) | Blah::B(x, y) => { } } }
-   |                                                                    ^ expected usize, found isize
-   |
-   = note: expected type `usize`
-              found type `isize`
+   |                                                                    ^ expected `usize`, found `isize`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/or-patterns/or-patterns-syntactic-fail.stderr b/src/test/ui/or-patterns/or-patterns-syntactic-fail.stderr
index 6d08b47c058..7e4cf0d14e1 100644
--- a/src/test/ui/or-patterns/or-patterns-syntactic-fail.stderr
+++ b/src/test/ui/or-patterns/or-patterns-syntactic-fail.stderr
@@ -122,9 +122,6 @@ LL |     let recovery_witness: String = 0;
    |                                    |
    |                                    expected struct `std::string::String`, found integer
    |                                    help: try using a conversion method: `0.to_string()`
-   |
-   = note: expected type `std::string::String`
-              found type `{integer}`
 
 error: aborting due to 16 previous errors
 
diff --git a/src/test/ui/output-type-mismatch.stderr b/src/test/ui/output-type-mismatch.stderr
index 449d3120571..533bd87c9cc 100644
--- a/src/test/ui/output-type-mismatch.stderr
+++ b/src/test/ui/output-type-mismatch.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/output-type-mismatch.rs:5:31
    |
 LL | fn main() { let i: isize; i = f(); }
-   |                               ^^^ expected isize, found ()
-   |
-   = note: expected type `isize`
-              found type `()`
+   |                               ^^^ expected `isize`, found `()`
 
 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..4d93e130901 100644
--- a/src/test/ui/parser/expr-as-stmt.stderr
+++ b/src/test/ui/parser/expr-as-stmt.stderr
@@ -47,37 +47,25 @@ error[E0308]: mismatched types
   --> $DIR/expr-as-stmt.rs:7:6
    |
 LL |     {2} + {2}
-   |      ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |      ^ expected `()`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/expr-as-stmt.rs:12:6
    |
 LL |     {2} + 2
-   |      ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |      ^ expected `()`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/expr-as-stmt.rs:18:7
    |
 LL |     { 42 } + foo;
-   |       ^^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |       ^^ expected `()`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/expr-as-stmt.rs:24:7
    |
 LL |     { 3 } * 3
-   |       ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |       ^ expected `()`, found integer
 
 error[E0614]: type `{integer}` cannot be dereferenced
   --> $DIR/expr-as-stmt.rs:24:11
diff --git a/src/test/ui/parser/fn-arg-doc-comment.rs b/src/test/ui/parser/fn-arg-doc-comment.rs
index 995eb62d0bb..2d1554183cc 100644
--- a/src/test/ui/parser/fn-arg-doc-comment.rs
+++ b/src/test/ui/parser/fn-arg-doc-comment.rs
@@ -17,13 +17,10 @@ fn main() {
     // verify that the parser recovered and properly typechecked the args
     f("", "");
     //~^ ERROR mismatched types
-    //~| NOTE expected u8, found reference
-    //~| NOTE expected
+    //~| NOTE expected `u8`, found `&str`
     //~| ERROR mismatched types
-    //~| NOTE expected u8, found reference
-    //~| NOTE expected
+    //~| NOTE expected `u8`, found `&str`
     bar("");
     //~^ ERROR mismatched types
-    //~| NOTE expected i32, found reference
-    //~| NOTE expected
+    //~| NOTE expected `i32`, found `&str`
 }
diff --git a/src/test/ui/parser/fn-arg-doc-comment.stderr b/src/test/ui/parser/fn-arg-doc-comment.stderr
index 669785af45f..41f2c080b94 100644
--- a/src/test/ui/parser/fn-arg-doc-comment.stderr
+++ b/src/test/ui/parser/fn-arg-doc-comment.stderr
@@ -20,28 +20,19 @@ error[E0308]: mismatched types
   --> $DIR/fn-arg-doc-comment.rs:18:7
    |
 LL |     f("", "");
-   |       ^^ expected u8, found reference
-   |
-   = note: expected type `u8`
-              found type `&'static str`
+   |       ^^ expected `u8`, found `&str`
 
 error[E0308]: mismatched types
   --> $DIR/fn-arg-doc-comment.rs:18:11
    |
 LL |     f("", "");
-   |           ^^ expected u8, found reference
-   |
-   = note: expected type `u8`
-              found type `&'static str`
+   |           ^^ expected `u8`, found `&str`
 
 error[E0308]: mismatched types
-  --> $DIR/fn-arg-doc-comment.rs:25:9
+  --> $DIR/fn-arg-doc-comment.rs:23:9
    |
 LL |     bar("");
-   |         ^^ expected i32, found reference
-   |
-   = note: expected type `i32`
-              found type `&'static str`
+   |         ^^ expected `i32`, found `&str`
 
 error: aborting due to 6 previous errors
 
diff --git a/src/test/ui/parser/issue-33413.stderr b/src/test/ui/parser/issue-33413.stderr
index 7e5c348e36c..ac320f095a2 100644
--- a/src/test/ui/parser/issue-33413.stderr
+++ b/src/test/ui/parser/issue-33413.stderr
@@ -8,12 +8,9 @@ error[E0308]: mismatched types
   --> $DIR/issue-33413.rs:4:23
    |
 LL |     fn f(*, a: u8) -> u8 {}
-   |        -              ^^ expected u8, found ()
+   |        -              ^^ expected `u8`, found `()`
    |        |
    |        implicitly returns `()` as its body has no tail or `return` expression
-   |
-   = note: expected type `u8`
-              found 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..fdf772fcbdb 100644
--- a/src/test/ui/parser/issue-62881.stderr
+++ b/src/test/ui/parser/issue-62881.stderr
@@ -17,12 +17,9 @@ error[E0308]: mismatched types
   --> $DIR/issue-62881.rs:3:29
    |
 LL | fn f() -> isize { fn f() -> isize {} pub f<
-   |                      -      ^^^^^ expected isize, found ()
+   |                      -      ^^^^^ expected `isize`, found `()`
    |                      |
    |                      implicitly returns `()` as its body has no tail or `return` expression
-   |
-   = note: expected type `isize`
-              found 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..ed4d2340fc5 100644
--- a/src/test/ui/parser/issue-62895.stderr
+++ b/src/test/ui/parser/issue-62895.stderr
@@ -37,12 +37,9 @@ error[E0308]: mismatched types
   --> $DIR/issue-62895.rs:3:11
    |
 LL | fn v() -> isize {
-   |    -      ^^^^^ expected isize, found ()
+   |    -      ^^^^^ expected `isize`, found `()`
    |    |
    |    implicitly returns `()` as its body has no tail or `return` expression
-   |
-   = note: expected type `isize`
-              found type `()`
 
 error: aborting due to 6 previous errors
 
diff --git a/src/test/ui/parser/lex-bad-char-literals-6.stderr b/src/test/ui/parser/lex-bad-char-literals-6.stderr
index 662cf2657e7..8f304bdf713 100644
--- a/src/test/ui/parser/lex-bad-char-literals-6.stderr
+++ b/src/test/ui/parser/lex-bad-char-literals-6.stderr
@@ -43,10 +43,7 @@ error[E0308]: mismatched types
   --> $DIR/lex-bad-char-literals-6.rs:15:20
    |
 LL |     let a: usize = "";
-   |                    ^^ expected usize, found reference
-   |
-   = note: expected type `usize`
-              found type `&'static str`
+   |                    ^^ expected `usize`, found `&str`
 
 error[E0277]: can't compare `&str` with `char`
   --> $DIR/lex-bad-char-literals-6.rs:12:10
diff --git a/src/test/ui/parser/match-vec-invalid.stderr b/src/test/ui/parser/match-vec-invalid.stderr
index 0956ac21b7f..58343e86d7b 100644
--- a/src/test/ui/parser/match-vec-invalid.stderr
+++ b/src/test/ui/parser/match-vec-invalid.stderr
@@ -34,10 +34,7 @@ error[E0308]: mismatched types
   --> $DIR/match-vec-invalid.rs:13:30
    |
 LL | const RECOVERY_WITNESS: () = 0;
-   |                              ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |                              ^ expected `()`, found integer
 
 error: aborting due to 5 previous errors
 
diff --git a/src/test/ui/parser/numeric-lifetime.stderr b/src/test/ui/parser/numeric-lifetime.stderr
index 4018b24aac1..d9585e7cbf2 100644
--- a/src/test/ui/parser/numeric-lifetime.stderr
+++ b/src/test/ui/parser/numeric-lifetime.stderr
@@ -14,10 +14,7 @@ error[E0308]: mismatched types
   --> $DIR/numeric-lifetime.rs:6:20
    |
 LL |     let x: usize = "";
-   |                    ^^ expected usize, found reference
-   |
-   = note: expected type `usize`
-              found type `&'static str`
+   |                    ^^ expected `usize`, found `&str`
 
 error: aborting due to 3 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..cb8bf62a8fe 100644
--- a/src/test/ui/parser/pat-lt-bracket-6.stderr
+++ b/src/test/ui/parser/pat-lt-bracket-6.stderr
@@ -17,10 +17,7 @@ error[E0308]: mismatched types
   --> $DIR/pat-lt-bracket-6.rs:10:30
    |
 LL | const RECOVERY_WITNESS: () = 0;
-   |                              ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |                              ^ expected `()`, found 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..aa115659d47 100644
--- a/src/test/ui/parser/pat-lt-bracket-7.stderr
+++ b/src/test/ui/parser/pat-lt-bracket-7.stderr
@@ -8,10 +8,7 @@ error[E0308]: mismatched types
   --> $DIR/pat-lt-bracket-7.rs:9:30
    |
 LL | const RECOVERY_WITNESS: () = 0;
-   |                              ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |                              ^ expected `()`, found 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..6c64290e144 100644
--- a/src/test/ui/parser/pat-tuple-4.stderr
+++ b/src/test/ui/parser/pat-tuple-4.stderr
@@ -17,10 +17,7 @@ error[E0308]: mismatched types
   --> $DIR/pat-tuple-4.rs:11:30
    |
 LL | const RECOVERY_WITNESS: () = 0;
-   |                              ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |                              ^ expected `()`, found integer
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/parser/pat-tuple-5.stderr b/src/test/ui/parser/pat-tuple-5.stderr
index 09ebdc29a21..3579a2c4e09 100644
--- a/src/test/ui/parser/pat-tuple-5.stderr
+++ b/src/test/ui/parser/pat-tuple-5.stderr
@@ -19,10 +19,10 @@ error[E0308]: mismatched types
 LL |     match (0, 1) {
    |           ------ this match expression has type `({integer}, {integer})`
 LL |         (PAT ..) => {}
-   |          ^^^^^^ expected tuple, found u8
+   |          ^^^^^^ expected tuple, found `u8`
    |
-   = note: expected type `({integer}, {integer})`
-              found type `u8`
+   = note: expected tuple `({integer}, {integer})`
+               found type `u8`
 
 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..e97cf544ac2 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
@@ -17,10 +17,7 @@ error[E0308]: mismatched types
   --> $DIR/recover-for-loop-parens-around-head.rs:13:38
    |
 LL |         const RECOVERY_WITNESS: () = 0;
-   |                                      ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |                                      ^ expected `()`, found 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..51a7c8e0802 100644
--- a/src/test/ui/parser/recover-from-homoglyph.stderr
+++ b/src/test/ui/parser/recover-from-homoglyph.stderr
@@ -13,10 +13,7 @@ error[E0308]: mismatched types
   --> $DIR/recover-from-homoglyph.rs:3:20
    |
 LL |     let x: usize = ();
-   |                    ^^ expected usize, found ()
-   |
-   = note: expected type `usize`
-              found type `()`
+   |                    ^^ expected `usize`, found `()`
 
 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..b824f92dfaa 100644
--- a/src/test/ui/parser/recover-missing-semi.stderr
+++ b/src/test/ui/parser/recover-missing-semi.stderr
@@ -20,19 +20,13 @@ error[E0308]: mismatched types
   --> $DIR/recover-missing-semi.rs:2:20
    |
 LL |     let _: usize = ()
-   |                    ^^ expected usize, found ()
-   |
-   = note: expected type `usize`
-              found type `()`
+   |                    ^^ expected `usize`, found `()`
 
 error[E0308]: mismatched types
   --> $DIR/recover-missing-semi.rs:9:20
    |
 LL |     let _: usize = ()
-   |                    ^^ expected usize, found ()
-   |
-   = note: expected type `usize`
-              found type `()`
+   |                    ^^ expected `usize`, found `()`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/parser/recover-range-pats.stderr b/src/test/ui/parser/recover-range-pats.stderr
index 160ab18e34a..af03b577548 100644
--- a/src/test/ui/parser/recover-range-pats.stderr
+++ b/src/test/ui/parser/recover-range-pats.stderr
@@ -418,18 +418,12 @@ error[E0308]: mismatched types
    |
 LL |     if let .0..Y = 0 {}
    |            ^^^^^ expected integer, found floating-point number
-   |
-   = note: expected type `{integer}`
-              found type `{float}`
 
 error[E0308]: mismatched types
   --> $DIR/recover-range-pats.rs:23:12
    |
 LL |     if let X.. .0 = 0 {}
    |            ^^^^^^ expected integer, found floating-point number
-   |
-   = note: expected type `u8`
-              found type `{float}`
 
 error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:32:12
@@ -452,18 +446,12 @@ error[E0308]: mismatched types
    |
 LL |     if let .0..=Y = 0 {}
    |            ^^^^^^ expected integer, found floating-point number
-   |
-   = note: expected type `{integer}`
-              found type `{float}`
 
 error[E0308]: mismatched types
   --> $DIR/recover-range-pats.rs:36:12
    |
 LL |     if let X..=.0 = 0 {}
    |            ^^^^^^ expected integer, found floating-point number
-   |
-   = note: expected type `u8`
-              found type `{float}`
 
 error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:45:12
@@ -486,18 +474,12 @@ error[E0308]: mismatched types
    |
 LL |     if let .0...Y = 0 {}
    |            ^^^^^^ expected integer, found floating-point number
-   |
-   = note: expected type `{integer}`
-              found type `{float}`
 
 error[E0308]: mismatched types
   --> $DIR/recover-range-pats.rs:52:12
    |
 LL |     if let X... .0 = 0 {}
    |            ^^^^^^^ expected integer, found floating-point number
-   |
-   = note: expected type `u8`
-              found type `{float}`
 
 error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:60:12
@@ -510,9 +492,6 @@ error[E0308]: mismatched types
    |
 LL |     if let .0.. = 0 {}
    |            ^^^^ expected integer, found floating-point number
-   |
-   = note: expected type `{integer}`
-              found type `{float}`
 
 error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:70:12
@@ -525,9 +504,6 @@ error[E0308]: mismatched types
    |
 LL |     if let .0..= = 0 {}
    |            ^^^^^ expected integer, found floating-point number
-   |
-   = note: expected type `{integer}`
-              found type `{float}`
 
 error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:82:12
@@ -540,9 +516,6 @@ error[E0308]: mismatched types
    |
 LL |     if let .0... = 0 {}
    |            ^^^^^ expected integer, found floating-point number
-   |
-   = note: expected type `{integer}`
-              found type `{float}`
 
 error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:94:14
@@ -555,9 +528,6 @@ error[E0308]: mismatched types
    |
 LL |     if let .. .0 = 0 {}
    |            ^^^^^ expected integer, found floating-point number
-   |
-   = note: expected type `{integer}`
-              found type `{float}`
 
 error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:104:15
@@ -570,9 +540,6 @@ error[E0308]: mismatched types
    |
 LL |     if let ..=.0 = 0 {}
    |            ^^^^^ expected integer, found floating-point number
-   |
-   = note: expected type `{integer}`
-              found type `{float}`
 
 error[E0029]: only char and numeric types are allowed in range patterns
   --> $DIR/recover-range-pats.rs:116:15
@@ -585,9 +552,6 @@ error[E0308]: mismatched types
    |
 LL |     if let ....3 = 0 {}
    |            ^^^^^ expected integer, found floating-point number
-   |
-   = note: expected type `{integer}`
-              found type `{float}`
 
 error: aborting due to 85 previous errors
 
diff --git a/src/test/ui/parser/recover-tuple.stderr b/src/test/ui/parser/recover-tuple.stderr
index 4252fc1fd1e..e6e094dc2e3 100644
--- a/src/test/ui/parser/recover-tuple.stderr
+++ b/src/test/ui/parser/recover-tuple.stderr
@@ -8,10 +8,7 @@ error[E0308]: mismatched types
   --> $DIR/recover-tuple.rs:6:20
    |
 LL |     let y: usize = "";
-   |                    ^^ expected usize, found reference
-   |
-   = note: expected type `usize`
-              found type `&'static str`
+   |                    ^^ expected `usize`, found `&str`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/parser/require-parens-for-chained-comparison.stderr b/src/test/ui/parser/require-parens-for-chained-comparison.stderr
index 85478dcd1dc..bece9a38800 100644
--- a/src/test/ui/parser/require-parens-for-chained-comparison.stderr
+++ b/src/test/ui/parser/require-parens-for-chained-comparison.stderr
@@ -45,19 +45,13 @@ error[E0308]: mismatched types
   --> $DIR/require-parens-for-chained-comparison.rs:8:14
    |
 LL |     false == 0 < 2;
-   |              ^ expected bool, found integer
-   |
-   = note: expected type `bool`
-              found type `{integer}`
+   |              ^ expected `bool`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/require-parens-for-chained-comparison.rs:8:18
    |
 LL |     false == 0 < 2;
-   |                  ^ expected bool, found integer
-   |
-   = note: expected type `bool`
-              found type `{integer}`
+   |                  ^ expected `bool`, found integer
 
 error: aborting due to 7 previous errors
 
diff --git a/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr b/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr
index 38f4a986e12..d12ea0b2fcb 100644
--- a/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr
+++ b/src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr
@@ -21,10 +21,10 @@ LL |       while || Foo {
    |  ___________^
 LL | |         x: 3
 LL | |     }.hi() {
-   | |__________^ expected bool, found closure
+   | |__________^ expected `bool`, found closure
    |
    = note: expected type `bool`
-              found type `[closure@$DIR/struct-literal-restrictions-in-lamda.rs:12:11: 14:11]`
+           found closure `[closure@$DIR/struct-literal-restrictions-in-lamda.rs:12:11: 14:11]`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/parser/unclosed-delimiter-in-dep.stderr b/src/test/ui/parser/unclosed-delimiter-in-dep.stderr
index 818f61b4d22..426748b5086 100644
--- a/src/test/ui/parser/unclosed-delimiter-in-dep.stderr
+++ b/src/test/ui/parser/unclosed-delimiter-in-dep.stderr
@@ -13,10 +13,10 @@ error[E0308]: mismatched types
   --> $DIR/unclosed-delimiter-in-dep.rs:4:20
    |
 LL |     let _: usize = unclosed_delim_mod::new();
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^ expected usize, found enum `std::result::Result`
+   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found enum `std::result::Result`
    |
    = note: expected type `usize`
-              found type `std::result::Result<unclosed_delim_mod::Value, ()>`
+              found enum `std::result::Result<unclosed_delim_mod::Value, ()>`
 
 error: aborting due to 2 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..95cca38f7de 100644
--- a/src/test/ui/pattern/pat-tuple-bad-type.stderr
+++ b/src/test/ui/pattern/pat-tuple-bad-type.stderr
@@ -13,10 +13,7 @@ error[E0308]: mismatched types
   --> $DIR/pat-tuple-bad-type.rs:10:9
    |
 LL |         (..) => {}
-   |         ^^^^ expected u8, found ()
-   |
-   = note: expected type `u8`
-              found type `()`
+   |         ^^^^ expected `u8`, found `()`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/pattern/pat-tuple-overfield.stderr b/src/test/ui/pattern/pat-tuple-overfield.stderr
index e64b6efb08d..25d02b8627c 100644
--- a/src/test/ui/pattern/pat-tuple-overfield.stderr
+++ b/src/test/ui/pattern/pat-tuple-overfield.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |         (1, 2, 3, 4) => {}
    |         ^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 4 elements
    |
-   = note: expected type `({integer}, {integer}, {integer})`
-              found type `(_, _, _, _)`
+   = note: expected tuple `({integer}, {integer}, {integer})`
+              found tuple `(_, _, _, _)`
 
 error[E0308]: mismatched types
   --> $DIR/pat-tuple-overfield.rs:6:9
@@ -13,8 +13,8 @@ error[E0308]: mismatched types
 LL |         (1, 2, .., 3, 4) => {}
    |         ^^^^^^^^^^^^^^^^ expected a tuple with 3 elements, found one with 4 elements
    |
-   = note: expected type `({integer}, {integer}, {integer})`
-              found type `(_, _, _, _)`
+   = note: expected tuple `({integer}, {integer}, {integer})`
+              found tuple `(_, _, _, _)`
 
 error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
   --> $DIR/pat-tuple-overfield.rs:10:9
diff --git a/src/test/ui/pattern/pattern-error-continue.rs b/src/test/ui/pattern/pattern-error-continue.rs
index 79cc4b552a7..8635622ab37 100644
--- a/src/test/ui/pattern/pattern-error-continue.rs
+++ b/src/test/ui/pattern/pattern-error-continue.rs
@@ -21,15 +21,13 @@ fn main() {
     match 'c' {
         S { .. } => (),
         //~^ ERROR mismatched types
-        //~| expected type `char`
-        //~| found type `S`
-        //~| expected char, found struct `S`
+        //~| expected `char`, found struct `S`
 
         _ => ()
     }
     f(true);
     //~^ ERROR mismatched types
-    //~| expected char, found bool
+    //~| expected `char`, found `bool`
 
     match () {
         E::V => {} //~ ERROR failed to resolve: use of undeclared type or module `E`
diff --git a/src/test/ui/pattern/pattern-error-continue.stderr b/src/test/ui/pattern/pattern-error-continue.stderr
index 5a7dab30d83..2f9fe1981bc 100644
--- a/src/test/ui/pattern/pattern-error-continue.stderr
+++ b/src/test/ui/pattern/pattern-error-continue.stderr
@@ -1,5 +1,5 @@
 error[E0433]: failed to resolve: use of undeclared type or module `E`
-  --> $DIR/pattern-error-continue.rs:35:9
+  --> $DIR/pattern-error-continue.rs:33:9
    |
 LL |         E::V => {}
    |         ^ use of undeclared type or module `E`
@@ -30,16 +30,13 @@ error[E0308]: mismatched types
 LL |     match 'c' {
    |           --- this match expression has type `char`
 LL |         S { .. } => (),
-   |         ^^^^^^^^ expected char, found struct `S`
-   |
-   = note: expected type `char`
-              found type `S`
+   |         ^^^^^^^^ expected `char`, found struct `S`
 
 error[E0308]: mismatched types
-  --> $DIR/pattern-error-continue.rs:30:7
+  --> $DIR/pattern-error-continue.rs:28:7
    |
 LL |     f(true);
-   |       ^^^^ expected char, found bool
+   |       ^^^^ expected `char`, found `bool`
 
 error: aborting due to 5 previous errors
 
diff --git a/src/test/ui/pattern/pattern-ident-path-generics.stderr b/src/test/ui/pattern/pattern-ident-path-generics.stderr
index bfc10c5f866..338eb6ff0c8 100644
--- a/src/test/ui/pattern/pattern-ident-path-generics.stderr
+++ b/src/test/ui/pattern/pattern-ident-path-generics.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/pattern-ident-path-generics.rs:3:9
    |
 LL |         None::<isize> => {}
-   |         ^^^^^^^^^^^^^ expected &str, found isize
+   |         ^^^^^^^^^^^^^ expected `&str`, found `isize`
    |
-   = note: expected type `std::option::Option<&str>`
-              found type `std::option::Option<isize>`
+   = note: expected enum `std::option::Option<&str>`
+              found enum `std::option::Option<isize>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/pattern/pattern-tyvar.stderr b/src/test/ui/pattern/pattern-tyvar.stderr
index 54834703467..b2afeacdf68 100644
--- a/src/test/ui/pattern/pattern-tyvar.stderr
+++ b/src/test/ui/pattern/pattern-tyvar.stderr
@@ -4,10 +4,10 @@ error[E0308]: mismatched types
 LL |     match t {
    |           - this match expression has type `std::option::Option<std::vec::Vec<isize>>`
 LL |       Bar::T1(_, Some::<isize>(x)) => {
-   |                  ^^^^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found isize
+   |                  ^^^^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found `isize`
    |
-   = note: expected type `std::option::Option<std::vec::Vec<isize>>`
-              found type `std::option::Option<isize>`
+   = note: expected enum `std::option::Option<std::vec::Vec<isize>>`
+              found enum `std::option::Option<isize>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/point-to-type-err-cause-on-impl-trait-return-2.stderr b/src/test/ui/point-to-type-err-cause-on-impl-trait-return-2.stderr
index edaa60e5b8d..f5a5f1ab37a 100644
--- a/src/test/ui/point-to-type-err-cause-on-impl-trait-return-2.stderr
+++ b/src/test/ui/point-to-type-err-cause-on-impl-trait-return-2.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/point-to-type-err-cause-on-impl-trait-return-2.rs:9:41
    |
 LL |             let value: &bool = unsafe { &42 };
-   |                                         ^^^ expected bool, found integer
+   |                                         ^^^ expected `bool`, found integer
    |
-   = note: expected type `&bool`
-              found type `&{integer}`
+   = note: expected reference `&bool`
+              found reference `&{integer}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/point-to-type-err-cause-on-impl-trait-return.stderr b/src/test/ui/point-to-type-err-cause-on-impl-trait-return.stderr
index 314ff84ae3c..d5ea2ba39a9 100644
--- a/src/test/ui/point-to-type-err-cause-on-impl-trait-return.stderr
+++ b/src/test/ui/point-to-type-err-cause-on-impl-trait-return.stderr
@@ -8,10 +8,7 @@ LL |         return 0i32;
    |                ---- ...is found to be `i32` here
 LL |     }
 LL |     1u32
-   |     ^^^^ expected i32, found u32
-   |
-   = note: expected type `i32`
-              found type `u32`
+   |     ^^^^ expected `i32`, found `u32`
 
 error[E0308]: mismatched types
   --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:13:16
@@ -23,10 +20,7 @@ LL |         return 0i32;
    |                ---- ...is found to be `i32` here
 LL |     } else {
 LL |         return 1u32;
-   |                ^^^^ expected i32, found u32
-   |
-   = note: expected type `i32`
-              found type `u32`
+   |                ^^^^ expected `i32`, found `u32`
 
 error[E0308]: mismatched types
   --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:22:9
@@ -38,10 +32,7 @@ LL |         return 0i32;
    |                ---- ...is found to be `i32` here
 LL |     } else {
 LL |         1u32
-   |         ^^^^ expected i32, found u32
-   |
-   = note: expected type `i32`
-              found type `u32`
+   |         ^^^^ expected `i32`, found `u32`
 
 error[E0308]: if and else have incompatible types
   --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:31:9
@@ -51,13 +42,10 @@ LL | |         0i32
    | |         ---- expected because of this
 LL | |     } else {
 LL | |         1u32
-   | |         ^^^^ expected i32, found u32
+   | |         ^^^^ expected `i32`, found `u32`
 LL | |
 LL | |     }
    | |_____- if and else have incompatible types
-   |
-   = note: expected type `i32`
-              found type `u32`
 
 error[E0308]: mismatched types
   --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:39:14
@@ -68,10 +56,7 @@ LL |     match 13 {
 LL |         0 => return 0i32,
    |                     ---- ...is found to be `i32` here
 LL |         _ => 1u32,
-   |              ^^^^ expected i32, found u32
-   |
-   = note: expected type `i32`
-              found type `u32`
+   |              ^^^^ expected `i32`, found `u32`
 
 error[E0308]: mismatched types
   --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:45:5
@@ -85,10 +70,7 @@ LL | |         0 => return 0i32,
 LL | |         1 => 1u32,
 LL | |         _ => 2u32,
 LL | |     }
-   | |_____^ expected i32, found u32
-   |
-   = note: expected type `i32`
-              found type `u32`
+   | |_____^ expected `i32`, found `u32`
 
 error[E0308]: mismatched types
   --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:59:13
@@ -100,10 +82,7 @@ LL |             return 0i32;
    |                    ---- ...is found to be `i32` here
 ...
 LL |             1u32
-   |             ^^^^ expected i32, found u32
-   |
-   = note: expected type `i32`
-              found type `u32`
+   |             ^^^^ expected `i32`, found `u32`
 
 error: aborting due to 7 previous errors
 
diff --git a/src/test/ui/pptypedef.rs b/src/test/ui/pptypedef.rs
index 80ebf0242ec..e28d323f883 100644
--- a/src/test/ui/pptypedef.rs
+++ b/src/test/ui/pptypedef.rs
@@ -3,9 +3,9 @@ fn let_in<T, F>(x: T, f: F) where F: FnOnce(T) {}
 fn main() {
     let_in(3u32, |i| { assert!(i == 3i32); });
     //~^ ERROR mismatched types
-    //~| expected u32, found i32
+    //~| expected `u32`, found `i32`
 
     let_in(3i32, |i| { assert!(i == 3u32); });
     //~^ ERROR mismatched types
-    //~| expected i32, found u32
+    //~| expected `i32`, found `u32`
 }
diff --git a/src/test/ui/pptypedef.stderr b/src/test/ui/pptypedef.stderr
index 0886622247a..40155de9c77 100644
--- a/src/test/ui/pptypedef.stderr
+++ b/src/test/ui/pptypedef.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/pptypedef.rs:4:37
    |
 LL |     let_in(3u32, |i| { assert!(i == 3i32); });
-   |                                     ^^^^ expected u32, found i32
+   |                                     ^^^^ expected `u32`, found `i32`
    |
 help: change the type of the numeric literal from `i32` to `u32`
    |
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
   --> $DIR/pptypedef.rs:8:37
    |
 LL |     let_in(3i32, |i| { assert!(i == 3u32); });
-   |                                     ^^^^ expected i32, found u32
+   |                                     ^^^^ expected `i32`, found `u32`
    |
 help: change the type of the numeric literal from `u32` to `i32`
    |
diff --git a/src/test/ui/proc-macro/attribute-spans-preserved.stderr b/src/test/ui/proc-macro/attribute-spans-preserved.stderr
index 6c571dbdb47..d107697d2bf 100644
--- a/src/test/ui/proc-macro/attribute-spans-preserved.stderr
+++ b/src/test/ui/proc-macro/attribute-spans-preserved.stderr
@@ -2,19 +2,13 @@ error[E0308]: mismatched types
   --> $DIR/attribute-spans-preserved.rs:7:23
    |
 LL | #[ foo ( let y: u32 = "z"; ) ]
-   |                       ^^^ expected u32, found reference
-   |
-   = note: expected type `u32`
-              found type `&'static str`
+   |                       ^^^ expected `u32`, found `&str`
 
 error[E0308]: mismatched types
   --> $DIR/attribute-spans-preserved.rs:8:23
    |
 LL | #[ bar { let x: u32 = "y"; } ]
-   |                       ^^^ expected u32, found reference
-   |
-   = note: expected type `u32`
-              found type `&'static str`
+   |                       ^^^ expected `u32`, found `&str`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/proc-macro/attribute-with-error.stderr b/src/test/ui/proc-macro/attribute-with-error.stderr
index 937d47ff089..391a259c380 100644
--- a/src/test/ui/proc-macro/attribute-with-error.stderr
+++ b/src/test/ui/proc-macro/attribute-with-error.stderr
@@ -2,37 +2,25 @@ error[E0308]: mismatched types
   --> $DIR/attribute-with-error.rs:10:18
    |
 LL |     let a: i32 = "foo";
-   |                  ^^^^^ expected i32, found reference
-   |
-   = note: expected type `i32`
-              found type `&'static str`
+   |                  ^^^^^ expected `i32`, found `&str`
 
 error[E0308]: mismatched types
   --> $DIR/attribute-with-error.rs:12:18
    |
 LL |     let b: i32 = "f'oo";
-   |                  ^^^^^^ expected i32, found reference
-   |
-   = note: expected type `i32`
-              found type `&'static str`
+   |                  ^^^^^^ expected `i32`, found `&str`
 
 error[E0308]: mismatched types
   --> $DIR/attribute-with-error.rs:25:22
    |
 LL |         let a: i32 = "foo";
-   |                      ^^^^^ expected i32, found reference
-   |
-   = note: expected type `i32`
-              found type `&'static str`
+   |                      ^^^^^ expected `i32`, found `&str`
 
 error[E0308]: mismatched types
   --> $DIR/attribute-with-error.rs:35:22
    |
 LL |         let a: i32 = "foo";
-   |                      ^^^^^ expected i32, found reference
-   |
-   = note: expected type `i32`
-              found type `&'static str`
+   |                      ^^^^^ expected `i32`, found `&str`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/proc-macro/issue-37788.stderr b/src/test/ui/proc-macro/issue-37788.stderr
index 0727e8c8ed1..f2c833e69f9 100644
--- a/src/test/ui/proc-macro/issue-37788.stderr
+++ b/src/test/ui/proc-macro/issue-37788.stderr
@@ -7,10 +7,10 @@ LL |     // Test that constructing the `visible_parent_map` (in `cstore_impl.rs`
 LL |     std::cell::Cell::new(0)
    |     ^^^^^^^^^^^^^^^^^^^^^^^- help: try adding a semicolon: `;`
    |     |
-   |     expected (), found struct `std::cell::Cell`
+   |     expected `()`, found struct `std::cell::Cell`
    |
-   = note: expected type `()`
-              found type `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/macro-brackets.stderr b/src/test/ui/proc-macro/macro-brackets.stderr
index 7447b5c15ee..9aaf612eb54 100644
--- a/src/test/ui/proc-macro/macro-brackets.stderr
+++ b/src/test/ui/proc-macro/macro-brackets.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/macro-brackets.rs:11:21
    |
 LL | id![static X: u32 = 'a';];
-   |                     ^^^ expected u32, found char
+   |                     ^^^ expected `u32`, found `char`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/proc-macro/nested-item-spans.stderr b/src/test/ui/proc-macro/nested-item-spans.stderr
index bef80311f38..09e13c7014b 100644
--- a/src/test/ui/proc-macro/nested-item-spans.stderr
+++ b/src/test/ui/proc-macro/nested-item-spans.stderr
@@ -2,19 +2,13 @@ error[E0308]: mismatched types
   --> $DIR/nested-item-spans.rs:9:22
    |
 LL |         let x: u32 = "x";
-   |                      ^^^ expected u32, found reference
-   |
-   = note: expected type `u32`
-              found type `&'static str`
+   |                      ^^^ expected `u32`, found `&str`
 
 error[E0308]: mismatched types
   --> $DIR/nested-item-spans.rs:18:22
    |
 LL |         let x: u32 = "x";
-   |                      ^^^ expected u32, found reference
-   |
-   = note: expected type `u32`
-              found type `&'static str`
+   |                      ^^^ expected `u32`, found `&str`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/proc-macro/signature.stderr b/src/test/ui/proc-macro/signature.stderr
index 4743e3031a3..6ebc99601c4 100644
--- a/src/test/ui/proc-macro/signature.stderr
+++ b/src/test/ui/proc-macro/signature.stderr
@@ -7,8 +7,8 @@ LL | |     loop {}
 LL | | }
    | |_^ expected normal fn, found unsafe fn
    |
-   = note: expected type `fn(proc_macro::TokenStream) -> proc_macro::TokenStream`
-              found type `unsafe extern "C" fn(i32, u32) -> u32 {foo}`
+   = note: expected fn pointer `fn(proc_macro::TokenStream) -> proc_macro::TokenStream`
+                 found fn item `unsafe extern "C" fn(i32, u32) -> u32 {foo}`
 
 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 545c2fa5f40..c9783808177 100644
--- a/src/test/ui/proc-macro/span-preservation.stderr
+++ b/src/test/ui/proc-macro/span-preservation.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/span-preservation.rs:11:20
    |
 LL |     let x: usize = "hello";
-   |                    ^^^^^^^ expected usize, found reference
-   |
-   = note: expected type `usize`
-              found type `&'static str`
+   |                    ^^^^^^^ expected `usize`, found `&str`
 
 error[E0308]: mismatched types
   --> $DIR/span-preservation.rs:17:29
@@ -14,13 +11,13 @@ LL | fn b(x: Option<isize>) -> usize {
    |                           ----- expected `usize` because of return type
 LL |     match x {
 LL |         Some(x) => { return x },
-   |                             ^ expected usize, found isize
+   |                             ^ expected `usize`, found `isize`
 
 error[E0308]: mismatched types
   --> $DIR/span-preservation.rs:33:22
    |
 LL |     let x = Foo { a: 10isize };
-   |                      ^^^^^^^ expected usize, found isize
+   |                      ^^^^^^^ expected `usize`, found `isize`
 
 error[E0560]: struct `c::Foo` has no field named `b`
   --> $DIR/span-preservation.rs:34:26
@@ -36,10 +33,7 @@ error[E0308]: mismatched types
 LL | extern fn bar() {
    |                 - possibly return type missing here?
 LL |     0
-   |     ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |     ^ expected `()`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/span-preservation.rs:44:5
@@ -47,10 +41,7 @@ error[E0308]: mismatched types
 LL | extern "C" fn baz() {
    |                     - possibly return type missing here?
 LL |     0
-   |     ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |     ^ expected `()`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/span-preservation.rs:49:5
@@ -58,10 +49,7 @@ error[E0308]: mismatched types
 LL | extern "Rust" fn rust_abi() {
    |                             - possibly return type missing here?
 LL |     0
-   |     ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |     ^ expected `()`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/span-preservation.rs:54:5
@@ -69,10 +57,7 @@ error[E0308]: mismatched types
 LL | extern "\x43" fn c_abi_escaped() {
    |                                  - possibly return type missing here?
 LL |     0
-   |     ^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |     ^ expected `()`, found integer
 
 error: aborting due to 8 previous errors
 
diff --git a/src/test/ui/ptr-coercion.rs b/src/test/ui/ptr-coercion.rs
index d1ef88b50e3..193899034c7 100644
--- a/src/test/ui/ptr-coercion.rs
+++ b/src/test/ui/ptr-coercion.rs
@@ -5,19 +5,19 @@ pub fn main() {
     // *const -> *mut
     let x: *const isize = &42;
     let x: *mut isize = x; //~  ERROR mismatched types
-                           //~| expected type `*mut isize`
-                           //~| found type `*const isize`
+                           //~| expected raw pointer `*mut isize`
+                           //~| found raw pointer `*const isize`
                            //~| types differ in mutability
 
     // & -> *mut
     let x: *mut isize = &42; //~  ERROR mismatched types
-                             //~| expected type `*mut isize`
-                             //~| found type `&isize`
+                             //~| expected raw pointer `*mut isize`
+                             //~| found reference `&isize`
                              //~| types differ in mutability
 
     let x: *const isize = &42;
     let x: *mut isize = x; //~  ERROR mismatched types
-                           //~| expected type `*mut isize`
-                           //~| found type `*const isize`
+                           //~| expected raw pointer `*mut isize`
+                           //~| found raw pointer `*const isize`
                            //~| types differ in mutability
 }
diff --git a/src/test/ui/ptr-coercion.stderr b/src/test/ui/ptr-coercion.stderr
index 019241d6874..49dc4b36268 100644
--- a/src/test/ui/ptr-coercion.stderr
+++ b/src/test/ui/ptr-coercion.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let x: *mut isize = x;
    |                         ^ types differ in mutability
    |
-   = note: expected type `*mut isize`
-              found type `*const isize`
+   = note: expected raw pointer `*mut isize`
+              found raw pointer `*const isize`
 
 error[E0308]: mismatched types
   --> $DIR/ptr-coercion.rs:13:25
@@ -13,8 +13,8 @@ error[E0308]: mismatched types
 LL |     let x: *mut isize = &42;
    |                         ^^^ types differ in mutability
    |
-   = note: expected type `*mut isize`
-              found type `&isize`
+   = note: expected raw pointer `*mut isize`
+                found reference `&isize`
 
 error[E0308]: mismatched types
   --> $DIR/ptr-coercion.rs:19:25
@@ -22,8 +22,8 @@ error[E0308]: mismatched types
 LL |     let x: *mut isize = x;
    |                         ^ types differ in mutability
    |
-   = note: expected type `*mut isize`
-              found type `*const isize`
+   = note: expected raw pointer `*mut isize`
+              found raw pointer `*const isize`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/range/issue-54505-no-literals.stderr b/src/test/ui/range/issue-54505-no-literals.stderr
index b8811c98d21..c49093343c0 100644
--- a/src/test/ui/range/issue-54505-no-literals.stderr
+++ b/src/test/ui/range/issue-54505-no-literals.stderr
@@ -7,8 +7,8 @@ LL |     take_range(std::ops::Range { start: 0, end: 1 });
    |                expected reference, found struct `std::ops::Range`
    |                help: consider borrowing here: `&std::ops::Range { start: 0, end: 1 }`
    |
-   = note: expected type `&_`
-              found type `std::ops::Range<{integer}>`
+   = note: expected reference `&_`
+                 found struct `std::ops::Range<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:21:16
@@ -19,8 +19,8 @@ LL |     take_range(::std::ops::Range { start: 0, end: 1 });
    |                expected reference, found struct `std::ops::Range`
    |                help: consider borrowing here: `&::std::ops::Range { start: 0, end: 1 }`
    |
-   = note: expected type `&_`
-              found type `std::ops::Range<{integer}>`
+   = note: expected reference `&_`
+                 found struct `std::ops::Range<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:26:16
@@ -31,8 +31,8 @@ LL |     take_range(std::ops::RangeFrom { start: 1 });
    |                expected reference, found struct `std::ops::RangeFrom`
    |                help: consider borrowing here: `&std::ops::RangeFrom { start: 1 }`
    |
-   = note: expected type `&_`
-              found type `std::ops::RangeFrom<{integer}>`
+   = note: expected reference `&_`
+                 found struct `std::ops::RangeFrom<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:31:16
@@ -43,8 +43,8 @@ LL |     take_range(::std::ops::RangeFrom { start: 1 });
    |                expected reference, found struct `std::ops::RangeFrom`
    |                help: consider borrowing here: `&::std::ops::RangeFrom { start: 1 }`
    |
-   = note: expected type `&_`
-              found type `std::ops::RangeFrom<{integer}>`
+   = note: expected reference `&_`
+                 found struct `std::ops::RangeFrom<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:36:16
@@ -55,8 +55,8 @@ LL |     take_range(std::ops::RangeFull {});
    |                expected reference, found struct `std::ops::RangeFull`
    |                help: consider borrowing here: `&std::ops::RangeFull {}`
    |
-   = note: expected type `&_`
-              found type `std::ops::RangeFull`
+   = note: expected reference `&_`
+                 found struct `std::ops::RangeFull`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:41:16
@@ -67,8 +67,8 @@ LL |     take_range(::std::ops::RangeFull {});
    |                expected reference, found struct `std::ops::RangeFull`
    |                help: consider borrowing here: `&::std::ops::RangeFull {}`
    |
-   = note: expected type `&_`
-              found type `std::ops::RangeFull`
+   = note: expected reference `&_`
+                 found struct `std::ops::RangeFull`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:46:16
@@ -79,8 +79,8 @@ LL |     take_range(std::ops::RangeInclusive::new(0, 1));
    |                expected reference, found struct `std::ops::RangeInclusive`
    |                help: consider borrowing here: `&std::ops::RangeInclusive::new(0, 1)`
    |
-   = note: expected type `&_`
-              found type `std::ops::RangeInclusive<{integer}>`
+   = note: expected reference `&_`
+                 found struct `std::ops::RangeInclusive<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:51:16
@@ -91,8 +91,8 @@ LL |     take_range(::std::ops::RangeInclusive::new(0, 1));
    |                expected reference, found struct `std::ops::RangeInclusive`
    |                help: consider borrowing here: `&::std::ops::RangeInclusive::new(0, 1)`
    |
-   = note: expected type `&_`
-              found type `std::ops::RangeInclusive<{integer}>`
+   = note: expected reference `&_`
+                 found struct `std::ops::RangeInclusive<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:56:16
@@ -103,8 +103,8 @@ LL |     take_range(std::ops::RangeTo { end: 5 });
    |                expected reference, found struct `std::ops::RangeTo`
    |                help: consider borrowing here: `&std::ops::RangeTo { end: 5 }`
    |
-   = note: expected type `&_`
-              found type `std::ops::RangeTo<{integer}>`
+   = note: expected reference `&_`
+                 found struct `std::ops::RangeTo<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:61:16
@@ -115,8 +115,8 @@ LL |     take_range(::std::ops::RangeTo { end: 5 });
    |                expected reference, found struct `std::ops::RangeTo`
    |                help: consider borrowing here: `&::std::ops::RangeTo { end: 5 }`
    |
-   = note: expected type `&_`
-              found type `std::ops::RangeTo<{integer}>`
+   = note: expected reference `&_`
+                 found struct `std::ops::RangeTo<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:66:16
@@ -127,8 +127,8 @@ LL |     take_range(std::ops::RangeToInclusive { end: 5 });
    |                expected reference, found struct `std::ops::RangeToInclusive`
    |                help: consider borrowing here: `&std::ops::RangeToInclusive { end: 5 }`
    |
-   = note: expected type `&_`
-              found type `std::ops::RangeToInclusive<{integer}>`
+   = note: expected reference `&_`
+                 found struct `std::ops::RangeToInclusive<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:71:16
@@ -139,8 +139,8 @@ LL |     take_range(::std::ops::RangeToInclusive { end: 5 });
    |                expected reference, found struct `std::ops::RangeToInclusive`
    |                help: consider borrowing here: `&::std::ops::RangeToInclusive { end: 5 }`
    |
-   = note: expected type `&_`
-              found type `std::ops::RangeToInclusive<{integer}>`
+   = note: expected reference `&_`
+                 found struct `std::ops::RangeToInclusive<{integer}>`
 
 error: aborting due to 12 previous errors
 
diff --git a/src/test/ui/range/issue-54505-no-std.stderr b/src/test/ui/range/issue-54505-no-std.stderr
index 4922e59953c..aead80fa500 100644
--- a/src/test/ui/range/issue-54505-no-std.stderr
+++ b/src/test/ui/range/issue-54505-no-std.stderr
@@ -9,8 +9,8 @@ LL |     take_range(0..1);
    |                expected reference, found struct `core::ops::Range`
    |                help: consider borrowing here: `&(0..1)`
    |
-   = note: expected type `&_`
-              found type `core::ops::Range<{integer}>`
+   = note: expected reference `&_`
+                 found struct `core::ops::Range<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-std.rs:33:16
@@ -21,8 +21,8 @@ LL |     take_range(1..);
    |                expected reference, found struct `core::ops::RangeFrom`
    |                help: consider borrowing here: `&(1..)`
    |
-   = note: expected type `&_`
-              found type `core::ops::RangeFrom<{integer}>`
+   = note: expected reference `&_`
+                 found struct `core::ops::RangeFrom<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-std.rs:38:16
@@ -33,8 +33,8 @@ LL |     take_range(..);
    |                expected reference, found struct `core::ops::RangeFull`
    |                help: consider borrowing here: `&(..)`
    |
-   = note: expected type `&_`
-              found type `core::ops::RangeFull`
+   = note: expected reference `&_`
+                 found struct `core::ops::RangeFull`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-std.rs:43:16
@@ -45,8 +45,8 @@ LL |     take_range(0..=1);
    |                expected reference, found struct `core::ops::RangeInclusive`
    |                help: consider borrowing here: `&(0..=1)`
    |
-   = note: expected type `&_`
-              found type `core::ops::RangeInclusive<{integer}>`
+   = note: expected reference `&_`
+                 found struct `core::ops::RangeInclusive<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-std.rs:48:16
@@ -57,8 +57,8 @@ LL |     take_range(..5);
    |                expected reference, found struct `core::ops::RangeTo`
    |                help: consider borrowing here: `&(..5)`
    |
-   = note: expected type `&_`
-              found type `core::ops::RangeTo<{integer}>`
+   = note: expected reference `&_`
+                 found struct `core::ops::RangeTo<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-std.rs:53:16
@@ -69,8 +69,8 @@ LL |     take_range(..=42);
    |                expected reference, found struct `core::ops::RangeToInclusive`
    |                help: consider borrowing here: `&(..=42)`
    |
-   = note: expected type `&_`
-              found type `core::ops::RangeToInclusive<{integer}>`
+   = note: expected reference `&_`
+                 found struct `core::ops::RangeToInclusive<{integer}>`
 
 error: aborting due to 7 previous errors
 
diff --git a/src/test/ui/range/issue-54505.stderr b/src/test/ui/range/issue-54505.stderr
index d6e1fb0cef2..9949ff85671 100644
--- a/src/test/ui/range/issue-54505.stderr
+++ b/src/test/ui/range/issue-54505.stderr
@@ -7,8 +7,8 @@ LL |     take_range(0..1);
    |                expected reference, found struct `std::ops::Range`
    |                help: consider borrowing here: `&(0..1)`
    |
-   = note: expected type `&_`
-              found type `std::ops::Range<{integer}>`
+   = note: expected reference `&_`
+                 found struct `std::ops::Range<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505.rs:19:16
@@ -19,8 +19,8 @@ LL |     take_range(1..);
    |                expected reference, found struct `std::ops::RangeFrom`
    |                help: consider borrowing here: `&(1..)`
    |
-   = note: expected type `&_`
-              found type `std::ops::RangeFrom<{integer}>`
+   = note: expected reference `&_`
+                 found struct `std::ops::RangeFrom<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505.rs:24:16
@@ -31,8 +31,8 @@ LL |     take_range(..);
    |                expected reference, found struct `std::ops::RangeFull`
    |                help: consider borrowing here: `&(..)`
    |
-   = note: expected type `&_`
-              found type `std::ops::RangeFull`
+   = note: expected reference `&_`
+                 found struct `std::ops::RangeFull`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505.rs:29:16
@@ -43,8 +43,8 @@ LL |     take_range(0..=1);
    |                expected reference, found struct `std::ops::RangeInclusive`
    |                help: consider borrowing here: `&(0..=1)`
    |
-   = note: expected type `&_`
-              found type `std::ops::RangeInclusive<{integer}>`
+   = note: expected reference `&_`
+                 found struct `std::ops::RangeInclusive<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505.rs:34:16
@@ -55,8 +55,8 @@ LL |     take_range(..5);
    |                expected reference, found struct `std::ops::RangeTo`
    |                help: consider borrowing here: `&(..5)`
    |
-   = note: expected type `&_`
-              found type `std::ops::RangeTo<{integer}>`
+   = note: expected reference `&_`
+                 found struct `std::ops::RangeTo<{integer}>`
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505.rs:39:16
@@ -67,8 +67,8 @@ LL |     take_range(..=42);
    |                expected reference, found struct `std::ops::RangeToInclusive`
    |                help: consider borrowing here: `&(..=42)`
    |
-   = note: expected type `&_`
-              found type `std::ops::RangeToInclusive<{integer}>`
+   = note: expected reference `&_`
+                 found struct `std::ops::RangeToInclusive<{integer}>`
 
 error: aborting due to 6 previous errors
 
diff --git a/src/test/ui/range/range-1.stderr b/src/test/ui/range/range-1.stderr
index bbc2abea51d..05009358106 100644
--- a/src/test/ui/range/range-1.stderr
+++ b/src/test/ui/range/range-1.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/range-1.rs:5:19
    |
 LL |     let _ = 0u32..10i32;
-   |                   ^^^^^ expected u32, found i32
+   |                   ^^^^^ expected `u32`, found `i32`
 
 error[E0277]: the trait bound `bool: std::iter::Step` is not satisfied
   --> $DIR/range-1.rs:9:14
diff --git a/src/test/ui/regions-fn-subtyping-return-static-fail.stderr b/src/test/ui/regions-fn-subtyping-return-static-fail.stderr
index 35478a7db86..27704b3e0a8 100644
--- a/src/test/ui/regions-fn-subtyping-return-static-fail.stderr
+++ b/src/test/ui/regions-fn-subtyping-return-static-fail.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     want_F(bar);
    |            ^^^ expected concrete lifetime, found bound lifetime parameter 'cx
    |
-   = note: expected type `for<'cx> fn(&'cx S) -> &'cx S`
-              found type `for<'a> fn(&'a S) -> &S {bar::<'_>}`
+   = note: expected fn pointer `for<'cx> fn(&'cx S) -> &'cx S`
+                 found fn item `for<'a> fn(&'a S) -> &S {bar::<'_>}`
 
 error[E0308]: mismatched types
   --> $DIR/regions-fn-subtyping-return-static-fail.rs:48:12
@@ -13,8 +13,8 @@ error[E0308]: mismatched types
 LL |     want_G(baz);
    |            ^^^ expected concrete lifetime, found bound lifetime parameter 'cx
    |
-   = note: expected type `for<'cx> fn(&'cx S) -> &'static S`
-              found type `for<'r> fn(&'r S) -> &'r S {baz}`
+   = note: expected fn pointer `for<'cx> fn(&'cx S) -> &'static S`
+                 found fn item `for<'r> fn(&'r S) -> &'r S {baz}`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/regions/region-invariant-static-error-reporting.stderr b/src/test/ui/regions/region-invariant-static-error-reporting.stderr
index 8358a7988c8..381bad4210f 100644
--- a/src/test/ui/regions/region-invariant-static-error-reporting.stderr
+++ b/src/test/ui/regions/region-invariant-static-error-reporting.stderr
@@ -11,8 +11,8 @@ LL | |         mk_static()
 LL | |     };
    | |_____- if and else have incompatible types
    |
-   = note: expected type `Invariant<'a>`
-              found type `Invariant<'static>`
+   = note: expected struct `Invariant<'a>`
+              found struct `Invariant<'static>`
 note: the lifetime `'a` as defined on the function body at 13:10...
   --> $DIR/region-invariant-static-error-reporting.rs:13:10
    |
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-lifetime-bounds-on-fns-where-clause.stderr b/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr
index 36c66451cfa..d2608e09ac5 100644
--- a/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr
+++ b/src/test/ui/regions/region-lifetime-bounds-on-fns-where-clause.stderr
@@ -22,8 +22,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 3 previous errors
 
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/region-multiple-lifetime-bounds-on-fns-where-clause.stderr b/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr
index a366bd2e5c2..fa39d800b0e 100644
--- a/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr
+++ b/src/test/ui/regions/region-multiple-lifetime-bounds-on-fns-where-clause.stderr
@@ -33,8 +33,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 4 previous errors
 
diff --git a/src/test/ui/regions/regions-bounds.stderr b/src/test/ui/regions/regions-bounds.stderr
index a15710b86c0..a4eebab3863 100644
--- a/src/test/ui/regions/regions-bounds.stderr
+++ b/src/test/ui/regions/regions-bounds.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     return e;
    |            ^ lifetime mismatch
    |
-   = note: expected type `TupleStruct<'b>`
-              found type `TupleStruct<'a>`
+   = note: expected struct `TupleStruct<'b>`
+              found struct `TupleStruct<'a>`
 note: the lifetime `'a` as defined on the function body at 8:10...
   --> $DIR/regions-bounds.rs:8:10
    |
@@ -23,8 +23,8 @@ error[E0308]: mismatched types
 LL |     return e;
    |            ^ lifetime mismatch
    |
-   = note: expected type `Struct<'b>`
-              found type `Struct<'a>`
+   = note: expected struct `Struct<'b>`
+              found struct `Struct<'a>`
 note: the lifetime `'a` as defined on the function body at 12:10...
   --> $DIR/regions-bounds.rs:12:10
    |
diff --git a/src/test/ui/regions/regions-fn-subtyping-return-static.stderr b/src/test/ui/regions/regions-fn-subtyping-return-static.stderr
index cda5ce273bd..a8a7e97e6ac 100644
--- a/src/test/ui/regions/regions-fn-subtyping-return-static.stderr
+++ b/src/test/ui/regions/regions-fn-subtyping-return-static.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     want_F(bar);
    |            ^^^ expected concrete lifetime, found bound lifetime parameter 'cx
    |
-   = note: expected type `for<'cx> fn(&'cx S) -> &'cx S`
-              found type `for<'a> fn(&'a S) -> &S {bar::<'_>}`
+   = note: expected fn pointer `for<'cx> fn(&'cx S) -> &'cx S`
+                 found fn item `for<'a> fn(&'a S) -> &S {bar::<'_>}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-decl.stderr b/src/test/ui/regions/regions-infer-invariance-due-to-decl.stderr
index f4e223bbf6f..4de380ad03b 100644
--- a/src/test/ui/regions/regions-infer-invariance-due-to-decl.stderr
+++ b/src/test/ui/regions/regions-infer-invariance-due-to-decl.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     b_isize
    |     ^^^^^^^ lifetime mismatch
    |
-   = note: expected type `Invariant<'static>`
-              found type `Invariant<'r>`
+   = note: expected struct `Invariant<'static>`
+              found struct `Invariant<'r>`
 note: the lifetime `'r` as defined on the function body at 11:23...
   --> $DIR/regions-infer-invariance-due-to-decl.rs:11:23
    |
diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr
index 6322244fcf9..a98d2f0222e 100644
--- a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr
+++ b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-3.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     b_isize
    |     ^^^^^^^ lifetime mismatch
    |
-   = note: expected type `Invariant<'static>`
-              found type `Invariant<'r>`
+   = note: expected struct `Invariant<'static>`
+              found struct `Invariant<'r>`
 note: the lifetime `'r` as defined on the function body at 9:23...
   --> $DIR/regions-infer-invariance-due-to-mutability-3.rs:9:23
    |
diff --git a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr
index 7baae69945f..deb08ff862c 100644
--- a/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr
+++ b/src/test/ui/regions/regions-infer-invariance-due-to-mutability-4.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     b_isize
    |     ^^^^^^^ lifetime mismatch
    |
-   = note: expected type `Invariant<'static>`
-              found type `Invariant<'r>`
+   = note: expected struct `Invariant<'static>`
+              found struct `Invariant<'r>`
 note: the lifetime `'r` as defined on the function body at 9:23...
   --> $DIR/regions-infer-invariance-due-to-mutability-4.rs:9:23
    |
diff --git a/src/test/ui/regions/regions-infer-not-param.rs b/src/test/ui/regions/regions-infer-not-param.rs
index d1744f8a51e..7643be64d5b 100644
--- a/src/test/ui/regions/regions-infer-not-param.rs
+++ b/src/test/ui/regions/regions-infer-not-param.rs
@@ -17,10 +17,10 @@ fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p } //~ ERROR mismatched ty
 fn take_indirect1(p: Indirect1) -> Indirect1 { p }
 
 fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p } //~ ERROR mismatched types
-//~| expected type `Indirect2<'b>`
-//~| found type `Indirect2<'a>`
+//~| expected struct `Indirect2<'b>`
+//~| found struct `Indirect2<'a>`
 //~| ERROR mismatched types
-//~| expected type `Indirect2<'b>`
-//~| found type `Indirect2<'a>`
+//~| expected struct `Indirect2<'b>`
+//~| found struct `Indirect2<'a>`
 
 fn main() {}
diff --git a/src/test/ui/regions/regions-infer-not-param.stderr b/src/test/ui/regions/regions-infer-not-param.stderr
index 6365769430f..a6e2047559c 100644
--- a/src/test/ui/regions/regions-infer-not-param.stderr
+++ b/src/test/ui/regions/regions-infer-not-param.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL | fn take_direct<'a,'b>(p: Direct<'a>) -> Direct<'b> { p }
    |                                                      ^ lifetime mismatch
    |
-   = note: expected type `Direct<'b>`
-              found type `Direct<'a>`
+   = note: expected struct `Direct<'b>`
+              found struct `Direct<'a>`
 note: the lifetime `'a` as defined on the function body at 15:16...
   --> $DIR/regions-infer-not-param.rs:15:16
    |
@@ -23,8 +23,8 @@ error[E0308]: mismatched types
 LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p }
    |                                                               ^ lifetime mismatch
    |
-   = note: expected type `Indirect2<'b>`
-              found type `Indirect2<'a>`
+   = note: expected struct `Indirect2<'b>`
+              found struct `Indirect2<'a>`
 note: the lifetime `'a` as defined on the function body at 19:19...
   --> $DIR/regions-infer-not-param.rs:19:19
    |
@@ -42,8 +42,8 @@ error[E0308]: mismatched types
 LL | fn take_indirect2<'a,'b>(p: Indirect2<'a>) -> Indirect2<'b> { p }
    |                                                               ^ lifetime mismatch
    |
-   = note: expected type `Indirect2<'b>`
-              found type `Indirect2<'a>`
+   = note: expected struct `Indirect2<'b>`
+              found struct `Indirect2<'a>`
 note: the lifetime `'b` as defined on the function body at 19:22...
   --> $DIR/regions-infer-not-param.rs:19:22
    |
diff --git a/src/test/ui/regions/regions-infer-paramd-indirect.rs b/src/test/ui/regions/regions-infer-paramd-indirect.rs
index 0fb1824aa5d..beb88e81bc1 100644
--- a/src/test/ui/regions/regions-infer-paramd-indirect.rs
+++ b/src/test/ui/regions/regions-infer-paramd-indirect.rs
@@ -21,8 +21,8 @@ impl<'a> SetF<'a> for C<'a> {
     fn set_f_bad(&mut self, b: Box<B>) {
         self.f = b;
         //~^ ERROR mismatched types
-        //~| expected type `std::boxed::Box<std::boxed::Box<&'a isize>>`
-        //~| found type `std::boxed::Box<std::boxed::Box<&isize>>`
+        //~| expected struct `std::boxed::Box<std::boxed::Box<&'a isize>>`
+        //~| found struct `std::boxed::Box<std::boxed::Box<&isize>>`
         //~| lifetime mismatch
     }
 }
diff --git a/src/test/ui/regions/regions-infer-paramd-indirect.stderr b/src/test/ui/regions/regions-infer-paramd-indirect.stderr
index b1fd337b8d0..1497c3ed925 100644
--- a/src/test/ui/regions/regions-infer-paramd-indirect.stderr
+++ b/src/test/ui/regions/regions-infer-paramd-indirect.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |         self.f = b;
    |                  ^ lifetime mismatch
    |
-   = note: expected type `std::boxed::Box<std::boxed::Box<&'a isize>>`
-              found type `std::boxed::Box<std::boxed::Box<&isize>>`
+   = note: expected struct `std::boxed::Box<std::boxed::Box<&'a isize>>`
+              found struct `std::boxed::Box<std::boxed::Box<&isize>>`
 note: the anonymous lifetime #2 defined on the method body at 21:5...
   --> $DIR/regions-infer-paramd-indirect.rs:21:5
    |
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/regions/regions-lifetime-bounds-on-fns.stderr b/src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr
index e260fccf848..a251bb7eb1a 100644
--- a/src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr
+++ b/src/test/ui/regions/regions-lifetime-bounds-on-fns.stderr
@@ -22,8 +22,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 3 previous errors
 
diff --git a/src/test/ui/regions/regions-trait-1.stderr b/src/test/ui/regions/regions-trait-1.stderr
index f835c005ff9..60ac7c09f04 100644
--- a/src/test/ui/regions/regions-trait-1.stderr
+++ b/src/test/ui/regions/regions-trait-1.stderr
@@ -4,8 +4,8 @@ error[E0308]: method not compatible with trait
 LL |     fn get_ctxt(&self) -> &'a Ctxt {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `fn(&HasCtxt<'a>) -> &Ctxt`
-              found type `fn(&HasCtxt<'a>) -> &'a Ctxt`
+   = note: expected fn pointer `fn(&HasCtxt<'a>) -> &Ctxt`
+              found fn pointer `fn(&HasCtxt<'a>) -> &'a Ctxt`
 note: the lifetime `'a` as defined on the impl at 12:6...
   --> $DIR/regions-trait-1.rs:12:6
    |
diff --git a/src/test/ui/regions/regions-trait-object-subtyping.stderr b/src/test/ui/regions/regions-trait-object-subtyping.stderr
index b7c7f93149d..ef69f2535dc 100644
--- a/src/test/ui/regions/regions-trait-object-subtyping.stderr
+++ b/src/test/ui/regions/regions-trait-object-subtyping.stderr
@@ -46,8 +46,8 @@ error[E0308]: mismatched types
 LL |     x
    |     ^ lifetime mismatch
    |
-   = note: expected type `Wrapper<&'b mut (dyn Dummy + 'b)>`
-              found type `Wrapper<&'a mut (dyn Dummy + 'a)>`
+   = note: expected struct `Wrapper<&'b mut (dyn Dummy + 'b)>`
+              found struct `Wrapper<&'a mut (dyn Dummy + 'a)>`
 note: the lifetime `'b` as defined on the function body at 20:15...
   --> $DIR/regions-trait-object-subtyping.rs:20:15
    |
diff --git a/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr b/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr
index aae519c5df2..e7a5db671bf 100644
--- a/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr
+++ b/src/test/ui/regions/regions-variance-invariant-use-covariant.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let _: Invariant<'static> = c;
    |                                 ^ lifetime mismatch
    |
-   = note: expected type `Invariant<'static>`
-              found type `Invariant<'b>`
+   = note: expected struct `Invariant<'static>`
+              found struct `Invariant<'b>`
 note: the lifetime `'b` as defined on the function body at 11:9...
   --> $DIR/regions-variance-invariant-use-covariant.rs:11:9
    |
diff --git a/src/test/ui/reify-intrinsic.stderr b/src/test/ui/reify-intrinsic.stderr
index 4a1bd77cf7e..da433278975 100644
--- a/src/test/ui/reify-intrinsic.stderr
+++ b/src/test/ui/reify-intrinsic.stderr
@@ -7,8 +7,8 @@ LL |     let _: unsafe extern "rust-intrinsic" fn(isize) -> usize = std::mem::tr
    |                                                                cannot coerce intrinsics to function pointers
    |                                                                help: use parentheses to call this function: `std::mem::transmute(...)`
    |
-   = note: expected type `unsafe extern "rust-intrinsic" fn(isize) -> usize`
-              found type `unsafe extern "rust-intrinsic" fn(_) -> _ {std::intrinsics::transmute::<_, _>}`
+   = note: expected fn pointer `unsafe extern "rust-intrinsic" fn(isize) -> usize`
+                 found fn item `unsafe extern "rust-intrinsic" fn(_) -> _ {std::intrinsics::transmute::<_, _>}`
 
 error[E0606]: casting `unsafe extern "rust-intrinsic" fn(_) -> _ {std::intrinsics::transmute::<_, _>}` as `unsafe extern "rust-intrinsic" fn(isize) -> usize` is invalid
   --> $DIR/reify-intrinsic.rs:11:13
diff --git a/src/test/ui/reject-specialized-drops-8142.rs b/src/test/ui/reject-specialized-drops-8142.rs
index b3cb83f94e0..655b42f5f8f 100644
--- a/src/test/ui/reject-specialized-drops-8142.rs
+++ b/src/test/ui/reject-specialized-drops-8142.rs
@@ -28,8 +28,8 @@ impl<'ml>               Drop for M<'ml>         { fn drop(&mut self) { } } // AC
 
 impl                    Drop for N<'static>     { fn drop(&mut self) { } } // REJECT
 //~^ ERROR mismatched types
-//~| expected type `N<'n>`
-//~|    found type `N<'static>`
+//~| expected struct `N<'n>`
+//~|    found struct `N<'static>`
 
 impl<COkNoBound> Drop for O<COkNoBound> { fn drop(&mut self) { } } // ACCEPT
 
diff --git a/src/test/ui/reject-specialized-drops-8142.stderr b/src/test/ui/reject-specialized-drops-8142.stderr
index 609a40163a3..e55f0232ff9 100644
--- a/src/test/ui/reject-specialized-drops-8142.stderr
+++ b/src/test/ui/reject-specialized-drops-8142.stderr
@@ -32,8 +32,8 @@ error[E0308]: mismatched types
 LL | impl                    Drop for N<'static>     { fn drop(&mut self) { } } // REJECT
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `N<'n>`
-              found type `N<'static>`
+   = note: expected struct `N<'n>`
+              found struct `N<'static>`
 note: the lifetime `'n` as defined on the struct at 8:10...
   --> $DIR/reject-specialized-drops-8142.rs:8:10
    |
diff --git a/src/test/ui/repeat_count.rs b/src/test/ui/repeat_count.rs
index c42dc8c9971..aca7af144a9 100644
--- a/src/test/ui/repeat_count.rs
+++ b/src/test/ui/repeat_count.rs
@@ -6,34 +6,26 @@ fn main() {
     //~^ ERROR attempt to use a non-constant value in a constant [E0435]
     let b = [0; ()];
     //~^ ERROR mismatched types
-    //~| expected type `usize`
-    //~| found type `()`
-    //~| expected usize, found ()
+    //~| expected `usize`, found `()`
     let c = [0; true];
     //~^ ERROR mismatched types
-    //~| expected usize, found bool
+    //~| expected `usize`, found `bool`
     let d = [0; 0.5];
     //~^ ERROR mismatched types
-    //~| expected type `usize`
-    //~| found type `{float}`
-    //~| expected usize, found floating-point number
+    //~| expected `usize`, found floating-point number
     let e = [0; "foo"];
     //~^ ERROR mismatched types
-    //~| expected type `usize`
-    //~| found type `&'static str`
-    //~| expected usize, found reference
+    //~| expected `usize`, found `&str`
     let f = [0; -4_isize];
     //~^ ERROR mismatched types
-    //~| expected usize, found isize
+    //~| expected `usize`, found `isize`
     let f = [0_usize; -1_isize];
     //~^ ERROR mismatched types
-    //~| expected usize, found isize
+    //~| expected `usize`, found `isize`
     struct G {
         g: (),
     }
     let g = [0; G { g: () }];
     //~^ ERROR mismatched types
-    //~| expected type `usize`
-    //~| found type `main::G`
-    //~| expected usize, found struct `main::G`
+    //~| expected `usize`, found struct `main::G`
 }
diff --git a/src/test/ui/repeat_count.stderr b/src/test/ui/repeat_count.stderr
index aae79dfbb3f..efad00b272c 100644
--- a/src/test/ui/repeat_count.stderr
+++ b/src/test/ui/repeat_count.stderr
@@ -8,40 +8,31 @@ error[E0308]: mismatched types
   --> $DIR/repeat_count.rs:7:17
    |
 LL |     let b = [0; ()];
-   |                 ^^ expected usize, found ()
-   |
-   = note: expected type `usize`
-              found type `()`
+   |                 ^^ expected `usize`, found `()`
 
 error[E0308]: mismatched types
-  --> $DIR/repeat_count.rs:12:17
+  --> $DIR/repeat_count.rs:10:17
    |
 LL |     let c = [0; true];
-   |                 ^^^^ expected usize, found bool
+   |                 ^^^^ expected `usize`, found `bool`
 
 error[E0308]: mismatched types
-  --> $DIR/repeat_count.rs:15:17
+  --> $DIR/repeat_count.rs:13:17
    |
 LL |     let d = [0; 0.5];
-   |                 ^^^ expected usize, found floating-point number
-   |
-   = note: expected type `usize`
-              found type `{float}`
+   |                 ^^^ expected `usize`, found floating-point number
 
 error[E0308]: mismatched types
-  --> $DIR/repeat_count.rs:20:17
+  --> $DIR/repeat_count.rs:16:17
    |
 LL |     let e = [0; "foo"];
-   |                 ^^^^^ expected usize, found reference
-   |
-   = note: expected type `usize`
-              found type `&'static str`
+   |                 ^^^^^ expected `usize`, found `&str`
 
 error[E0308]: mismatched types
-  --> $DIR/repeat_count.rs:25:17
+  --> $DIR/repeat_count.rs:19:17
    |
 LL |     let f = [0; -4_isize];
-   |                 ^^^^^^^^ expected usize, found isize
+   |                 ^^^^^^^^ expected `usize`, found `isize`
    |
 help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
    |
@@ -49,10 +40,10 @@ LL |     let f = [0; (-4_isize).try_into().unwrap()];
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0308]: mismatched types
-  --> $DIR/repeat_count.rs:28:23
+  --> $DIR/repeat_count.rs:22:23
    |
 LL |     let f = [0_usize; -1_isize];
-   |                       ^^^^^^^^ expected usize, found isize
+   |                       ^^^^^^^^ expected `usize`, found `isize`
    |
 help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
    |
@@ -60,13 +51,10 @@ LL |     let f = [0_usize; (-1_isize).try_into().unwrap()];
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0308]: mismatched types
-  --> $DIR/repeat_count.rs:34:17
+  --> $DIR/repeat_count.rs:28:17
    |
 LL |     let g = [0; G { g: () }];
-   |                 ^^^^^^^^^^^ expected usize, found struct `main::G`
-   |
-   = note: expected type `usize`
-              found type `main::G`
+   |                 ^^^^^^^^^^^ expected `usize`, found struct `main::G`
 
 error: aborting due to 8 previous errors
 
diff --git a/src/test/ui/resolve/name-clash-nullary.stderr b/src/test/ui/resolve/name-clash-nullary.stderr
index 51793f426d6..aeeb0c45191 100644
--- a/src/test/ui/resolve/name-clash-nullary.stderr
+++ b/src/test/ui/resolve/name-clash-nullary.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/name-clash-nullary.rs:2:7
    |
 LL |   let None: isize = 42;
-   |       ^^^^ expected isize, found enum `std::option::Option`
+   |       ^^^^ expected `isize`, found enum `std::option::Option`
    |
    = note: expected type `isize`
-              found type `std::option::Option<_>`
+              found enum `std::option::Option<_>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/resolve/privacy-enum-ctor.stderr b/src/test/ui/resolve/privacy-enum-ctor.stderr
index 8a450ab85e9..12270e42644 100644
--- a/src/test/ui/resolve/privacy-enum-ctor.stderr
+++ b/src/test/ui/resolve/privacy-enum-ctor.stderr
@@ -285,8 +285,8 @@ LL |         let _: Z = Z::Fn;
    |                    expected enum `m::n::Z`, found fn item
    |                    help: use parentheses to instantiate this tuple variant: `Z::Fn(_)`
    |
-   = note: expected type `m::n::Z`
-              found type `fn(u8) -> m::n::Z {m::n::Z::Fn}`
+   = note: expected enum `m::n::Z`
+           found fn item `fn(u8) -> m::n::Z {m::n::Z::Fn}`
 
 error[E0618]: expected function, found enum variant `Z::Unit`
   --> $DIR/privacy-enum-ctor.rs:31:17
@@ -316,8 +316,8 @@ LL |     let _: E = m::E::Fn;
    |                expected enum `m::E`, found fn item
    |                help: use parentheses to instantiate this tuple variant: `m::E::Fn(_)`
    |
-   = note: expected type `m::E`
-              found type `fn(u8) -> m::E {m::E::Fn}`
+   = note: expected enum `m::E`
+           found fn item `fn(u8) -> m::E {m::E::Fn}`
 
 error[E0618]: expected function, found enum variant `m::E::Unit`
   --> $DIR/privacy-enum-ctor.rs:47:16
@@ -347,8 +347,8 @@ LL |     let _: E = E::Fn;
    |                expected enum `m::E`, found fn item
    |                help: use parentheses to instantiate this tuple variant: `E::Fn(_)`
    |
-   = note: expected type `m::E`
-              found type `fn(u8) -> m::E {m::E::Fn}`
+   = note: expected enum `m::E`
+           found fn item `fn(u8) -> m::E {m::E::Fn}`
 
 error[E0618]: expected function, found enum variant `E::Unit`
   --> $DIR/privacy-enum-ctor.rs:55:16
diff --git a/src/test/ui/resolve/resolve-inconsistent-binding-mode.stderr b/src/test/ui/resolve/resolve-inconsistent-binding-mode.stderr
index 6f660872f5e..58455024d38 100644
--- a/src/test/ui/resolve/resolve-inconsistent-binding-mode.stderr
+++ b/src/test/ui/resolve/resolve-inconsistent-binding-mode.stderr
@@ -24,19 +24,13 @@ error[E0308]: mismatched types
   --> $DIR/resolve-inconsistent-binding-mode.rs:7:32
    |
 LL |       Opts::A(ref i) | Opts::B(i) => {}
-   |                                ^ expected &isize, found isize
-   |
-   = note: expected type `&isize`
-              found type `isize`
+   |                                ^ expected `&isize`, found `isize`
 
 error[E0308]: mismatched types
   --> $DIR/resolve-inconsistent-binding-mode.rs:16:32
    |
 LL |       Opts::A(ref i) | Opts::B(i) => {}
-   |                                ^ expected &isize, found isize
-   |
-   = note: expected type `&isize`
-              found type `isize`
+   |                                ^ expected `&isize`, found `isize`
 
 error[E0308]: mismatched types
   --> $DIR/resolve-inconsistent-binding-mode.rs:25:36
diff --git a/src/test/ui/resolve/resolve-inconsistent-names.stderr b/src/test/ui/resolve/resolve-inconsistent-names.stderr
index f02867a0024..271495012da 100644
--- a/src/test/ui/resolve/resolve-inconsistent-names.stderr
+++ b/src/test/ui/resolve/resolve-inconsistent-names.stderr
@@ -87,10 +87,7 @@ error[E0308]: mismatched types
   --> $DIR/resolve-inconsistent-names.rs:19:19
    |
 LL |         (A, B) | (ref B, c) | (c, A) => ()
-   |                   ^^^^^ expected enum `E`, found &E
-   |
-   = note: expected type `E`
-              found type `&E`
+   |                   ^^^^^ expected enum `E`, found `&E`
 
 error: aborting due to 9 previous errors
 
diff --git a/src/test/ui/retslot-cast.stderr b/src/test/ui/retslot-cast.stderr
index a1169910ae7..cdef304cdc8 100644
--- a/src/test/ui/retslot-cast.stderr
+++ b/src/test/ui/retslot-cast.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     inner(x)
    |     ^^^^^^^^ expected trait `std::iter::Iterator<Item = ()>`, found trait `std::iter::Iterator<Item = ()> + std::marker::Send`
    |
-   = note: expected type `std::option::Option<&dyn std::iter::Iterator<Item = ()>>`
-              found type `std::option::Option<&dyn std::iter::Iterator<Item = ()> + std::marker::Send>`
+   = note: expected enum `std::option::Option<&dyn std::iter::Iterator<Item = ()>>`
+              found enum `std::option::Option<&dyn std::iter::Iterator<Item = ()> + std::marker::Send>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/return/return-from-diverging.stderr b/src/test/ui/return/return-from-diverging.stderr
index 3dd029c14c0..0c1fb4d9c59 100644
--- a/src/test/ui/return/return-from-diverging.stderr
+++ b/src/test/ui/return/return-from-diverging.stderr
@@ -4,10 +4,10 @@ error[E0308]: mismatched types
 LL | fn fail() -> ! {
    |              - expected `!` because of return type
 LL |     return "wow";
-   |            ^^^^^ expected !, found reference
+   |            ^^^^^ expected `!`, found `&str`
    |
-   = note: expected type `!`
-              found type `&'static str`
+   = note:   expected type `!`
+           found reference `&'static str`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/return/return-type.stderr b/src/test/ui/return/return-type.stderr
index 6eeec41b94c..535428f1c91 100644
--- a/src/test/ui/return/return-type.stderr
+++ b/src/test/ui/return/return-type.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/return-type.rs:10:5
    |
 LL |     foo(4 as usize)
-   |     ^^^^^^^^^^^^^^^ expected (), found struct `S`
+   |     ^^^^^^^^^^^^^^^ expected `()`, found struct `S`
    |
-   = note: expected type `()`
-              found type `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-2005-default-binding-mode/const.stderr b/src/test/ui/rfc-2005-default-binding-mode/const.stderr
index 210b4f6be63..f25fc300d7f 100644
--- a/src/test/ui/rfc-2005-default-binding-mode/const.stderr
+++ b/src/test/ui/rfc-2005-default-binding-mode/const.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/const.rs:14:9
    |
 LL |         FOO => {},
-   |         ^^^ expected &Foo, found struct `Foo`
-   |
-   = note: expected type `&Foo`
-              found type `Foo`
+   |         ^^^ expected `&Foo`, found struct `Foo`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/rfc-2005-default-binding-mode/lit.stderr b/src/test/ui/rfc-2005-default-binding-mode/lit.stderr
index 9be1876b714..b0d60c7a4c8 100644
--- a/src/test/ui/rfc-2005-default-binding-mode/lit.stderr
+++ b/src/test/ui/rfc-2005-default-binding-mode/lit.stderr
@@ -2,19 +2,19 @@ error[E0308]: mismatched types
   --> $DIR/lit.rs:7:13
    |
 LL |             "abc" => true,
-   |             ^^^^^ expected &str, found str
+   |             ^^^^^ expected `&str`, found `str`
    |
-   = note: expected type `&&str`
-              found type `&'static str`
+   = note:   expected type `&&str`
+           found reference `&'static str`
 
 error[E0308]: mismatched types
   --> $DIR/lit.rs:16:9
    |
 LL |         b"abc" => true,
-   |         ^^^^^^ expected &[u8], found array of 3 elements
+   |         ^^^^^^ expected `&[u8]`, found array `[u8; 3]`
    |
-   = note: expected type `&&[u8]`
-              found type `&'static [u8; 3]`
+   = note:   expected type `&&[u8]`
+           found reference `&'static [u8; 3]`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr
index dd4b0cd1e87..d50e5f6b795 100644
--- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr
+++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr
@@ -5,9 +5,6 @@ LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A {
    |                                                                - expected `A` because of return type
 LL |     x
    |     ^ expected struct `A`, found enum `uninhabited::UninhabitedEnum`
-   |
-   = note: expected type `A`
-              found type `uninhabited::UninhabitedEnum`
 
 error[E0308]: mismatched types
   --> $DIR/coercions.rs:26:5
@@ -16,9 +13,6 @@ LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct)
    |                                                                               - expected `A` because of return type
 LL |     x
    |     ^ expected struct `A`, found struct `uninhabited::UninhabitedTupleStruct`
-   |
-   = note: expected type `A`
-              found type `uninhabited::UninhabitedTupleStruct`
 
 error[E0308]: mismatched types
   --> $DIR/coercions.rs:30:5
@@ -27,9 +21,6 @@ LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A {
    |                                                                    - expected `A` because of return type
 LL |     x
    |     ^ expected struct `A`, found struct `uninhabited::UninhabitedStruct`
-   |
-   = note: expected type `A`
-              found type `uninhabited::UninhabitedStruct`
 
 error[E0308]: mismatched types
   --> $DIR/coercions.rs:34:5
@@ -38,9 +29,6 @@ LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariant
    |                                                                                  - expected `A` because of return type
 LL |     x
    |     ^ expected struct `A`, found enum `uninhabited::UninhabitedVariants`
-   |
-   = note: expected type `A`
-              found type `uninhabited::UninhabitedVariants`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr
index fd49c682398..16a62a99249 100644
--- a/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr
+++ b/src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr
@@ -5,9 +5,6 @@ LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A {
    |                                                                - expected `A` because of return type
 LL |     x
    |     ^ expected struct `A`, found enum `UninhabitedEnum`
-   |
-   = note: expected type `A`
-              found type `UninhabitedEnum`
 
 error[E0308]: mismatched types
   --> $DIR/coercions_same_crate.rs:32:5
@@ -16,9 +13,6 @@ LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct)
    |                                                                               - expected `A` because of return type
 LL |     x
    |     ^ expected struct `A`, found struct `UninhabitedTupleStruct`
-   |
-   = note: expected type `A`
-              found type `UninhabitedTupleStruct`
 
 error[E0308]: mismatched types
   --> $DIR/coercions_same_crate.rs:36:5
@@ -27,9 +21,6 @@ LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A {
    |                                                                    - expected `A` because of return type
 LL |     x
    |     ^ expected struct `A`, found struct `UninhabitedStruct`
-   |
-   = note: expected type `A`
-              found type `UninhabitedStruct`
 
 error[E0308]: mismatched types
   --> $DIR/coercions_same_crate.rs:40:5
@@ -38,9 +29,6 @@ LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariant
    |                                                                                  - expected `A` because of return type
 LL |     x
    |     ^ expected struct `A`, found enum `UninhabitedVariants`
-   |
-   = note: expected type `A`
-              found type `UninhabitedVariants`
 
 error: aborting due to 4 previous errors
 
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 aa7c342819e..05e30a8010a 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
@@ -537,11 +537,8 @@ error[E0308]: mismatched types
 LL |     if &let 0 = 0 {}
    |        ^^^^^^^^^^
    |        |
-   |        expected bool, found &bool
+   |        expected `bool`, found `&bool`
    |        help: consider removing the borrow: `let 0 = 0`
-   |
-   = note: expected type `bool`
-              found type `&bool`
 
 error[E0614]: type `bool` cannot be dereferenced
   --> $DIR/disallowed-positions.rs:36:8
@@ -581,38 +578,35 @@ error[E0308]: mismatched types
 LL |     if x = let 0 = 0 {}
    |        ^^^^^^^^^^^^^
    |        |
-   |        expected bool, found ()
+   |        expected `bool`, found `()`
    |        help: try comparing for equality: `x == let 0 = 0`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:59:8
    |
 LL |     if true..(let 0 = 0) {}
-   |        ^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
+   |        ^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<bool>`
+            found struct `std::ops::Range<bool>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:61:8
    |
 LL |     if ..(let 0 = 0) {}
-   |        ^^^^^^^^^^^^^ expected bool, found struct `std::ops::RangeTo`
+   |        ^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::RangeTo`
    |
    = note: expected type `bool`
-              found type `std::ops::RangeTo<bool>`
+            found struct `std::ops::RangeTo<bool>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:63:8
    |
 LL |     if (let 0 = 0).. {}
-   |        ^^^^^^^^^^^^^ expected bool, found struct `std::ops::RangeFrom`
+   |        ^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::RangeFrom`
    |
    = note: expected type `bool`
-              found type `std::ops::RangeFrom<bool>`
+            found struct `std::ops::RangeFrom<bool>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:67:12
@@ -620,19 +614,19 @@ error[E0308]: mismatched types
 LL |     if let Range { start: _, end: _ } = true..true && false {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this match expression has type `bool`
    |            |
-   |            expected bool, found struct `std::ops::Range`
+   |            expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<_>`
+            found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:67:8
    |
 LL |     if let Range { start: _, end: _ } = true..true && false {}
-   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
+   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<bool>`
+            found struct `std::ops::Range<bool>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:71:12
@@ -640,19 +634,19 @@ error[E0308]: mismatched types
 LL |     if let Range { start: _, end: _ } = true..true || false {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this match expression has type `bool`
    |            |
-   |            expected bool, found struct `std::ops::Range`
+   |            expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<_>`
+            found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:71:8
    |
 LL |     if let Range { start: _, end: _ } = true..true || false {}
-   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
+   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<bool>`
+            found struct `std::ops::Range<bool>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:78:12
@@ -660,26 +654,26 @@ error[E0308]: mismatched types
 LL |     if let Range { start: F, end } = F..|| true {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found struct `std::ops::Range`
    |
-   = note: expected type `fn() -> bool`
-              found type `std::ops::Range<_>`
+   = note: expected fn pointer `fn() -> bool`
+                  found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:78:41
    |
 LL |     if let Range { start: F, end } = F..|| true {}
-   |                                         ^^^^^^^ expected bool, found closure
+   |                                         ^^^^^^^ expected `bool`, found closure
    |
    = note: expected type `bool`
-              found type `[closure@$DIR/disallowed-positions.rs:78:41: 78:48]`
+           found closure `[closure@$DIR/disallowed-positions.rs:78:41: 78:48]`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:78:8
    |
 LL |     if let Range { start: F, end } = F..|| true {}
-   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
+   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<bool>`
+            found struct `std::ops::Range<bool>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:86:12
@@ -687,28 +681,25 @@ error[E0308]: mismatched types
 LL |     if let Range { start: true, end } = t..&&false {}
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   - this match expression has type `bool`
    |            |
-   |            expected bool, found struct `std::ops::Range`
+   |            expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<_>`
+            found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:86:44
    |
 LL |     if let Range { start: true, end } = t..&&false {}
-   |                                            ^^^^^^^ expected bool, found &&bool
-   |
-   = note: expected type `bool`
-              found type `&&bool`
+   |                                            ^^^^^^^ expected `bool`, found `&&bool`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:86:8
    |
 LL |     if let Range { start: true, end } = t..&&false {}
-   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
+   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<bool>`
+            found struct `std::ops::Range<bool>`
 
 error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
   --> $DIR/disallowed-positions.rs:42:20
@@ -725,11 +716,8 @@ error[E0308]: mismatched types
 LL |     while &let 0 = 0 {}
    |           ^^^^^^^^^^
    |           |
-   |           expected bool, found &bool
+   |           expected `bool`, found `&bool`
    |           help: consider removing the borrow: `let 0 = 0`
-   |
-   = note: expected type `bool`
-              found type `&bool`
 
 error[E0614]: type `bool` cannot be dereferenced
   --> $DIR/disallowed-positions.rs:100:11
@@ -769,38 +757,35 @@ error[E0308]: mismatched types
 LL |     while x = let 0 = 0 {}
    |           ^^^^^^^^^^^^^
    |           |
-   |           expected bool, found ()
+   |           expected `bool`, found `()`
    |           help: try comparing for equality: `x == let 0 = 0`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:123:11
    |
 LL |     while true..(let 0 = 0) {}
-   |           ^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
+   |           ^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<bool>`
+            found struct `std::ops::Range<bool>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:125:11
    |
 LL |     while ..(let 0 = 0) {}
-   |           ^^^^^^^^^^^^^ expected bool, found struct `std::ops::RangeTo`
+   |           ^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::RangeTo`
    |
    = note: expected type `bool`
-              found type `std::ops::RangeTo<bool>`
+            found struct `std::ops::RangeTo<bool>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:127:11
    |
 LL |     while (let 0 = 0).. {}
-   |           ^^^^^^^^^^^^^ expected bool, found struct `std::ops::RangeFrom`
+   |           ^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::RangeFrom`
    |
    = note: expected type `bool`
-              found type `std::ops::RangeFrom<bool>`
+            found struct `std::ops::RangeFrom<bool>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:131:15
@@ -808,19 +793,19 @@ error[E0308]: mismatched types
 LL |     while let Range { start: _, end: _ } = true..true && false {}
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this match expression has type `bool`
    |               |
-   |               expected bool, found struct `std::ops::Range`
+   |               expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<_>`
+            found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:131:11
    |
 LL |     while let Range { start: _, end: _ } = true..true && false {}
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<bool>`
+            found struct `std::ops::Range<bool>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:135:15
@@ -828,19 +813,19 @@ error[E0308]: mismatched types
 LL |     while let Range { start: _, end: _ } = true..true || false {}
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this match expression has type `bool`
    |               |
-   |               expected bool, found struct `std::ops::Range`
+   |               expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<_>`
+            found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:135:11
    |
 LL |     while let Range { start: _, end: _ } = true..true || false {}
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<bool>`
+            found struct `std::ops::Range<bool>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:142:15
@@ -848,26 +833,26 @@ error[E0308]: mismatched types
 LL |     while let Range { start: F, end } = F..|| true {}
    |               ^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found struct `std::ops::Range`
    |
-   = note: expected type `fn() -> bool`
-              found type `std::ops::Range<_>`
+   = note: expected fn pointer `fn() -> bool`
+                  found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:142:44
    |
 LL |     while let Range { start: F, end } = F..|| true {}
-   |                                            ^^^^^^^ expected bool, found closure
+   |                                            ^^^^^^^ expected `bool`, found closure
    |
    = note: expected type `bool`
-              found type `[closure@$DIR/disallowed-positions.rs:142:44: 142:51]`
+           found closure `[closure@$DIR/disallowed-positions.rs:142:44: 142:51]`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:142:11
    |
 LL |     while let Range { start: F, end } = F..|| true {}
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<bool>`
+            found struct `std::ops::Range<bool>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:150:15
@@ -875,28 +860,25 @@ error[E0308]: mismatched types
 LL |     while let Range { start: true, end } = t..&&false {}
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   - this match expression has type `bool`
    |               |
-   |               expected bool, found struct `std::ops::Range`
+   |               expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<_>`
+            found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:150:47
    |
 LL |     while let Range { start: true, end } = t..&&false {}
-   |                                               ^^^^^^^ expected bool, found &&bool
-   |
-   = note: expected type `bool`
-              found type `&&bool`
+   |                                               ^^^^^^^ expected `bool`, found `&&bool`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:150:11
    |
 LL |     while let Range { start: true, end } = t..&&false {}
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found struct `std::ops::Range`
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<bool>`
+            found struct `std::ops::Range<bool>`
 
 error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
   --> $DIR/disallowed-positions.rs:106:23
@@ -945,10 +927,10 @@ error[E0308]: mismatched types
 LL |     (let Range { start: _, end: _ } = true..true || false);
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this match expression has type `bool`
    |          |
-   |          expected bool, found struct `std::ops::Range`
+   |          expected `bool`, found struct `std::ops::Range`
    |
    = note: expected type `bool`
-              found type `std::ops::Range<_>`
+            found struct `std::ops::Range<_>`
 
 error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:207:5
@@ -957,10 +939,7 @@ LL | fn outside_if_and_while_expr() {
    |                                - help: try adding a return type: `-> &bool`
 ...
 LL |     &let 0 = 0
-   |     ^^^^^^^^^^ expected (), found &bool
-   |
-   = note: expected type `()`
-              found type `&bool`
+   |     ^^^^^^^^^^ expected `()`, found `&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/shift-various-bad-types.rs b/src/test/ui/shift-various-bad-types.rs
index f3857461c9d..31224bbca1e 100644
--- a/src/test/ui/shift-various-bad-types.rs
+++ b/src/test/ui/shift-various-bad-types.rs
@@ -24,7 +24,7 @@ fn foo(p: &Panolpy) {
     // Type of the result follows the LHS, not the RHS:
     let _: i32 = 22_i64 >> 1_i32;
     //~^ ERROR mismatched types
-    //~| expected i32, found i64
+    //~| expected `i32`, found `i64`
 }
 
 fn main() {
diff --git a/src/test/ui/shift-various-bad-types.stderr b/src/test/ui/shift-various-bad-types.stderr
index c7a95883226..3be1217440b 100644
--- a/src/test/ui/shift-various-bad-types.stderr
+++ b/src/test/ui/shift-various-bad-types.stderr
@@ -26,7 +26,7 @@ error[E0308]: mismatched types
   --> $DIR/shift-various-bad-types.rs:25:18
    |
 LL |     let _: i32 = 22_i64 >> 1_i32;
-   |                  ^^^^^^^^^^^^^^^ expected i32, found i64
+   |                  ^^^^^^^^^^^^^^^ expected `i32`, found `i64`
    |
 help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
    |
diff --git a/src/test/ui/slice-mut.rs b/src/test/ui/slice-mut.rs
index dc5ef58eb33..e9989f0f481 100644
--- a/src/test/ui/slice-mut.rs
+++ b/src/test/ui/slice-mut.rs
@@ -6,7 +6,7 @@ fn main() {
 
     let y: &mut[_] = &x[2..4];
     //~^ ERROR mismatched types
-    //~| expected type `&mut [_]`
-    //~| found type `&[isize]`
+    //~| expected mutable reference `&mut [_]`
+    //~| found reference `&[isize]`
     //~| types differ in mutability
 }
diff --git a/src/test/ui/slice-mut.stderr b/src/test/ui/slice-mut.stderr
index e99d83d0fed..c1c5f316e95 100644
--- a/src/test/ui/slice-mut.stderr
+++ b/src/test/ui/slice-mut.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let y: &mut[_] = &x[2..4];
    |                      ^^^^^^^^ types differ in mutability
    |
-   = note: expected type `&mut [_]`
-              found type `&[isize]`
+   = note: expected mutable reference `&mut [_]`
+                      found reference `&[isize]`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/slightly-nice-generic-literal-messages.rs b/src/test/ui/slightly-nice-generic-literal-messages.rs
index cd0ee174af5..a48598ce8d5 100644
--- a/src/test/ui/slightly-nice-generic-literal-messages.rs
+++ b/src/test/ui/slightly-nice-generic-literal-messages.rs
@@ -6,7 +6,7 @@ fn main() {
     match Foo(1.1, marker::PhantomData) {
         1 => {}
     //~^ ERROR mismatched types
-    //~| expected type `Foo<{float}, _>`
+    //~| expected struct `Foo<{float}, _>`
     //~| found type `{integer}`
     //~| expected struct `Foo`, found integer
     }
diff --git a/src/test/ui/slightly-nice-generic-literal-messages.stderr b/src/test/ui/slightly-nice-generic-literal-messages.stderr
index 76ebc007df3..61eabed9504 100644
--- a/src/test/ui/slightly-nice-generic-literal-messages.stderr
+++ b/src/test/ui/slightly-nice-generic-literal-messages.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |         1 => {}
    |         ^ expected struct `Foo`, found integer
    |
-   = note: expected type `Foo<{float}, _>`
-              found type `{integer}`
+   = note: expected struct `Foo<{float}, _>`
+                found type `{integer}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/span/coerce-suggestions.stderr b/src/test/ui/span/coerce-suggestions.stderr
index 0d15a2a753e..5918888ff89 100644
--- a/src/test/ui/span/coerce-suggestions.stderr
+++ b/src/test/ui/span/coerce-suggestions.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/coerce-suggestions.rs:7:20
    |
 LL |     let x: usize = String::new();
-   |                    ^^^^^^^^^^^^^ expected usize, found struct `std::string::String`
-   |
-   = note: expected type `usize`
-              found type `std::string::String`
+   |                    ^^^^^^^^^^^^^ expected `usize`, found struct `std::string::String`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-suggestions.rs:9:19
@@ -13,11 +10,8 @@ error[E0308]: mismatched types
 LL |     let x: &str = String::new();
    |                   ^^^^^^^^^^^^^
    |                   |
-   |                   expected &str, found struct `std::string::String`
+   |                   expected `&str`, found struct `std::string::String`
    |                   help: consider borrowing here: `&String::new()`
-   |
-   = note: expected type `&str`
-              found type `std::string::String`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-suggestions.rs:12:10
@@ -25,8 +19,8 @@ error[E0308]: mismatched types
 LL |     test(&y);
    |          ^^ types differ in mutability
    |
-   = note: expected type `&mut std::string::String`
-              found type `&std::string::String`
+   = note: expected mutable reference `&mut std::string::String`
+                      found reference `&std::string::String`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-suggestions.rs:14:11
@@ -34,8 +28,8 @@ error[E0308]: mismatched types
 LL |     test2(&y);
    |           ^^ types differ in mutability
    |
-   = note: expected type `&mut i32`
-              found type `&std::string::String`
+   = note: expected mutable reference `&mut i32`
+                      found reference `&std::string::String`
 
 error[E0308]: mismatched types
   --> $DIR/coerce-suggestions.rs:17:9
@@ -50,10 +44,8 @@ error[E0308]: mismatched types
   --> $DIR/coerce-suggestions.rs:21:9
    |
 LL |     s = format!("foo");
-   |         ^^^^^^^^^^^^^^ expected mutable reference, found struct `std::string::String`
+   |         ^^^^^^^^^^^^^^ expected `&mut std::string::String`, found struct `std::string::String`
    |
-   = note: expected type `&mut std::string::String`
-              found type `std::string::String`
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error: aborting due to 6 previous errors
diff --git a/src/test/ui/span/issue-33884.stderr b/src/test/ui/span/issue-33884.stderr
index e59440b363f..4f46c4c7394 100644
--- a/src/test/ui/span/issue-33884.stderr
+++ b/src/test/ui/span/issue-33884.stderr
@@ -4,8 +4,6 @@ error[E0308]: mismatched types
 LL |     stream.write_fmt(format!("message received"))
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::fmt::Arguments`, found struct `std::string::String`
    |
-   = note: expected type `std::fmt::Arguments<'_>`
-              found type `std::string::String`
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error: aborting due to previous error
diff --git a/src/test/ui/span/issue-34264.stderr b/src/test/ui/span/issue-34264.stderr
index 26d686f6f50..56a2686945c 100644
--- a/src/test/ui/span/issue-34264.stderr
+++ b/src/test/ui/span/issue-34264.stderr
@@ -55,10 +55,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-34264.rs:8:13
    |
 LL |     bar("", "");
-   |             ^^ expected usize, found reference
-   |
-   = note: expected type `usize`
-              found type `&'static str`
+   |             ^^ expected `usize`, found `&str`
 
 error[E0061]: this function takes 2 parameters but 3 parameters were supplied
   --> $DIR/issue-34264.rs:10:5
diff --git a/src/test/ui/span/issue-39018.stderr b/src/test/ui/span/issue-39018.stderr
index 2ce5b0c1171..9637d1d82ec 100644
--- a/src/test/ui/span/issue-39018.stderr
+++ b/src/test/ui/span/issue-39018.stderr
@@ -70,11 +70,8 @@ error[E0308]: mismatched types
 LL |     let _ = a + b;
    |                 ^
    |                 |
-   |                 expected &str, found struct `std::string::String`
+   |                 expected `&str`, found struct `std::string::String`
    |                 help: consider borrowing here: `&b`
-   |
-   = note: expected type `&str`
-              found type `std::string::String`
 
 error[E0369]: binary operation `+` cannot be applied to type `&std::string::String`
   --> $DIR/issue-39018.rs:30:15
diff --git a/src/test/ui/span/move-closure.stderr b/src/test/ui/span/move-closure.stderr
index e2226b197ae..9914d7e8507 100644
--- a/src/test/ui/span/move-closure.stderr
+++ b/src/test/ui/span/move-closure.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/move-closure.rs:5:17
    |
 LL |     let x: () = move || ();
-   |                 ^^^^^^^^^^ expected (), found closure
+   |                 ^^^^^^^^^^ expected `()`, found closure
    |
-   = note: expected type `()`
-              found type `[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 43cebd7f9c2..d03aec7ab30 100644
--- a/src/test/ui/specialization/specialization-default-projection.stderr
+++ b/src/test/ui/specialization/specialization-default-projection.stderr
@@ -5,10 +5,10 @@ LL | fn generic<T>() -> <T as Foo>::Assoc {
    |                    ----------------- expected `<T as Foo>::Assoc` because of return type
 ...
 LL |     ()
-   |     ^^ expected associated type, found ()
+   |     ^^ expected associated type, found `()`
    |
-   = note: expected type `<T as Foo>::Assoc`
-              found type `()`
+   = note: expected associated type `<T as Foo>::Assoc`
+                    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
 
@@ -21,10 +21,10 @@ LL | fn monomorphic() -> () {
 LL |     generic::<()>()
    |     ^^^^^^^^^^^^^^^- help: try adding a semicolon: `;`
    |     |
-   |     expected (), found associated type
+   |     expected `()`, found associated type
    |
-   = note: expected type `()`
-              found type `<() as Foo>::Assoc`
+   = 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/specialization/specialization-default-types.stderr b/src/test/ui/specialization/specialization-default-types.stderr
index 932087421fb..257c114252c 100644
--- a/src/test/ui/specialization/specialization-default-types.stderr
+++ b/src/test/ui/specialization/specialization-default-types.stderr
@@ -6,8 +6,8 @@ LL |     default fn generate(self) -> Self::Output {
 LL |         Box::new(self)
    |         ^^^^^^^^^^^^^^ expected associated type, found struct `std::boxed::Box`
    |
-   = note: expected type `<T as Example>::Output`
-              found type `std::boxed::Box<T>`
+   = note: expected associated type `<T as Example>::Output`
+                       found struct `std::boxed::Box<T>`
    = note: consider constraining the associated type `<T as Example>::Output` to `std::boxed::Box<T>` or calling a method that returns `<T as Example>::Output`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
 
@@ -19,8 +19,8 @@ LL | fn trouble<T>(t: T) -> Box<T> {
 LL |     Example::generate(t)
    |     ^^^^^^^^^^^^^^^^^^^^ expected struct `std::boxed::Box`, found associated type
    |
-   = note: expected type `std::boxed::Box<T>`
-              found type `<T as Example>::Output`
+   = note:       expected struct `std::boxed::Box<T>`
+           found associated type `<T as Example>::Output`
    = note: consider constraining the associated type `<T as Example>::Output` to `std::boxed::Box<T>`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
 
diff --git a/src/test/ui/static/static-mut-bad-types.stderr b/src/test/ui/static/static-mut-bad-types.stderr
index 88d62011fc4..ddd98ff4079 100644
--- a/src/test/ui/static/static-mut-bad-types.stderr
+++ b/src/test/ui/static/static-mut-bad-types.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/static-mut-bad-types.rs:5:13
    |
 LL |         a = true;
-   |             ^^^^ expected isize, found bool
+   |             ^^^^ expected `isize`, found `bool`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/static/static-reference-to-fn-1.stderr b/src/test/ui/static/static-reference-to-fn-1.stderr
index f6d2385ac69..77ab62c321c 100644
--- a/src/test/ui/static/static-reference-to-fn-1.stderr
+++ b/src/test/ui/static/static-reference-to-fn-1.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |         func: &foo,
    |               ^^^^ expected fn pointer, found fn item
    |
-   = note: expected type `&fn() -> std::option::Option<isize>`
-              found type `&fn() -> std::option::Option<isize> {foo}`
+   = note: expected reference `&fn() -> std::option::Option<isize>`
+              found reference `&fn() -> std::option::Option<isize> {foo}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/str/str-array-assignment.stderr b/src/test/ui/str/str-array-assignment.stderr
index ecd5fb44129..909ff1e0263 100644
--- a/src/test/ui/str/str-array-assignment.stderr
+++ b/src/test/ui/str/str-array-assignment.stderr
@@ -2,12 +2,9 @@ error[E0308]: if and else have incompatible types
   --> $DIR/str-array-assignment.rs:3:37
    |
 LL |   let t = if true { s[..2] } else { s };
-   |                     ------          ^ expected str, found &str
+   |                     ------          ^ expected `str`, found `&str`
    |                     |
    |                     expected because of this
-   |
-   = note: expected type `str`
-              found type `&str`
 
 error[E0308]: mismatched types
   --> $DIR/str-array-assignment.rs:5:27
@@ -15,11 +12,8 @@ error[E0308]: mismatched types
 LL |   let u: &str = if true { s[..2] } else { s };
    |                           ^^^^^^
    |                           |
-   |                           expected &str, found str
+   |                           expected `&str`, found `str`
    |                           help: consider borrowing here: `&s[..2]`
-   |
-   = note: expected type `&str`
-              found type `str`
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/str-array-assignment.rs:7:7
@@ -40,11 +34,8 @@ error[E0308]: mismatched types
 LL |   let w: &str = s[..2];
    |                 ^^^^^^
    |                 |
-   |                 expected &str, found str
+   |                 expected `&str`, found `str`
    |                 help: consider borrowing here: `&s[..2]`
-   |
-   = note: expected type `&str`
-              found type `str`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/str/str-lit-type-mismatch.stderr b/src/test/ui/str/str-lit-type-mismatch.stderr
index ef40faa8e26..7174fd972eb 100644
--- a/src/test/ui/str/str-lit-type-mismatch.stderr
+++ b/src/test/ui/str/str-lit-type-mismatch.stderr
@@ -4,11 +4,11 @@ error[E0308]: mismatched types
 LL |     let x: &[u8] = "foo";
    |                    ^^^^^
    |                    |
-   |                    expected slice, found str
+   |                    expected slice `[u8]`, found `str`
    |                    help: consider adding a leading `b`: `b"foo"`
    |
-   = note: expected type `&[u8]`
-              found type `&'static str`
+   = note: expected reference `&[u8]`
+              found reference `&'static str`
 
 error[E0308]: mismatched types
   --> $DIR/str-lit-type-mismatch.rs:3:23
@@ -16,11 +16,11 @@ error[E0308]: mismatched types
 LL |     let y: &[u8; 4] = "baaa";
    |                       ^^^^^^
    |                       |
-   |                       expected array of 4 elements, found str
+   |                       expected array `[u8; 4]`, found `str`
    |                       help: consider adding a leading `b`: `b"baaa"`
    |
-   = note: expected type `&[u8; 4]`
-              found type `&'static str`
+   = note: expected reference `&[u8; 4]`
+              found reference `&'static str`
 
 error[E0308]: mismatched types
   --> $DIR/str-lit-type-mismatch.rs:4:19
@@ -28,11 +28,11 @@ error[E0308]: mismatched types
 LL |     let z: &str = b"foo";
    |                   ^^^^^^
    |                   |
-   |                   expected str, found array of 3 elements
+   |                   expected `str`, found array `[u8; 3]`
    |                   help: consider removing the leading `b`: `"foo"`
    |
-   = note: expected type `&str`
-              found type `&'static [u8; 3]`
+   = note: expected reference `&str`
+              found reference `&'static [u8; 3]`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/struct-literal-variant-in-if.stderr b/src/test/ui/struct-literal-variant-in-if.stderr
index bfc8b24e8ac..b75a53915b5 100644
--- a/src/test/ui/struct-literal-variant-in-if.stderr
+++ b/src/test/ui/struct-literal-variant-in-if.stderr
@@ -56,20 +56,14 @@ error[E0308]: mismatched types
 LL |     if x == E::V { field } {}
    |     ---------------^^^^^--- help: consider using a semicolon here
    |     |              |
-   |     |              expected (), found bool
+   |     |              expected `()`, found `bool`
    |     expected this to be `()`
-   |
-   = note: expected type `()`
-              found type `bool`
 
 error[E0308]: mismatched types
   --> $DIR/struct-literal-variant-in-if.rs:21:20
    |
 LL |     let y: usize = ();
-   |                    ^^ expected usize, found ()
-   |
-   = note: expected type `usize`
-              found type `()`
+   |                    ^^ expected `usize`, found `()`
 
 error: aborting due to 7 previous errors
 
diff --git a/src/test/ui/structs/struct-base-wrong-type.stderr b/src/test/ui/structs/struct-base-wrong-type.stderr
index a0216305f31..b039ce2cc92 100644
--- a/src/test/ui/structs/struct-base-wrong-type.stderr
+++ b/src/test/ui/structs/struct-base-wrong-type.stderr
@@ -3,36 +3,24 @@ error[E0308]: mismatched types
    |
 LL | static foo: Foo = Foo { a: 2, ..bar };
    |                                 ^^^ expected struct `Foo`, found struct `Bar`
-   |
-   = note: expected type `Foo`
-              found type `Bar`
 
 error[E0308]: mismatched types
   --> $DIR/struct-base-wrong-type.rs:8:35
    |
 LL | static foo_i: Foo = Foo { a: 2, ..4 };
    |                                   ^ expected struct `Foo`, found integer
-   |
-   = note: expected type `Foo`
-              found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/struct-base-wrong-type.rs:12:27
    |
 LL |     let f = Foo { a: 2, ..b };
    |                           ^ expected struct `Foo`, found struct `Bar`
-   |
-   = note: expected type `Foo`
-              found type `Bar`
 
 error[E0308]: mismatched types
   --> $DIR/struct-base-wrong-type.rs:13:34
    |
 LL |     let f__isize = Foo { a: 2, ..4 };
    |                                  ^ expected struct `Foo`, found integer
-   |
-   = note: expected type `Foo`
-              found type `{integer}`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/structs/struct-path-self-type-mismatch.stderr b/src/test/ui/structs/struct-path-self-type-mismatch.stderr
index 687d610baf8..b55a2cbf752 100644
--- a/src/test/ui/structs/struct-path-self-type-mismatch.stderr
+++ b/src/test/ui/structs/struct-path-self-type-mismatch.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/struct-path-self-type-mismatch.rs:7:23
    |
 LL |         Self { inner: 1.5f32 };
-   |                       ^^^^^^ expected i32, found f32
+   |                       ^^^^^^ expected `i32`, found `f32`
 
 error[E0308]: mismatched types
   --> $DIR/struct-path-self-type-mismatch.rs:15:20
@@ -15,8 +15,8 @@ LL |     fn new<U>(u: U) -> Foo<U> {
 LL |             inner: u
    |                    ^ expected type parameter `T`, found type parameter `U`
    |
-   = note: expected type `T`
-              found type `U`
+   = note: expected type parameter `T`
+              found type parameter `U`
    = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
 
@@ -36,8 +36,8 @@ LL | |
 LL | |         }
    | |_________^ expected type parameter `U`, found type parameter `T`
    |
-   = note: expected type `Foo<U>`
-              found type `Foo<T>`
+   = note: expected struct `Foo<U>`
+              found struct `Foo<T>`
    = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
    = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
 
diff --git a/src/test/ui/structs/structure-constructor-type-mismatch.rs b/src/test/ui/structs/structure-constructor-type-mismatch.rs
index 8850f6ea89f..01cc1764657 100644
--- a/src/test/ui/structs/structure-constructor-type-mismatch.rs
+++ b/src/test/ui/structs/structure-constructor-type-mismatch.rs
@@ -16,32 +16,32 @@ fn main() {
     let pt = PointF {
         x: 1,
         //~^ ERROR mismatched types
-        //~| expected f32, found integer
+        //~| expected `f32`, found integer
         y: 2,
         //~^ ERROR mismatched types
-        //~| expected f32, found integer
+        //~| expected `f32`, found integer
     };
 
     let pt2 = Point::<f32> {
         x: 3,
         //~^ ERROR mismatched types
-        //~| expected f32, found integer
+        //~| expected `f32`, found integer
         y: 4,
         //~^ ERROR mismatched types
-        //~| expected f32, found integer
+        //~| expected `f32`, found integer
     };
 
     let pair = PairF {
         x: 5,
         //~^ ERROR mismatched types
-        //~| expected f32, found integer
+        //~| expected `f32`, found integer
         y: 6,
     };
 
     let pair2 = PairF::<i32> {
         x: 7,
         //~^ ERROR mismatched types
-        //~| expected f32, found integer
+        //~| expected `f32`, found integer
         y: 8,
     };
 
diff --git a/src/test/ui/structs/structure-constructor-type-mismatch.stderr b/src/test/ui/structs/structure-constructor-type-mismatch.stderr
index 62d872bb3e4..4bd3acac532 100644
--- a/src/test/ui/structs/structure-constructor-type-mismatch.stderr
+++ b/src/test/ui/structs/structure-constructor-type-mismatch.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |         x: 1,
    |            ^
    |            |
-   |            expected f32, found integer
+   |            expected `f32`, found integer
    |            help: use a float literal: `1.0`
-   |
-   = note: expected type `f32`
-              found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:20:12
@@ -16,11 +13,8 @@ error[E0308]: mismatched types
 LL |         y: 2,
    |            ^
    |            |
-   |            expected f32, found integer
+   |            expected `f32`, found integer
    |            help: use a float literal: `2.0`
-   |
-   = note: expected type `f32`
-              found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:26:12
@@ -28,11 +22,8 @@ error[E0308]: mismatched types
 LL |         x: 3,
    |            ^
    |            |
-   |            expected f32, found integer
+   |            expected `f32`, found integer
    |            help: use a float literal: `3.0`
-   |
-   = note: expected type `f32`
-              found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:29:12
@@ -40,11 +31,8 @@ error[E0308]: mismatched types
 LL |         y: 4,
    |            ^
    |            |
-   |            expected f32, found integer
+   |            expected `f32`, found integer
    |            help: use a float literal: `4.0`
-   |
-   = note: expected type `f32`
-              found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:35:12
@@ -52,11 +40,8 @@ error[E0308]: mismatched types
 LL |         x: 5,
    |            ^
    |            |
-   |            expected f32, found integer
+   |            expected `f32`, found integer
    |            help: use a float literal: `5.0`
-   |
-   = note: expected type `f32`
-              found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:42:12
@@ -64,11 +49,8 @@ error[E0308]: mismatched types
 LL |         x: 7,
    |            ^
    |            |
-   |            expected f32, found integer
+   |            expected `f32`, found integer
    |            help: use a float literal: `7.0`
-   |
-   = note: expected type `f32`
-              found type `{integer}`
 
 error[E0107]: wrong number of type arguments: expected 0, found 1
   --> $DIR/structure-constructor-type-mismatch.rs:48:24
@@ -82,11 +64,8 @@ error[E0308]: mismatched types
 LL |         x: 9,
    |            ^
    |            |
-   |            expected f32, found integer
+   |            expected `f32`, found integer
    |            help: use a float literal: `9.0`
-   |
-   = note: expected type `f32`
-              found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:50:12
@@ -94,11 +73,8 @@ error[E0308]: mismatched types
 LL |         y: 10,
    |            ^^
    |            |
-   |            expected f32, found integer
+   |            expected `f32`, found integer
    |            help: use a float literal: `10.0`
-   |
-   = note: expected type `f32`
-              found type `{integer}`
 
 error[E0107]: wrong number of type arguments: expected 0, found 1
   --> $DIR/structure-constructor-type-mismatch.rs:54:18
@@ -112,10 +88,10 @@ error[E0308]: mismatched types
 LL |     match (Point { x: 1, y: 2 }) {
    |           ---------------------- this match expression has type `Point<{integer}>`
 LL |         PointF::<u32> { .. } => {}
-   |         ^^^^^^^^^^^^^^^^^^^^ expected integer, found f32
+   |         ^^^^^^^^^^^^^^^^^^^^ expected integer, found `f32`
    |
-   = note: expected type `Point<{integer}>`
-              found type `Point<f32>`
+   = note: expected struct `Point<{integer}>`
+              found struct `Point<f32>`
 
 error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:59:9
@@ -123,10 +99,10 @@ error[E0308]: mismatched types
 LL |     match (Point { x: 1, y: 2 }) {
    |           ---------------------- this match expression has type `Point<{integer}>`
 LL |         PointF { .. } => {}
-   |         ^^^^^^^^^^^^^ expected integer, found f32
+   |         ^^^^^^^^^^^^^ expected integer, found `f32`
    |
-   = note: expected type `Point<{integer}>`
-              found type `Point<f32>`
+   = note: expected struct `Point<{integer}>`
+              found struct `Point<f32>`
 
 error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:67:9
@@ -134,10 +110,10 @@ error[E0308]: mismatched types
 LL |     match (Pair { x: 1, y: 2 }) {
    |           --------------------- this match expression has type `Pair<{integer}, {integer}>`
 LL |         PairF::<u32> { .. } => {}
-   |         ^^^^^^^^^^^^^^^^^^^ expected integer, found f32
+   |         ^^^^^^^^^^^^^^^^^^^ expected integer, found `f32`
    |
-   = note: expected type `Pair<{integer}, {integer}>`
-              found type `Pair<f32, u32>`
+   = note: expected struct `Pair<{integer}, {integer}>`
+              found struct `Pair<f32, u32>`
 
 error: aborting due to 13 previous errors
 
diff --git a/src/test/ui/substs-ppaux.normal.stderr b/src/test/ui/substs-ppaux.normal.stderr
index cb55203c88e..8a233105491 100644
--- a/src/test/ui/substs-ppaux.normal.stderr
+++ b/src/test/ui/substs-ppaux.normal.stderr
@@ -7,11 +7,11 @@ LL |     fn bar<'a, T>() where T: 'a {}
 LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |                 |
-   |                 expected (), found fn item
+   |                 expected `()`, found fn item
    |                 help: use parentheses to call this function: `<i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>()`
    |
-   = note: expected type `()`
-              found type `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
@@ -22,11 +22,11 @@ LL |     fn bar<'a, T>() where T: 'a {}
 LL |     let x: () = <i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |                 |
-   |                 expected (), found fn item
+   |                 expected `()`, found fn item
    |                 help: use parentheses to call this function: `<i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>()`
    |
-   = note: expected type `()`
-              found type `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
@@ -37,11 +37,11 @@ LL |     fn baz() {}
 LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::baz;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |                 |
-   |                 expected (), found fn item
+   |                 expected `()`, found fn item
    |                 help: use parentheses to call this function: `<i8 as Foo<'static, 'static,  u8>>::baz()`
    |
-   = note: expected type `()`
-              found type `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
@@ -52,11 +52,11 @@ LL | fn foo<'z>() where &'z (): Sized {
 LL |     let x: () = foo::<'static>;
    |                 ^^^^^^^^^^^^^^
    |                 |
-   |                 expected (), found fn item
+   |                 expected `()`, found fn item
    |                 help: use parentheses to call this function: `foo::<'static>()`
    |
-   = note: expected type `()`
-              found type `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 129ebd43594..66cd94d7a1b 100644
--- a/src/test/ui/substs-ppaux.rs
+++ b/src/test/ui/substs-ppaux.rs
@@ -15,36 +15,36 @@ 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]~| found type `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::bar::<ReStatic, char>}`
+    //[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]~| found type `fn() {<i8 as Foo<'static, 'static, u8>>::bar::<'static, char>}`
+    //[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]~| found type `fn() {<i8 as Foo<ReStatic, ReStatic>>::bar::<ReStatic, char>}`
+    //[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]~| found type `fn() {<i8 as Foo<'static, 'static>>::bar::<'static, char>}`
+    //[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]~| found type `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::baz}`
+    //[verbose]~| expected unit type `()`
+    //[verbose]~| found fn item `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::baz}`
     //[normal]~^^^^ ERROR mismatched types
-    //[normal]~| expected type `()`
-    //[normal]~| found type `fn() {<i8 as Foo<'static, 'static, u8>>::baz}`
+    //[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]~| found type `fn() {foo::<ReStatic>}`
+    //[verbose]~| expected unit type `()`
+    //[verbose]~| found fn item `fn() {foo::<ReStatic>}`
     //[normal]~^^^^ ERROR mismatched types
-    //[normal]~| expected type `()`
-    //[normal]~| found type `fn() {foo::<'static>}`
+    //[normal]~| expected unit type `()`
+    //[normal]~| found fn item `fn() {foo::<'static>}`
 
     <str as Foo<u8>>::bar;
     //[verbose]~^ ERROR the size for values of type
diff --git a/src/test/ui/substs-ppaux.verbose.stderr b/src/test/ui/substs-ppaux.verbose.stderr
index cafcba97b92..ab70d02e157 100644
--- a/src/test/ui/substs-ppaux.verbose.stderr
+++ b/src/test/ui/substs-ppaux.verbose.stderr
@@ -7,11 +7,11 @@ LL |     fn bar<'a, T>() where T: 'a {}
 LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |                 |
-   |                 expected (), found fn item
+   |                 expected `()`, found fn item
    |                 help: use parentheses to call this function: `<i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>()`
    |
-   = note: expected type `()`
-              found type `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
@@ -22,11 +22,11 @@ LL |     fn bar<'a, T>() where T: 'a {}
 LL |     let x: () = <i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |                 |
-   |                 expected (), found fn item
+   |                 expected `()`, found fn item
    |                 help: use parentheses to call this function: `<i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>()`
    |
-   = note: expected type `()`
-              found type `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
@@ -37,11 +37,11 @@ LL |     fn baz() {}
 LL |     let x: () = <i8 as Foo<'static, 'static,  u8>>::baz;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |                 |
-   |                 expected (), found fn item
+   |                 expected `()`, found fn item
    |                 help: use parentheses to call this function: `<i8 as Foo<'static, 'static,  u8>>::baz()`
    |
-   = note: expected type `()`
-              found type `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
@@ -52,11 +52,11 @@ LL | fn foo<'z>() where &'z (): Sized {
 LL |     let x: () = foo::<'static>;
    |                 ^^^^^^^^^^^^^^
    |                 |
-   |                 expected (), found fn item
+   |                 expected `()`, found fn item
    |                 help: use parentheses to call this function: `foo::<'static>()`
    |
-   = note: expected type `()`
-              found type `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/as-ref.stderr b/src/test/ui/suggestions/as-ref.stderr
index 8143acc957b..1cc63f5c476 100644
--- a/src/test/ui/suggestions/as-ref.stderr
+++ b/src/test/ui/suggestions/as-ref.stderr
@@ -2,45 +2,33 @@ error[E0308]: mismatched types
   --> $DIR/as-ref.rs:6:27
    |
 LL |   opt.map(|arg| takes_ref(arg));
-   |       ---                 ^^^ expected &Foo, found struct `Foo`
+   |       ---                 ^^^ expected `&Foo`, found struct `Foo`
    |       |
    |       help: consider using `as_ref` instead: `as_ref().map`
-   |
-   = note: expected type `&Foo`
-              found type `Foo`
 
 error[E0308]: mismatched types
   --> $DIR/as-ref.rs:8:37
    |
 LL |   opt.and_then(|arg| Some(takes_ref(arg)));
-   |       --------                      ^^^ expected &Foo, found struct `Foo`
+   |       --------                      ^^^ expected `&Foo`, found struct `Foo`
    |       |
    |       help: consider using `as_ref` instead: `as_ref().and_then`
-   |
-   = note: expected type `&Foo`
-              found type `Foo`
 
 error[E0308]: mismatched types
   --> $DIR/as-ref.rs:11:27
    |
 LL |   opt.map(|arg| takes_ref(arg));
-   |       ---                 ^^^ expected &Foo, found struct `Foo`
+   |       ---                 ^^^ expected `&Foo`, found struct `Foo`
    |       |
    |       help: consider using `as_ref` instead: `as_ref().map`
-   |
-   = note: expected type `&Foo`
-              found type `Foo`
 
 error[E0308]: mismatched types
   --> $DIR/as-ref.rs:13:35
    |
 LL |   opt.and_then(|arg| Ok(takes_ref(arg)));
-   |       --------                    ^^^ expected &Foo, found struct `Foo`
+   |       --------                    ^^^ expected `&Foo`, found struct `Foo`
    |       |
    |       help: consider using `as_ref` instead: `as_ref().and_then`
-   |
-   = note: expected type `&Foo`
-              found type `Foo`
 
 error[E0308]: mismatched types
   --> $DIR/as-ref.rs:16:27
@@ -51,8 +39,8 @@ LL |   let y: Option<&usize> = x;
    |                           expected enum `std::option::Option`, found reference
    |                           help: you can convert from `&Option<T>` to `Option<&T>` using `.as_ref()`: `x.as_ref()`
    |
-   = note: expected type `std::option::Option<&usize>`
-              found type `&std::option::Option<usize>`
+   = note:   expected enum `std::option::Option<&usize>`
+           found reference `&std::option::Option<usize>`
 
 error[E0308]: mismatched types
   --> $DIR/as-ref.rs:19:35
@@ -60,8 +48,8 @@ error[E0308]: mismatched types
 LL |   let y: Result<&usize, &usize> = x;
    |                                   ^ expected enum `std::result::Result`, found reference
    |
-   = note: expected type `std::result::Result<&usize, &usize>`
-              found type `&std::result::Result<usize, usize>`
+   = note:   expected enum `std::result::Result<&usize, &usize>`
+           found reference `&std::result::Result<usize, usize>`
 help: you can convert from `&Result<T, E>` to `Result<&T, &E>` using `.as_ref()`
    |
 LL |   let y: Result<&usize, &usize> = x.as_ref();
@@ -73,8 +61,8 @@ error[E0308]: mismatched types
 LL |   let y: Result<&usize, usize> = x;
    |                                  ^ expected enum `std::result::Result`, found reference
    |
-   = note: expected type `std::result::Result<&usize, usize>`
-              found type `&std::result::Result<usize, usize>`
+   = note:   expected enum `std::result::Result<&usize, usize>`
+           found reference `&std::result::Result<usize, usize>`
 
 error: aborting due to 7 previous errors
 
diff --git a/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr b/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr
index bc7a7247a12..e37edc1daca 100644
--- a/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr
+++ b/src/test/ui/suggestions/dont-suggest-deref-inside-macro-issue-58298.stderr
@@ -6,11 +6,9 @@ LL | |         "abc"
 LL | |     };
    | |      ^
    | |      |
-   | |______expected &str, found struct `std::string::String`
+   | |______expected `&str`, found struct `std::string::String`
    |        in this macro invocation
    |
-   = note: expected type `&str`
-              found type `std::string::String`
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error: aborting due to previous error
diff --git a/src/test/ui/suggestions/dont-suggest-try_into-in-macros.stderr b/src/test/ui/suggestions/dont-suggest-try_into-in-macros.stderr
index f04306997a9..1f2252f4d43 100644
--- a/src/test/ui/suggestions/dont-suggest-try_into-in-macros.stderr
+++ b/src/test/ui/suggestions/dont-suggest-try_into-in-macros.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/dont-suggest-try_into-in-macros.rs:2:5
    |
 LL |     assert_eq!(10u64, 10usize);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u64, found usize
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `usize`
    |
    = 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/suggestions/fn-or-tuple-struct-without-args.stderr b/src/test/ui/suggestions/fn-or-tuple-struct-without-args.stderr
index 56810a49158..e699a753d3a 100644
--- a/src/test/ui/suggestions/fn-or-tuple-struct-without-args.stderr
+++ b/src/test/ui/suggestions/fn-or-tuple-struct-without-args.stderr
@@ -21,11 +21,11 @@ LL | fn foo(a: usize, b: usize) -> usize { a }
 LL |     let _: usize = foo;
    |                    ^^^
    |                    |
-   |                    expected usize, found fn item
+   |                    expected `usize`, found fn item
    |                    help: use parentheses to call this function: `foo(a, b)`
    |
    = note: expected type `usize`
-              found type `fn(usize, usize) -> usize {foo}`
+           found fn item `fn(usize, usize) -> usize {foo}`
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:30:16
@@ -39,8 +39,8 @@ LL |     let _: S = S;
    |                expected struct `S`, found fn item
    |                help: use parentheses to instantiate this tuple struct: `S(_, _)`
    |
-   = note: expected type `S`
-              found type `fn(usize, usize) -> S {S}`
+   = note: expected struct `S`
+             found fn item `fn(usize, usize) -> S {S}`
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:31:20
@@ -51,11 +51,11 @@ LL | fn bar() -> usize { 42 }
 LL |     let _: usize = bar;
    |                    ^^^
    |                    |
-   |                    expected usize, found fn item
+   |                    expected `usize`, found fn item
    |                    help: use parentheses to call this function: `bar()`
    |
    = note: expected type `usize`
-              found type `fn() -> usize {bar}`
+           found fn item `fn() -> usize {bar}`
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:32:16
@@ -69,8 +69,8 @@ LL |     let _: V = V;
    |                expected struct `V`, found fn item
    |                help: use parentheses to instantiate this tuple struct: `V()`
    |
-   = note: expected type `V`
-              found type `fn() -> V {V}`
+   = note: expected struct `V`
+             found fn item `fn() -> V {V}`
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:33:20
@@ -81,11 +81,11 @@ LL |     fn baz(x: usize, y: usize) -> usize { x }
 LL |     let _: usize = T::baz;
    |                    ^^^^^^
    |                    |
-   |                    expected usize, found fn item
+   |                    expected `usize`, found fn item
    |                    help: use parentheses to call this function: `T::baz(x, y)`
    |
    = note: expected type `usize`
-              found type `fn(usize, usize) -> usize {<_ as T>::baz}`
+           found fn item `fn(usize, usize) -> usize {<_ as T>::baz}`
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:34:20
@@ -96,11 +96,11 @@ LL |     fn bat(x: usize) -> usize { 42 }
 LL |     let _: usize = T::bat;
    |                    ^^^^^^
    |                    |
-   |                    expected usize, found fn item
+   |                    expected `usize`, found fn item
    |                    help: use parentheses to call this function: `T::bat(x)`
    |
    = note: expected type `usize`
-              found type `fn(usize) -> usize {<_ as T>::bat}`
+           found fn item `fn(usize) -> usize {<_ as T>::bat}`
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:35:16
@@ -114,8 +114,8 @@ LL |     let _: E = E::A;
    |                expected enum `E`, found fn item
    |                help: use parentheses to instantiate this tuple variant: `E::A(_)`
    |
-   = note: expected type `E`
-              found type `fn(usize) -> E {E::A}`
+   = note: expected enum `E`
+           found fn item `fn(usize) -> E {E::A}`
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:37:20
@@ -126,11 +126,11 @@ LL |     fn baz(x: usize, y: usize) -> usize { x }
 LL |     let _: usize = X::baz;
    |                    ^^^^^^
    |                    |
-   |                    expected usize, found fn item
+   |                    expected `usize`, found fn item
    |                    help: use parentheses to call this function: `X::baz(x, y)`
    |
    = note: expected type `usize`
-              found type `fn(usize, usize) -> usize {<X as T>::baz}`
+           found fn item `fn(usize, usize) -> usize {<X as T>::baz}`
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:38:20
@@ -141,11 +141,11 @@ LL |     fn bat(x: usize) -> usize { 42 }
 LL |     let _: usize = X::bat;
    |                    ^^^^^^
    |                    |
-   |                    expected usize, found fn item
+   |                    expected `usize`, found fn item
    |                    help: use parentheses to call this function: `X::bat(x)`
    |
    = note: expected type `usize`
-              found type `fn(usize) -> usize {<X as T>::bat}`
+           found fn item `fn(usize) -> usize {<X as T>::bat}`
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:39:20
@@ -156,11 +156,11 @@ LL |     fn bax(x: usize) -> usize { 42 }
 LL |     let _: usize = X::bax;
    |                    ^^^^^^
    |                    |
-   |                    expected usize, found fn item
+   |                    expected `usize`, found fn item
    |                    help: use parentheses to call this function: `X::bax(x)`
    |
    = note: expected type `usize`
-              found type `fn(usize) -> usize {<X as T>::bax}`
+           found fn item `fn(usize) -> usize {<X as T>::bax}`
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:40:20
@@ -171,11 +171,11 @@ LL |     fn bach(x: usize) -> usize;
 LL |     let _: usize = X::bach;
    |                    ^^^^^^^
    |                    |
-   |                    expected usize, found fn item
+   |                    expected `usize`, found fn item
    |                    help: use parentheses to call this function: `X::bach(x)`
    |
    = note: expected type `usize`
-              found type `fn(usize) -> usize {<X as T>::bach}`
+           found fn item `fn(usize) -> usize {<X as T>::bach}`
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:41:20
@@ -186,11 +186,11 @@ LL |     fn ban(&self) -> usize { 42 }
 LL |     let _: usize = X::ban;
    |                    ^^^^^^
    |                    |
-   |                    expected usize, found fn item
+   |                    expected `usize`, found fn item
    |                    help: use parentheses to call this function: `X::ban(_)`
    |
    = note: expected type `usize`
-              found type `for<'r> fn(&'r X) -> usize {<X as T>::ban}`
+           found fn item `for<'r> fn(&'r X) -> usize {<X as T>::ban}`
 
 error[E0308]: mismatched types
   --> $DIR/fn-or-tuple-struct-without-args.rs:42:20
@@ -201,11 +201,11 @@ LL |     fn bal(&self) -> usize;
 LL |     let _: usize = X::bal;
    |                    ^^^^^^
    |                    |
-   |                    expected usize, found fn item
+   |                    expected `usize`, found fn item
    |                    help: use parentheses to call this function: `X::bal(_)`
    |
    = note: expected type `usize`
-              found type `for<'r> fn(&'r X) -> usize {<X as T>::bal}`
+           found fn item `for<'r> fn(&'r X) -> usize {<X as T>::bal}`
 
 error[E0615]: attempted to take value of method `ban` on type `X`
   --> $DIR/fn-or-tuple-struct-without-args.rs:43:22
@@ -227,11 +227,11 @@ LL |     let closure = || 42;
 LL |     let _: usize = closure;
    |                    ^^^^^^^
    |                    |
-   |                    expected usize, found closure
+   |                    expected `usize`, found closure
    |                    help: use parentheses to call this closure: `closure()`
    |
    = note: expected type `usize`
-              found type `[closure@$DIR/fn-or-tuple-struct-without-args.rs:45:19: 45:24]`
+           found closure `[closure@$DIR/fn-or-tuple-struct-without-args.rs:45:19: 45:24]`
 
 error: aborting due to 17 previous errors
 
diff --git a/src/test/ui/suggestions/format-borrow.stderr b/src/test/ui/suggestions/format-borrow.stderr
index 44bb11faa7f..4b111396431 100644
--- a/src/test/ui/suggestions/format-borrow.stderr
+++ b/src/test/ui/suggestions/format-borrow.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |     let a: String = &String::from("a");
    |                     ^^^^^^^^^^^^^^^^^^
    |                     |
-   |                     expected struct `std::string::String`, found reference
+   |                     expected struct `std::string::String`, found `&std::string::String`
    |                     help: consider removing the borrow: `String::from("a")`
-   |
-   = note: expected type `std::string::String`
-              found type `&std::string::String`
 
 error[E0308]: mismatched types
   --> $DIR/format-borrow.rs:4:21
@@ -16,11 +13,8 @@ error[E0308]: mismatched types
 LL |     let b: String = &format!("b");
    |                     ^^^^^^^^^^^^^
    |                     |
-   |                     expected struct `std::string::String`, found reference
+   |                     expected struct `std::string::String`, found `&std::string::String`
    |                     help: consider removing the borrow: `format!("b")`
-   |
-   = note: expected type `std::string::String`
-              found type `&std::string::String`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/suggestions/issue-52820.stderr b/src/test/ui/suggestions/issue-52820.stderr
index fb568aca250..5ad6597b82e 100644
--- a/src/test/ui/suggestions/issue-52820.stderr
+++ b/src/test/ui/suggestions/issue-52820.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |         guts,
    |         ^^^^
    |         |
-   |         expected struct `std::string::String`, found &str
+   |         expected struct `std::string::String`, found `&str`
    |         help: try using a conversion method: `guts: guts.to_string()`
-   |
-   = note: expected type `std::string::String`
-              found type `&str`
 
 error[E0308]: mismatched types
   --> $DIR/issue-52820.rs:10:17
@@ -16,11 +13,8 @@ error[E0308]: mismatched types
 LL |         brains: guts.clone(),
    |                 ^^^^^^^^^^^^
    |                 |
-   |                 expected struct `std::string::String`, found &str
+   |                 expected struct `std::string::String`, found `&str`
    |                 help: try using a conversion method: `guts.to_string()`
-   |
-   = note: expected type `std::string::String`
-              found type `&str`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/suggestions/issue-59819.stderr b/src/test/ui/suggestions/issue-59819.stderr
index 66898115cbd..23991bbbe69 100644
--- a/src/test/ui/suggestions/issue-59819.stderr
+++ b/src/test/ui/suggestions/issue-59819.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |     let y: i32 = x;
    |                  ^
    |                  |
-   |                  expected i32, found struct `Foo`
+   |                  expected `i32`, found struct `Foo`
    |                  help: consider dereferencing the type: `*x`
-   |
-   = note: expected type `i32`
-              found type `Foo`
 
 error[E0308]: mismatched types
   --> $DIR/issue-59819.rs:30:18
@@ -16,11 +13,8 @@ error[E0308]: mismatched types
 LL |     let b: i32 = a;
    |                  ^
    |                  |
-   |                  expected i32, found &{integer}
+   |                  expected `i32`, found `&{integer}`
    |                  help: consider dereferencing the borrow: `*a`
-   |
-   = note: expected type `i32`
-              found type `&{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/issue-59819.rs:34:21
@@ -30,9 +24,6 @@ LL |     let g: String = f;
    |                     |
    |                     expected struct `std::string::String`, found struct `Bar`
    |                     help: try using a conversion method: `f.to_string()`
-   |
-   = note: expected type `std::string::String`
-              found type `Bar`
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/suggestions/match-ergonomics.stderr b/src/test/ui/suggestions/match-ergonomics.stderr
index b7497be6ceb..abdb754acc5 100644
--- a/src/test/ui/suggestions/match-ergonomics.stderr
+++ b/src/test/ui/suggestions/match-ergonomics.stderr
@@ -4,11 +4,11 @@ error[E0308]: mismatched types
 LL |         [&v] => {},
    |          ^^
    |          |
-   |          expected i32, found reference
+   |          expected `i32`, found reference
    |          help: you can probably remove the explicit borrow: `v`
    |
-   = note: expected type `i32`
-              found type `&_`
+   = note:   expected type `i32`
+           found reference `&_`
 
 error[E0529]: expected an array or slice, found `std::vec::Vec<i32>`
   --> $DIR/match-ergonomics.rs:8:9
@@ -28,11 +28,11 @@ error[E0308]: mismatched types
 LL |         &v => {},
    |         ^^
    |         |
-   |         expected i32, found reference
+   |         expected `i32`, found reference
    |         help: you can probably remove the explicit borrow: `v`
    |
-   = note: expected type `i32`
-              found type `&_`
+   = note:   expected type `i32`
+           found reference `&_`
 
 error[E0308]: mismatched types
   --> $DIR/match-ergonomics.rs:40:13
@@ -40,11 +40,11 @@ error[E0308]: mismatched types
 LL |     if let [&v] = &x[..] {}
    |             ^^
    |             |
-   |             expected i32, found reference
+   |             expected `i32`, found reference
    |             help: you can probably remove the explicit borrow: `v`
    |
-   = note: expected type `i32`
-              found type `&_`
+   = note:   expected type `i32`
+           found reference `&_`
 
 error: aborting due to 5 previous errors
 
diff --git a/src/test/ui/suggestions/match-needing-semi.stderr b/src/test/ui/suggestions/match-needing-semi.stderr
index 988945817c2..28abd089525 100644
--- a/src/test/ui/suggestions/match-needing-semi.stderr
+++ b/src/test/ui/suggestions/match-needing-semi.stderr
@@ -5,16 +5,13 @@ LL | /     match 3 {
 LL | |         4 => 1,
 LL | |         3 => {
 LL | |             2
-   | |             ^ expected (), found integer
+   | |             ^ expected `()`, found integer
 LL | |         }
 LL | |         _ => 2
 LL | |     }
    | |     -- help: consider using a semicolon here
    | |_____|
    |       expected this to be `()`
-   |
-   = note: expected type `()`
-              found type `{integer}`
 
 error[E0308]: mismatched types
   --> $DIR/match-needing-semi.rs:12:5
@@ -26,10 +23,7 @@ LL | |         _ => 2
 LL | |     }
    | |     ^- help: consider using a semicolon here
    | |_____|
-   |       expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |       expected `()`, found integer
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/suggestions/mismatched-types-numeric-from.stderr b/src/test/ui/suggestions/mismatched-types-numeric-from.stderr
index 223b6747322..f2c67dd1fdb 100644
--- a/src/test/ui/suggestions/mismatched-types-numeric-from.stderr
+++ b/src/test/ui/suggestions/mismatched-types-numeric-from.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/mismatched-types-numeric-from.rs:2:18
    |
 LL |     let _: u32 = i32::from(0_u8);
-   |                  ^^^^^^^^^^^^^^^ expected u32, found i32
+   |                  ^^^^^^^^^^^^^^^ expected `u32`, found `i32`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/suggestions/mut-ref-reassignment.stderr b/src/test/ui/suggestions/mut-ref-reassignment.stderr
index 66b78a1b140..e7748008494 100644
--- a/src/test/ui/suggestions/mut-ref-reassignment.stderr
+++ b/src/test/ui/suggestions/mut-ref-reassignment.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     opt = None;
    |           ^^^^ expected mutable reference, found enum `std::option::Option`
    |
-   = note: expected type `&mut std::option::Option<std::string::String>`
-              found type `std::option::Option<_>`
+   = note: expected mutable reference `&mut std::option::Option<std::string::String>`
+                           found enum `std::option::Option<_>`
 help: consider dereferencing here to assign to the mutable borrowed piece of memory
    |
 LL |     *opt = None;
@@ -17,8 +17,8 @@ error[E0308]: mismatched types
 LL |     opt = None
    |           ^^^^ expected mutable reference, found enum `std::option::Option`
    |
-   = note: expected type `&mut std::result::Result<std::string::String, ()>`
-              found type `std::option::Option<_>`
+   = note: expected mutable reference `&mut std::result::Result<std::string::String, ()>`
+                           found enum `std::option::Option<_>`
 
 error[E0308]: mismatched types
   --> $DIR/mut-ref-reassignment.rs:10:11
@@ -26,8 +26,8 @@ error[E0308]: mismatched types
 LL |     opt = Some(String::new())
    |           ^^^^^^^^^^^^^^^^^^^ expected mutable reference, found enum `std::option::Option`
    |
-   = note: expected type `&mut std::option::Option<std::string::String>`
-              found type `std::option::Option<std::string::String>`
+   = note: expected mutable reference `&mut std::option::Option<std::string::String>`
+                           found enum `std::option::Option<std::string::String>`
 help: consider dereferencing here to assign to the mutable borrowed piece of memory
    |
 LL |     *opt = Some(String::new())
@@ -39,8 +39,8 @@ error[E0308]: mismatched types
 LL |     opt = Some(42)
    |           ^^^^^^^^ expected mutable reference, found enum `std::option::Option`
    |
-   = note: expected type `&mut std::option::Option<std::string::String>`
-              found type `std::option::Option<{integer}>`
+   = note: expected mutable reference `&mut std::option::Option<std::string::String>`
+                           found enum `std::option::Option<{integer}>`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/suggestions/opaque-type-error.stderr b/src/test/ui/suggestions/opaque-type-error.stderr
index 450cbd4799f..e7bf84a4113 100644
--- a/src/test/ui/suggestions/opaque-type-error.stderr
+++ b/src/test/ui/suggestions/opaque-type-error.stderr
@@ -10,8 +10,8 @@ LL | |         thing_two()
 LL | |     }.await
    | |_____- if and else have incompatible types
    |
-   = note: expected type `impl std::future::Future` (opaque type at <$DIR/opaque-type-error.rs:8:19>)
-              found type `impl std::future::Future` (opaque type at <$DIR/opaque-type-error.rs:12:19>)
+   = note:     expected type `impl std::future::Future` (opaque type at <$DIR/opaque-type-error.rs:8:19>)
+           found opaque type `impl std::future::Future` (opaque type at <$DIR/opaque-type-error.rs:12:19>)
    = note: distinct uses of `impl Trait` result in different opaque types
    = help: if both `Future`s have the same `Output` type, consider `.await`ing on both of them
 
diff --git a/src/test/ui/suggestions/recover-from-semicolon-trailing-item.stderr b/src/test/ui/suggestions/recover-from-semicolon-trailing-item.stderr
index 9a47a1efb75..a93eca0c99d 100644
--- a/src/test/ui/suggestions/recover-from-semicolon-trailing-item.stderr
+++ b/src/test/ui/suggestions/recover-from-semicolon-trailing-item.stderr
@@ -22,28 +22,19 @@ error[E0308]: mismatched types
   --> $DIR/recover-from-semicolon-trailing-item.rs:10:20
    |
 LL |     let _: usize = S {};
-   |                    ^^^^ expected usize, found struct `S`
-   |
-   = note: expected type `usize`
-              found type `S`
+   |                    ^^^^ expected `usize`, found struct `S`
 
 error[E0308]: mismatched types
   --> $DIR/recover-from-semicolon-trailing-item.rs:12:20
    |
 LL |     let _: usize = X {};
-   |                    ^^^^ expected usize, found struct `main::X`
-   |
-   = note: expected type `usize`
-              found type `main::X`
+   |                    ^^^^ expected `usize`, found struct `main::X`
 
 error[E0308]: mismatched types
   --> $DIR/recover-from-semicolon-trailing-item.rs:14:9
    |
 LL |     foo("");
-   |         ^^ expected usize, found reference
-   |
-   = note: expected type `usize`
-              found type `&'static str`
+   |         ^^ expected `usize`, found `&str`
 
 error: aborting due to 6 previous errors
 
diff --git a/src/test/ui/suggestions/suggest-box.stderr b/src/test/ui/suggestions/suggest-box.stderr
index 50c106d63a0..cda6d5254e7 100644
--- a/src/test/ui/suggestions/suggest-box.stderr
+++ b/src/test/ui/suggestions/suggest-box.stderr
@@ -8,8 +8,8 @@ LL | |         Ok(())
 LL | |     };
    | |_____^ expected struct `std::boxed::Box`, found closure
    |
-   = note: expected type `std::boxed::Box<dyn std::ops::Fn() -> std::result::Result<(), ()>>`
-              found type `[closure@$DIR/suggest-box.rs:4:47: 7:6]`
+   = note: expected struct `std::boxed::Box<dyn std::ops::Fn() -> std::result::Result<(), ()>>`
+             found closure `[closure@$DIR/suggest-box.rs:4:47: 7:6]`
    = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
 help: store this in the heap by calling `Box::new`
    |
diff --git a/src/test/ui/suggestions/type-mismatch-struct-field-shorthand-2.stderr b/src/test/ui/suggestions/type-mismatch-struct-field-shorthand-2.stderr
index a25c644680e..f717cc7addb 100644
--- a/src/test/ui/suggestions/type-mismatch-struct-field-shorthand-2.stderr
+++ b/src/test/ui/suggestions/type-mismatch-struct-field-shorthand-2.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL |     let _ = RGB { r, g, c };
    |                   ^
    |                   |
-   |                   expected f64, found f32
+   |                   expected `f64`, found `f32`
    |                   help: you can convert an `f32` to `f64`: `r: r.into()`
 
 error[E0308]: mismatched types
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
 LL |     let _ = RGB { r, g, c };
    |                      ^
    |                      |
-   |                      expected f64, found f32
+   |                      expected `f64`, found `f32`
    |                      help: you can convert an `f32` to `f64`: `g: g.into()`
 
 error[E0560]: struct `RGB` has no field named `c`
diff --git a/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.stderr b/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.stderr
index ed8013d5997..7521c253545 100644
--- a/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.stderr
+++ b/src/test/ui/suggestions/type-mismatch-struct-field-shorthand.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL |     let _ = RGB { r, g, b };
    |                   ^
    |                   |
-   |                   expected f64, found f32
+   |                   expected `f64`, found `f32`
    |                   help: you can convert an `f32` to `f64`: `r: r.into()`
 
 error[E0308]: mismatched types
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
 LL |     let _ = RGB { r, g, b };
    |                      ^
    |                      |
-   |                      expected f64, found f32
+   |                      expected `f64`, found `f32`
    |                      help: you can convert an `f32` to `f64`: `g: g.into()`
 
 error[E0308]: mismatched types
@@ -22,7 +22,7 @@ error[E0308]: mismatched types
 LL |     let _ = RGB { r, g, b };
    |                         ^
    |                         |
-   |                         expected f64, found f32
+   |                         expected `f64`, found `f32`
    |                         help: you can convert an `f32` to `f64`: `b: b.into()`
 
 error: aborting due to 3 previous errors
diff --git a/src/test/ui/suppressed-error.rs b/src/test/ui/suppressed-error.rs
index cf3dce8e224..256ec1713d4 100644
--- a/src/test/ui/suppressed-error.rs
+++ b/src/test/ui/suppressed-error.rs
@@ -1,8 +1,8 @@
 fn main() {
     let (x, y) = ();
 //~^ ERROR mismatched types
-//~| expected type `()`
-//~| found type `(_, _)`
-//~| expected (), found tuple
+//~| 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 85e1deb3cde..846cd2adcd8 100644
--- a/src/test/ui/suppressed-error.stderr
+++ b/src/test/ui/suppressed-error.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/suppressed-error.rs:2:9
    |
 LL |     let (x, y) = ();
-   |         ^^^^^^ expected (), found tuple
+   |         ^^^^^^ expected `()`, found tuple
    |
-   = note: expected type `()`
-              found type `(_, _)`
+   = note: expected unit type `()`
+                  found tuple `(_, _)`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/switched-expectations.stderr b/src/test/ui/switched-expectations.stderr
index 043d130051d..dca9c6ce4d3 100644
--- a/src/test/ui/switched-expectations.stderr
+++ b/src/test/ui/switched-expectations.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/switched-expectations.rs:3:30
    |
 LL |     let ref string: String = var;
-   |                              ^^^ expected struct `std::string::String`, found i32
-   |
-   = note: expected type `std::string::String`
-              found type `i32`
+   |                              ^^^ expected struct `std::string::String`, found `i32`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/tag-that-dare-not-speak-its-name.rs b/src/test/ui/tag-that-dare-not-speak-its-name.rs
index 9f47b2e9b9f..4d9a98827de 100644
--- a/src/test/ui/tag-that-dare-not-speak-its-name.rs
+++ b/src/test/ui/tag-that-dare-not-speak-its-name.rs
@@ -11,6 +11,6 @@ fn main() {
     let x : char = last(y);
     //~^ ERROR mismatched types
     //~| expected type `char`
-    //~| found type `std::option::Option<_>`
-    //~| expected char, found enum `std::option::Option`
+    //~| found enum `std::option::Option<_>`
+    //~| expected `char`, found enum `std::option::Option`
 }
diff --git a/src/test/ui/tag-that-dare-not-speak-its-name.stderr b/src/test/ui/tag-that-dare-not-speak-its-name.stderr
index 23e3d665262..63280082e0e 100644
--- a/src/test/ui/tag-that-dare-not-speak-its-name.stderr
+++ b/src/test/ui/tag-that-dare-not-speak-its-name.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/tag-that-dare-not-speak-its-name.rs:11:20
    |
 LL |     let x : char = last(y);
-   |                    ^^^^^^^ expected char, found enum `std::option::Option`
+   |                    ^^^^^^^ expected `char`, found enum `std::option::Option`
    |
    = note: expected type `char`
-              found type `std::option::Option<_>`
+              found enum `std::option::Option<_>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/tail-typeck.stderr b/src/test/ui/tail-typeck.stderr
index 1170f5c17c1..eeeb258da21 100644
--- a/src/test/ui/tail-typeck.stderr
+++ b/src/test/ui/tail-typeck.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/tail-typeck.rs:3:26
    |
 LL | fn f() -> isize { return g(); }
-   |           -----          ^^^ expected isize, found usize
+   |           -----          ^^^ expected `isize`, found `usize`
    |           |
    |           expected `isize` because of return type
 
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..64d0ea012c8 100644
--- a/src/test/ui/terminal-width/non-whitespace-trimming-2.stderr
+++ b/src/test/ui/terminal-width/non-whitespace-trimming-2.stderr
@@ -1,11 +1,8 @@
 error[E0308]: mismatched types
   --> $DIR/non-whitespace-trimming-2.rs:4:311
    |
-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}`
+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
 
 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..c1b6544cdc8 100644
--- a/src/test/ui/terminal-width/non-whitespace-trimming-unicode.stderr
+++ b/src/test/ui/terminal-width/non-whitespace-trimming-unicode.stderr
@@ -1,11 +1,8 @@
 error[E0308]: mismatched types
   --> $DIR/non-whitespace-trimming-unicode.rs:4:415
    |
-LL | ...♯♰♱♲♳♴♵♶♷♸♹♺♻♼♽♾♿⚀⚁⚂⚃⚄⚅⚆⚈⚉4"; let _: () = 42;  let _: &str = "🦀☀☁☂☃☄★☆☇☈☉☊☋☌☍☎☏☐☑☒☓  ☖☗☘☙☚☛☜☝☞☟☠☡☢☣☤☥☦☧☨☩☪☫☬☭☮☯☰☱☲☳☴☵☶☷☸☹☺☻☼☽☾☿♀♁♂♃♄♅♆...
-   |                                               ^^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+LL | ...♰♱♲♳♴♵♶♷♸♹♺♻♼♽♾♿⚀⚁⚂⚃⚄⚅⚆⚈⚉4"; let _: () = 42;  let _: &str = "🦀☀☁☂☃☄★☆☇☈☉☊☋☌☍☎☏☐☑☒☓  ☖☗☘☙☚☛☜☝☞☟☠☡☢☣☤☥☦☧☨☩☪☫☬☭☮☯☰☱☲☳☴☵☶☷☸☹☺☻☼☽☾☿♀♁♂♃♄♅♆...
+   |                                              ^^ expected `()`, found 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..a8f2212b557 100644
--- a/src/test/ui/terminal-width/non-whitespace-trimming.stderr
+++ b/src/test/ui/terminal-width/non-whitespace-trimming.stderr
@@ -1,11 +1,8 @@
 error[E0308]: mismatched types
   --> $DIR/non-whitespace-trimming.rs:4:241
    |
-LL | ...) = (); let _: () = (); let _: () = (); let _: () = 42; let _: () = (); let _: () = (); let _: () = (); let _: () = (); let _: () = ()...
-   |                                                        ^^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+LL | ... = (); let _: () = (); let _: () = (); let _: () = 42; let _: () = (); let _: () = (); let _: () = (); let _: () = (); let _: () = ();...
+   |                                                       ^^ expected `()`, found 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..97a64e603b7 100644
--- a/src/test/ui/terminal-width/whitespace-trimming-2.stderr
+++ b/src/test/ui/terminal-width/whitespace-trimming-2.stderr
@@ -4,10 +4,7 @@ error[E0308]: mismatched types
 LL | ...-> usize {
    |       ----- expected `usize` because of return type
 LL | ...                                                                                                                                                                                 ()
-   |                                                                                                                                                                                     ^^ expected usize, found ()
-   |
-   = note: expected type `usize`
-              found type `()`
+   |                                                                                                                                                                                     ^^ expected `usize`, found `()`
 
 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..903673266cc 100644
--- a/src/test/ui/terminal-width/whitespace-trimming.stderr
+++ b/src/test/ui/terminal-width/whitespace-trimming.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/whitespace-trimming.rs:4:193
    |
 LL | ...                   let _: () = 42;
-   |                                   ^^ expected (), found integer
-   |
-   = note: expected type `()`
-              found type `{integer}`
+   |                                   ^^ expected `()`, found integer
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/terr-in-field.rs b/src/test/ui/terr-in-field.rs
index 388c13d28cc..aa801fd0a6c 100644
--- a/src/test/ui/terr-in-field.rs
+++ b/src/test/ui/terr-in-field.rs
@@ -11,8 +11,6 @@ struct Bar {
 fn want_foo(f: Foo) {}
 fn have_bar(b: Bar) {
     want_foo(b); //~  ERROR mismatched types
-                 //~| expected type `Foo`
-                 //~| found type `Bar`
                  //~| expected struct `Foo`, found struct `Bar`
 }
 
diff --git a/src/test/ui/terr-in-field.stderr b/src/test/ui/terr-in-field.stderr
index 91c3b3014a2..5c6859a0efe 100644
--- a/src/test/ui/terr-in-field.stderr
+++ b/src/test/ui/terr-in-field.stderr
@@ -3,9 +3,6 @@ error[E0308]: mismatched types
    |
 LL |     want_foo(b);
    |              ^ expected struct `Foo`, found struct `Bar`
-   |
-   = note: expected type `Foo`
-              found type `Bar`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/terr-sorts.rs b/src/test/ui/terr-sorts.rs
index 4bec5614e49..f91185fd7c6 100644
--- a/src/test/ui/terr-sorts.rs
+++ b/src/test/ui/terr-sorts.rs
@@ -8,8 +8,8 @@ type Bar = Box<Foo>;
 fn want_foo(f: Foo) {}
 fn have_bar(b: Bar) {
     want_foo(b); //~  ERROR mismatched types
-                 //~| expected type `Foo`
-                 //~| found type `std::boxed::Box<Foo>`
+                 //~| expected struct `Foo`
+                 //~| found struct `std::boxed::Box<Foo>`
 }
 
 fn main() {}
diff --git a/src/test/ui/terr-sorts.stderr b/src/test/ui/terr-sorts.stderr
index 05b9fb43fe1..2f7cc66f105 100644
--- a/src/test/ui/terr-sorts.stderr
+++ b/src/test/ui/terr-sorts.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     want_foo(b);
    |              ^ expected struct `Foo`, found struct `std::boxed::Box`
    |
-   = note: expected type `Foo`
-              found type `std::boxed::Box<Foo>`
+   = note: expected struct `Foo`
+              found struct `std::boxed::Box<Foo>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/traits/trait-bounds-sugar.stderr b/src/test/ui/traits/trait-bounds-sugar.stderr
index 2aa025cb7a6..5ee8be51dd5 100644
--- a/src/test/ui/traits/trait-bounds-sugar.stderr
+++ b/src/test/ui/traits/trait-bounds-sugar.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     a(x);
    |       ^ expected trait `Foo + std::marker::Send`, found trait `Foo + std::marker::Sync`
    |
-   = note: expected type `std::boxed::Box<(dyn Foo + std::marker::Send + 'static)>`
-              found type `std::boxed::Box<(dyn Foo + std::marker::Sync + 'static)>`
+   = note: expected struct `std::boxed::Box<(dyn Foo + std::marker::Send + 'static)>`
+              found struct `std::boxed::Box<(dyn Foo + std::marker::Sync + 'static)>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/traits/trait-impl-method-mismatch.rs b/src/test/ui/traits/trait-impl-method-mismatch.rs
index 886e92604a0..683b1c1aa43 100644
--- a/src/test/ui/traits/trait-impl-method-mismatch.rs
+++ b/src/test/ui/traits/trait-impl-method-mismatch.rs
@@ -6,8 +6,8 @@ impl Mumbo for usize {
     // Cannot have a larger effect than the trait:
     unsafe fn jumbo(&self, x: &usize) { *self + *x; }
     //~^ ERROR method `jumbo` has an incompatible type for trait
-    //~| expected type `fn
-    //~| found type `unsafe fn
+    //~| expected fn pointer `fn
+    //~| found fn pointer `unsafe fn
 }
 
 fn main() {}
diff --git a/src/test/ui/traits/trait-impl-method-mismatch.stderr b/src/test/ui/traits/trait-impl-method-mismatch.stderr
index 3e86c97f5c1..52e49186241 100644
--- a/src/test/ui/traits/trait-impl-method-mismatch.stderr
+++ b/src/test/ui/traits/trait-impl-method-mismatch.stderr
@@ -7,8 +7,8 @@ LL |     fn jumbo(&self, x: &usize) -> usize;
 LL |     unsafe fn jumbo(&self, x: &usize) { *self + *x; }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected normal fn, found unsafe fn
    |
-   = note: expected type `fn(&usize, &usize) -> usize`
-              found type `unsafe fn(&usize, &usize)`
+   = note: expected fn pointer `fn(&usize, &usize) -> usize`
+              found fn pointer `unsafe fn(&usize, &usize)`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/traits/trait-matching-lifetimes.stderr b/src/test/ui/traits/trait-matching-lifetimes.stderr
index e1ccde3c9d1..17ebdb7c825 100644
--- a/src/test/ui/traits/trait-matching-lifetimes.stderr
+++ b/src/test/ui/traits/trait-matching-lifetimes.stderr
@@ -4,8 +4,8 @@ error[E0308]: method not compatible with trait
 LL |     fn foo(x: Foo<'b,'a>) {
    |     ^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `fn(Foo<'a, 'b>)`
-              found type `fn(Foo<'b, 'a>)`
+   = note: expected fn pointer `fn(Foo<'a, 'b>)`
+              found fn pointer `fn(Foo<'b, 'a>)`
 note: the lifetime `'b` as defined on the impl at 13:9...
   --> $DIR/trait-matching-lifetimes.rs:13:9
    |
@@ -23,8 +23,8 @@ error[E0308]: method not compatible with trait
 LL |     fn foo(x: Foo<'b,'a>) {
    |     ^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `fn(Foo<'a, 'b>)`
-              found type `fn(Foo<'b, 'a>)`
+   = note: expected fn pointer `fn(Foo<'a, 'b>)`
+              found fn pointer `fn(Foo<'b, 'a>)`
 note: the lifetime `'a` as defined on the impl at 13:6...
   --> $DIR/trait-matching-lifetimes.rs:13:6
    |
diff --git a/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr b/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr
index 44643e8c8de..5d0fb6b44cb 100644
--- a/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr
+++ b/src/test/ui/traits/traits-assoc-type-in-supertrait-bad.stderr
@@ -2,10 +2,7 @@ error[E0271]: type mismatch resolving `<std::vec::IntoIter<i32> as std::iter::It
   --> $DIR/traits-assoc-type-in-supertrait-bad.rs:11:6
    |
 LL | impl Foo for IntoIter<i32> {
-   |      ^^^ expected i32, found u32
-   |
-   = note: expected type `i32`
-              found type `u32`
+   |      ^^^ expected `i32`, found `u32`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/traits/traits-multidispatch-bad.stderr b/src/test/ui/traits/traits-multidispatch-bad.stderr
index f4ce548314d..671faf45178 100644
--- a/src/test/ui/traits/traits-multidispatch-bad.stderr
+++ b/src/test/ui/traits/traits-multidispatch-bad.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/traits-multidispatch-bad.rs:19:17
    |
 LL |     test(22i32, 44i32);
-   |                 ^^^^^ expected u32, found i32
+   |                 ^^^^^ expected `u32`, found `i32`
    |
 help: change the type of the numeric literal from `i32` to `u32`
    |
diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr
index 5820e4699c1..08c79519dfe 100644
--- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr
+++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr
@@ -5,7 +5,7 @@ LL | fn global_bound_is_hidden() -> u8
    |                                -- expected `u8` because of return type
 ...
 LL |     B::get_x()
-   |     ^^^^^^^^^^ expected u8, found i32
+   |     ^^^^^^^^^^ expected `u8`, found `i32`
    |
 help: you can convert an `i32` to `u8` and panic if the converted value wouldn't fit
    |
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 e1c2c6b675e..414c3f24d3a 100644
--- a/src/test/ui/try-block/try-block-bad-type.stderr
+++ b/src/test/ui/try-block/try-block-bad-type.stderr
@@ -17,19 +17,13 @@ error[E0271]: type mismatch resolving `<std::result::Result<i32, i32> as std::op
   --> $DIR/try-block-bad-type.rs:12:9
    |
 LL |         ""
-   |         ^^ expected i32, found &str
-   |
-   = note: expected type `i32`
-              found type `&str`
+   |         ^^ expected `i32`, found `&str`
 
 error[E0271]: type mismatch resolving `<std::result::Result<i32, i32> as std::ops::Try>::Ok == ()`
   --> $DIR/try-block-bad-type.rs:15:39
    |
 LL |     let res: Result<i32, i32> = try { };
-   |                                       ^ expected i32, found ()
-   |
-   = note: expected type `i32`
-              found type `()`
+   |                                       ^ expected `i32`, found `()`
 
 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..f779121bbc6 100644
--- a/src/test/ui/try-block/try-block-type-error.stderr
+++ b/src/test/ui/try-block/try-block-type-error.stderr
@@ -4,20 +4,14 @@ error[E0271]: type mismatch resolving `<std::option::Option<f32> as std::ops::Tr
 LL |         42
    |         ^^
    |         |
-   |         expected f32, found integer
+   |         expected `f32`, found integer
    |         help: use a float literal: `42.0`
-   |
-   = note: expected type `f32`
-              found type `{integer}`
 
 error[E0271]: type mismatch resolving `<std::option::Option<i32> as std::ops::Try>::Ok == ()`
   --> $DIR/try-block-type-error.rs:16:5
    |
 LL |     };
-   |     ^ expected i32, found ()
-   |
-   = note: expected type `i32`
-              found type `()`
+   |     ^ expected `i32`, found `()`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/tuple/tuple-arity-mismatch.rs b/src/test/ui/tuple/tuple-arity-mismatch.rs
index 4f505c05a6a..f1e525c93e1 100644
--- a/src/test/ui/tuple/tuple-arity-mismatch.rs
+++ b/src/test/ui/tuple/tuple-arity-mismatch.rs
@@ -5,13 +5,13 @@ fn first((value, _): (isize, f64)) -> isize { value }
 fn main() {
     let y = first ((1,2.0,3));
     //~^ ERROR mismatched types
-    //~| expected type `(isize, f64)`
-    //~| found type `(isize, f64, {integer})`
+    //~| expected tuple `(isize, f64)`
+    //~| found tuple `(isize, f64, {integer})`
     //~| expected a tuple with 2 elements, found one with 3 elements
 
     let y = first ((1,));
     //~^ ERROR mismatched types
-    //~| expected type `(isize, f64)`
-    //~| found type `(isize,)`
+    //~| expected tuple `(isize, f64)`
+    //~| found tuple `(isize,)`
     //~| expected a tuple with 2 elements, found one with 1 element
 }
diff --git a/src/test/ui/tuple/tuple-arity-mismatch.stderr b/src/test/ui/tuple/tuple-arity-mismatch.stderr
index 6946a60c59a..10bcedaf4aa 100644
--- a/src/test/ui/tuple/tuple-arity-mismatch.stderr
+++ b/src/test/ui/tuple/tuple-arity-mismatch.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let y = first ((1,2.0,3));
    |                    ^^^^^^^^^ expected a tuple with 2 elements, found one with 3 elements
    |
-   = note: expected type `(isize, f64)`
-              found type `(isize, f64, {integer})`
+   = note: expected tuple `(isize, f64)`
+              found tuple `(isize, f64, {integer})`
 
 error[E0308]: mismatched types
   --> $DIR/tuple-arity-mismatch.rs:12:20
@@ -13,8 +13,8 @@ error[E0308]: mismatched types
 LL |     let y = first ((1,));
    |                    ^^^^ expected a tuple with 2 elements, found one with 1 element
    |
-   = note: expected type `(isize, f64)`
-              found type `(isize,)`
+   = note: expected tuple `(isize, f64)`
+              found tuple `(isize,)`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/tutorial-suffix-inference-test.rs b/src/test/ui/tutorial-suffix-inference-test.rs
index 2477c636530..849adfd5368 100644
--- a/src/test/ui/tutorial-suffix-inference-test.rs
+++ b/src/test/ui/tutorial-suffix-inference-test.rs
@@ -8,10 +8,10 @@ fn main() {
     identity_u8(x);  // after this, `x` is assumed to have type `u8`
     identity_u16(x);
     //~^ ERROR mismatched types
-    //~| expected u16, found u8
+    //~| expected `u16`, found `u8`
     identity_u16(y);
     //~^ ERROR mismatched types
-    //~| expected u16, found i32
+    //~| expected `u16`, found `i32`
 
     let a = 3;
 
@@ -20,5 +20,5 @@ fn main() {
     identity_i(a); // ok
     identity_u16(a);
     //~^ ERROR mismatched types
-    //~| expected u16, found isize
+    //~| expected `u16`, found `isize`
 }
diff --git a/src/test/ui/tutorial-suffix-inference-test.stderr b/src/test/ui/tutorial-suffix-inference-test.stderr
index ae0cf124673..c6c7ba26794 100644
--- a/src/test/ui/tutorial-suffix-inference-test.stderr
+++ b/src/test/ui/tutorial-suffix-inference-test.stderr
@@ -4,14 +4,14 @@ error[E0308]: mismatched types
 LL |     identity_u16(x);
    |                  ^
    |                  |
-   |                  expected u16, found u8
+   |                  expected `u16`, found `u8`
    |                  help: you can convert an `u8` to `u16`: `x.into()`
 
 error[E0308]: mismatched types
   --> $DIR/tutorial-suffix-inference-test.rs:12:18
    |
 LL |     identity_u16(y);
-   |                  ^ expected u16, found i32
+   |                  ^ expected `u16`, found `i32`
    |
 help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit
    |
@@ -22,7 +22,7 @@ error[E0308]: mismatched types
   --> $DIR/tutorial-suffix-inference-test.rs:21:18
    |
 LL |     identity_u16(a);
-   |                  ^ expected u16, found isize
+   |                  ^ expected `u16`, found `isize`
    |
 help: you can convert an `isize` to `u16` and panic if the converted value wouldn't fit
    |
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 9e44e208f0e..412b4dbda4f 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
@@ -5,10 +5,10 @@ LL | impl<T> Enum<T> {
    |      - this type parameter
 LL |     fn ts_variant() {
 LL |         Self::TSVariant(());
-   |                         ^^ expected type parameter `T`, found ()
+   |                         ^^ expected type parameter `T`, found `()`
    |
-   = note: expected type `T`
-              found type `()`
+   = note: expected type parameter `T`
+                   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
 
@@ -31,10 +31,10 @@ LL | impl<T> Enum<T> {
    |      - this type parameter
 ...
 LL |         Self::<()>::TSVariant(());
-   |                               ^^ expected type parameter `T`, found ()
+   |                               ^^ expected type parameter `T`, found `()`
    |
-   = note: expected type `T`
-              found type `()`
+   = note: expected type parameter `T`
+                   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
 
@@ -57,10 +57,10 @@ LL | impl<T> Enum<T> {
    |      - this type parameter
 ...
 LL |         Self::SVariant { v: () };
-   |                             ^^ expected type parameter `T`, found ()
+   |                             ^^ expected type parameter `T`, found `()`
    |
-   = note: expected type `T`
-              found type `()`
+   = note: expected type parameter `T`
+                   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
 
@@ -77,10 +77,10 @@ LL | impl<T> Enum<T> {
    |      - this type parameter
 ...
 LL |         Self::SVariant::<()> { v: () };
-   |                                   ^^ expected type parameter `T`, found ()
+   |                                   ^^ expected type parameter `T`, found `()`
    |
-   = note: expected type `T`
-              found type `()`
+   = note: expected type parameter `T`
+                   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
 
@@ -97,10 +97,10 @@ LL | impl<T> Enum<T> {
    |      - this type parameter
 ...
 LL |         Self::<()>::SVariant { v: () };
-   |                                   ^^ expected type parameter `T`, found ()
+   |                                   ^^ expected type parameter `T`, found `()`
    |
-   = note: expected type `T`
-              found type `()`
+   = note: expected type parameter `T`
+                   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
 
@@ -123,10 +123,10 @@ LL | impl<T> Enum<T> {
    |      - this type parameter
 ...
 LL |         Self::<()>::SVariant::<()> { v: () };
-   |                                         ^^ expected type parameter `T`, found ()
+   |                                         ^^ expected type parameter `T`, found `()`
    |
-   = note: expected type `T`
-              found type `()`
+   = note: expected type parameter `T`
+                   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-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr b/src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr
index 0394ddab46c..078971b89f7 100644
--- a/src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr
+++ b/src/test/ui/type-alias-enum-variants/enum-variant-priority-higher-than-other-inherent.stderr
@@ -11,10 +11,7 @@ error[E0308]: mismatched types
   --> $DIR/enum-variant-priority-higher-than-other-inherent.rs:22:17
    |
 LL |     let _: u8 = <E2>::V;
-   |                 ^^^^^^^ expected u8, found enum `E2`
-   |
-   = note: expected type `u8`
-              found type `E2`
+   |                 ^^^^^^^ expected `u8`, found enum `E2`
 
 error: aborting due to 2 previous errors
 
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..4fe25d6d287 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
@@ -8,10 +8,10 @@ error[E0308]: mismatched types
   --> $DIR/generic_type_does_not_live_long_enough.rs:6:18
    |
 LL |     let z: i32 = x;
-   |                  ^ expected i32, found opaque type
+   |                  ^ 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/generic_type_does_not_live_long_enough.stderr b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.stderr
index d9600f1d1d6..2a037e68174 100644
--- a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.stderr
+++ b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.stderr
@@ -8,10 +8,10 @@ error[E0308]: mismatched types
   --> $DIR/generic_type_does_not_live_long_enough.rs:6:18
    |
 LL |     let z: i32 = x;
-   |                  ^ expected i32, found opaque type
+   |                  ^ expected `i32`, found opaque type
    |
-   = note: expected type `i32`
-              found type `WrongGeneric::<&{integer}>`
+   = note:     expected type `i32`
+           found opaque type `WrongGeneric::<&{integer}>`
 
 error[E0310]: the parameter type `T` may not live long enough
   --> $DIR/generic_type_does_not_live_long_enough.rs:9:1
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 a5065241fc7..053ccee3785 100644
--- a/src/test/ui/type-alias-impl-trait/issue-63279.stderr
+++ b/src/test/ui/type-alias-impl-trait/issue-63279.stderr
@@ -2,10 +2,10 @@ error[E0271]: type mismatch resolving `<[closure@$DIR/issue-63279.rs:6:5: 6:28]
   --> $DIR/issue-63279.rs:3:1
    |
 LL | type Closure = impl FnOnce();
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected opaque type, found ()
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected opaque type, found `()`
    |
-   = note: expected type `Closure`
-              found type `()`
+   = note: expected opaque type `Closure`
+                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-alias-impl-trait/never_reveal_concrete_type.stderr b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr
index 7c195f1fad0..89add864f9a 100644
--- a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr
+++ b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/never_reveal_concrete_type.rs:13:27
    |
 LL |     let _: &'static str = x;
-   |                           ^ expected reference, found opaque type
+   |                           ^ expected `&str`, found opaque type
    |
-   = note: expected type `&'static str`
-              found type `NoReveal`
+   = note: expected reference `&'static str`
+            found opaque type `NoReveal`
 
 error[E0605]: non-primitive cast: `NoReveal` as `&'static str`
   --> $DIR/never_reveal_concrete_type.rs:14:13
diff --git a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr
index 5e5826978fc..7650013e41b 100644
--- a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr
+++ b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/no_revealing_outside_defining_module.rs:15:19
    |
 LL |     let _: &str = bomp();
-   |                   ^^^^^^ expected &str, found opaque type
+   |                   ^^^^^^ expected `&str`, found opaque type
    |
-   = note: expected type `&str`
-              found type `Boo`
+   = note: expected reference `&str`
+            found opaque type `Boo`
 
 error[E0308]: mismatched types
   --> $DIR/no_revealing_outside_defining_module.rs:19:5
@@ -13,10 +13,10 @@ error[E0308]: mismatched types
 LL | fn bomp() -> boo::Boo {
    |              -------- expected `Boo` because of return type
 LL |     ""
-   |     ^^ expected opaque type, found reference
+   |     ^^ expected opaque type, found `&str`
    |
-   = note: expected type `Boo`
-              found type `&'static str`
+   = note: expected opaque type `Boo`
+                found reference `&'static str`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/type/type-ascription-precedence.stderr b/src/test/ui/type/type-ascription-precedence.stderr
index aecb0f87387..92d3f18e82f 100644
--- a/src/test/ui/type/type-ascription-precedence.stderr
+++ b/src/test/ui/type/type-ascription-precedence.stderr
@@ -2,19 +2,13 @@ error[E0308]: mismatched types
   --> $DIR/type-ascription-precedence.rs:31:7
    |
 LL |     &(S: &S);
-   |       ^ expected &S, found struct `S`
-   |
-   = note: expected type `&S`
-              found type `S`
+   |       ^ expected `&S`, found struct `S`
 
 error[E0308]: mismatched types
   --> $DIR/type-ascription-precedence.rs:35:7
    |
 LL |     *(S: Z);
    |       ^ expected struct `Z`, found struct `S`
-   |
-   = note: expected type `Z`
-              found type `S`
 
 error[E0614]: type `Z` cannot be dereferenced
   --> $DIR/type-ascription-precedence.rs:35:5
@@ -27,9 +21,6 @@ error[E0308]: mismatched types
    |
 LL |     -(S: Z);
    |       ^ expected struct `Z`, found struct `S`
-   |
-   = note: expected type `Z`
-              found type `S`
 
 error[E0600]: cannot apply unary operator `-` to type `Z`
   --> $DIR/type-ascription-precedence.rs:40:5
@@ -44,18 +35,12 @@ error[E0308]: mismatched types
    |
 LL |     (S + Z): Z;
    |     ^^^^^^^ expected struct `Z`, found struct `S`
-   |
-   = note: expected type `Z`
-              found type `S`
 
 error[E0308]: mismatched types
   --> $DIR/type-ascription-precedence.rs:49:5
    |
 LL |     (S * Z): Z;
    |     ^^^^^^^ expected struct `Z`, found struct `S`
-   |
-   = note: expected type `Z`
-              found type `S`
 
 error[E0308]: mismatched types
   --> $DIR/type-ascription-precedence.rs:53:5
@@ -63,8 +48,8 @@ error[E0308]: mismatched types
 LL |     (S .. S): S;
    |     ^^^^^^^^ expected struct `S`, found struct `std::ops::Range`
    |
-   = note: expected type `S`
-              found type `std::ops::Range<S>`
+   = note: expected struct `S`
+              found struct `std::ops::Range<S>`
 
 error: aborting due to 8 previous errors
 
diff --git a/src/test/ui/type/type-ascription-soundness.stderr b/src/test/ui/type/type-ascription-soundness.stderr
index 150e19020fe..6ed940823af 100644
--- a/src/test/ui/type/type-ascription-soundness.stderr
+++ b/src/test/ui/type/type-ascription-soundness.stderr
@@ -2,37 +2,37 @@ error[E0308]: mismatched types
   --> $DIR/type-ascription-soundness.rs:7:17
    |
 LL |     let ref x = arr: &[u8];
-   |                 ^^^ expected slice, found array of 3 elements
+   |                 ^^^ expected slice `[u8]`, found array `[u8; 3]`
    |
-   = note: expected type `&[u8]`
-              found type `&[u8; 3]`
+   = note: expected reference `&[u8]`
+              found reference `&[u8; 3]`
 
 error[E0308]: mismatched types
   --> $DIR/type-ascription-soundness.rs:8:21
    |
 LL |     let ref mut x = arr: &[u8];
-   |                     ^^^ expected slice, found array of 3 elements
+   |                     ^^^ expected slice `[u8]`, found array `[u8; 3]`
    |
-   = note: expected type `&[u8]`
-              found type `&[u8; 3]`
+   = note: expected reference `&[u8]`
+              found reference `&[u8; 3]`
 
 error[E0308]: mismatched types
   --> $DIR/type-ascription-soundness.rs:9:11
    |
 LL |     match arr: &[u8] {
-   |           ^^^ expected slice, found array of 3 elements
+   |           ^^^ expected slice `[u8]`, found array `[u8; 3]`
    |
-   = note: expected type `&[u8]`
-              found type `&[u8; 3]`
+   = note: expected reference `&[u8]`
+              found reference `&[u8; 3]`
 
 error[E0308]: mismatched types
   --> $DIR/type-ascription-soundness.rs:12:17
    |
 LL |     let _len = (arr: &[u8]).len();
-   |                 ^^^ expected slice, found array of 3 elements
+   |                 ^^^ expected slice `[u8]`, found array `[u8; 3]`
    |
-   = note: expected type `&[u8]`
-              found type `&[u8; 3]`
+   = note: expected reference `&[u8]`
+              found reference `&[u8; 3]`
 
 error: aborting due to 4 previous errors
 
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..58a9e643cf6 100644
--- a/src/test/ui/type/type-check/assignment-expected-bool.stderr
+++ b/src/test/ui/type/type-check/assignment-expected-bool.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |     let _: bool = 0 = 0;
    |                   ^^^^^
    |                   |
-   |                   expected bool, found ()
+   |                   expected `bool`, found `()`
    |                   help: try comparing for equality: `0 == 0`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:9:14
@@ -16,11 +13,8 @@ error[E0308]: mismatched types
 LL |         0 => 0 = 0,
    |              ^^^^^
    |              |
-   |              expected bool, found ()
+   |              expected `bool`, found `()`
    |              help: try comparing for equality: `0 == 0`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:10:14
@@ -28,11 +22,8 @@ error[E0308]: mismatched types
 LL |         _ => 0 = 0,
    |              ^^^^^
    |              |
-   |              expected bool, found ()
+   |              expected `bool`, found `()`
    |              help: try comparing for equality: `0 == 0`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:14:17
@@ -40,11 +31,8 @@ error[E0308]: mismatched types
 LL |         true => 0 = 0,
    |                 ^^^^^
    |                 |
-   |                 expected bool, found ()
+   |                 expected `bool`, found `()`
    |                 help: try comparing for equality: `0 == 0`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:18:8
@@ -52,11 +40,8 @@ error[E0308]: mismatched types
 LL |     if 0 = 0 {}
    |        ^^^^^
    |        |
-   |        expected bool, found ()
+   |        expected `bool`, found `()`
    |        help: try comparing for equality: `0 == 0`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:20:24
@@ -64,11 +49,8 @@ error[E0308]: mismatched types
 LL |     let _: bool = if { 0 = 0 } {
    |                        ^^^^^
    |                        |
-   |                        expected bool, found ()
+   |                        expected `bool`, found `()`
    |                        help: try comparing for equality: `0 == 0`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:21:9
@@ -76,11 +58,8 @@ error[E0308]: mismatched types
 LL |         0 = 0
    |         ^^^^^
    |         |
-   |         expected bool, found ()
+   |         expected `bool`, found `()`
    |         help: try comparing for equality: `0 == 0`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:23:9
@@ -88,11 +67,8 @@ error[E0308]: mismatched types
 LL |         0 = 0
    |         ^^^^^
    |         |
-   |         expected bool, found ()
+   |         expected `bool`, found `()`
    |         help: try comparing for equality: `0 == 0`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:26:13
@@ -100,11 +76,8 @@ error[E0308]: mismatched types
 LL |     let _ = (0 = 0)
    |             ^^^^^^^
    |             |
-   |             expected bool, found ()
+   |             expected `bool`, found `()`
    |             help: try comparing for equality: `0 == 0`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:27:14
@@ -112,11 +85,8 @@ error[E0308]: mismatched types
 LL |         && { 0 = 0 }
    |              ^^^^^
    |              |
-   |              expected bool, found ()
+   |              expected `bool`, found `()`
    |              help: try comparing for equality: `0 == 0`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:28:12
@@ -124,11 +94,8 @@ error[E0308]: mismatched types
 LL |         || (0 = 0);
    |            ^^^^^^^
    |            |
-   |            expected bool, found ()
+   |            expected `bool`, found `()`
    |            help: try comparing for equality: `0 == 0`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0070]: invalid left-hand side expression
   --> $DIR/assignment-expected-bool.rs:31:20
@@ -140,10 +107,7 @@ error[E0308]: mismatched types
   --> $DIR/assignment-expected-bool.rs:31:20
    |
 LL |     let _: usize = 0 = 0;
-   |                    ^^^^^ expected usize, found ()
-   |
-   = note: expected type `usize`
-              found type `()`
+   |                    ^^^^^ expected `usize`, found `()`
 
 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..0957dcb986b 100644
--- a/src/test/ui/type/type-check/assignment-in-if.stderr
+++ b/src/test/ui/type/type-check/assignment-in-if.stderr
@@ -4,11 +4,8 @@ error[E0308]: mismatched types
 LL |     if x = x {
    |        ^^^^^
    |        |
-   |        expected bool, found ()
+   |        expected `bool`, found `()`
    |        help: try comparing for equality: `x == x`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-in-if.rs:20:8
@@ -16,11 +13,8 @@ error[E0308]: mismatched types
 LL |     if (x = x) {
    |        ^^^^^^^
    |        |
-   |        expected bool, found ()
+   |        expected `bool`, found `()`
    |        help: try comparing for equality: `x == x`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-in-if.rs:25:8
@@ -28,11 +22,8 @@ error[E0308]: mismatched types
 LL |     if y = (Foo { foo: x }) {
    |        ^^^^^^^^^^^^^^^^^^^^
    |        |
-   |        expected bool, found ()
+   |        expected `bool`, found `()`
    |        help: try comparing for equality: `y == (Foo { foo: x })`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-in-if.rs:30:8
@@ -40,11 +31,8 @@ error[E0308]: mismatched types
 LL |     if 3 = x {
    |        ^^^^^
    |        |
-   |        expected bool, found ()
+   |        expected `bool`, found `()`
    |        help: try comparing for equality: `3 == x`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-in-if.rs:36:13
@@ -52,11 +40,8 @@ error[E0308]: mismatched types
 LL |             x = 4
    |             ^^^^^
    |             |
-   |             expected bool, found ()
+   |             expected `bool`, found `()`
    |             help: try comparing for equality: `x == 4`
-   |
-   = note: expected type `bool`
-              found type `()`
 
 error[E0308]: mismatched types
   --> $DIR/assignment-in-if.rs:38:13
@@ -64,11 +49,8 @@ error[E0308]: mismatched types
 LL |             x = 5
    |             ^^^^^
    |             |
-   |             expected bool, found ()
+   |             expected `bool`, found `()`
    |             help: try comparing for equality: `x == 5`
-   |
-   = note: expected type `bool`
-              found 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..16dc6475c6f 100644
--- a/src/test/ui/type/type-error-break-tail.stderr
+++ b/src/test/ui/type/type-error-break-tail.stderr
@@ -7,11 +7,8 @@ LL |     loop {
 LL |         if false { break; }
    |                    ^^^^^
    |                    |
-   |                    expected i32, found ()
+   |                    expected `i32`, found `()`
    |                    help: give it a value of the expected type: `break 42`
-   |
-   = note: expected type `i32`
-              found type `()`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/type/type-mismatch-multiple.rs b/src/test/ui/type/type-mismatch-multiple.rs
index b8f04ca8d4a..55d6ceef1de 100644
--- a/src/test/ui/type/type-mismatch-multiple.rs
+++ b/src/test/ui/type/type-mismatch-multiple.rs
@@ -2,8 +2,6 @@
 
 fn main() { let a: bool = 1; let b: i32 = true; }
 //~^ ERROR mismatched types
-//~| expected type `bool`
-//~| found type `{integer}`
-//~| expected bool, found integer
+//~| expected `bool`, found integer
 //~| ERROR mismatched types
-//~| expected i32, found bool
+//~| expected `i32`, found `bool`
diff --git a/src/test/ui/type/type-mismatch-multiple.stderr b/src/test/ui/type/type-mismatch-multiple.stderr
index 8f6b23ea091..d615e599501 100644
--- a/src/test/ui/type/type-mismatch-multiple.stderr
+++ b/src/test/ui/type/type-mismatch-multiple.stderr
@@ -2,16 +2,13 @@ error[E0308]: mismatched types
   --> $DIR/type-mismatch-multiple.rs:3:27
    |
 LL | fn main() { let a: bool = 1; let b: i32 = true; }
-   |                           ^ expected bool, found integer
-   |
-   = note: expected type `bool`
-              found type `{integer}`
+   |                           ^ expected `bool`, found integer
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch-multiple.rs:3:43
    |
 LL | fn main() { let a: bool = 1; let b: i32 = true; }
-   |                                           ^^^^ expected i32, found bool
+   |                                           ^^^^ expected `i32`, found `bool`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/type/type-mismatch-same-crate-name.rs b/src/test/ui/type/type-mismatch-same-crate-name.rs
index 61e6bd21920..b1f9a28e16d 100644
--- a/src/test/ui/type/type-mismatch-same-crate-name.rs
+++ b/src/test/ui/type/type-mismatch-same-crate-name.rs
@@ -17,13 +17,11 @@ fn main() {
         //~^ ERROR mismatched types
         //~| Perhaps two different versions of crate `crate_a1`
         //~| expected struct `main::a::Foo`
-        //~| expected type `main::a::Foo`
-        //~| found type `main::a::Foo`
         a::try_bar(bar2);
         //~^ ERROR mismatched types
         //~| Perhaps two different versions of crate `crate_a1`
         //~| expected trait `main::a::Bar`
-        //~| expected type `std::boxed::Box<(dyn main::a::Bar + 'static)>`
-        //~| found type `std::boxed::Box<dyn main::a::Bar>`
+        //~| expected struct `std::boxed::Box<(dyn main::a::Bar + 'static)>`
+        //~| found struct `std::boxed::Box<dyn main::a::Bar>`
     }
 }
diff --git a/src/test/ui/type/type-mismatch-same-crate-name.stderr b/src/test/ui/type/type-mismatch-same-crate-name.stderr
index ed07b602e3e..91bbe9c1fbe 100644
--- a/src/test/ui/type/type-mismatch-same-crate-name.stderr
+++ b/src/test/ui/type/type-mismatch-same-crate-name.stderr
@@ -4,8 +4,6 @@ error[E0308]: mismatched types
 LL |         a::try_foo(foo2);
    |                    ^^^^ expected struct `main::a::Foo`, found a different struct `main::a::Foo`
    |
-   = note: expected type `main::a::Foo` (struct `main::a::Foo`)
-              found type `main::a::Foo` (struct `main::a::Foo`)
 note: Perhaps two different versions of crate `crate_a1` are being used?
   --> $DIR/type-mismatch-same-crate-name.rs:16:20
    |
@@ -13,15 +11,15 @@ LL |         a::try_foo(foo2);
    |                    ^^^^
 
 error[E0308]: mismatched types
-  --> $DIR/type-mismatch-same-crate-name.rs:22:20
+  --> $DIR/type-mismatch-same-crate-name.rs:20:20
    |
 LL |         a::try_bar(bar2);
    |                    ^^^^ expected trait `main::a::Bar`, found a different trait `main::a::Bar`
    |
-   = note: expected type `std::boxed::Box<(dyn main::a::Bar + 'static)>`
-              found type `std::boxed::Box<dyn main::a::Bar>`
+   = note: expected struct `std::boxed::Box<(dyn main::a::Bar + 'static)>`
+              found struct `std::boxed::Box<dyn main::a::Bar>`
 note: Perhaps two different versions of crate `crate_a1` are being used?
-  --> $DIR/type-mismatch-same-crate-name.rs:22:20
+  --> $DIR/type-mismatch-same-crate-name.rs:20:20
    |
 LL |         a::try_bar(bar2);
    |                    ^^^^
diff --git a/src/test/ui/type/type-mismatch.stderr b/src/test/ui/type/type-mismatch.stderr
index 7aea9db6167..24c71c63103 100644
--- a/src/test/ui/type/type-mismatch.stderr
+++ b/src/test/ui/type/type-mismatch.stderr
@@ -2,91 +2,79 @@ error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:17:17
    |
 LL |     want::<foo>(f);
-   |                 ^ expected struct `foo`, found usize
-   |
-   = note: expected type `foo`
-              found type `usize`
+   |                 ^ expected struct `foo`, found `usize`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:18:17
    |
 LL |     want::<bar>(f);
-   |                 ^ expected struct `bar`, found usize
-   |
-   = note: expected type `bar`
-              found type `usize`
+   |                 ^ expected struct `bar`, found `usize`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:19:24
    |
 LL |     want::<Foo<usize>>(f);
-   |                        ^ expected struct `Foo`, found usize
+   |                        ^ expected struct `Foo`, found `usize`
    |
-   = note: expected type `Foo<usize>`
-              found type `usize`
+   = note: expected struct `Foo<usize>`
+                found type `usize`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:20:27
    |
 LL |     want::<Foo<usize, B>>(f);
-   |                           ^ expected struct `Foo`, found usize
+   |                           ^ expected struct `Foo`, found `usize`
    |
-   = note: expected type `Foo<usize, B>`
-              found type `usize`
+   = note: expected struct `Foo<usize, B>`
+                found type `usize`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:21:22
    |
 LL |     want::<Foo<foo>>(f);
-   |                      ^ expected struct `Foo`, found usize
+   |                      ^ expected struct `Foo`, found `usize`
    |
-   = note: expected type `Foo<foo>`
-              found type `usize`
+   = note: expected struct `Foo<foo>`
+                found type `usize`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:22:25
    |
 LL |     want::<Foo<foo, B>>(f);
-   |                         ^ expected struct `Foo`, found usize
+   |                         ^ expected struct `Foo`, found `usize`
    |
-   = note: expected type `Foo<foo, B>`
-              found type `usize`
+   = note: expected struct `Foo<foo, B>`
+                found type `usize`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:23:22
    |
 LL |     want::<Foo<bar>>(f);
-   |                      ^ expected struct `Foo`, found usize
+   |                      ^ expected struct `Foo`, found `usize`
    |
-   = note: expected type `Foo<bar>`
-              found type `usize`
+   = note: expected struct `Foo<bar>`
+                found type `usize`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:24:25
    |
 LL |     want::<Foo<bar, B>>(f);
-   |                         ^ expected struct `Foo`, found usize
+   |                         ^ expected struct `Foo`, found `usize`
    |
-   = note: expected type `Foo<bar, B>`
-              found type `usize`
+   = note: expected struct `Foo<bar, B>`
+                found type `usize`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:28:19
    |
 LL |     want::<usize>(f);
-   |                   ^ expected usize, found struct `foo`
-   |
-   = note: expected type `usize`
-              found type `foo`
+   |                   ^ expected `usize`, found struct `foo`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:29:17
    |
 LL |     want::<bar>(f);
    |                 ^ expected struct `bar`, found struct `foo`
-   |
-   = note: expected type `bar`
-              found type `foo`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:30:24
@@ -94,8 +82,8 @@ error[E0308]: mismatched types
 LL |     want::<Foo<usize>>(f);
    |                        ^ expected struct `Foo`, found struct `foo`
    |
-   = note: expected type `Foo<usize>`
-              found type `foo`
+   = note: expected struct `Foo<usize>`
+              found struct `foo`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:31:27
@@ -103,8 +91,8 @@ error[E0308]: mismatched types
 LL |     want::<Foo<usize, B>>(f);
    |                           ^ expected struct `Foo`, found struct `foo`
    |
-   = note: expected type `Foo<usize, B>`
-              found type `foo`
+   = note: expected struct `Foo<usize, B>`
+              found struct `foo`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:32:22
@@ -112,8 +100,8 @@ error[E0308]: mismatched types
 LL |     want::<Foo<foo>>(f);
    |                      ^ expected struct `Foo`, found struct `foo`
    |
-   = note: expected type `Foo<foo>`
-              found type `foo`
+   = note: expected struct `Foo<foo>`
+              found struct `foo`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:33:25
@@ -121,8 +109,8 @@ error[E0308]: mismatched types
 LL |     want::<Foo<foo, B>>(f);
    |                         ^ expected struct `Foo`, found struct `foo`
    |
-   = note: expected type `Foo<foo, B>`
-              found type `foo`
+   = note: expected struct `Foo<foo, B>`
+              found struct `foo`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:34:22
@@ -130,8 +118,8 @@ error[E0308]: mismatched types
 LL |     want::<Foo<bar>>(f);
    |                      ^ expected struct `Foo`, found struct `foo`
    |
-   = note: expected type `Foo<bar>`
-              found type `foo`
+   = note: expected struct `Foo<bar>`
+              found struct `foo`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:35:25
@@ -139,17 +127,17 @@ error[E0308]: mismatched types
 LL |     want::<Foo<bar, B>>(f);
    |                         ^ expected struct `Foo`, found struct `foo`
    |
-   = note: expected type `Foo<bar, B>`
-              found type `foo`
+   = note: expected struct `Foo<bar, B>`
+              found struct `foo`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:39:19
    |
 LL |     want::<usize>(f);
-   |                   ^ expected usize, found struct `Foo`
+   |                   ^ expected `usize`, found struct `Foo`
    |
    = note: expected type `usize`
-              found type `Foo<foo>`
+            found struct `Foo<foo>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:40:17
@@ -157,8 +145,8 @@ error[E0308]: mismatched types
 LL |     want::<foo>(f);
    |                 ^ expected struct `foo`, found struct `Foo`
    |
-   = note: expected type `foo`
-              found type `Foo<foo>`
+   = note: expected struct `foo`
+              found struct `Foo<foo>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:41:17
@@ -166,26 +154,26 @@ error[E0308]: mismatched types
 LL |     want::<bar>(f);
    |                 ^ expected struct `bar`, found struct `Foo`
    |
-   = note: expected type `bar`
-              found type `Foo<foo>`
+   = note: expected struct `bar`
+              found struct `Foo<foo>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:42:24
    |
 LL |     want::<Foo<usize>>(f);
-   |                        ^ expected usize, found struct `foo`
+   |                        ^ expected `usize`, found struct `foo`
    |
-   = note: expected type `Foo<usize>`
-              found type `Foo<foo>`
+   = note: expected struct `Foo<usize>`
+              found struct `Foo<foo>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:43:27
    |
 LL |     want::<Foo<usize, B>>(f);
-   |                           ^ expected usize, found struct `foo`
+   |                           ^ expected `usize`, found struct `foo`
    |
-   = note: expected type `Foo<usize, B>`
-              found type `Foo<foo, A>`
+   = note: expected struct `Foo<usize, B>`
+              found struct `Foo<foo, A>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:44:25
@@ -193,8 +181,8 @@ error[E0308]: mismatched types
 LL |     want::<Foo<foo, B>>(f);
    |                         ^ expected struct `B`, found struct `A`
    |
-   = note: expected type `Foo<_, B>`
-              found type `Foo<_, A>`
+   = note: expected struct `Foo<_, B>`
+              found struct `Foo<_, A>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:45:22
@@ -202,8 +190,8 @@ error[E0308]: mismatched types
 LL |     want::<Foo<bar>>(f);
    |                      ^ expected struct `bar`, found struct `foo`
    |
-   = note: expected type `Foo<bar>`
-              found type `Foo<foo>`
+   = note: expected struct `Foo<bar>`
+              found struct `Foo<foo>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:46:25
@@ -211,8 +199,8 @@ error[E0308]: mismatched types
 LL |     want::<Foo<bar, B>>(f);
    |                         ^ expected struct `bar`, found struct `foo`
    |
-   = note: expected type `Foo<bar, B>`
-              found type `Foo<foo, A>`
+   = note: expected struct `Foo<bar, B>`
+              found struct `Foo<foo, A>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:47:23
@@ -220,29 +208,29 @@ error[E0308]: mismatched types
 LL |     want::<&Foo<foo>>(f);
    |                       ^
    |                       |
-   |                       expected &Foo<foo>, found struct `Foo`
+   |                       expected `&Foo<foo>`, found struct `Foo`
    |                       help: consider borrowing here: `&f`
    |
-   = note: expected type `&Foo<foo>`
-              found type `Foo<foo>`
+   = note: expected reference `&Foo<foo>`
+                 found struct `Foo<foo>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:48:26
    |
 LL |     want::<&Foo<foo, B>>(f);
-   |                          ^ expected reference, found struct `Foo`
+   |                          ^ expected `&Foo<foo, B>`, found struct `Foo`
    |
-   = note: expected type `&Foo<foo, B>`
-              found type `Foo<foo>`
+   = note: expected reference `&Foo<foo, B>`
+                 found struct `Foo<foo>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:52:19
    |
 LL |     want::<usize>(f);
-   |                   ^ expected usize, found struct `Foo`
+   |                   ^ expected `usize`, found struct `Foo`
    |
    = note: expected type `usize`
-              found type `Foo<foo, B>`
+            found struct `Foo<foo, B>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:53:17
@@ -250,8 +238,8 @@ error[E0308]: mismatched types
 LL |     want::<foo>(f);
    |                 ^ expected struct `foo`, found struct `Foo`
    |
-   = note: expected type `foo`
-              found type `Foo<foo, B>`
+   = note: expected struct `foo`
+              found struct `Foo<foo, B>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:54:17
@@ -259,26 +247,26 @@ error[E0308]: mismatched types
 LL |     want::<bar>(f);
    |                 ^ expected struct `bar`, found struct `Foo`
    |
-   = note: expected type `bar`
-              found type `Foo<foo, B>`
+   = note: expected struct `bar`
+              found struct `Foo<foo, B>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:55:24
    |
 LL |     want::<Foo<usize>>(f);
-   |                        ^ expected usize, found struct `foo`
+   |                        ^ expected `usize`, found struct `foo`
    |
-   = note: expected type `Foo<usize, A>`
-              found type `Foo<foo, B>`
+   = note: expected struct `Foo<usize, A>`
+              found struct `Foo<foo, B>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:56:27
    |
 LL |     want::<Foo<usize, B>>(f);
-   |                           ^ expected usize, found struct `foo`
+   |                           ^ expected `usize`, found struct `foo`
    |
-   = note: expected type `Foo<usize, _>`
-              found type `Foo<foo, _>`
+   = note: expected struct `Foo<usize, _>`
+              found struct `Foo<foo, _>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:57:22
@@ -286,8 +274,8 @@ error[E0308]: mismatched types
 LL |     want::<Foo<foo>>(f);
    |                      ^ expected struct `A`, found struct `B`
    |
-   = note: expected type `Foo<_, A>`
-              found type `Foo<_, B>`
+   = note: expected struct `Foo<_, A>`
+              found struct `Foo<_, B>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:58:22
@@ -295,8 +283,8 @@ error[E0308]: mismatched types
 LL |     want::<Foo<bar>>(f);
    |                      ^ expected struct `bar`, found struct `foo`
    |
-   = note: expected type `Foo<bar, A>`
-              found type `Foo<foo, B>`
+   = note: expected struct `Foo<bar, A>`
+              found struct `Foo<foo, B>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:59:25
@@ -304,17 +292,17 @@ error[E0308]: mismatched types
 LL |     want::<Foo<bar, B>>(f);
    |                         ^ expected struct `bar`, found struct `foo`
    |
-   = note: expected type `Foo<bar, _>`
-              found type `Foo<foo, _>`
+   = note: expected struct `Foo<bar, _>`
+              found struct `Foo<foo, _>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:60:23
    |
 LL |     want::<&Foo<foo>>(f);
-   |                       ^ expected &Foo<foo>, found struct `Foo`
+   |                       ^ expected `&Foo<foo>`, found struct `Foo`
    |
-   = note: expected type `&Foo<foo>`
-              found type `Foo<foo, B>`
+   = note: expected reference `&Foo<foo>`
+                 found struct `Foo<foo, B>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:61:26
@@ -322,20 +310,20 @@ error[E0308]: mismatched types
 LL |     want::<&Foo<foo, B>>(f);
    |                          ^
    |                          |
-   |                          expected reference, found struct `Foo`
+   |                          expected `&Foo<foo, B>`, found struct `Foo`
    |                          help: consider borrowing here: `&f`
    |
-   = note: expected type `&Foo<foo, B>`
-              found type `Foo<foo, B>`
+   = note: expected reference `&Foo<foo, B>`
+                 found struct `Foo<foo, B>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:65:19
    |
 LL |     want::<usize>(f);
-   |                   ^ expected usize, found struct `Foo`
+   |                   ^ expected `usize`, found struct `Foo`
    |
    = note: expected type `usize`
-              found type `Foo<foo, B, A>`
+            found struct `Foo<foo, B, A>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:66:17
@@ -343,8 +331,8 @@ error[E0308]: mismatched types
 LL |     want::<foo>(f);
    |                 ^ expected struct `foo`, found struct `Foo`
    |
-   = note: expected type `foo`
-              found type `Foo<foo, B, A>`
+   = note: expected struct `foo`
+              found struct `Foo<foo, B, A>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:67:17
@@ -352,26 +340,26 @@ error[E0308]: mismatched types
 LL |     want::<bar>(f);
    |                 ^ expected struct `bar`, found struct `Foo`
    |
-   = note: expected type `bar`
-              found type `Foo<foo, B, A>`
+   = note: expected struct `bar`
+              found struct `Foo<foo, B, A>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:68:24
    |
 LL |     want::<Foo<usize>>(f);
-   |                        ^ expected usize, found struct `foo`
+   |                        ^ expected `usize`, found struct `foo`
    |
-   = note: expected type `Foo<usize, A, B>`
-              found type `Foo<foo, B, A>`
+   = note: expected struct `Foo<usize, A, B>`
+              found struct `Foo<foo, B, A>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:69:27
    |
 LL |     want::<Foo<usize, B>>(f);
-   |                           ^ expected usize, found struct `foo`
+   |                           ^ expected `usize`, found struct `foo`
    |
-   = note: expected type `Foo<usize, _, B>`
-              found type `Foo<foo, _, A>`
+   = note: expected struct `Foo<usize, _, B>`
+              found struct `Foo<foo, _, A>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:70:22
@@ -379,8 +367,8 @@ error[E0308]: mismatched types
 LL |     want::<Foo<foo>>(f);
    |                      ^ expected struct `A`, found struct `B`
    |
-   = note: expected type `Foo<_, A, B>`
-              found type `Foo<_, B, A>`
+   = note: expected struct `Foo<_, A, B>`
+              found struct `Foo<_, B, A>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:71:25
@@ -388,8 +376,8 @@ error[E0308]: mismatched types
 LL |     want::<Foo<foo, B>>(f);
    |                         ^ expected struct `B`, found struct `A`
    |
-   = note: expected type `Foo<_, _, B>`
-              found type `Foo<_, _, A>`
+   = note: expected struct `Foo<_, _, B>`
+              found struct `Foo<_, _, A>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:72:22
@@ -397,8 +385,8 @@ error[E0308]: mismatched types
 LL |     want::<Foo<bar>>(f);
    |                      ^ expected struct `bar`, found struct `foo`
    |
-   = note: expected type `Foo<bar, A, B>`
-              found type `Foo<foo, B, A>`
+   = note: expected struct `Foo<bar, A, B>`
+              found struct `Foo<foo, B, A>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:73:25
@@ -406,26 +394,26 @@ error[E0308]: mismatched types
 LL |     want::<Foo<bar, B>>(f);
    |                         ^ expected struct `bar`, found struct `foo`
    |
-   = note: expected type `Foo<bar, _, B>`
-              found type `Foo<foo, _, A>`
+   = note: expected struct `Foo<bar, _, B>`
+              found struct `Foo<foo, _, A>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:74:23
    |
 LL |     want::<&Foo<foo>>(f);
-   |                       ^ expected &Foo<foo>, found struct `Foo`
+   |                       ^ expected `&Foo<foo>`, found struct `Foo`
    |
-   = note: expected type `&Foo<foo>`
-              found type `Foo<foo, B, A>`
+   = note: expected reference `&Foo<foo>`
+                 found struct `Foo<foo, B, A>`
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:75:26
    |
 LL |     want::<&Foo<foo, B>>(f);
-   |                          ^ expected reference, found struct `Foo`
+   |                          ^ expected `&Foo<foo, B>`, found struct `Foo`
    |
-   = note: expected type `&Foo<foo, B>`
-              found type `Foo<foo, B, A>`
+   = note: expected reference `&Foo<foo, B>`
+                 found struct `Foo<foo, B, A>`
 
 error: aborting due to 47 previous errors
 
diff --git a/src/test/ui/type/type-parameter-names.rs b/src/test/ui/type/type-parameter-names.rs
index 82576646345..b54a3fae0c1 100644
--- a/src/test/ui/type/type-parameter-names.rs
+++ b/src/test/ui/type/type-parameter-names.rs
@@ -4,9 +4,9 @@
 fn foo<Foo, Bar>(x: Foo) -> Bar {
     x
 //~^ ERROR mismatched types
-//~| expected type `Bar`
-//~| found type `Foo`
 //~| expected type parameter `Bar`, found type parameter `Foo`
+//~| expected type parameter `Bar`
+//~| found type parameter `Foo`
 }
 
 fn main() {}
diff --git a/src/test/ui/type/type-parameter-names.stderr b/src/test/ui/type/type-parameter-names.stderr
index 78d6989a336..f0ca8afca4e 100644
--- a/src/test/ui/type/type-parameter-names.stderr
+++ b/src/test/ui/type/type-parameter-names.stderr
@@ -9,8 +9,8 @@ LL | fn foo<Foo, Bar>(x: Foo) -> Bar {
 LL |     x
    |     ^ expected type parameter `Bar`, found type parameter `Foo`
    |
-   = note: expected type `Bar`
-              found type `Foo`
+   = note: expected type parameter `Bar`
+              found type parameter `Foo`
    = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
    = 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/type-params-in-different-spaces-1.rs b/src/test/ui/type/type-params-in-different-spaces-1.rs
index d2dce7006b7..6efd14d3785 100644
--- a/src/test/ui/type/type-params-in-different-spaces-1.rs
+++ b/src/test/ui/type/type-params-in-different-spaces-1.rs
@@ -3,9 +3,9 @@ use std::ops::Add;
 trait BrokenAdd: Copy + Add<Output=Self> {
     fn broken_add<T>(&self, rhs: T) -> Self {
         *self + rhs //~  ERROR mismatched types
-                    //~| expected type `Self`
-                    //~| found type `T`
                     //~| expected type parameter `Self`, found type parameter `T`
+                    //~| expected type parameter `Self`
+                    //~| found type parameter `T`
     }
 }
 
diff --git a/src/test/ui/type/type-params-in-different-spaces-1.stderr b/src/test/ui/type/type-params-in-different-spaces-1.stderr
index d2c6b7304ff..eeb09a9f02e 100644
--- a/src/test/ui/type/type-params-in-different-spaces-1.stderr
+++ b/src/test/ui/type/type-params-in-different-spaces-1.stderr
@@ -12,8 +12,8 @@ LL | |     }
 LL | | }
    | |_- expected type parameter
    |
-   = note: expected type `Self`
-              found type `T`
+   = note: expected type parameter `Self`
+              found type parameter `T`
    = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
    = 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/type-params-in-different-spaces-3.stderr b/src/test/ui/type/type-params-in-different-spaces-3.stderr
index ec5d6372792..880c138d287 100644
--- a/src/test/ui/type/type-params-in-different-spaces-3.stderr
+++ b/src/test/ui/type/type-params-in-different-spaces-3.stderr
@@ -12,8 +12,8 @@ LL | |     }
 LL | | }
    | |_- expected type parameter
    |
-   = note: expected type `Self`
-              found type `X`
+   = note: expected type parameter `Self`
+              found type parameter `X`
    = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
    = 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/type-shadow.stderr b/src/test/ui/type/type-shadow.stderr
index f15bdc16d51..b5a80766804 100644
--- a/src/test/ui/type/type-shadow.stderr
+++ b/src/test/ui/type/type-shadow.stderr
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/type-shadow.rs:6:20
    |
 LL |         let y: Y = "hello";
-   |                    ^^^^^^^ expected isize, found reference
-   |
-   = note: expected type `isize`
-              found type `&'static str`
+   |                    ^^^^^^^ expected `isize`, found `&str`
 
 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 d41086186f8..14c09ade7dd 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
@@ -4,10 +4,10 @@ error[E0308]: mismatched types
 LL | fn ice(x: Box<dyn Iterator<Item=()>>) {
    |                                       - possibly return type missing here?
 LL |     *x
-   |     ^^ expected (), found trait std::iter::Iterator
+   |     ^^ expected `()`, found trait `std::iter::Iterator`
    |
-   = note: expected type `()`
-              found type `(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/typeck/typeck_type_placeholder_mismatch.rs b/src/test/ui/typeck/typeck_type_placeholder_mismatch.rs
index ec978e45b82..2f9cfcf8dbb 100644
--- a/src/test/ui/typeck/typeck_type_placeholder_mismatch.rs
+++ b/src/test/ui/typeck/typeck_type_placeholder_mismatch.rs
@@ -12,8 +12,8 @@ pub fn main() {
 fn test1() {
     let x: Foo<_> = Bar::<usize>(PhantomData);
     //~^ ERROR mismatched types
-    //~| expected type `Foo<_>`
-    //~| found type `Bar<usize>`
+    //~| expected struct `Foo<_>`
+    //~| found struct `Bar<usize>`
     //~| expected struct `Foo`, found struct `Bar`
     let y: Foo<usize> = x;
 }
@@ -21,7 +21,7 @@ fn test1() {
 fn test2() {
     let x: Foo<_> = Bar::<usize>(PhantomData);
     //~^ ERROR mismatched types
-    //~| expected type `Foo<_>`
-    //~| found type `Bar<usize>`
+    //~| expected struct `Foo<_>`
+    //~| found struct `Bar<usize>`
     //~| expected struct `Foo`, found struct `Bar`
 }
diff --git a/src/test/ui/typeck/typeck_type_placeholder_mismatch.stderr b/src/test/ui/typeck/typeck_type_placeholder_mismatch.stderr
index 89114874824..1f6f89a6eb1 100644
--- a/src/test/ui/typeck/typeck_type_placeholder_mismatch.stderr
+++ b/src/test/ui/typeck/typeck_type_placeholder_mismatch.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     let x: Foo<_> = Bar::<usize>(PhantomData);
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Foo`, found struct `Bar`
    |
-   = note: expected type `Foo<_>`
-              found type `Bar<usize>`
+   = note: expected struct `Foo<_>`
+              found struct `Bar<usize>`
 
 error[E0308]: mismatched types
   --> $DIR/typeck_type_placeholder_mismatch.rs:22:21
@@ -13,8 +13,8 @@ error[E0308]: mismatched types
 LL |     let x: Foo<_> = Bar::<usize>(PhantomData);
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Foo`, found struct `Bar`
    |
-   = note: expected type `Foo<_>`
-              found type `Bar<usize>`
+   = note: expected struct `Foo<_>`
+              found struct `Bar<usize>`
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/ufcs/ufcs-explicit-self-bad.rs b/src/test/ui/ufcs/ufcs-explicit-self-bad.rs
index bdb8e197fbe..e836d33976a 100644
--- a/src/test/ui/ufcs/ufcs-explicit-self-bad.rs
+++ b/src/test/ui/ufcs/ufcs-explicit-self-bad.rs
@@ -38,12 +38,12 @@ impl<'a, T> SomeTrait for &'a Bar<T> {
     //~^ ERROR mismatched `self` parameter type
     fn dummy3(self: &&Bar<T>) {}
     //~^ ERROR mismatched `self` parameter type
-    //~| expected type `&'a Bar<T>`
-    //~| found type `&Bar<T>`
+    //~| expected reference `&'a Bar<T>`
+    //~| found reference `&Bar<T>`
     //~| lifetime mismatch
     //~| ERROR mismatched `self` parameter type
-    //~| expected type `&'a Bar<T>`
-    //~| found type `&Bar<T>`
+    //~| expected reference `&'a Bar<T>`
+    //~| found reference `&Bar<T>`
     //~| lifetime mismatch
 }
 
diff --git a/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr b/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr
index de3a997a19e..d1232ad3f32 100644
--- a/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr
+++ b/src/test/ui/ufcs/ufcs-explicit-self-bad.stderr
@@ -31,8 +31,8 @@ error[E0308]: mismatched `self` parameter type
 LL |     fn dummy2(self: &Bar<T>) {}
    |                     ^^^^^^^ lifetime mismatch
    |
-   = note: expected type `&'a Bar<T>`
-              found type `&Bar<T>`
+   = note: expected reference `&'a Bar<T>`
+              found reference `&Bar<T>`
 note: the anonymous lifetime #1 defined on the method body at 37:5...
   --> $DIR/ufcs-explicit-self-bad.rs:37:5
    |
@@ -50,8 +50,8 @@ error[E0308]: mismatched `self` parameter type
 LL |     fn dummy2(self: &Bar<T>) {}
    |                     ^^^^^^^ lifetime mismatch
    |
-   = note: expected type `&'a Bar<T>`
-              found type `&Bar<T>`
+   = note: expected reference `&'a Bar<T>`
+              found reference `&Bar<T>`
 note: the lifetime `'a` as defined on the impl at 35:6...
   --> $DIR/ufcs-explicit-self-bad.rs:35:6
    |
@@ -69,8 +69,8 @@ error[E0308]: mismatched `self` parameter type
 LL |     fn dummy3(self: &&Bar<T>) {}
    |                     ^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `&'a Bar<T>`
-              found type `&Bar<T>`
+   = note: expected reference `&'a Bar<T>`
+              found reference `&Bar<T>`
 note: the anonymous lifetime #2 defined on the method body at 39:5...
   --> $DIR/ufcs-explicit-self-bad.rs:39:5
    |
@@ -88,8 +88,8 @@ error[E0308]: mismatched `self` parameter type
 LL |     fn dummy3(self: &&Bar<T>) {}
    |                     ^^^^^^^^ lifetime mismatch
    |
-   = note: expected type `&'a Bar<T>`
-              found type `&Bar<T>`
+   = note: expected reference `&'a Bar<T>`
+              found reference `&Bar<T>`
 note: the lifetime `'a` as defined on the impl at 35:6...
   --> $DIR/ufcs-explicit-self-bad.rs:35:6
    |
diff --git a/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr b/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr
index a6f24984c8b..59f699b7024 100644
--- a/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr
+++ b/src/test/ui/ufcs/ufcs-qpath-self-mismatch.stderr
@@ -10,7 +10,7 @@ error[E0308]: mismatched types
   --> $DIR/ufcs-qpath-self-mismatch.rs:6:28
    |
 LL |     <i32 as Add<i32>>::add(1u32, 2);
-   |                            ^^^^ expected i32, found u32
+   |                            ^^^^ expected `i32`, found `u32`
    |
 help: change the type of the numeric literal from `u32` to `i32`
    |
@@ -21,7 +21,7 @@ error[E0308]: mismatched types
   --> $DIR/ufcs-qpath-self-mismatch.rs:8:31
    |
 LL |     <i32 as Add<i32>>::add(1, 2u32);
-   |                               ^^^^ expected i32, found u32
+   |                               ^^^^ expected `i32`, found `u32`
    |
 help: change the type of the numeric literal from `u32` to `i32`
    |
diff --git a/src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr b/src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr
index 2479f3e601e..482b3ace65b 100644
--- a/src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr
+++ b/src/test/ui/unboxed-closures/unboxed-closures-type-mismatch.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/unboxed-closures-type-mismatch.rs:5:15
    |
 LL |     let z = f(1_usize, 2);
-   |               ^^^^^^^ expected isize, found usize
+   |               ^^^^^^^ expected `isize`, found `usize`
    |
 help: change the type of the numeric literal from `usize` to `isize`
    |
diff --git a/src/test/ui/unsafe/unsafe-subtyping.stderr b/src/test/ui/unsafe/unsafe-subtyping.stderr
index cac5ee07089..b3e789cc0d9 100644
--- a/src/test/ui/unsafe/unsafe-subtyping.stderr
+++ b/src/test/ui/unsafe/unsafe-subtyping.stderr
@@ -6,8 +6,8 @@ LL | fn foo(x: Option<fn(i32)>) -> Option<unsafe fn(i32)> {
 LL |     x
    |     ^ expected unsafe fn, found normal fn
    |
-   = note: expected type `std::option::Option<unsafe fn(i32)>`
-              found type `std::option::Option<fn(i32)>`
+   = note: expected enum `std::option::Option<unsafe fn(i32)>`
+              found enum `std::option::Option<fn(i32)>`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/unsafe/unsafe-trait-impl.rs b/src/test/ui/unsafe/unsafe-trait-impl.rs
index 7b76e006907..97ee97cb5c0 100644
--- a/src/test/ui/unsafe/unsafe-trait-impl.rs
+++ b/src/test/ui/unsafe/unsafe-trait-impl.rs
@@ -7,8 +7,8 @@ trait Foo {
 impl Foo for u32 {
     fn len(&self) -> u32 { *self }
     //~^ ERROR method `len` has an incompatible type for trait
-    //~| expected type `unsafe fn(&u32) -> u32`
-    //~| found type `fn(&u32) -> u32`
+    //~| expected fn pointer `unsafe fn(&u32) -> u32`
+    //~| found fn pointer `fn(&u32) -> u32`
 }
 
 fn main() { }
diff --git a/src/test/ui/unsafe/unsafe-trait-impl.stderr b/src/test/ui/unsafe/unsafe-trait-impl.stderr
index 4e93d235757..567be27555c 100644
--- a/src/test/ui/unsafe/unsafe-trait-impl.stderr
+++ b/src/test/ui/unsafe/unsafe-trait-impl.stderr
@@ -7,8 +7,8 @@ LL |     unsafe fn len(&self) -> u32;
 LL |     fn len(&self) -> u32 { *self }
    |     ^^^^^^^^^^^^^^^^^^^^ expected unsafe fn, found normal fn
    |
-   = note: expected type `unsafe fn(&u32) -> u32`
-              found type `fn(&u32) -> u32`
+   = note: expected fn pointer `unsafe fn(&u32) -> u32`
+              found fn pointer `fn(&u32) -> u32`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/variance/variance-btree-invariant-types.stderr b/src/test/ui/variance/variance-btree-invariant-types.stderr
index 0f93927683e..8172a019b65 100644
--- a/src/test/ui/variance/variance-btree-invariant-types.stderr
+++ b/src/test/ui/variance/variance-btree-invariant-types.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected type `std::collections::btree_map::IterMut<'_, &'new (), _>`
-              found type `std::collections::btree_map::IterMut<'_, &'static (), _>`
+   = note: expected struct `std::collections::btree_map::IterMut<'_, &'new (), _>`
+              found struct `std::collections::btree_map::IterMut<'_, &'static (), _>`
 note: the lifetime `'new` as defined on the function body at 3:21...
   --> $DIR/variance-btree-invariant-types.rs:3:21
    |
@@ -19,8 +19,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected type `std::collections::btree_map::IterMut<'_, _, &'new ()>`
-              found type `std::collections::btree_map::IterMut<'_, _, &'static ()>`
+   = note: expected struct `std::collections::btree_map::IterMut<'_, _, &'new ()>`
+              found struct `std::collections::btree_map::IterMut<'_, _, &'static ()>`
 note: the lifetime `'new` as defined on the function body at 6:21...
   --> $DIR/variance-btree-invariant-types.rs:6:21
    |
@@ -34,8 +34,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected type `std::collections::btree_map::IterMut<'_, &'static (), _>`
-              found type `std::collections::btree_map::IterMut<'_, &'new (), _>`
+   = note: expected struct `std::collections::btree_map::IterMut<'_, &'static (), _>`
+              found struct `std::collections::btree_map::IterMut<'_, &'new (), _>`
 note: the lifetime `'new` as defined on the function body at 9:24...
   --> $DIR/variance-btree-invariant-types.rs:9:24
    |
@@ -49,8 +49,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected type `std::collections::btree_map::IterMut<'_, _, &'static ()>`
-              found type `std::collections::btree_map::IterMut<'_, _, &'new ()>`
+   = note: expected struct `std::collections::btree_map::IterMut<'_, _, &'static ()>`
+              found struct `std::collections::btree_map::IterMut<'_, _, &'new ()>`
 note: the lifetime `'new` as defined on the function body at 12:24...
   --> $DIR/variance-btree-invariant-types.rs:12:24
    |
@@ -64,8 +64,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected type `std::collections::btree_map::OccupiedEntry<'_, &'new (), _>`
-              found type `std::collections::btree_map::OccupiedEntry<'_, &'static (), _>`
+   = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, &'new (), _>`
+              found struct `std::collections::btree_map::OccupiedEntry<'_, &'static (), _>`
 note: the lifetime `'new` as defined on the function body at 16:20...
   --> $DIR/variance-btree-invariant-types.rs:16:20
    |
@@ -79,8 +79,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected type `std::collections::btree_map::OccupiedEntry<'_, _, &'new ()>`
-              found type `std::collections::btree_map::OccupiedEntry<'_, _, &'static ()>`
+   = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, _, &'new ()>`
+              found struct `std::collections::btree_map::OccupiedEntry<'_, _, &'static ()>`
 note: the lifetime `'new` as defined on the function body at 20:20...
   --> $DIR/variance-btree-invariant-types.rs:20:20
    |
@@ -94,8 +94,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected type `std::collections::btree_map::OccupiedEntry<'_, &'static (), _>`
-              found type `std::collections::btree_map::OccupiedEntry<'_, &'new (), _>`
+   = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, &'static (), _>`
+              found struct `std::collections::btree_map::OccupiedEntry<'_, &'new (), _>`
 note: the lifetime `'new` as defined on the function body at 24:23...
   --> $DIR/variance-btree-invariant-types.rs:24:23
    |
@@ -109,8 +109,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected type `std::collections::btree_map::OccupiedEntry<'_, _, &'static ()>`
-              found type `std::collections::btree_map::OccupiedEntry<'_, _, &'new ()>`
+   = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, _, &'static ()>`
+              found struct `std::collections::btree_map::OccupiedEntry<'_, _, &'new ()>`
 note: the lifetime `'new` as defined on the function body at 28:23...
   --> $DIR/variance-btree-invariant-types.rs:28:23
    |
@@ -124,8 +124,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected type `std::collections::btree_map::VacantEntry<'_, &'new (), _>`
-              found type `std::collections::btree_map::VacantEntry<'_, &'static (), _>`
+   = note: expected struct `std::collections::btree_map::VacantEntry<'_, &'new (), _>`
+              found struct `std::collections::btree_map::VacantEntry<'_, &'static (), _>`
 note: the lifetime `'new` as defined on the function body at 33:20...
   --> $DIR/variance-btree-invariant-types.rs:33:20
    |
@@ -139,8 +139,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected type `std::collections::btree_map::VacantEntry<'_, _, &'new ()>`
-              found type `std::collections::btree_map::VacantEntry<'_, _, &'static ()>`
+   = note: expected struct `std::collections::btree_map::VacantEntry<'_, _, &'new ()>`
+              found struct `std::collections::btree_map::VacantEntry<'_, _, &'static ()>`
 note: the lifetime `'new` as defined on the function body at 37:20...
   --> $DIR/variance-btree-invariant-types.rs:37:20
    |
@@ -154,8 +154,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected type `std::collections::btree_map::VacantEntry<'_, &'static (), _>`
-              found type `std::collections::btree_map::VacantEntry<'_, &'new (), _>`
+   = note: expected struct `std::collections::btree_map::VacantEntry<'_, &'static (), _>`
+              found struct `std::collections::btree_map::VacantEntry<'_, &'new (), _>`
 note: the lifetime `'new` as defined on the function body at 41:23...
   --> $DIR/variance-btree-invariant-types.rs:41:23
    |
@@ -169,8 +169,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected type `std::collections::btree_map::VacantEntry<'_, _, &'static ()>`
-              found type `std::collections::btree_map::VacantEntry<'_, _, &'new ()>`
+   = note: expected struct `std::collections::btree_map::VacantEntry<'_, _, &'static ()>`
+              found struct `std::collections::btree_map::VacantEntry<'_, _, &'new ()>`
 note: the lifetime `'new` as defined on the function body at 45:23...
   --> $DIR/variance-btree-invariant-types.rs:45:23
    |
diff --git a/src/test/ui/variance/variance-contravariant-arg-object.stderr b/src/test/ui/variance/variance-contravariant-arg-object.stderr
index 27017e5dc47..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 type `dyn Get<&'min i32>`
-              found type `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 type `dyn Get<&'max i32>`
-              found type `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 b986edb809f..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 type `dyn Get<&'min i32>`
-              found type `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 type `dyn Get<&'max i32>`
-              found type `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 8ff1e23e8ad..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 type `dyn Get<&'min i32>`
-              found type `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 type `dyn Get<&'max i32>`
-              found type `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
    |
diff --git a/src/test/ui/variance/variance-use-contravariant-struct-1.stderr b/src/test/ui/variance/variance-use-contravariant-struct-1.stderr
index 618f56da512..423c9a601f4 100644
--- a/src/test/ui/variance/variance-use-contravariant-struct-1.stderr
+++ b/src/test/ui/variance/variance-use-contravariant-struct-1.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected type `SomeStruct<&'min ()>`
-              found type `SomeStruct<&'max ()>`
+   = note: expected struct `SomeStruct<&'min ()>`
+              found struct `SomeStruct<&'max ()>`
 note: the lifetime `'min` as defined on the function body at 8:8...
   --> $DIR/variance-use-contravariant-struct-1.rs:8:8
    |
diff --git a/src/test/ui/variance/variance-use-covariant-struct-1.stderr b/src/test/ui/variance/variance-use-covariant-struct-1.stderr
index 0b3a8dcfc86..3f9224804bd 100644
--- a/src/test/ui/variance/variance-use-covariant-struct-1.stderr
+++ b/src/test/ui/variance/variance-use-covariant-struct-1.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected type `SomeStruct<&'max ()>`
-              found type `SomeStruct<&'min ()>`
+   = note: expected struct `SomeStruct<&'max ()>`
+              found struct `SomeStruct<&'min ()>`
 note: the lifetime `'min` as defined on the function body at 6:8...
   --> $DIR/variance-use-covariant-struct-1.rs:6:8
    |
diff --git a/src/test/ui/variance/variance-use-invariant-struct-1.stderr b/src/test/ui/variance/variance-use-invariant-struct-1.stderr
index 31deefb535e..7063f1c9c8f 100644
--- a/src/test/ui/variance/variance-use-invariant-struct-1.stderr
+++ b/src/test/ui/variance/variance-use-invariant-struct-1.stderr
@@ -4,8 +4,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected type `SomeStruct<&'min ()>`
-              found type `SomeStruct<&'max ()>`
+   = note: expected struct `SomeStruct<&'min ()>`
+              found struct `SomeStruct<&'max ()>`
 note: the lifetime `'min` as defined on the function body at 8:8...
   --> $DIR/variance-use-invariant-struct-1.rs:8:8
    |
@@ -23,8 +23,8 @@ error[E0308]: mismatched types
 LL |     v
    |     ^ lifetime mismatch
    |
-   = note: expected type `SomeStruct<&'max ()>`
-              found type `SomeStruct<&'min ()>`
+   = note: expected struct `SomeStruct<&'max ()>`
+              found struct `SomeStruct<&'min ()>`
 note: the lifetime `'min` as defined on the function body at 15:8...
   --> $DIR/variance-use-invariant-struct-1.rs:15:8
    |
diff --git a/src/test/ui/wf/wf-unsafe-trait-obj-match.stderr b/src/test/ui/wf/wf-unsafe-trait-obj-match.stderr
index 185b1e6c36b..d5799ccc834 100644
--- a/src/test/ui/wf/wf-unsafe-trait-obj-match.stderr
+++ b/src/test/ui/wf/wf-unsafe-trait-obj-match.stderr
@@ -9,8 +9,8 @@ LL | |         None => &R,
 LL | |     }
    | |_____- `match` arms have incompatible types
    |
-   = note: expected type `&S`
-              found type `&R`
+   = note:   expected type `&S`
+           found reference `&R`
 
 error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/wf-unsafe-trait-obj-match.rs:26:21
diff --git a/src/test/ui/while-type-error.stderr b/src/test/ui/while-type-error.stderr
index 15169673fe9..529cbff0563 100644
--- a/src/test/ui/while-type-error.stderr
+++ b/src/test/ui/while-type-error.stderr
@@ -2,10 +2,10 @@ error[E0308]: mismatched types
   --> $DIR/while-type-error.rs:3:19
    |
 LL | fn main() { while main { } }
-   |                   ^^^^ expected bool, found fn item
+   |                   ^^^^ expected `bool`, found fn item
    |
    = note: expected type `bool`
-              found type `fn() {main}`
+           found fn item `fn() {main}`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/wrong-mul-method-signature.stderr b/src/test/ui/wrong-mul-method-signature.stderr
index 2317bf8e829..c0888b3b9d4 100644
--- a/src/test/ui/wrong-mul-method-signature.stderr
+++ b/src/test/ui/wrong-mul-method-signature.stderr
@@ -2,46 +2,40 @@ error[E0053]: method `mul` has an incompatible type for trait
   --> $DIR/wrong-mul-method-signature.rs:16:5
    |
 LL |     fn mul(self, s: &f64) -> Vec1 {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected f64, found &f64
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `f64`, found `&f64`
    |
-   = note: expected type `fn(Vec1, f64) -> Vec1`
-              found type `fn(Vec1, &f64) -> Vec1`
+   = note: expected fn pointer `fn(Vec1, f64) -> Vec1`
+              found fn pointer `fn(Vec1, &f64) -> Vec1`
 
 error[E0053]: method `mul` has an incompatible type for trait
   --> $DIR/wrong-mul-method-signature.rs:33:5
    |
 LL |     fn mul(self, s: f64) -> Vec2 {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Vec2`, found f64
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Vec2`, found `f64`
    |
-   = note: expected type `fn(Vec2, Vec2) -> f64`
-              found type `fn(Vec2, f64) -> Vec2`
+   = note: expected fn pointer `fn(Vec2, Vec2) -> f64`
+              found fn pointer `fn(Vec2, f64) -> Vec2`
 
 error[E0053]: method `mul` has an incompatible type for trait
   --> $DIR/wrong-mul-method-signature.rs:52:5
    |
 LL |     fn mul(self, s: f64) -> f64 {
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found f64
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `f64`
    |
-   = note: expected type `fn(Vec3, f64) -> i32`
-              found type `fn(Vec3, f64) -> f64`
+   = note: expected fn pointer `fn(Vec3, f64) -> i32`
+              found fn pointer `fn(Vec3, f64) -> f64`
 
 error[E0308]: mismatched types
   --> $DIR/wrong-mul-method-signature.rs:63:45
    |
 LL |     let x: Vec2 = Vec2 { x: 1.0, y: 2.0 } * 2.0; // trait had reversed order
    |                                             ^^^ expected struct `Vec2`, found floating-point number
-   |
-   = note: expected type `Vec2`
-              found type `{float}`
 
 error[E0308]: mismatched types
   --> $DIR/wrong-mul-method-signature.rs:63:19
    |
 LL |     let x: Vec2 = Vec2 { x: 1.0, y: 2.0 } * 2.0; // trait had reversed order
-   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Vec2`, found f64
-   |
-   = note: expected type `Vec2`
-              found type `f64`
+   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Vec2`, found `f64`
 
 error: aborting due to 5 previous errors
 
diff --git a/src/test/ui/wrong-ret-type.stderr b/src/test/ui/wrong-ret-type.stderr
index cf59f42683d..440620f40b1 100644
--- a/src/test/ui/wrong-ret-type.stderr
+++ b/src/test/ui/wrong-ret-type.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/wrong-ret-type.rs:2:49
    |
 LL | fn mk_int() -> usize { let i: isize = 3; return i; }
-   |                -----                            ^ expected usize, found isize
+   |                -----                            ^ expected `usize`, found `isize`
    |                |
    |                expected `usize` because of return type