From 6f8f70624b99460481af25764b9e02d2c67b42c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Fri, 15 Nov 2019 09:37:01 -0800 Subject: [PATCH] Surround types with backticks in type errors --- src/librustc/ty/error.rs | 8 +- src/librustc/ty/wf.rs | 4 +- src/librustc_typeck/check/_match.rs | 8 +- src/librustc_typeck/check/pat.rs | 2 +- .../failed-doctest-missing-codes.stdout | 2 +- src/test/ui/arg-type-mismatch.stderr | 2 +- src/test/ui/array-break-length.stderr | 4 +- src/test/ui/array-not-vector.rs | 4 +- src/test/ui/array-not-vector.stderr | 4 +- ...ssociated-const-generic-obligations.stderr | 2 +- .../associated-const-impl-wrong-type.stderr | 2 +- .../associated-types/associated-types-eq-3.rs | 4 +- .../associated-types-eq-3.stderr | 4 +- .../associated-types-eq-hr.stderr | 4 +- ...ated-types-multiple-types-one-trait.stderr | 4 +- ...sociated-types-overridden-binding-2.stderr | 2 +- .../associated-types-path-2.rs | 4 +- .../associated-types-path-2.stderr | 4 +- .../ui/associated-types/issue-44153.stderr | 2 +- ...point-at-type-on-obligation-failure.stderr | 2 +- ...block-control-flow-static-semantics.stderr | 12 +- .../dont-suggest-missing-await.stderr | 2 +- .../suggest-missing-await-closure.stderr | 2 +- .../async-await/suggest-missing-await.stderr | 2 +- src/test/ui/binop/binop-logic-float.stderr | 4 +- src/test/ui/binop/binop-logic-int.stderr | 4 +- .../block-expression-remove-semicolon.stderr | 2 +- .../block-must-not-have-result-do.stderr | 2 +- .../block-must-not-have-result-res.stderr | 2 +- .../block-must-not-have-result-while.rs | 2 +- .../block-must-not-have-result-while.stderr | 2 +- .../consider-removing-last-semi.stderr | 4 +- src/test/ui/block-result/issue-11714.stderr | 2 +- src/test/ui/block-result/issue-13428.stderr | 4 +- src/test/ui/block-result/issue-13624.rs | 4 +- src/test/ui/block-result/issue-13624.stderr | 4 +- src/test/ui/block-result/issue-20862.stderr | 2 +- src/test/ui/block-result/issue-22645.stderr | 2 +- src/test/ui/block-result/issue-5500.rs | 2 +- src/test/ui/block-result/issue-5500.stderr | 2 +- .../unexpected-return-on-unit.stderr | 2 +- src/test/ui/break-while-condition.stderr | 6 +- src/test/ui/chalkify/type_inference.stderr | 2 +- .../closure-array-break-length.stderr | 4 +- src/test/ui/codemap_tests/tab.stderr | 2 +- .../coerce-expect-unsized-ascribed.stderr | 14 +- src/test/ui/coercion/coerce-to-bang.stderr | 20 +- ...coercion-missing-tail-expected-type.stderr | 4 +- src/test/ui/coercion/coercion-slice.rs | 2 +- src/test/ui/coercion/coercion-slice.stderr | 2 +- .../fn-const-param-infer.stderr | 2 +- .../types-mismatch-const-args.stderr | 2 +- .../ui/consts/const-cast-wrong-type.stderr | 2 +- .../const-eval/const-eval-overflow-3b.stderr | 2 +- .../const-eval/const-eval-overflow-4b.rs | 2 +- .../const-eval/const-eval-overflow-4b.stderr | 2 +- .../ui/consts/const-eval/const-eval-span.rs | 2 +- .../consts/const-eval/const-eval-span.stderr | 2 +- src/test/ui/consts/const-integer-bool-ops.rs | 36 +-- .../ui/consts/const-integer-bool-ops.stderr | 36 +-- src/test/ui/consts/const-tup-index-span.rs | 2 +- .../ui/consts/const-tup-index-span.stderr | 2 +- src/test/ui/consts/const-type-mismatch.stderr | 4 +- src/test/ui/consts/enum-discr-type-err.stderr | 2 +- src/test/ui/conversion-methods.stderr | 6 +- src/test/ui/cross/cross-borrow-trait.stderr | 2 +- src/test/ui/deref-suggestion.stderr | 20 +- src/test/ui/destructure-trait-ref.rs | 4 +- src/test/ui/destructure-trait-ref.stderr | 6 +- src/test/ui/did_you_mean/issue-42764.stderr | 2 +- ...xpected-float-found-integer-literal.stderr | 10 +- src/test/ui/discrim/discrim-ill-typed.rs | 16 +- src/test/ui/discrim/discrim-ill-typed.stderr | 16 +- src/test/ui/diverging-fn-tail-35849.stderr | 2 +- .../ui/diverging-tuple-parts-39485.stderr | 4 +- src/test/ui/dst/dst-bad-assign-3.rs | 2 +- src/test/ui/dst/dst-bad-assign-3.stderr | 2 +- src/test/ui/dst/dst-bad-assign.rs | 2 +- src/test/ui/dst/dst-bad-assign.stderr | 2 +- src/test/ui/dst/dst-bad-coercions.stderr | 8 +- src/test/ui/error-codes/E0070.stderr | 2 +- src/test/ui/error-codes/E0271.stderr | 2 +- src/test/ui/error-codes/E0308-4.stderr | 2 +- src/test/ui/error-codes/E0308.stderr | 2 +- src/test/ui/estr-subtyping.stderr | 2 +- ...loat-literal-inference-restrictions.stderr | 4 +- src/test/ui/fn/fn-bad-block-type.stderr | 2 +- src/test/ui/fn/fn-item-type.rs | 4 +- src/test/ui/fn/fn-item-type.stderr | 4 +- src/test/ui/fn/fn-trait-formatting.stderr | 6 +- .../fully-qualified-type-name4.rs | 2 +- .../fully-qualified-type-name4.stderr | 2 +- .../type-mismatch-signature-deduction.stderr | 2 +- .../generic-arg-mismatch-recover.stderr | 2 +- .../generic/generic-type-params-name-repr.rs | 12 +- .../generic-type-params-name-repr.stderr | 12 +- src/test/ui/if-else-type-mismatch.stderr | 16 +- src/test/ui/if/if-branch-types.rs | 2 +- src/test/ui/if/if-branch-types.stderr | 2 +- src/test/ui/if/if-let-arm-types.rs | 2 +- src/test/ui/if/if-let-arm-types.stderr | 2 +- src/test/ui/if/if-no-match-bindings.stderr | 16 +- src/test/ui/if/if-typeck.stderr | 2 +- .../ui/if/if-without-else-as-fn-expr.stderr | 12 +- src/test/ui/if/if-without-else-result.rs | 2 +- src/test/ui/if/if-without-else-result.stderr | 2 +- src/test/ui/if/ifmt-bad-arg.stderr | 4 +- .../bound-normalization-fail.stderr | 4 +- src/test/ui/impl-trait/equality.rs | 2 +- src/test/ui/impl-trait/equality.stderr | 2 +- src/test/ui/impl-trait/equality2.rs | 8 +- src/test/ui/impl-trait/equality2.stderr | 16 +- .../ui/include-macros/mismatched-types.stderr | 4 +- src/test/ui/indexing-requires-a-uint.stderr | 2 +- .../ui/integer-literal-suffix-inference.rs | 72 ++--- .../integer-literal-suffix-inference.stderr | 72 ++--- src/test/ui/issues/issue-10176.rs | 2 +- src/test/ui/issues/issue-10176.stderr | 2 +- src/test/ui/issues/issue-11319.rs | 2 +- src/test/ui/issues/issue-11319.stderr | 2 +- src/test/ui/issues/issue-11374.stderr | 2 +- src/test/ui/issues/issue-12997-2.stderr | 2 +- src/test/ui/issues/issue-13359.rs | 4 +- src/test/ui/issues/issue-13359.stderr | 4 +- src/test/ui/issues/issue-1362.stderr | 2 +- src/test/ui/issues/issue-14091.stderr | 2 +- src/test/ui/issues/issue-1448-2.stderr | 2 +- src/test/ui/issues/issue-16338.stderr | 2 +- src/test/ui/issues/issue-16401.rs | 2 +- src/test/ui/issues/issue-16401.stderr | 2 +- src/test/ui/issues/issue-17033.rs | 2 +- src/test/ui/issues/issue-17033.stderr | 2 +- src/test/ui/issues/issue-19991.rs | 2 +- src/test/ui/issues/issue-19991.stderr | 2 +- src/test/ui/issues/issue-20225.stderr | 6 +- src/test/ui/issues/issue-22684.stderr | 2 +- src/test/ui/issues/issue-23589.stderr | 2 +- src/test/ui/issues/issue-27008.rs | 2 +- src/test/ui/issues/issue-27008.stderr | 2 +- src/test/ui/issues/issue-27042.stderr | 8 +- src/test/ui/issues/issue-29084.rs | 2 +- src/test/ui/issues/issue-29084.stderr | 2 +- src/test/ui/issues/issue-31173.stderr | 2 +- src/test/ui/issues/issue-31910.rs | 2 +- src/test/ui/issues/issue-31910.stderr | 2 +- src/test/ui/issues/issue-32323.stderr | 2 +- src/test/ui/issues/issue-34334.stderr | 2 +- src/test/ui/issues/issue-3477.rs | 2 +- src/test/ui/issues/issue-3477.stderr | 2 +- src/test/ui/issues/issue-35869.stderr | 8 +- src/test/ui/issues/issue-37026.stderr | 4 +- src/test/ui/issues/issue-37665.stderr | 2 +- src/test/ui/issues/issue-39970.stderr | 2 +- src/test/ui/issues/issue-39974.rs | 2 +- src/test/ui/issues/issue-39974.stderr | 2 +- src/test/ui/issues/issue-40749.stderr | 2 +- src/test/ui/issues/issue-41549.stderr | 2 +- src/test/ui/issues/issue-41742.stderr | 2 +- src/test/ui/issues/issue-4201.rs | 2 +- src/test/ui/issues/issue-4201.stderr | 2 +- src/test/ui/issues/issue-43162.stderr | 2 +- src/test/ui/issues/issue-44023.stderr | 2 +- src/test/ui/issues/issue-4517.rs | 2 +- src/test/ui/issues/issue-4517.stderr | 2 +- src/test/ui/issues/issue-46112.stderr | 2 +- src/test/ui/issues/issue-46302.stderr | 2 +- ...-consider-borrowing-cast-or-binexpr.stderr | 4 +- src/test/ui/issues/issue-47486.stderr | 2 +- src/test/ui/issues/issue-48364.stderr | 2 +- src/test/ui/issues/issue-48838.stderr | 2 +- src/test/ui/issues/issue-50577.stderr | 2 +- src/test/ui/issues/issue-50585.stderr | 2 +- src/test/ui/issues/issue-50600.stderr | 2 +- src/test/ui/issues/issue-50688.stderr | 2 +- src/test/ui/issues/issue-5100.rs | 2 +- src/test/ui/issues/issue-5100.stderr | 2 +- ...1632-try-desugar-incompatible-types.stderr | 2 +- src/test/ui/issues/issue-53348.rs | 2 +- src/test/ui/issues/issue-53348.stderr | 2 +- src/test/ui/issues/issue-53692.stderr | 4 +- src/test/ui/issues/issue-61106.stderr | 2 +- src/test/ui/issues/issue-61882.stderr | 4 +- src/test/ui/issues/issue-6458-4.stderr | 2 +- src/test/ui/issues/issue-7061.stderr | 2 +- src/test/ui/issues/issue-8761.rs | 4 +- src/test/ui/issues/issue-8761.stderr | 4 +- .../ui/json-bom-plus-crlf-multifile.stderr | 2 +- src/test/ui/json-bom-plus-crlf.stderr | 2 +- .../keyword-false-as-identifier.stderr | 2 +- .../keyword/keyword-true-as-identifier.stderr | 2 +- .../liveness-closure-require-ret.stderr | 2 +- .../ui/liveness/liveness-forgot-ret.stderr | 2 +- .../ui/liveness/liveness-issue-2163.stderr | 2 +- .../ui/liveness/liveness-missing-ret2.stderr | 2 +- .../liveness-return-last-stmt-semi.stderr | 8 +- src/test/ui/loops/loop-break-value.stderr | 16 +- .../ui/loops/loop-labeled-break-value.stderr | 6 +- .../ui/loops/loop-properly-diverging-2.stderr | 2 +- .../match/match-arm-resolving-to-never.stderr | 2 +- src/test/ui/match/match-ill-type2.stderr | 2 +- src/test/ui/match/match-range-fail.stderr | 2 +- src/test/ui/match/match-type-err-first-arm.rs | 8 +- .../ui/match/match-type-err-first-arm.stderr | 8 +- .../meta-expected-error-correct-rev.a.stderr | 2 +- ...od-ambig-one-trait-unknown-int-type.stderr | 2 +- ...-same-trait-object-with-separate-params.rs | 10 +- ...e-trait-object-with-separate-params.stderr | 10 +- src/test/ui/methods/method-self-arg-1.rs | 2 +- src/test/ui/methods/method-self-arg-1.stderr | 2 +- src/test/ui/mir-unpretty.stderr | 2 +- src/test/ui/mismatched_types/E0053.stderr | 2 +- src/test/ui/mismatched_types/E0409.stderr | 2 +- .../for-loop-has-unit-body.stderr | 2 +- .../ui/mismatched_types/issue-19109.stderr | 2 +- .../ui/mismatched_types/issue-26480.stderr | 2 +- .../ui/mismatched_types/issue-35030.stderr | 4 +- .../ui/mismatched_types/issue-38371.stderr | 4 +- src/test/ui/mismatched_types/main.stderr | 2 +- .../numeric-literal-cast.stderr | 6 +- .../overloaded-calls-bad.stderr | 2 +- .../trait-impl-fn-incompatibility.stderr | 2 +- src/test/ui/missing/missing-return.stderr | 2 +- src/test/ui/mut/mut-cross-borrowing.stderr | 2 +- .../call-fn-never-arg-wrong-type.stderr | 2 +- .../never_type/never-assign-wrong-type.stderr | 2 +- src/test/ui/noexporttypeexe.rs | 2 +- src/test/ui/noexporttypeexe.stderr | 2 +- src/test/ui/numeric/const-scope.stderr | 12 +- src/test/ui/numeric/len.stderr | 2 +- src/test/ui/numeric/numeric-cast-2.stderr | 6 +- .../numeric-cast-without-suggestion.stderr | 42 +-- src/test/ui/numeric/numeric-cast.stderr | 226 +++++++-------- src/test/ui/numeric/numeric-suffix.stderr | 268 +++++++++--------- .../ui/or-patterns/consistent-bindings.stderr | 2 +- .../issue-64879-trailing-before-guard.stderr | 2 +- .../ui/or-patterns/or-pattern-mismatch.stderr | 2 +- src/test/ui/output-type-mismatch.stderr | 2 +- src/test/ui/parser/expr-as-stmt.stderr | 8 +- src/test/ui/parser/fn-arg-doc-comment.rs | 6 +- src/test/ui/parser/fn-arg-doc-comment.stderr | 6 +- src/test/ui/parser/issue-33413.stderr | 2 +- src/test/ui/parser/issue-62881.stderr | 2 +- src/test/ui/parser/issue-62895.stderr | 2 +- .../ui/parser/lex-bad-char-literals-6.stderr | 2 +- src/test/ui/parser/match-vec-invalid.stderr | 2 +- src/test/ui/parser/numeric-lifetime.stderr | 2 +- src/test/ui/parser/pat-lt-bracket-6.stderr | 2 +- src/test/ui/parser/pat-lt-bracket-7.stderr | 2 +- src/test/ui/parser/pat-tuple-4.stderr | 2 +- src/test/ui/parser/pat-tuple-5.stderr | 2 +- ...recover-for-loop-parens-around-head.stderr | 2 +- .../ui/parser/recover-from-homoglyph.stderr | 2 +- .../ui/parser/recover-missing-semi.stderr | 4 +- src/test/ui/parser/recover-tuple.stderr | 2 +- ...quire-parens-for-chained-comparison.stderr | 4 +- ...truct-literal-restrictions-in-lamda.stderr | 2 +- .../parser/unclosed-delimiter-in-dep.stderr | 2 +- src/test/ui/pattern/pat-tuple-bad-type.stderr | 2 +- src/test/ui/pattern/pattern-error-continue.rs | 4 +- .../ui/pattern/pattern-error-continue.stderr | 4 +- .../pattern-ident-path-generics.stderr | 2 +- src/test/ui/pattern/pattern-tyvar.stderr | 2 +- ...pe-err-cause-on-impl-trait-return-2.stderr | 2 +- ...type-err-cause-on-impl-trait-return.stderr | 14 +- src/test/ui/pptypedef.rs | 4 +- src/test/ui/pptypedef.stderr | 4 +- .../attribute-spans-preserved.stderr | 4 +- .../ui/proc-macro/attribute-with-error.stderr | 8 +- src/test/ui/proc-macro/issue-37788.stderr | 2 +- src/test/ui/proc-macro/macro-brackets.stderr | 2 +- .../ui/proc-macro/nested-item-spans.stderr | 4 +- .../ui/proc-macro/span-preservation.stderr | 8 +- src/test/ui/range/range-1.stderr | 2 +- src/test/ui/repeat_count.rs | 14 +- src/test/ui/repeat_count.stderr | 14 +- src/test/ui/resolve/name-clash-nullary.stderr | 2 +- .../resolve-inconsistent-binding-mode.stderr | 4 +- .../resolve/resolve-inconsistent-names.stderr | 2 +- .../ui/return/return-from-diverging.stderr | 2 +- src/test/ui/return/return-type.stderr | 2 +- .../const.stderr | 2 +- .../rfc-2005-default-binding-mode/lit.stderr | 4 +- .../disallowed-positions.stderr | 60 ++-- src/test/ui/shift-various-bad-types.rs | 2 +- src/test/ui/shift-various-bad-types.stderr | 2 +- src/test/ui/span/coerce-suggestions.stderr | 6 +- src/test/ui/span/issue-34264.stderr | 2 +- src/test/ui/span/issue-39018.stderr | 2 +- src/test/ui/span/move-closure.stderr | 2 +- .../specialization-default-projection.stderr | 4 +- .../ui/static/static-mut-bad-types.stderr | 2 +- src/test/ui/str/str-array-assignment.stderr | 6 +- src/test/ui/str/str-lit-type-mismatch.stderr | 6 +- .../ui/struct-literal-variant-in-if.stderr | 4 +- .../struct-path-self-type-mismatch.stderr | 2 +- .../structure-constructor-type-mismatch.rs | 12 +- ...structure-constructor-type-mismatch.stderr | 22 +- src/test/ui/substs-ppaux.normal.stderr | 8 +- src/test/ui/substs-ppaux.verbose.stderr | 8 +- src/test/ui/suggestions/as-ref.stderr | 8 +- ...gest-deref-inside-macro-issue-58298.stderr | 2 +- .../dont-suggest-try_into-in-macros.stderr | 2 +- .../fn-or-tuple-struct-without-args.stderr | 22 +- src/test/ui/suggestions/format-borrow.stderr | 4 +- src/test/ui/suggestions/issue-52820.stderr | 4 +- src/test/ui/suggestions/issue-59819.stderr | 4 +- .../ui/suggestions/match-ergonomics.stderr | 6 +- .../ui/suggestions/match-needing-semi.stderr | 4 +- .../mismatched-types-numeric-from.stderr | 2 +- ...ecover-from-semicolon-trailing-item.stderr | 6 +- ...e-mismatch-struct-field-shorthand-2.stderr | 4 +- ...ype-mismatch-struct-field-shorthand.stderr | 6 +- src/test/ui/suppressed-error.rs | 2 +- src/test/ui/suppressed-error.stderr | 2 +- src/test/ui/switched-expectations.stderr | 2 +- .../ui/tag-that-dare-not-speak-its-name.rs | 2 +- .../tag-that-dare-not-speak-its-name.stderr | 2 +- src/test/ui/tail-typeck.stderr | 2 +- .../non-whitespace-trimming-2.stderr | 4 +- .../non-whitespace-trimming-unicode.stderr | 4 +- .../non-whitespace-trimming.stderr | 4 +- .../whitespace-trimming-2.stderr | 2 +- .../terminal-width/whitespace-trimming.stderr | 2 +- ...traits-assoc-type-in-supertrait-bad.stderr | 2 +- .../ui/traits/traits-multidispatch-bad.stderr | 2 +- ...ounds-inconsistent-projection-error.stderr | 2 +- .../ui/try-block/try-block-bad-type.stderr | 4 +- .../ui/try-block/try-block-type-error.stderr | 4 +- src/test/ui/tutorial-suffix-inference-test.rs | 6 +- .../ui/tutorial-suffix-inference-test.stderr | 6 +- .../enum-variant-generic-args.stderr | 12 +- ...priority-higher-than-other-inherent.stderr | 2 +- ..._type_does_not_live_long_enough.nll.stderr | 2 +- ...eric_type_does_not_live_long_enough.stderr | 2 +- .../type-alias-impl-trait/issue-63279.stderr | 2 +- .../never_reveal_concrete_type.stderr | 2 +- ...o_revealing_outside_defining_module.stderr | 4 +- .../ui/type/type-ascription-precedence.stderr | 2 +- .../assignment-expected-bool.stderr | 24 +- .../type/type-check/assignment-in-if.stderr | 12 +- src/test/ui/type/type-error-break-tail.stderr | 2 +- src/test/ui/type/type-mismatch-multiple.rs | 4 +- .../ui/type/type-mismatch-multiple.stderr | 4 +- src/test/ui/type/type-mismatch.stderr | 48 ++-- src/test/ui/type/type-shadow.stderr | 2 +- ...e-57673-ice-on-deref-of-boxed-trait.stderr | 2 +- .../ui/ufcs/ufcs-qpath-self-mismatch.stderr | 4 +- .../unboxed-closures-type-mismatch.stderr | 2 +- src/test/ui/while-type-error.stderr | 2 +- src/test/ui/wrong-mul-method-signature.stderr | 8 +- src/test/ui/wrong-ret-type.stderr | 2 +- 351 files changed, 1086 insertions(+), 1086 deletions(-) diff --git a/src/librustc/ty/error.rs b/src/librustc/ty/error.rs index feb53539a2e..8e3ae0864aa 100644 --- a/src/librustc/ty/error.rs +++ b/src/librustc/ty/error.rs @@ -222,8 +222,8 @@ 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 => format!("{}", self).into(), - ty::Tuple(ref tys) if tys.is_empty() => format!("{}", self).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(), @@ -244,7 +244,7 @@ impl<'tcx> ty::TyS<'tcx> { if tymut_string != "_" && ( ty.is_simple_text() || tymut_string.len() < "mutable reference".len() ) { - format!("&{}", tymut_string).into() + format!("`&{}`", tymut_string).into() } else { // Unknown type name, it's long or has type arguments match mutbl { hir::Mutability::Mutable => "mutable reference", @@ -256,7 +256,7 @@ impl<'tcx> ty::TyS<'tcx> { 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() } 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_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 42dc56c44ce..9d486d0a661 100644 --- a/src/test/rustdoc-ui/failed-doctest-missing-codes.stdout +++ b/src/test/rustdoc-ui/failed-doctest-missing-codes.stdout @@ -9,7 +9,7 @@ error[E0308]: mismatched types --> $DIR/failed-doctest-missing-codes.rs:9:13 | LL | let x: () = 5i32; - | ^^^^ expected (), found 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 321a07c4a66..05b21efeece 100644 --- a/src/test/ui/arg-type-mismatch.stderr +++ b/src/test/ui/arg-type-mismatch.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/arg-type-mismatch.rs:5:30 | LL | fn main() { let i: (); i = f(()); } - | ^^ expected isize, found () + | ^^ 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 971b3685b90..69c7599cce1 100644 --- a/src/test/ui/array-break-length.stderr +++ b/src/test/ui/array-break-length.stderr @@ -14,7 +14,7 @@ error[E0308]: mismatched types --> $DIR/array-break-length.rs:3:9 | LL | |_: [_; break]| {} - | ^^^^^^^^^^^^^^^^^^ expected (), found closure + | ^^^^^^^^^^^^^^^^^^ expected `()`, found closure | = note: expected unit type `()` found closure `[closure@$DIR/array-break-length.rs:3:9: 3:27]` @@ -23,7 +23,7 @@ error[E0308]: mismatched types --> $DIR/array-break-length.rs:8:9 | LL | |_: [_; continue]| {} - | ^^^^^^^^^^^^^^^^^^^^^ expected (), found closure + | ^^^^^^^^^^^^^^^^^^^^^ expected `()`, found closure | = note: expected unit type `()` found closure `[closure@$DIR/array-break-length.rs:8:9: 8:30]` diff --git a/src/test/ui/array-not-vector.rs b/src/test/ui/array-not-vector.rs index 504874f2ce3..5e46f015baf 100644 --- a/src/test/ui/array-not-vector.rs +++ b/src/test/ui/array-not-vector.rs @@ -1,12 +1,12 @@ fn main() { let _x: i32 = [1, 2, 3]; //~^ ERROR mismatched types - //~| expected i32, found array + //~| expected `i32`, found array let x: &[i32] = &[1, 2, 3]; let _y: &i32 = x; //~^ ERROR mismatched types //~| expected reference `&i32` //~| found reference `&[i32]` - //~| expected i32, found slice + //~| expected `i32`, found slice } diff --git a/src/test/ui/array-not-vector.stderr b/src/test/ui/array-not-vector.stderr index fd02307ffd3..412a8ae8461 100644 --- a/src/test/ui/array-not-vector.stderr +++ b/src/test/ui/array-not-vector.stderr @@ -2,13 +2,13 @@ error[E0308]: mismatched types --> $DIR/array-not-vector.rs:2:19 | LL | let _x: i32 = [1, 2, 3]; - | ^^^^^^^^^ expected i32, found array `[{integer}; 3]` + | ^^^^^^^^^ expected `i32`, found array `[{integer}; 3]` error[E0308]: mismatched types --> $DIR/array-not-vector.rs:7:20 | LL | let _y: &i32 = x; - | ^ expected i32, found slice `[i32]` + | ^ expected `i32`, found slice `[i32]` | = note: expected reference `&i32` found reference `&[i32]` 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 f2312cbaa06..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,7 +5,7 @@ LL | const FROM: Self::Out; | --------- type in trait ... LL | const FROM: &'static str = "foo"; - | ^^^^^^^^^^^^ expected associated type, found &str + | ^^^^^^^^^^^^ expected associated type, found `&str` | = note: expected associated type `::Out` found reference `&'static str` 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-types/associated-types-eq-3.rs b/src/test/ui/associated-types/associated-types-eq-3.rs index 2bc302914a5..3bb03c39e0f 100644 --- a/src/test/ui/associated-types/associated-types-eq-3.rs +++ b/src/test/ui/associated-types/associated-types-eq-3.rs @@ -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 060e2c8a2cc..24c830d8b5b 100644 --- a/src/test/ui/associated-types/associated-types-eq-3.stderr +++ b/src/test/ui/associated-types/associated-types-eq-3.stderr @@ -16,13 +16,13 @@ LL | fn foo1>(x: I) { | ---- ----- required by this bound in `foo1` ... LL | foo1(a); - | ^^^^ expected struct `Bar`, found usize + | ^^^^ expected struct `Bar`, found `usize` error[E0271]: type mismatch resolving `::A == Bar` --> $DIR/associated-types-eq-3.rs:41:9 | LL | baz(&a); - | ^^ expected struct `Bar`, found usize + | ^^ expected struct `Bar`, found `usize` | = note: required for the cast to the object type `dyn Foo` 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 6ed91b9ff47..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,7 +7,7 @@ LL | where T : for<'x> TheTrait<&'x isize, A = &'x isize> | ------------- required by this bound in `foo` ... LL | foo::(); - | ^^^^^^^^^^^^^^^^^ expected isize, found usize + | ^^^^^^^^^^^^^^^^^ expected `isize`, found `usize` | = note: expected reference `&isize` found reference `&usize` @@ -21,7 +21,7 @@ LL | where T : for<'x> TheTrait<&'x isize, A = &'x usize> | ------------- required by this bound in `bar` ... LL | bar::(); - | ^^^^^^^^^^^^^^^^ expected usize, found isize + | ^^^^^^^^^^^^^^^^ expected `usize`, found `isize` | = note: expected reference `&usize` found reference `&isize` 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 69596fa4b90..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,7 +2,7 @@ error[E0271]: type mismatch resolving `::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: &T) { } | ------ ----- required by this bound in `want_y` @@ -16,7 +16,7 @@ error[E0271]: type mismatch resolving `::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: &T) { } | ------ ----- required by this bound in `want_x` 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 4ec1fd810aa..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,7 +2,7 @@ error[E0271]: type mismatch resolving ` as std::iter::It --> $DIR/associated-types-overridden-binding-2.rs:6:43 | LL | let _: &dyn I32Iterator = &vec![42].into_iter(); - | ^^^^^^^^^^^^^^^^^^^^^ expected i32, found u32 + | ^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32` | = note: required for the cast to the object type `dyn std::iter::Iterator` 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(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 f9b1373820f..8ef71087958 100644 --- a/src/test/ui/associated-types/issue-44153.stderr +++ b/src/test/ui/associated-types/issue-44153.stderr @@ -5,7 +5,7 @@ LL | fn visit() {} | ---------- required by `Visit::visit` ... LL | <() as Visit>::visit(); - | ^^^^^^^^^^^^^^^^^^^^ expected (), found &() + | ^^^^^^^^^^^^^^^^^^^^ expected `()`, found `&()` | = note: required because of the requirements on the impl of `Visit` for `()` 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 9b4defaa0bd..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,7 +7,7 @@ LL | type Ok; LL | impl Bar for Foo { | ---------------- in this `impl` item LL | type Ok = (); - | ^^^^^^^^^^^^^ expected u32, found () + | ^^^^^^^^^^^^^ 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 212558cf932..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,7 +22,7 @@ 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 @@ -30,7 +30,7 @@ error[E0271]: type mismatch resolving ` $DIR/async-block-control-flow-static-semantics.rs:18:39 | LL | let _: &dyn Future = █ - | ^^^^^^ expected (), found u8 + | ^^^^^^ expected `()`, found `u8` | = note: required for the cast to the object type `dyn std::future::Future` @@ -45,13 +45,13 @@ LL | | return 0u8; ... | LL | | LL | | } - | |_^ expected u8, found () + | |_^ expected `u8`, found `()` error[E0271]: type mismatch resolving `::Output == ()` --> $DIR/async-block-control-flow-static-semantics.rs:27:39 | LL | let _: &dyn Future = █ - | ^^^^^^ expected (), found u8 + | ^^^^^^ expected `()`, found `u8` | = note: required for the cast to the object type `dyn std::future::Future` @@ -59,7 +59,7 @@ error[E0308]: mismatched types --> $DIR/async-block-control-flow-static-semantics.rs:48:44 | LL | fn rethrow_targets_async_block_not_fn() -> Result { - | ---------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found () + | ---------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `()` | | | implicitly returns `()` as its body has no tail or `return` expression | @@ -70,7 +70,7 @@ error[E0308]: mismatched types --> $DIR/async-block-control-flow-static-semantics.rs:57:50 | LL | fn rethrow_targets_async_block_not_async_fn() -> Result { - | ---------------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found () + | ---------------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `()` | | | implicitly returns `()` as its body has no tail or `return` expression | 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 6f3d10d0868..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,7 +2,7 @@ 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 opaque type `impl std::future::Future` 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 56d26826366..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,7 +4,7 @@ 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` diff --git a/src/test/ui/async-await/suggest-missing-await.stderr b/src/test/ui/async-await/suggest-missing-await.stderr index e44438bfa58..7a635a37107 100644 --- a/src/test/ui/async-await/suggest-missing-await.stderr +++ b/src/test/ui/async-await/suggest-missing-await.stderr @@ -4,7 +4,7 @@ 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` 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 06b7fcbe9b6..50d857cd9d7 100644 --- a/src/test/ui/binop/binop-logic-int.stderr +++ b/src/test/ui/binop/binop-logic-int.stderr @@ -2,13 +2,13 @@ error[E0308]: mismatched types --> $DIR/binop-logic-int.rs:1:21 | LL | fn main() { let x = 1 && 2; } - | ^ expected bool, found 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 + | ^ expected `bool`, found integer error: aborting due to 2 previous errors diff --git a/src/test/ui/block-expression-remove-semicolon.stderr b/src/test/ui/block-expression-remove-semicolon.stderr index cc515f4bf45..e39cd04f81b 100644 --- a/src/test/ui/block-expression-remove-semicolon.stderr +++ b/src/test/ui/block-expression-remove-semicolon.stderr @@ -7,7 +7,7 @@ LL | | LL | | foo(); | | - help: consider removing this semicolon LL | | }; - | |_____^ expected i32, found () + | |_____^ 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 a303f5d29d0..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,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/block-must-not-have-result-do.rs:3:9 | LL | true - | ^^^^ expected (), found 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 aabc7604f90..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,7 +4,7 @@ error[E0308]: mismatched types LL | fn drop(&mut self) { | - expected `()` because of default return type LL | true - | ^^^^ expected (), found 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 f9372593729..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,6 +1,6 @@ fn main() { while true { //~ WARN denote infinite loops with true //~ ERROR mismatched types - //~| 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 72063ad1731..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,7 +10,7 @@ error[E0308]: mismatched types --> $DIR/block-must-not-have-result-while.rs:3:9 | LL | true - | ^^^^ expected (), found 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 fed98f91246..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,7 +2,7 @@ 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; @@ -13,7 +13,7 @@ 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(); diff --git a/src/test/ui/block-result/issue-11714.stderr b/src/test/ui/block-result/issue-11714.stderr index 5cd2726b8dd..61991643a4a 100644 --- a/src/test/ui/block-result/issue-11714.stderr +++ b/src/test/ui/block-result/issue-11714.stderr @@ -2,7 +2,7 @@ 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 ... diff --git a/src/test/ui/block-result/issue-13428.stderr b/src/test/ui/block-result/issue-13428.stderr index 24e942619f0..707d24cd6ab 100644 --- a/src/test/ui/block-result/issue-13428.stderr +++ b/src/test/ui/block-result/issue-13428.stderr @@ -2,7 +2,7 @@ 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 ... @@ -13,7 +13,7 @@ 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() diff --git a/src/test/ui/block-result/issue-13624.rs b/src/test/ui/block-result/issue-13624.rs index ed0b3021746..bd1d0de320e 100644 --- a/src/test/ui/block-result/issue-13624.rs +++ b/src/test/ui/block-result/issue-13624.rs @@ -6,7 +6,7 @@ mod a { pub fn get_enum_struct_variant() -> () { Enum::EnumStructVariant { x: 1, y: 2, z: 3 } //~^ ERROR mismatched types - //~| expected (), found enum `a::Enum` + //~| expected `()`, found enum `a::Enum` } } @@ -19,7 +19,7 @@ mod b { match enum_struct_variant { a::Enum::EnumStructVariant { x, y, z } => { //~^ ERROR mismatched types - //~| 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 2404d06ae86..90ffb4b2e52 100644 --- a/src/test/ui/block-result/issue-13624.stderr +++ b/src/test/ui/block-result/issue-13624.stderr @@ -4,7 +4,7 @@ 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` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found enum `a::Enum` error[E0308]: mismatched types --> $DIR/issue-13624.rs:20:9 @@ -12,7 +12,7 @@ error[E0308]: mismatched types LL | match enum_struct_variant { | ------------------- this match expression has type `()` LL | a::Enum::EnumStructVariant { x, y, z } => { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found enum `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 717c7517def..f9c890b0ed8 100644 --- a/src/test/ui/block-result/issue-20862.stderr +++ b/src/test/ui/block-result/issue-20862.stderr @@ -4,7 +4,7 @@ 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 unit type `()` found closure `[closure@$DIR/issue-20862.rs:2:5: 2:14 x:_]` diff --git a/src/test/ui/block-result/issue-22645.stderr b/src/test/ui/block-result/issue-22645.stderr index cc1b4a217ce..79eb1d4b890 100644 --- a/src/test/ui/block-result/issue-22645.stderr +++ b/src/test/ui/block-result/issue-22645.stderr @@ -15,7 +15,7 @@ LL | fn main() { | - expected `()` because of default return type LL | let b = Bob + 3.5; LL | b + 3 - | ^^^^^ expected (), found struct `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 55f1efce93d..577987a4596 100644 --- a/src/test/ui/block-result/issue-5500.rs +++ b/src/test/ui/block-result/issue-5500.rs @@ -3,5 +3,5 @@ fn main() { //~^ ERROR mismatched types //~| expected unit type `()` //~| found reference `&_` - //~| expected (), 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 12ee677d09d..9d9f7ac2e4a 100644 --- a/src/test/ui/block-result/issue-5500.stderr +++ b/src/test/ui/block-result/issue-5500.stderr @@ -6,7 +6,7 @@ LL | fn main() { LL | &panic!() | ^^^^^^^^^ | | - | expected (), found reference + | expected `()`, found reference | help: consider removing the borrow: `panic!()` | = note: expected unit type `()` 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 170d11373dd..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,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/unexpected-return-on-unit.rs:9:5 | LL | foo() - | ^^^^^ expected (), found usize + | ^^^^^ expected `()`, found `usize` | help: try adding a semicolon | diff --git a/src/test/ui/break-while-condition.stderr b/src/test/ui/break-while-condition.stderr index 6f131514a40..6960c4fd867 100644 --- a/src/test/ui/break-while-condition.stderr +++ b/src/test/ui/break-while-condition.stderr @@ -5,7 +5,7 @@ LL | let _: ! = { | ____________________^ LL | | 'a: while break 'a {}; LL | | }; - | |_________^ expected !, found () + | |_________^ expected `!`, found `()` | = note: expected type `!` found unit type `()` @@ -16,7 +16,7 @@ error[E0308]: mismatched types LL | / while false { LL | | break LL | | } - | |_____________^ expected !, found () + | |_____________^ expected `!`, found `()` | = note: expected type `!` found unit type `()` @@ -27,7 +27,7 @@ error[E0308]: mismatched types LL | / while false { LL | | return LL | | } - | |_____________^ expected !, found () + | |_____________^ expected `!`, found `()` | = note: expected type `!` found unit type `()` diff --git a/src/test/ui/chalkify/type_inference.stderr b/src/test/ui/chalkify/type_inference.stderr index fdc79ec29f3..b8152caf3d2 100644 --- a/src/test/ui/chalkify/type_inference.stderr +++ b/src/test/ui/chalkify/type_inference.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/type_inference.rs:21:14 | LL | only_foo(x); - | ^ expected i32, found floating-point number + | ^ 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/closures/closure-array-break-length.stderr b/src/test/ui/closures/closure-array-break-length.stderr index 44c9ee33575..f6991a23f4d 100644 --- a/src/test/ui/closures/closure-array-break-length.stderr +++ b/src/test/ui/closures/closure-array-break-length.stderr @@ -20,7 +20,7 @@ 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 closure `[closure@$DIR/closure-array-break-length.rs:4:11: 4:32]` @@ -29,7 +29,7 @@ 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 closure `[closure@$DIR/closure-array-break-length.rs:7:11: 7:29]` diff --git a/src/test/ui/codemap_tests/tab.stderr b/src/test/ui/codemap_tests/tab.stderr index 3ee10cd4cb8..c3f19d20d39 100644 --- a/src/test/ui/codemap_tests/tab.stderr +++ b/src/test/ui/codemap_tests/tab.stderr @@ -10,7 +10,7 @@ error[E0308]: mismatched types LL | fn foo() { | - help: try adding a return type: `-> &'static str` LL | "bar boo" - | ^^^^^^^^^^^^^^^^^^^^ expected (), found &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 db8ecb818c9..303d83d3426 100644 --- a/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr +++ b/src/test/ui/coercion/coerce-expect-unsized-ascribed.stderr @@ -29,7 +29,7 @@ error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:13:13 | LL | let _ = box { |x| (x as u8) }: Box _>; - | ^^^^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure + | ^^^^^^^^^^^^^^^^^^^^^ expected trait `std::ops::Fn`, found closure | = note: expected struct `std::boxed::Box u8>` found struct `std::boxed::Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:13:19: 13:32]>` @@ -38,7 +38,7 @@ error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:14:13 | LL | let _ = box if true { false } else { true }: Box; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found bool + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `std::fmt::Debug`, found `bool` | = note: expected struct `std::boxed::Box` found struct `std::boxed::Box` @@ -47,7 +47,7 @@ error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:15:13 | LL | let _ = box match true { true => 'a', false => 'b' }: Box; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found char + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `std::fmt::Debug`, found `char` | = note: expected struct `std::boxed::Box` found struct `std::boxed::Box` @@ -83,7 +83,7 @@ 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 reference `&dyn std::ops::Fn(i32) -> u8` found reference `&[closure@$DIR/coerce-expect-unsized-ascribed.rs:21:16: 21:29]` @@ -92,7 +92,7 @@ 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 reference `&dyn std::fmt::Debug` found reference `&bool` @@ -101,7 +101,7 @@ 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 reference `&dyn std::fmt::Debug` found reference `&char` @@ -119,7 +119,7 @@ error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:26:13 | LL | let _ = Box::new(|x| (x as u8)): Box _>; - | ^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure + | ^^^^^^^^^^^^^^^^^^^^^^^ expected trait `std::ops::Fn`, found closure | = note: expected struct `std::boxed::Box _>` found struct `std::boxed::Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:26:22: 26:35]>` diff --git a/src/test/ui/coercion/coerce-to-bang.stderr b/src/test/ui/coercion/coerce-to-bang.stderr index 284c20b6e28..0b0c2e9f5a3 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:6: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:18: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:26: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:36: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:45:12 | LL | foo(a, b, c); - | ^ expected !, found integer + | ^ expected `!`, found integer | = note: expected type `!` found type `{integer}` @@ -47,7 +47,7 @@ error[E0308]: mismatched types --> $DIR/coerce-to-bang.rs:50:21 | LL | let x: [!; 2] = [return, 22]; - | ^^^^^^^^^^^^ expected !, found integer + | ^^^^^^^^^^^^ expected `!`, found integer | = note: expected array `[!; 2]` found array `[{integer}; 2]` @@ -56,7 +56,7 @@ error[E0308]: mismatched types --> $DIR/coerce-to-bang.rs:55: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:60: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:65: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:76: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 7811df45259..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,7 +2,7 @@ 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; @@ -12,7 +12,7 @@ error[E0308]: mismatched types --> $DIR/coercion-missing-tail-expected-type.rs:7:13 | LL | fn foo() -> Result { - | --- ^^^^^^^^^^^^^^^ 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); diff --git a/src/test/ui/coercion/coercion-slice.rs b/src/test/ui/coercion/coercion-slice.rs index 1d54d35f649..b756c8f8203 100644 --- a/src/test/ui/coercion/coercion-slice.rs +++ b/src/test/ui/coercion/coercion-slice.rs @@ -3,5 +3,5 @@ fn main() { let _: &[i32] = [0]; //~^ ERROR mismatched types - //~| expected &[i32], found array `[{integer}; 1]` + //~| 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 34caaed9de4..0e7fc06a9b7 100644 --- a/src/test/ui/coercion/coercion-slice.stderr +++ b/src/test/ui/coercion/coercion-slice.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | let _: &[i32] = [0]; | ^^^ | | - | expected &[i32], found array `[{integer}; 1]` + | expected `&[i32]`, found array `[{integer}; 1]` | help: consider borrowing here: `&[0]` error: aborting due to previous error 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 d62383e1224..7eb3c19a589 100644 --- a/src/test/ui/const-generics/fn-const-param-infer.stderr +++ b/src/test/ui/const-generics/fn-const-param-infer.stderr @@ -19,7 +19,7 @@ error[E0308]: mismatched types --> $DIR/fn-const-param-infer.rs:20:24 | LL | let _ = Checked::<{generic_arg::}>; - | ^^^^^^^^^^^^^^^^^^ expected usize, found u32 + | ^^^^^^^^^^^^^^^^^^ expected `usize`, found `u32` | = note: expected fn pointer `fn(usize) -> bool` found fn item `fn(u32) -> bool {generic_arg::}` 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 c912d9d0abf..0ce98f1455c 100644 --- a/src/test/ui/const-generics/types-mismatch-const-args.stderr +++ b/src/test/ui/const-generics/types-mismatch-const-args.stderr @@ -19,7 +19,7 @@ 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 struct `A<'a, u16, _, _>` found struct `A<'b, u32, _, _>` 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 682c7a1d65f..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,7 +8,7 @@ const CONSTANT: S = S(0); enum E { V = CONSTANT, //~^ ERROR mismatched types - //~| expected isize, found struct `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 3436802f8a9..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,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/const-eval-span.rs:9:9 | LL | V = CONSTANT, - | ^^^^^^^^ expected isize, found struct `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 8b5f3440964..9001fefd102 100644 --- a/src/test/ui/consts/const-integer-bool-ops.stderr +++ b/src/test/ui/consts/const-integer-bool-ops.stderr @@ -2,19 +2,19 @@ error[E0308]: mismatched types --> $DIR/const-integer-bool-ops.rs:1:18 | LL | const X: usize = 42 && 39; - | ^^ expected bool, found 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 + | ^^ 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 @@ -26,19 +26,19 @@ error[E0308]: mismatched types --> $DIR/const-integer-bool-ops.rs:11:19 | LL | const X1: usize = 42 || 39; - | ^^ expected bool, found 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 + | ^^ 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 @@ -50,19 +50,19 @@ error[E0308]: mismatched types --> $DIR/const-integer-bool-ops.rs:21:19 | LL | const X2: usize = -42 || -39; - | ^^^ expected bool, found 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 + | ^^^ 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 @@ -74,19 +74,19 @@ error[E0308]: mismatched types --> $DIR/const-integer-bool-ops.rs:31:19 | LL | const X3: usize = -42 && -39; - | ^^^ expected bool, found 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 + | ^^^ 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 @@ -98,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 @@ -110,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 @@ -122,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 @@ -134,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 @@ -146,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 @@ -158,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 1d280026a01..8e4a092e40f 100644 --- a/src/test/ui/consts/const-tup-index-span.stderr +++ b/src/test/ui/consts/const-tup-index-span.stderr @@ -2,7 +2,7 @@ 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 tuple `(usize,)` found type `usize` 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 ff5529a8408..1aca37a6fb8 100644 --- a/src/test/ui/conversion-methods.stderr +++ b/src/test/ui/conversion-methods.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | let _tis_an_instants_play: String = "'Tis a fond Ambush—"; | ^^^^^^^^^^^^^^^^^^^^^ | | - | expected struct `std::string::String`, found &str + | expected struct `std::string::String`, found `&str` | help: try using a conversion method: `"'Tis a fond Ambush—".to_string()` error[E0308]: mismatched types @@ -13,7 +13,7 @@ error[E0308]: mismatched types LL | let _just_to_make_bliss: PathBuf = Path::new("/ern/her/own/surprise"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | expected struct `std::path::PathBuf`, found &std::path::Path + | expected struct `std::path::PathBuf`, found `&std::path::Path` | help: try using a conversion method: `Path::new("/ern/her/own/surprise").to_path_buf()` error[E0308]: mismatched types @@ -31,7 +31,7 @@ error[E0308]: mismatched types LL | let _prove_piercing_earnest: Vec = &[1, 2, 3]; | ^^^^^^^^^^ | | - | expected struct `std::vec::Vec`, found &[{integer}; 3] + | expected struct `std::vec::Vec`, found `&[{integer}; 3]` | help: try using a conversion method: `(&[1, 2, 3]).to_vec()` | = note: expected struct `std::vec::Vec` diff --git a/src/test/ui/cross/cross-borrow-trait.stderr b/src/test/ui/cross/cross-borrow-trait.stderr index 282912e076e..9bffa6bd111 100644 --- a/src/test/ui/cross/cross-borrow-trait.stderr +++ b/src/test/ui/cross/cross-borrow-trait.stderr @@ -4,7 +4,7 @@ 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 reference `&dyn Trait` diff --git a/src/test/ui/deref-suggestion.stderr b/src/test/ui/deref-suggestion.stderr index 433bab77189..226f6fb620f 100644 --- a/src/test/ui/deref-suggestion.stderr +++ b/src/test/ui/deref-suggestion.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | foo(s); | ^ | | - | expected struct `std::string::String`, found &std::string::String + | expected struct `std::string::String`, found `&std::string::String` | help: try using a conversion method: `s.to_string()` error[E0308]: mismatched types @@ -13,7 +13,7 @@ error[E0308]: mismatched types LL | foo3(u); | ^ | | - | expected u32, found &u32 + | expected `u32`, found `&u32` | help: consider dereferencing the borrow: `*u` error[E0308]: mismatched types @@ -22,7 +22,7 @@ error[E0308]: mismatched types LL | foo(&"aaa".to_owned()); | ^^^^^^^^^^^^^^^^^ | | - | expected struct `std::string::String`, found &std::string::String + | expected struct `std::string::String`, found `&std::string::String` | help: consider removing the borrow: `"aaa".to_owned()` error[E0308]: mismatched types @@ -31,14 +31,14 @@ error[E0308]: mismatched types LL | foo(&mut "aaa".to_owned()); | ^^^^^^^^^^^^^^^^^^^^^ | | - | expected struct `std::string::String`, found &mut std::string::String + | expected struct `std::string::String`, found `&mut std::string::String` | help: consider removing the borrow: `"aaa".to_owned()` 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 @@ -47,7 +47,7 @@ error[E0308]: mismatched types --> $DIR/deref-suggestion.rs:36:5 | LL | assert_eq!(3i32, &3i32); - | ^^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found &i32 + | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `&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) @@ -57,7 +57,7 @@ error[E0308]: mismatched types LL | let s = S { u }; | ^ | | - | expected &u32, found integer + | expected `&u32`, found integer | help: consider borrowing here: `u: &u` error[E0308]: mismatched types @@ -66,7 +66,7 @@ error[E0308]: mismatched types LL | let s = S { u: u }; | ^ | | - | expected &u32, found integer + | expected `&u32`, found integer | help: consider borrowing here: `&u` error[E0308]: mismatched types @@ -75,7 +75,7 @@ error[E0308]: mismatched types LL | let r = R { i }; | ^ | | - | expected u32, found &{integer} + | expected `u32`, found `&{integer}` | help: consider dereferencing the borrow: `i: *i` error[E0308]: mismatched types @@ -84,7 +84,7 @@ error[E0308]: mismatched types LL | let r = R { i: i }; | ^ | | - | expected u32, found &{integer} + | expected `u32`, found `&{integer}` | help: consider dereferencing the borrow: `*i` 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 c1b178b221c..fb92196b2bd 100644 --- a/src/test/ui/destructure-trait-ref.rs +++ b/src/test/ui/destructure-trait-ref.rs @@ -33,12 +33,12 @@ fn main() { //~^ ERROR mismatched types //~| expected trait object `dyn T` //~| found reference `&_` - //~| expected trait T, found reference + //~| expected trait `T`, found reference let &&&x = &(&1isize as &dyn T); //~^ ERROR mismatched types //~| expected trait object `dyn T` //~| found reference `&_` - //~| expected trait T, found reference + //~| expected trait `T`, found reference let box box x = box 1isize as Box; //~^ ERROR mismatched types //~| expected trait object `dyn T` diff --git a/src/test/ui/destructure-trait-ref.stderr b/src/test/ui/destructure-trait-ref.stderr index ef67c1c9637..f77291969d2 100644 --- a/src/test/ui/destructure-trait-ref.stderr +++ b/src/test/ui/destructure-trait-ref.stderr @@ -22,7 +22,7 @@ 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 trait object `dyn T` @@ -34,7 +34,7 @@ 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 trait object `dyn T` @@ -44,7 +44,7 @@ error[E0308]: mismatched types --> $DIR/destructure-trait-ref.rs:42:13 | LL | let box box x = box 1isize as Box; - | ^^^^^ expected trait T, found struct `std::boxed::Box` + | ^^^^^ expected trait `T`, found struct `std::boxed::Box` | = note: expected trait object `dyn T` found struct `std::boxed::Box<_>` diff --git a/src/test/ui/did_you_mean/issue-42764.stderr b/src/test/ui/did_you_mean/issue-42764.stderr index 5fd3676d361..16b80a6f412 100644 --- a/src/test/ui/did_you_mean/issue-42764.stderr +++ b/src/test/ui/did_you_mean/issue-42764.stderr @@ -2,7 +2,7 @@ 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 enum `DoubleOption<_>` found type `usize` 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 76641b1120a..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,7 +4,7 @@ error[E0308]: mismatched types LL | let sixteen: f32 = 16; | ^^ | | - | expected f32, found integer + | expected `f32`, found integer | help: use a float literal: `16.0` error[E0308]: mismatched types @@ -13,7 +13,7 @@ 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` error[E0308]: mismatched types @@ -22,20 +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` 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 + | ^^^^ 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 + | ^^^^ expected `f32`, found integer error: aborting due to 5 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 3f3ef666f66..21361489a2c 100644 --- a/src/test/ui/diverging-fn-tail-35849.stderr +++ b/src/test/ui/diverging-fn-tail-35849.stderr @@ -5,7 +5,7 @@ LL | fn assert_sizeof() -> ! { | - expected `!` because of return type LL | unsafe { LL | ::std::mem::transmute::(panic!()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected !, found array `[u8; 8]` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `!`, found array `[u8; 8]` | = note: expected type `!` found array `[u8; 8]` diff --git a/src/test/ui/diverging-tuple-parts-39485.stderr b/src/test/ui/diverging-tuple-parts-39485.stderr index de5cf274c53..ad3e5ab3dc9 100644 --- a/src/test/ui/diverging-tuple-parts-39485.stderr +++ b/src/test/ui/diverging-tuple-parts-39485.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/diverging-tuple-parts-39485.rs:8:5 | LL | &panic!() - | ^^^^^^^^^ expected (), found reference + | ^^^^^^^^^ expected `()`, found reference | = note: expected unit type `()` found reference `&_` @@ -21,7 +21,7 @@ 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 tuple `(!, !)` diff --git a/src/test/ui/dst/dst-bad-assign-3.rs b/src/test/ui/dst/dst-bad-assign-3.rs index 8218614134c..e3b621b909a 100644 --- a/src/test/ui/dst/dst-bad-assign-3.rs +++ b/src/test/ui/dst/dst-bad-assign-3.rs @@ -32,7 +32,7 @@ pub fn main() { let z: Box = Box::new(Bar1 {f: 36}); f5.2 = Bar1 {f: 36}; //~^ ERROR mismatched types - //~| 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 54bb4bf9a3a..dc03f38e103 100644 --- a/src/test/ui/dst/dst-bad-assign-3.stderr +++ b/src/test/ui/dst/dst-bad-assign-3.stderr @@ -2,7 +2,7 @@ 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 trait object `dyn ToBar` found struct `Bar1` diff --git a/src/test/ui/dst/dst-bad-assign.rs b/src/test/ui/dst/dst-bad-assign.rs index ad3b3c71f57..ed94242f5bf 100644 --- a/src/test/ui/dst/dst-bad-assign.rs +++ b/src/test/ui/dst/dst-bad-assign.rs @@ -34,7 +34,7 @@ pub fn main() { let z: Box = Box::new(Bar1 {f: 36}); f5.ptr = Bar1 {f: 36}; //~^ ERROR mismatched types - //~| 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 5a2d73c3b1a..8031f162482 100644 --- a/src/test/ui/dst/dst-bad-assign.stderr +++ b/src/test/ui/dst/dst-bad-assign.stderr @@ -2,7 +2,7 @@ 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 trait object `dyn ToBar` found struct `Bar1` diff --git a/src/test/ui/dst/dst-bad-coercions.stderr b/src/test/ui/dst/dst-bad-coercions.stderr index 3c6111a345b..6058594d64d 100644 --- a/src/test/ui/dst/dst-bad-coercions.stderr +++ b/src/test/ui/dst/dst-bad-coercions.stderr @@ -2,7 +2,7 @@ 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 reference `&S` found raw pointer `*const S` @@ -13,7 +13,7 @@ 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 reference `&dyn T` @@ -23,7 +23,7 @@ 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 reference `&S` found raw pointer `*mut S` @@ -34,7 +34,7 @@ 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 reference `&dyn T` diff --git a/src/test/ui/error-codes/E0070.stderr b/src/test/ui/error-codes/E0070.stderr index 779b6ea924c..845833bc82f 100644 --- a/src/test/ui/error-codes/E0070.stderr +++ b/src/test/ui/error-codes/E0070.stderr @@ -14,7 +14,7 @@ error[E0308]: mismatched types --> $DIR/E0070.rs:8:25 | LL | some_other_func() = 4; - | ^ expected (), found 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 3ed2f6f0d23..b2dcdf8ee2e 100644 --- a/src/test/ui/error-codes/E0271.stderr +++ b/src/test/ui/error-codes/E0271.stderr @@ -5,7 +5,7 @@ LL | fn foo(t: T) where T: Trait { | --- ------------------ required by this bound in `foo` ... LL | foo(3_i8); - | ^^^ expected u32, found &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 0251c3bee6a..b71fb95e706 100644 --- a/src/test/ui/error-codes/E0308.stderr +++ b/src/test/ui/error-codes/E0308.stderr @@ -2,7 +2,7 @@ error[E0308]: intrinsic has wrong type --> $DIR/E0308.rs:4:5 | LL | fn size_of(); - | ^^^^^^^^^^^^^^^^ expected (), found usize + | ^^^^^^^^^^^^^^^^ expected `()`, found `usize` | = note: expected fn pointer `extern "rust-intrinsic" fn()` found fn pointer `extern "rust-intrinsic" fn() -> usize` diff --git a/src/test/ui/estr-subtyping.stderr b/src/test/ui/estr-subtyping.stderr index 108df4ae1c9..e5dbab6441c 100644 --- a/src/test/ui/estr-subtyping.stderr +++ b/src/test/ui/estr-subtyping.stderr @@ -4,7 +4,7 @@ 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()` 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 ea4db564829..e6f84f4f354 100644 --- a/src/test/ui/float-literal-inference-restrictions.stderr +++ b/src/test/ui/float-literal-inference-restrictions.stderr @@ -4,14 +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` 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-item-type.rs b/src/test/ui/fn/fn-item-type.rs index 3ab4e8f9215..18146d52551 100644 --- a/src/test/ui/fn/fn-item-type.rs +++ b/src/test/ui/fn/fn-item-type.rs @@ -18,7 +18,7 @@ fn main() { eq(foo::, foo::); //~^ ERROR mismatched types - //~| expected u8, found i8 + //~| expected `u8`, found `i8` eq(bar::, bar::>); //~^ ERROR mismatched types @@ -29,5 +29,5 @@ fn main() { // Make sure we distinguish between trait methods correctly. eq(::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 f6c4f735939..e25e9c21c9f 100644 --- a/src/test/ui/fn/fn-item-type.stderr +++ b/src/test/ui/fn/fn-item-type.stderr @@ -11,7 +11,7 @@ error[E0308]: mismatched types --> $DIR/fn-item-type.rs:19:19 | LL | eq(foo::, foo::); - | ^^^^^^^^^ expected u8, found i8 + | ^^^^^^^^^ expected `u8`, found `i8` | = note: expected fn item `fn(isize) -> isize {foo::}` found fn item `fn(isize) -> isize {foo::}` @@ -29,7 +29,7 @@ error[E0308]: mismatched types --> $DIR/fn-item-type.rs:30:26 | LL | eq(::foo, ::foo); - | ^^^^^^^^^^^^^^^^^ expected u8, found u16 + | ^^^^^^^^^^^^^^^^^ expected `u8`, found `u16` | = note: expected fn item `fn() {::foo}` found fn item `fn() {::foo}` diff --git a/src/test/ui/fn/fn-trait-formatting.stderr b/src/test/ui/fn/fn-trait-formatting.stderr index 44cc7448097..5e7d6ad9534 100644 --- a/src/test/ui/fn/fn-trait-formatting.stderr +++ b/src/test/ui/fn/fn-trait-formatting.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/fn-trait-formatting.rs:6:17 | LL | let _: () = (box |_: isize| {}) as Box; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `std::boxed::Box` | = note: expected unit type `()` found struct `std::boxed::Box` @@ -11,7 +11,7 @@ error[E0308]: mismatched types --> $DIR/fn-trait-formatting.rs:10:17 | LL | let _: () = (box |_: isize, isize| {}) as Box; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `std::boxed::Box` | = note: expected unit type `()` found struct `std::boxed::Box` @@ -20,7 +20,7 @@ error[E0308]: mismatched types --> $DIR/fn-trait-formatting.rs:14:17 | LL | let _: () = (box || -> isize { unimplemented!() }) as Box isize>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `std::boxed::Box` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `std::boxed::Box` | = note: expected unit type `()` found struct `std::boxed::Box isize>` 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 c41e6c4c9f0..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 @@ -7,7 +7,7 @@ fn bar(x: usize) -> Option { //~^ ERROR mismatched types //~| expected enum `std::option::Option` //~| 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 26389f46718..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,7 +4,7 @@ error[E0308]: mismatched types LL | fn bar(x: usize) -> Option { | ------------- expected `std::option::Option` because of return type LL | return x; - | ^ expected enum `std::option::Option`, found usize + | ^ expected enum `std::option::Option`, found `usize` | = note: expected enum `std::option::Option` found type `usize` diff --git a/src/test/ui/generator/type-mismatch-signature-deduction.stderr b/src/test/ui/generator/type-mismatch-signature-deduction.stderr index 7cae50f42f9..8606ecd33da 100644 --- a/src/test/ui/generator/type-mismatch-signature-deduction.stderr +++ b/src/test/ui/generator/type-mismatch-signature-deduction.stderr @@ -2,7 +2,7 @@ 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 enum `std::result::Result<{integer}, _>` diff --git a/src/test/ui/generic/generic-arg-mismatch-recover.stderr b/src/test/ui/generic/generic-arg-mismatch-recover.stderr index e544cd1bb3a..4b86212e486 100644 --- a/src/test/ui/generic/generic-arg-mismatch-recover.stderr +++ b/src/test/ui/generic/generic-arg-mismatch-recover.stderr @@ -8,7 +8,7 @@ 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 reference `&'static ()` found reference `&{integer}` 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 4b1af8e915c..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 = (); //~^ ERROR mismatched types - //~| expected struct `Foo`, found () + //~| expected struct `Foo`, found `()` //~| expected struct `Foo` //~| found unit type `()` // ...even when they're present, but the same types as the defaults. let _: Foo = (); //~^ ERROR mismatched types - //~| expected struct `Foo`, found () + //~| expected struct `Foo`, found `()` //~| expected struct `Foo` //~| found unit type `()` // Including cases where the default is using previous type params. let _: HashMap = (); //~^ ERROR mismatched types - //~| expected struct `HashMap`, found () + //~| expected struct `HashMap`, found `()` //~| expected struct `HashMap` //~| found unit type `()` let _: HashMap> = (); //~^ ERROR mismatched types - //~| expected struct `HashMap`, found () + //~| expected struct `HashMap`, found `()` //~| expected struct `HashMap` //~| found unit type `()` // But not when there's a different type in between. let _: Foo = (); //~^ ERROR mismatched types - //~| expected struct `Foo`, found () + //~| expected struct `Foo`, found `()` //~| expected struct `Foo` //~| found unit type `()` // And don't print <> at all when there's just defaults. let _: Foo = (); //~^ ERROR mismatched types - //~| 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 12cc11236f8..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,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/generic-type-params-name-repr.rs:13:25 | LL | let _: Foo = (); - | ^^ expected struct `Foo`, found () + | ^^ expected struct `Foo`, found `()` | = note: expected struct `Foo` found unit type `()` @@ -11,7 +11,7 @@ error[E0308]: mismatched types --> $DIR/generic-type-params-name-repr.rs:20:31 | LL | let _: Foo = (); - | ^^ expected struct `Foo`, found () + | ^^ expected struct `Foo`, found `()` | = note: expected struct `Foo` found unit type `()` @@ -20,7 +20,7 @@ error[E0308]: mismatched types --> $DIR/generic-type-params-name-repr.rs:27:37 | LL | let _: HashMap = (); - | ^^ expected struct `HashMap`, found () + | ^^ expected struct `HashMap`, found `()` | = note: expected struct `HashMap` found unit type `()` @@ -29,7 +29,7 @@ error[E0308]: mismatched types --> $DIR/generic-type-params-name-repr.rs:32:51 | LL | let _: HashMap> = (); - | ^^ expected struct `HashMap`, found () + | ^^ expected struct `HashMap`, found `()` | = note: expected struct `HashMap` found unit type `()` @@ -38,7 +38,7 @@ error[E0308]: mismatched types --> $DIR/generic-type-params-name-repr.rs:39:31 | LL | let _: Foo = (); - | ^^ expected struct `Foo`, found () + | ^^ expected struct `Foo`, found `()` | = note: expected struct `Foo` found unit type `()` @@ -47,7 +47,7 @@ error[E0308]: mismatched types --> $DIR/generic-type-params-name-repr.rs:46:27 | LL | let _: Foo = (); - | ^^ expected struct `Foo`, found () + | ^^ expected struct `Foo`, found `()` | = note: expected struct `Foo` found unit type `()` diff --git a/src/test/ui/if-else-type-mismatch.stderr b/src/test/ui/if-else-type-mismatch.stderr index 6d36854545c..14e8f87393b 100644 --- a/src/test/ui/if-else-type-mismatch.stderr +++ b/src/test/ui/if-else-type-mismatch.stderr @@ -7,7 +7,7 @@ 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 @@ -15,7 +15,7 @@ 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 @@ -31,7 +31,7 @@ LL | | 3u32; | | expected because of this LL | | } else { LL | | 4u32 - | | ^^^^ expected (), found u32 + | | ^^^^ expected `()`, found `u32` LL | | }; | |_____- if and else have incompatible types @@ -47,7 +47,7 @@ LL | | 6u32; | | ^^^^- | | | | | | | help: consider removing this semicolon - | | expected u32, found () + | | expected `u32`, found `()` LL | | }; | |_____- if and else have incompatible types @@ -60,7 +60,7 @@ LL | | 7i32; | | ----- expected because of this LL | | } else { LL | | 8u32 - | | ^^^^ expected (), found u32 + | | ^^^^ expected `()`, found `u32` LL | | }; | |_____- if and else have incompatible types @@ -73,7 +73,7 @@ LL | | 9i32 | | ---- expected because of this LL | | } else { LL | | 10u32; - | | ^^^^^^ expected i32, found () + | | ^^^^^^ expected `i32`, found `()` LL | | }; | |_____- if and else have incompatible types @@ -86,7 +86,7 @@ LL | | LL | | } else { | |_____- expected because of this LL | 11u32 - | ^^^^^ expected (), found u32 + | ^^^^^ expected `()`, found `u32` error[E0308]: if and else have incompatible types --> $DIR/if-else-type-mismatch.rs:42:12 @@ -99,7 +99,7 @@ LL | } else { | ____________^ LL | | LL | | }; - | |_____^ expected i32, found () + | |_____^ 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 bfaae2d31a0..b5eacf5860f 100644 --- a/src/test/ui/if/if-branch-types.stderr +++ b/src/test/ui/if/if-branch-types.stderr @@ -2,7 +2,7 @@ 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 diff --git a/src/test/ui/if/if-let-arm-types.rs b/src/test/ui/if/if-let-arm-types.rs index f120b60c611..cae4f0974c6 100644 --- a/src/test/ui/if/if-let-arm-types.rs +++ b/src/test/ui/if/if-let-arm-types.rs @@ -7,5 +7,5 @@ fn main() { 1 }; //~^^ ERROR: if and else have incompatible types - //~| NOTE expected (), found integer + //~| 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 088aa0e8554..da93dfc9995 100644 --- a/src/test/ui/if/if-let-arm-types.stderr +++ b/src/test/ui/if/if-let-arm-types.stderr @@ -8,7 +8,7 @@ LL | | () LL | | LL | | } else { LL | | 1 - | | ^ expected (), found integer + | | ^ expected `()`, found integer LL | | }; | |_____- if and else have incompatible types diff --git a/src/test/ui/if/if-no-match-bindings.stderr b/src/test/ui/if/if-no-match-bindings.stderr index add9ee86ac2..3f382e023a7 100644 --- a/src/test/ui/if/if-no-match-bindings.stderr +++ b/src/test/ui/if/if-no-match-bindings.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | if b_ref() {} | ^^^^^^^ | | - | expected bool, found &bool + | expected `bool`, found `&bool` | help: consider dereferencing the borrow: `*b_ref()` error[E0308]: mismatched types @@ -13,7 +13,7 @@ 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()` error[E0308]: mismatched types @@ -22,7 +22,7 @@ error[E0308]: mismatched types LL | if &true {} | ^^^^^ | | - | expected bool, found &bool + | expected `bool`, found `&bool` | help: consider removing the borrow: `true` error[E0308]: mismatched types @@ -31,7 +31,7 @@ error[E0308]: mismatched types LL | if &mut true {} | ^^^^^^^^^ | | - | expected bool, found &mut bool + | expected `bool`, found `&mut bool` | help: consider removing the borrow: `true` error[E0308]: mismatched types @@ -40,7 +40,7 @@ error[E0308]: mismatched types LL | while b_ref() {} | ^^^^^^^ | | - | expected bool, found &bool + | expected `bool`, found `&bool` | help: consider dereferencing the borrow: `*b_ref()` error[E0308]: mismatched types @@ -49,7 +49,7 @@ 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()` error[E0308]: mismatched types @@ -58,7 +58,7 @@ error[E0308]: mismatched types LL | while &true {} | ^^^^^ | | - | expected bool, found &bool + | expected `bool`, found `&bool` | help: consider removing the borrow: `true` error[E0308]: mismatched types @@ -67,7 +67,7 @@ error[E0308]: mismatched types LL | while &mut true {} | ^^^^^^^^^ | | - | expected bool, found &mut bool + | expected `bool`, found `&mut bool` | help: consider removing the borrow: `true` 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 2bddcc707c6..74ed0ed0ae6 100644 --- a/src/test/ui/if/if-typeck.stderr +++ b/src/test/ui/if/if-typeck.stderr @@ -2,7 +2,7 @@ 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 fn item `fn() {f}` 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 472c85d96fb..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,7 +6,7 @@ LL | fn foo(bar: usize) -> usize { LL | / if bar % 5 == 0 { LL | | return 3; LL | | } - | |_____^ expected usize, found () + | |_____^ expected `usize`, found `()` | = note: `if` expressions without `else` evaluate to `()` = help: consider adding an `else` block that evaluates to the expected type @@ -20,7 +20,7 @@ LL | let x: usize = if bar % 5 == 0 { | | expected because of this assignment LL | | return 3; LL | | }; - | |_____^ expected usize, found () + | |_____^ expected `usize`, found `()` | = note: `if` expressions without `else` evaluate to `()` = help: consider adding an `else` block that evaluates to the expected type @@ -33,7 +33,7 @@ LL | fn foo3(bar: usize) -> usize { LL | / if bar % 5 == 0 { LL | | 3 LL | | } - | |_____^ expected usize, found () + | |_____^ expected `usize`, found `()` | = note: `if` expressions without `else` evaluate to `()` = help: consider adding an `else` block that evaluates to the expected type @@ -46,7 +46,7 @@ LL | fn foo_let(bar: usize) -> usize { LL | / if let 0 = 1 { LL | | return 3; LL | | } - | |_____^ expected usize, found () + | |_____^ expected `usize`, found `()` | = note: `if` expressions without `else` evaluate to `()` = help: consider adding an `else` block that evaluates to the expected type @@ -60,7 +60,7 @@ LL | let x: usize = if let 0 = 1 { | | expected because of this assignment LL | | return 3; LL | | }; - | |_____^ expected usize, found () + | |_____^ expected `usize`, found `()` | = note: `if` expressions without `else` evaluate to `()` = help: consider adding an `else` block that evaluates to the expected type @@ -73,7 +73,7 @@ LL | fn foo3_let(bar: usize) -> usize { LL | / if let 0 = 1 { LL | | 3 LL | | } - | |_____^ expected usize, found () + | |_____^ expected `usize`, found `()` | = 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 bd559733466..e5fb7b26321 100644 --- a/src/test/ui/if/if-without-else-result.rs +++ b/src/test/ui/if/if-without-else-result.rs @@ -1,6 +1,6 @@ fn main() { let a = if true { true }; //~^ ERROR if may be missing an else clause [E0317] - //~| 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 b2c700d3c8f..66a8185774e 100644 --- a/src/test/ui/if/if-without-else-result.stderr +++ b/src/test/ui/if/if-without-else-result.stderr @@ -5,7 +5,7 @@ LL | let a = if true { true }; | ^^^^^^^^^^----^^ | | | | | found here - | expected (), found bool + | expected `()`, found `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 2f81c3938ef..07917c2a540 100644 --- a/src/test/ui/if/ifmt-bad-arg.stderr +++ b/src/test/ui/if/ifmt-bad-arg.stderr @@ -300,7 +300,7 @@ 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 reference `&usize` found reference `&{float}` @@ -309,7 +309,7 @@ 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 reference `&usize` found reference `&{float}` diff --git a/src/test/ui/impl-trait/bound-normalization-fail.stderr b/src/test/ui/impl-trait/bound-normalization-fail.stderr index 0074ac31417..fc4cddd0216 100644 --- a/src/test/ui/impl-trait/bound-normalization-fail.stderr +++ b/src/test/ui/impl-trait/bound-normalization-fail.stderr @@ -10,7 +10,7 @@ error[E0271]: type mismatch resolving ` as FooLike>::Output == $DIR/bound-normalization-fail.rs:28:32 | LL | fn foo_fail() -> impl FooLike { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found associated type + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type | = note: expected type `()` found associated type `::Assoc` @@ -28,7 +28,7 @@ error[E0271]: type mismatch resolving ` as FooLike>::Output == $DIR/bound-normalization-fail.rs:44:41 | LL | fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found associated type + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found associated type | = note: expected type `()` found associated type `>::Assoc` 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 7349ab12cda..e53524e58d6 100644 --- a/src/test/ui/impl-trait/equality.stderr +++ b/src/test/ui/impl-trait/equality.stderr @@ -8,7 +8,7 @@ LL | return 1_i32; | ----- ...is found to be `i32` here LL | } LL | 0_u32 - | ^^^^^ expected i32, found 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 29cd67a806d..abce8c8c204 100644 --- a/src/test/ui/impl-trait/equality2.rs +++ b/src/test/ui/impl-trait/equality2.rs @@ -26,19 +26,19 @@ fn main() { //~^ ERROR mismatched types //~| expected type `u32` //~| found opaque type `impl Foo` - //~| expected u32, found opaque type + //~| expected `u32`, found opaque type let _: i32 = Leak::leak(hide(0_i32)); //~^ ERROR mismatched types //~| expected type `i32` //~| found associated type `::T` - //~| expected i32, found associated type + //~| 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 de85f5f6eec..7a656fca28b 100644 --- a/src/test/ui/impl-trait/equality2.stderr +++ b/src/test/ui/impl-trait/equality2.stderr @@ -2,7 +2,7 @@ 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 opaque type `impl Foo` @@ -11,7 +11,7 @@ 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 associated type `::T` @@ -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 opaque type `impl Foo` (u32) - found opaque 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 opaque type `impl Foo` (i32) - found opaque 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/include-macros/mismatched-types.stderr b/src/test/ui/include-macros/mismatched-types.stderr index 43d8ba1d7a3..33daf372f98 100644 --- a/src/test/ui/include-macros/mismatched-types.stderr +++ b/src/test/ui/include-macros/mismatched-types.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/mismatched-types.rs:2:20 | LL | let b: &[u8] = include_str!("file.txt"); - | ^^^^^^^^^^^^^^^^^^^^^^^^ expected slice `[u8]`, found str + | ^^^^^^^^^^^^^^^^^^^^^^^^ expected slice `[u8]`, found `str` | = note: expected reference `&[u8]` found reference `&'static str` @@ -11,7 +11,7 @@ error[E0308]: mismatched types --> $DIR/mismatched-types.rs:3:19 | LL | let s: &str = include_bytes!("file.txt"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected str, found array `[u8; 0]` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `str`, found array `[u8; 0]` | = note: expected reference `&str` found reference `&'static [u8; 0]` 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::(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/issues/issue-10176.rs b/src/test/ui/issues/issue-10176.rs index 9f42214a505..6277aa05eb3 100644 --- a/src/test/ui/issues/issue-10176.rs +++ b/src/test/ui/issues/issue-10176.rs @@ -3,7 +3,7 @@ fn f() -> isize { //~^ ERROR mismatched types //~| expected type `isize` //~| found tuple `(!, !)` -//~| expected isize, 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 7cab5a1f7c3..cd5361ffad3 100644 --- a/src/test/ui/issues/issue-10176.stderr +++ b/src/test/ui/issues/issue-10176.stderr @@ -4,7 +4,7 @@ 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 tuple `(!, !)` diff --git a/src/test/ui/issues/issue-11319.rs b/src/test/ui/issues/issue-11319.rs index f40d0005161..8c2bafe63bd 100644 --- a/src/test/ui/issues/issue-11319.rs +++ b/src/test/ui/issues/issue-11319.rs @@ -7,7 +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 `bool`, found `()` _ => true } } diff --git a/src/test/ui/issues/issue-11319.stderr b/src/test/ui/issues/issue-11319.stderr index 2ca49922d06..7663a32883c 100644 --- a/src/test/ui/issues/issue-11319.stderr +++ b/src/test/ui/issues/issue-11319.stderr @@ -10,7 +10,7 @@ LL | | Some(2) => true, | | ---- this is found to be of type `bool` LL | | LL | | None => (), - | | ^^ expected bool, found () + | | ^^ expected `bool`, found `()` ... | LL | | _ => true LL | | } diff --git a/src/test/ui/issues/issue-11374.stderr b/src/test/ui/issues/issue-11374.stderr index a5b9de0a0a3..bc7d1247502 100644 --- a/src/test/ui/issues/issue-11374.stderr +++ b/src/test/ui/issues/issue-11374.stderr @@ -4,7 +4,7 @@ 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 mutable reference `&mut [u8]` diff --git a/src/test/ui/issues/issue-12997-2.stderr b/src/test/ui/issues/issue-12997-2.stderr index 102405cd0f6..01f8e348836 100644 --- a/src/test/ui/issues/issue-12997-2.stderr +++ b/src/test/ui/issues/issue-12997-2.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-12997-2.rs:8:1 | LL | fn bar(x: isize) { } - | ^^^^^^^^^^^^^^^^^^^^ expected isize, found &mut test::Bencher + | ^^^^^^^^^^^^^^^^^^^^ expected `isize`, found `&mut test::Bencher` error: aborting due to previous error 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-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-14091.stderr b/src/test/ui/issues/issue-14091.stderr index bb9f843dadf..7db47347808 100644 --- a/src/test/ui/issues/issue-14091.stderr +++ b/src/test/ui/issues/issue-14091.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-14091.rs:2:5 | LL | assert!(1,1); - | ^^^^^^^^^^^^^ expected bool, found 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-16338.stderr b/src/test/ui/issues/issue-16338.stderr index cae09c21519..c35edb0c8c0 100644 --- a/src/test/ui/issues/issue-16338.stderr +++ b/src/test/ui/issues/issue-16338.stderr @@ -2,7 +2,7 @@ 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 struct `Slice<_>` diff --git a/src/test/ui/issues/issue-16401.rs b/src/test/ui/issues/issue-16401.rs index aaa38b8f170..332352ca727 100644 --- a/src/test/ui/issues/issue-16401.rs +++ b/src/test/ui/issues/issue-16401.rs @@ -9,7 +9,7 @@ fn main() { //~^ ERROR mismatched types //~| expected unit type `()` //~| found struct `Slice<_>` - //~| expected (), 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 872066bd3f7..d3d6108be9d 100644 --- a/src/test/ui/issues/issue-16401.stderr +++ b/src/test/ui/issues/issue-16401.stderr @@ -4,7 +4,7 @@ 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 unit type `()` found struct `Slice<_>` diff --git a/src/test/ui/issues/issue-17033.rs b/src/test/ui/issues/issue-17033.rs index 715892397a4..72a8cd9823a 100644 --- a/src/test/ui/issues/issue-17033.rs +++ b/src/test/ui/issues/issue-17033.rs @@ -1,6 +1,6 @@ fn f<'r>(p: &'r mut fn(p: &mut ())) { (*p)(()) //~ ERROR mismatched types - //~| 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 4bdc806f717..518fc30142c 100644 --- a/src/test/ui/issues/issue-17033.stderr +++ b/src/test/ui/issues/issue-17033.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | (*p)(()) | ^^ | | - | expected &mut (), found () + | expected `&mut ()`, found `()` | help: consider mutably borrowing here: `&mut ()` error: aborting due to previous error diff --git a/src/test/ui/issues/issue-19991.rs b/src/test/ui/issues/issue-19991.rs index e79a006afd9..62d5a6de760 100644 --- a/src/test/ui/issues/issue-19991.rs +++ b/src/test/ui/issues/issue-19991.rs @@ -3,7 +3,7 @@ fn main() { if let Some(homura) = Some("madoka") { //~ ERROR missing an else clause - //~| expected (), 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 d06c3acfd12..b78f4a6d293 100644 --- a/src/test/ui/issues/issue-19991.stderr +++ b/src/test/ui/issues/issue-19991.stderr @@ -6,7 +6,7 @@ LL | | LL | | 765 | | --- found here LL | | }; - | |_____^ expected (), found integer + | |_____^ expected `()`, found 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.stderr b/src/test/ui/issues/issue-20225.stderr index baee8b96799..1c5911e05f7 100644 --- a/src/test/ui/issues/issue-20225.stderr +++ b/src/test/ui/issues/issue-20225.stderr @@ -4,7 +4,7 @@ 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 &T, found type parameter `T` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&T`, found type parameter `T` | = note: expected fn pointer `extern "rust-call" fn(&Foo, (&'a T,))` found fn pointer `extern "rust-call" fn(&Foo, (T,))` @@ -17,7 +17,7 @@ error[E0053]: method `call_mut` has an incompatible type for trait LL | impl<'a, T> FnMut<(&'a T,)> for Foo { | - this type parameter LL | extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &T, found type parameter `T` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&T`, found type parameter `T` | = note: expected fn pointer `extern "rust-call" fn(&mut Foo, (&'a T,))` found fn pointer `extern "rust-call" fn(&mut Foo, (T,))` @@ -31,7 +31,7 @@ LL | impl<'a, T> FnOnce<(&'a T,)> for Foo { | - this type parameter ... LL | extern "rust-call" fn call_once(self, (_,): (T,)) {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected &T, found type parameter `T` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&T`, found type parameter `T` | = note: expected fn pointer `extern "rust-call" fn(Foo, (&'a T,))` found fn pointer `extern "rust-call" fn(Foo, (T,))` diff --git a/src/test/ui/issues/issue-22684.stderr b/src/test/ui/issues/issue-22684.stderr index 3c6d3df7fae..46524bc2c18 100644 --- a/src/test/ui/issues/issue-22684.stderr +++ b/src/test/ui/issues/issue-22684.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-22684.rs:17:17 | LL | let _: () = foo::Foo.bar(); - | ^^^^^^^^^^^^^^ expected (), found 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 a36b380b9c1..d126e1bf0b5 100644 --- a/src/test/ui/issues/issue-23589.stderr +++ b/src/test/ui/issues/issue-23589.stderr @@ -11,7 +11,7 @@ error[E0308]: mismatched types --> $DIR/issue-23589.rs:2:29 | LL | let v: Vec(&str) = vec!['1', '2']; - | ^^^ expected &str, found char + | ^^^ expected `&str`, found `char` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-27008.rs b/src/test/ui/issues/issue-27008.rs index 1a08647358c..e04de33f6ef 100644 --- a/src/test/ui/issues/issue-27008.rs +++ b/src/test/ui/issues/issue-27008.rs @@ -3,5 +3,5 @@ struct S; fn main() { let b = [0; S]; //~^ ERROR mismatched types - //~| 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 2c9eed0b3a5..5b7e74c1c30 100644 --- a/src/test/ui/issues/issue-27008.stderr +++ b/src/test/ui/issues/issue-27008.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-27008.rs:4:17 | LL | let b = [0; S]; - | ^ expected usize, found struct `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 e379b23a595..71e4d785014 100644 --- a/src/test/ui/issues/issue-27042.stderr +++ b/src/test/ui/issues/issue-27042.stderr @@ -14,7 +14,7 @@ error[E0308]: mismatched types LL | loop { break }; | ^^^^^ | | - | expected i32, found () + | expected `i32`, found `()` | help: give it a value of the expected type: `break 42` error[E0308]: mismatched types @@ -23,21 +23,21 @@ error[E0308]: mismatched types LL | / 'b: LL | | LL | | while true { break }; // but here we cite the whole loop - | |____________________________^ expected i32, found () + | |____________________________^ 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 () + | |_______________________________^ expected `i32`, found `()` error[E0308]: mismatched types --> $DIR/issue-27042.rs:15:9 | LL | / 'd: LL | | while let Some(_) = None { break }; - | |__________________________________________^ expected i32, found () + | |__________________________________________^ 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 c4c6b6f8183..d1625268669 100644 --- a/src/test/ui/issues/issue-29084.rs +++ b/src/test/ui/issues/issue-29084.rs @@ -3,7 +3,7 @@ macro_rules! foo { fn bar(d: u8) { } bar(&mut $d); //~^ ERROR mismatched types - //~| expected u8, found &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 a91033e3360..3e7ea745ce4 100644 --- a/src/test/ui/issues/issue-29084.stderr +++ b/src/test/ui/issues/issue-29084.stderr @@ -2,7 +2,7 @@ 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 diff --git a/src/test/ui/issues/issue-31173.stderr b/src/test/ui/issues/issue-31173.stderr index 0cc64d2f9c1..38cf3c4f930 100644 --- a/src/test/ui/issues/issue-31173.stderr +++ b/src/test/ui/issues/issue-31173.stderr @@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving ` $DIR/issue-31173.rs:10:10 | LL | .cloned() - | ^^^^^^ expected u8, found reference + | ^^^^^^ expected `u8`, found reference | = note: expected type `u8` found reference `&_` 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 { 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 f0ca557e581..7c0928b1924 100644 --- a/src/test/ui/issues/issue-32323.stderr +++ b/src/test/ui/issues/issue-32323.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-32323.rs:5:30 | LL | pub fn f<'a, T: Tr<'a>>() -> >::Out {} - | - ^^^^^^^^^^^^^^^^^^ expected associated type, found () + | - ^^^^^^^^^^^^^^^^^^ expected associated type, found `()` | | | implicitly returns `()` as its body has no tail or `return` expression | diff --git a/src/test/ui/issues/issue-34334.stderr b/src/test/ui/issues/issue-34334.stderr index c68056a8bd7..fc90e0674cf 100644 --- a/src/test/ui/issues/issue-34334.stderr +++ b/src/test/ui/issues/issue-34334.stderr @@ -29,7 +29,7 @@ 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 struct `std::vec::Vec<_>` 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-35869.stderr b/src/test/ui/issues/issue-35869.stderr index f70a9c8818a..be21569315b 100644 --- a/src/test/ui/issues/issue-35869.stderr +++ b/src/test/ui/issues/issue-35869.stderr @@ -5,7 +5,7 @@ LL | fn foo(_: fn(u8) -> ()); | ------------ type in trait ... LL | fn foo(_: fn(u16) -> ()) {} - | ^^^^^^^^^^^^^ expected u8, found u16 + | ^^^^^^^^^^^^^ expected `u8`, found `u16` | = note: expected fn pointer `fn(fn(u8))` found fn pointer `fn(fn(u16))` @@ -17,7 +17,7 @@ LL | fn bar(_: Option); | ---------- type in trait ... LL | fn bar(_: Option) {} - | ^^^^^^^^^^^ expected u8, found u16 + | ^^^^^^^^^^^ expected `u8`, found `u16` | = note: expected fn pointer `fn(std::option::Option)` found fn pointer `fn(std::option::Option)` @@ -29,7 +29,7 @@ LL | fn baz(_: (u8, u16)); | --------- type in trait ... LL | fn baz(_: (u16, u16)) {} - | ^^^^^^^^^^ expected u8, found u16 + | ^^^^^^^^^^ expected `u8`, found `u16` | = note: expected fn pointer `fn((u8, u16))` found fn pointer `fn((u16, u16))` @@ -41,7 +41,7 @@ LL | fn qux() -> u8; | -- type in trait ... LL | fn qux() -> u16 { 5u16 } - | ^^^ expected u8, found u16 + | ^^^ expected `u8`, found `u16` | = note: expected fn pointer `fn() -> u8` found fn pointer `fn() -> u16` diff --git a/src/test/ui/issues/issue-37026.stderr b/src/test/ui/issues/issue-37026.stderr index 5613d3f1766..00952356b18 100644 --- a/src/test/ui/issues/issue-37026.stderr +++ b/src/test/ui/issues/issue-37026.stderr @@ -2,13 +2,13 @@ error[E0308]: mismatched types --> $DIR/issue-37026.rs:6:9 | LL | let empty_struct::XEmpty2 = (); - | ^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `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` + | ^^^^^^^^^^^^^^^^^^^^^^^^^ 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 f872557966b..8a9529a68b7 100644 --- a/src/test/ui/issues/issue-37665.stderr +++ b/src/test/ui/issues/issue-37665.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-37665.rs:10:17 | LL | let x: () = 0; - | ^ expected (), found integer + | ^ expected `()`, found integer error: aborting due to previous error diff --git a/src/test/ui/issues/issue-39970.stderr b/src/test/ui/issues/issue-39970.stderr index b758cccd8f7..6f342b459c0 100644 --- a/src/test/ui/issues/issue-39970.stderr +++ b/src/test/ui/issues/issue-39970.stderr @@ -5,7 +5,7 @@ LL | fn visit() {} | ---------- required by `Visit::visit` ... LL | <() as Visit>::visit(); - | ^^^^^^^^^^^^^^^^^^^^ expected &(), found () + | ^^^^^^^^^^^^^^^^^^^^ expected `&()`, found `()` | = note: required because of the requirements on the impl of `Visit` for `()` 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-40749.stderr b/src/test/ui/issues/issue-40749.stderr index 67d5d6be640..4170a96bddf 100644 --- a/src/test/ui/issues/issue-40749.stderr +++ b/src/test/ui/issues/issue-40749.stderr @@ -2,7 +2,7 @@ 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 struct `std::ops::RangeTo<{integer}>` diff --git a/src/test/ui/issues/issue-41549.stderr b/src/test/ui/issues/issue-41549.stderr index 6d2ef769a16..62307d387c8 100644 --- a/src/test/ui/issues/issue-41549.stderr +++ b/src/test/ui/issues/issue-41549.stderr @@ -2,7 +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 () + | ^^ 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 d6e2146208e..61a0ae5fa91 100644 --- a/src/test/ui/issues/issue-41742.stderr +++ b/src/test/ui/issues/issue-41742.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-41742.rs:24:7 | LL | H["?"].f(); - | ^^^ expected u32, found &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 ba4e9f6fa98..2d655e4b7e7 100644 --- a/src/test/ui/issues/issue-4201.rs +++ b/src/test/ui/issues/issue-4201.rs @@ -3,7 +3,7 @@ fn main() { 0 } else if false { //~^ ERROR if may be missing an else clause -//~| expected (), 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 5ea4fdbf7ec..aacc426783d 100644 --- a/src/test/ui/issues/issue-4201.stderr +++ b/src/test/ui/issues/issue-4201.stderr @@ -8,7 +8,7 @@ LL | | LL | | 1 | | - found here LL | | }; - | |_____^ expected (), found integer + | |_____^ expected `()`, found 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 76696873f4e..0ed3d27c65b 100644 --- a/src/test/ui/issues/issue-43162.stderr +++ b/src/test/ui/issues/issue-43162.stderr @@ -14,7 +14,7 @@ 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 | diff --git a/src/test/ui/issues/issue-44023.stderr b/src/test/ui/issues/issue-44023.stderr index a55bb229869..fc54e7c62bb 100644 --- a/src/test/ui/issues/issue-44023.stderr +++ b/src/test/ui/issues/issue-44023.stderr @@ -2,7 +2,7 @@ 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 diff --git a/src/test/ui/issues/issue-4517.rs b/src/test/ui/issues/issue-4517.rs index df3da04f2e8..caf85d44aac 100644 --- a/src/test/ui/issues/issue-4517.rs +++ b/src/test/ui/issues/issue-4517.rs @@ -4,5 +4,5 @@ fn main() { let foo: [u8; 4] = [1; 4]; bar(foo); //~^ ERROR mismatched types - //~| expected usize, found array `[u8; 4]` + //~| 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 6c5495484b3..1ae97b69c6c 100644 --- a/src/test/ui/issues/issue-4517.stderr +++ b/src/test/ui/issues/issue-4517.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-4517.rs:5:9 | LL | bar(foo); - | ^^^ expected usize, found array `[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 ea1eca7552d..a861c38b001 100644 --- a/src/test/ui/issues/issue-46112.stderr +++ b/src/test/ui/issues/issue-46112.stderr @@ -4,7 +4,7 @@ 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 enum `std::option::Option<()>` diff --git a/src/test/ui/issues/issue-46302.stderr b/src/test/ui/issues/issue-46302.stderr index 073abdfefdc..a6f97c3c9af 100644 --- a/src/test/ui/issues/issue-46302.stderr +++ b/src/test/ui/issues/issue-46302.stderr @@ -4,7 +4,7 @@ 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]` 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 7e356ba1c11..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,7 +4,7 @@ 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)` error[E0308]: mismatched types @@ -13,7 +13,7 @@ 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)` 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 9237b93924a..cf95d309c63 100644 --- a/src/test/ui/issues/issue-47486.stderr +++ b/src/test/ui/issues/issue-47486.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-47486.rs:2:10 | LL | () < std::mem::size_of::<_>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found 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 4fc534d59c8..e5bb9298cd5 100644 --- a/src/test/ui/issues/issue-48364.stderr +++ b/src/test/ui/issues/issue-48364.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-48364.rs:2:21 | LL | b"".starts_with(stringify!(foo)) - | ^^^^^^^^^^^^^^^ expected slice `[u8]`, found str + | ^^^^^^^^^^^^^^^ expected slice `[u8]`, found `str` | = note: expected reference `&[u8]` found reference `&'static str` diff --git a/src/test/ui/issues/issue-48838.stderr b/src/test/ui/issues/issue-48838.stderr index 684e518c36f..712a7bc33f8 100644 --- a/src/test/ui/issues/issue-48838.stderr +++ b/src/test/ui/issues/issue-48838.stderr @@ -2,7 +2,7 @@ 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 closure `[closure@$DIR/issue-48838.rs:2:14: 2:19]` diff --git a/src/test/ui/issues/issue-50577.stderr b/src/test/ui/issues/issue-50577.stderr index 2494bf7471b..0a150fbf53a 100644 --- a/src/test/ui/issues/issue-50577.stderr +++ b/src/test/ui/issues/issue-50577.stderr @@ -28,7 +28,7 @@ error[E0317]: if may be missing an else clause LL | Drop = assert_eq!(1, 1) | ^^^^^^^^^^^^^^^^ | | - | expected (), found isize + | expected `()`, found `isize` | found here | = note: `if` expressions without `else` evaluate to `()` diff --git a/src/test/ui/issues/issue-50585.stderr b/src/test/ui/issues/issue-50585.stderr index 9f60db91731..c2630b664b5 100644 --- a/src/test/ui/issues/issue-50585.stderr +++ b/src/test/ui/issues/issue-50585.stderr @@ -8,7 +8,7 @@ error[E0308]: mismatched types --> $DIR/issue-50585.rs:2:18 | LL | |y: Vec<[(); for x in 0..2 {}]>| {}; - | ^^^^^^^^^^^^^^^^ expected usize, found () + | ^^^^^^^^^^^^^^^^ 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 8278b0af9f2..08d9a839920 100644 --- a/src/test/ui/issues/issue-50600.stderr +++ b/src/test/ui/issues/issue-50600.stderr @@ -2,7 +2,7 @@ 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 closure `[closure@$DIR/issue-50600.rs:2:13: 2:23]` diff --git a/src/test/ui/issues/issue-50688.stderr b/src/test/ui/issues/issue-50688.stderr index bb69744803d..1f348c4cf1f 100644 --- a/src/test/ui/issues/issue-50688.stderr +++ b/src/test/ui/issues/issue-50688.stderr @@ -2,7 +2,7 @@ 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 closure `[closure@$DIR/issue-50688.rs:2:9: 2:14]` diff --git a/src/test/ui/issues/issue-5100.rs b/src/test/ui/issues/issue-5100.rs index 8f6928bf379..71dd237cad5 100644 --- a/src/test/ui/issues/issue-5100.rs +++ b/src/test/ui/issues/issue-5100.rs @@ -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 60d94478b3b..bcbcefef3b1 100644 --- a/src/test/ui/issues/issue-5100.stderr +++ b/src/test/ui/issues/issue-5100.stderr @@ -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 94178d51210..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,7 +5,7 @@ LL | missing_discourses()? | ^^^^^^^^^^^^^^^^^^^^- | | | | | help: try removing this `?` - | expected enum `std::result::Result`, found isize + | expected enum `std::result::Result`, found `isize` | = note: expected enum `std::result::Result` found type `isize` diff --git a/src/test/ui/issues/issue-53348.rs b/src/test/ui/issues/issue-53348.rs index e453b0cfaa8..bbfdd9c5389 100644 --- a/src/test/ui/issues/issue-53348.rs +++ b/src/test/ui/issues/issue-53348.rs @@ -9,7 +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 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 2c117f52a26..433fe40ea03 100644 --- a/src/test/ui/issues/issue-53348.stderr +++ b/src/test/ui/issues/issue-53348.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-53348.rs:10:13 | LL | a = *i.to_string(); - | ^^^^^^^^^^^^^^ expected struct `std::string::String`, found str + | ^^^^^^^^^^^^^^ expected struct `std::string::String`, found `str` 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 8dc5c95b9b1..50a202d1489 100644 --- a/src/test/ui/issues/issue-53692.stderr +++ b/src/test/ui/issues/issue-53692.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | let items_clone: Vec = 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 struct `std::vec::Vec` @@ -16,7 +16,7 @@ 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()` error: aborting due to 2 previous errors diff --git a/src/test/ui/issues/issue-61106.stderr b/src/test/ui/issues/issue-61106.stderr index c8439ee18f4..163aa816ab7 100644 --- a/src/test/ui/issues/issue-61106.stderr +++ b/src/test/ui/issues/issue-61106.stderr @@ -4,7 +4,7 @@ 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` 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 86cc48aff06..09ffe8e64b1 100644 --- a/src/test/ui/issues/issue-61882.stderr +++ b/src/test/ui/issues/issue-61882.stderr @@ -2,13 +2,13 @@ error[E0308]: mismatched types --> $DIR/issue-61882.rs:4:27 | LL | const B: A = Self(0); - | ^ expected bool, found integer + | ^ expected `bool`, found integer error[E0308]: mismatched types --> $DIR/issue-61882.rs:4:22 | LL | const B: A = Self(0); - | ^^^^^^^ expected u8, found bool + | ^^^^^^^ expected `u8`, found `bool` | = note: expected struct `A` found struct `A` diff --git a/src/test/ui/issues/issue-6458-4.stderr b/src/test/ui/issues/issue-6458-4.stderr index d36297886df..6537867bbf5 100644 --- a/src/test/ui/issues/issue-6458-4.stderr +++ b/src/test/ui/issues/issue-6458-4.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-6458-4.rs:1:20 | LL | fn foo(b: bool) -> Result { - | --- ^^^^^^^^^^^^^^^^^^^ 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()); diff --git a/src/test/ui/issues/issue-7061.stderr b/src/test/ui/issues/issue-7061.stderr index b498ff0b534..bf1450ca765 100644 --- a/src/test/ui/issues/issue-7061.stderr +++ b/src/test/ui/issues/issue-7061.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/issue-7061.rs:4:46 | LL | fn foo(&'a mut self) -> Box { self } - | -------------- ^^^^ expected struct `std::boxed::Box`, found &mut BarStruct + | -------------- ^^^^ expected struct `std::boxed::Box`, found `&mut BarStruct` | | | expected `std::boxed::Box` because of return type | 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/json-bom-plus-crlf-multifile.stderr b/src/test/ui/json-bom-plus-crlf-multifile.stderr index c1cc57ab511..494bbd7f284 100644 --- a/src/test/ui/json-bom-plus-crlf-multifile.stderr +++ b/src/test/ui/json-bom-plus-crlf-multifile.stderr @@ -72,7 +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":[],"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 581605ca5bb..ea21a6b8961 100644 --- a/src/test/ui/json-bom-plus-crlf.stderr +++ b/src/test/ui/json-bom-plus-crlf.stderr @@ -72,7 +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":[],"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 7774349b75a..fcc30064018 100644 --- a/src/test/ui/keyword/keyword-false-as-identifier.stderr +++ b/src/test/ui/keyword/keyword-false-as-identifier.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/keyword-false-as-identifier.rs:2:9 | LL | let false = 22; - | ^^^^^ expected integer, found 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 b2c2fc744c3..b8cc2ffd2a8 100644 --- a/src/test/ui/keyword/keyword-true-as-identifier.stderr +++ b/src/test/ui/keyword/keyword-true-as-identifier.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/keyword-true-as-identifier.rs:2:9 | LL | let true = 22; - | ^^^^ expected integer, found bool + | ^^^^ expected integer, found `bool` error: aborting due to previous error diff --git a/src/test/ui/liveness/liveness-closure-require-ret.stderr b/src/test/ui/liveness/liveness-closure-require-ret.stderr index db330c2f354..07b2ef6cd1b 100644 --- a/src/test/ui/liveness/liveness-closure-require-ret.stderr +++ b/src/test/ui/liveness/liveness-closure-require-ret.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/liveness-closure-require-ret.rs:2:37 | LL | fn main() { println!("{}", force(|| {})); } - | ^^ expected isize, found () + | ^^ 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 6b7bd1acdc7..95070322bdd 100644 --- a/src/test/ui/liveness/liveness-forgot-ret.stderr +++ b/src/test/ui/liveness/liveness-forgot-ret.stderr @@ -2,7 +2,7 @@ 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 diff --git a/src/test/ui/liveness/liveness-issue-2163.stderr b/src/test/ui/liveness/liveness-issue-2163.stderr index 7606413f15e..2adc2d43809 100644 --- a/src/test/ui/liveness/liveness-issue-2163.stderr +++ b/src/test/ui/liveness/liveness-issue-2163.stderr @@ -5,7 +5,7 @@ LL | a.iter().all(|_| -> bool { | ______________________________^ LL | | LL | | }); - | |_____^ expected bool, found () + | |_____^ 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 499dbf10ede..afdb733cd03 100644 --- a/src/test/ui/liveness/liveness-missing-ret2.stderr +++ b/src/test/ui/liveness/liveness-missing-ret2.stderr @@ -2,7 +2,7 @@ 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 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 93249fd5aff..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,7 +4,7 @@ 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!(); @@ -14,7 +14,7 @@ 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 @@ -22,7 +22,7 @@ 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; @@ -32,7 +32,7 @@ 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 diff --git a/src/test/ui/loops/loop-break-value.stderr b/src/test/ui/loops/loop-break-value.stderr index 4588b7b02bb..81d25af1996 100644 --- a/src/test/ui/loops/loop-break-value.stderr +++ b/src/test/ui/loops/loop-break-value.stderr @@ -98,7 +98,7 @@ error[E0308]: mismatched types --> $DIR/loop-break-value.rs:4:31 | LL | let val: ! = loop { break break; }; - | ^^^^^ expected !, found () + | ^^^^^ expected `!`, found `()` | = note: expected type `!` found unit type `()` @@ -107,31 +107,31 @@ error[E0308]: mismatched types --> $DIR/loop-break-value.rs:11:19 | LL | break 123; - | ^^^ expected &str, found integer + | ^^^ expected `&str`, found integer error[E0308]: mismatched types --> $DIR/loop-break-value.rs:16:15 | LL | break "asdf"; - | ^^^^^^ expected i32, found &str + | ^^^^^^ expected `i32`, found `&str` error[E0308]: mismatched types --> $DIR/loop-break-value.rs:21:31 | LL | break 'outer_loop "nope"; - | ^^^^^^ expected i32, found &str + | ^^^^^^ expected `i32`, found `&str` error[E0308]: mismatched types --> $DIR/loop-break-value.rs:73:26 | LL | break 'c 123; - | ^^^ expected (), found integer + | ^^^ expected `()`, found integer error[E0308]: mismatched types --> $DIR/loop-break-value.rs:80:15 | LL | break (break, break); - | ^^^^^^^^^^^^^^ expected (), found tuple + | ^^^^^^^^^^^^^^ expected `()`, found tuple | = note: expected unit type `()` found tuple `(!, !)` @@ -140,7 +140,7 @@ error[E0308]: mismatched types --> $DIR/loop-break-value.rs:85:15 | LL | break 2; - | ^ expected (), found integer + | ^ expected `()`, found integer error[E0308]: mismatched types --> $DIR/loop-break-value.rs:90:9 @@ -148,7 +148,7 @@ error[E0308]: mismatched types LL | break; | ^^^^^ | | - | expected integer, found () + | expected integer, found `()` | help: give it a value of the expected type: `break value` 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 c3d0ae28f74..aa04d330f25 100644 --- a/src/test/ui/loops/loop-labeled-break-value.stderr +++ b/src/test/ui/loops/loop-labeled-break-value.stderr @@ -4,7 +4,7 @@ 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` error[E0308]: mismatched types @@ -13,7 +13,7 @@ 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` error[E0308]: mismatched types @@ -22,7 +22,7 @@ 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` 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 9b4329ded18..5030a2935b9 100644 --- a/src/test/ui/loops/loop-properly-diverging-2.stderr +++ b/src/test/ui/loops/loop-properly-diverging-2.stderr @@ -4,7 +4,7 @@ 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` 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 4598b512f1d..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,7 +9,7 @@ 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 &str + | | ^^ expected integer, found `&str` LL | | }; | |_____- `match` arms have incompatible types | 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.stderr b/src/test/ui/match/match-range-fail.stderr index 8ce2d8853de..adaaf29aae4 100644 --- a/src/test/ui/match/match-range-fail.stderr +++ b/src/test/ui/match/match-range-fail.stderr @@ -28,7 +28,7 @@ error[E0308]: mismatched types --> $DIR/match-range-fail.rs:18:9 | LL | 'c' ..= 100 => { } - | ^^^^^^^^^^^ expected integer, found char + | ^^^^^^^^^^^ expected integer, found `char` error: aborting due to 4 previous errors 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 2a0f01a0b09..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,7 +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 `char`, found integer }; x } @@ -33,7 +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 `char`, found integer }; x } @@ -45,6 +45,6 @@ fn test_func4() { }, None => {} //~^ ERROR match arms have incompatible types - //~| NOTE expected u32, found () + //~| 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 39048e03296..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,7 +15,7 @@ LL | let x = match n { LL | | 12 => 'b', | | --- this is found to be of type `char` LL | | _ => 42, - | | ^^ expected char, found integer + | | ^^ expected `char`, found integer LL | | LL | | LL | | }; @@ -34,7 +34,7 @@ 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 | | }; @@ -49,7 +49,7 @@ LL | | x | | - this is found to be of type `u32` LL | | }, LL | | None => {} - | | ^^ expected u32, found () + | | ^^ expected `u32`, found `()` LL | | LL | | LL | | }; 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 12f75d009e2..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,13 +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 + | ^ 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 + | ^ expected `()`, found `u64` error[E0034]: multiple applicable items in scope --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:120:15 @@ -39,19 +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 + | ^ 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 + | ^ 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 + | ^ 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 c58040cdf5f..f589f20d81d 100644 --- a/src/test/ui/methods/method-self-arg-1.rs +++ b/src/test/ui/methods/method-self-arg-1.rs @@ -9,7 +9,7 @@ impl Foo { fn main() { let x = Foo; Foo::bar(x); //~ ERROR mismatched types - //~| expected &Foo, found struct `Foo` + //~| expected `&Foo`, found struct `Foo` Foo::bar(&42); //~ ERROR mismatched types //~| expected struct `Foo`, found integer //~| expected reference `&Foo` diff --git a/src/test/ui/methods/method-self-arg-1.stderr b/src/test/ui/methods/method-self-arg-1.stderr index a56164db1b6..17ea61fc4bd 100644 --- a/src/test/ui/methods/method-self-arg-1.stderr +++ b/src/test/ui/methods/method-self-arg-1.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | Foo::bar(x); | ^ | | - | expected &Foo, found struct `Foo` + | expected `&Foo`, found struct `Foo` | help: consider borrowing here: `&x` error[E0308]: mismatched types diff --git a/src/test/ui/mir-unpretty.stderr b/src/test/ui/mir-unpretty.stderr index d3e41dabba6..5384dedb65a 100644 --- a/src/test/ui/mir-unpretty.stderr +++ b/src/test/ui/mir-unpretty.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/mir-unpretty.rs:4:17 | LL | let x: () = 0; - | ^ expected (), found 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 4e6af20db1b..fef83e6bbe2 100644 --- a/src/test/ui/mismatched_types/E0053.stderr +++ b/src/test/ui/mismatched_types/E0053.stderr @@ -5,7 +5,7 @@ LL | fn foo(x: u16); | --- type in trait ... LL | fn foo(x: i16) { } - | ^^^ expected u16, found i16 + | ^^^ expected `u16`, found `i16` | = note: expected fn pointer `fn(u16)` found fn pointer `fn(i16)` diff --git a/src/test/ui/mismatched_types/E0409.stderr b/src/test/ui/mismatched_types/E0409.stderr index 5a961f8948b..098fd74a39d 100644 --- a/src/test/ui/mismatched_types/E0409.stderr +++ b/src/test/ui/mismatched_types/E0409.stderr @@ -10,7 +10,7 @@ error[E0308]: mismatched types --> $DIR/E0409.rs:5:23 | LL | (0, ref y) | (y, 0) => {} - | ^ expected &{integer}, found integer + | ^ expected `&{integer}`, found integer error: aborting due to 2 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 97b1139abd5..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,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/for-loop-has-unit-body.rs:3:9 | LL | x - | ^ expected (), found 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 c790cc90a2c..c25e2687b75 100644 --- a/src/test/ui/mismatched_types/issue-19109.stderr +++ b/src/test/ui/mismatched_types/issue-19109.stderr @@ -4,7 +4,7 @@ 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 unit type `()` found raw pointer `*mut dyn Trait` 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 c01f5d3ca4b..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 Parser for bool { | ---- this type parameter LL | fn parse(text: &str) -> Option { LL | Some(true) - | ^^^^ expected type parameter `bool`, found bool + | ^^^^ expected type parameter `bool`, found `bool` | = note: expected type parameter `bool` (type parameter `bool`) - found type `bool` (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 48a123fd28a..802a2fef6bd 100644 --- a/src/test/ui/mismatched_types/issue-38371.stderr +++ b/src/test/ui/mismatched_types/issue-38371.stderr @@ -16,7 +16,7 @@ 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` @@ -26,7 +26,7 @@ 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 reference `&_` diff --git a/src/test/ui/mismatched_types/main.stderr b/src/test/ui/mismatched_types/main.stderr index de66c504f8c..51c8e5f5d4a 100644 --- a/src/test/ui/mismatched_types/main.stderr +++ b/src/test/ui/mismatched_types/main.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | let x: u32 = ( | __________________^ LL | | ); - | |_____^ expected u32, found () + | |_____^ 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 b57ceb08b17..5a5dd056261 100644 --- a/src/test/ui/mismatched_types/overloaded-calls-bad.stderr +++ b/src/test/ui/mismatched_types/overloaded-calls-bad.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/overloaded-calls-bad.rs:28:17 | LL | let ans = s("what"); - | ^^^^^^ expected isize, found &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-impl-fn-incompatibility.stderr b/src/test/ui/mismatched_types/trait-impl-fn-incompatibility.stderr index 050bb326130..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,7 +5,7 @@ LL | fn foo(x: u16); | --- type in trait ... LL | fn foo(x: i16) { } - | ^^^ expected u16, found i16 + | ^^^ expected `u16`, found `i16` | = note: expected fn pointer `fn(u16)` found fn pointer `fn(i16)` diff --git a/src/test/ui/missing/missing-return.stderr b/src/test/ui/missing/missing-return.stderr index 441551486a4..ff7f261e03c 100644 --- a/src/test/ui/missing/missing-return.stderr +++ b/src/test/ui/missing/missing-return.stderr @@ -2,7 +2,7 @@ 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 diff --git a/src/test/ui/mut/mut-cross-borrowing.stderr b/src/test/ui/mut/mut-cross-borrowing.stderr index d79d230ca96..c262d1336a2 100644 --- a/src/test/ui/mut/mut-cross-borrowing.stderr +++ b/src/test/ui/mut/mut-cross-borrowing.stderr @@ -4,7 +4,7 @@ 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 mutable reference `&mut isize` 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 d7013bf3c0f..eacef1dc330 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,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/call-fn-never-arg-wrong-type.rs:10:9 | LL | foo("wow"); - | ^^^^^ expected !, found &str + | ^^^^^ expected `!`, found `&str` | = note: expected type `!` found reference `&'static str` 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 3f72b6914ca..8d8a83567ab 100644 --- a/src/test/ui/never_type/never-assign-wrong-type.stderr +++ b/src/test/ui/never_type/never-assign-wrong-type.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/never-assign-wrong-type.rs:7:16 | LL | let x: ! = "hello"; - | ^^^^^^^ expected !, found &str + | ^^^^^^^ expected `!`, found `&str` | = note: expected type `!` found reference `&'static str` diff --git a/src/test/ui/noexporttypeexe.rs b/src/test/ui/noexporttypeexe.rs index d3c04fc562f..0a8b40b08fe 100644 --- a/src/test/ui/noexporttypeexe.rs +++ b/src/test/ui/noexporttypeexe.rs @@ -11,5 +11,5 @@ fn main() { //~^ ERROR mismatched types //~| expected type `isize` //~| found enum `std::option::Option` - //~| expected isize, found enum `std::option::Option` + //~| expected `isize`, found enum `std::option::Option` } diff --git a/src/test/ui/noexporttypeexe.stderr b/src/test/ui/noexporttypeexe.stderr index 3def891110d..18fb1755eb1 100644 --- a/src/test/ui/noexporttypeexe.stderr +++ b/src/test/ui/noexporttypeexe.stderr @@ -2,7 +2,7 @@ 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 enum `std::option::Option` 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::(x_f64); - | ^^^^^ expected usize, found f64 + | ^^^^^ expected `usize`, found `f64` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:18:18 | LL | foo::(x_f32); - | ^^^^^ expected usize, found f32 + | ^^^^^ expected `usize`, found `f32` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:19:18 | LL | foo::(x_f64); - | ^^^^^ expected isize, found f64 + | ^^^^^ expected `isize`, found `f64` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:20:18 | LL | foo::(x_f32); - | ^^^^^ expected isize, found f32 + | ^^^^^ expected `isize`, found `f32` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:21:16 | LL | foo::(x_f64); - | ^^^^^ expected u64, found f64 + | ^^^^^ expected `u64`, found `f64` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:22:16 | LL | foo::(x_f32); - | ^^^^^ expected u64, found f32 + | ^^^^^ expected `u64`, found `f32` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:23:16 | LL | foo::(x_f64); - | ^^^^^ expected i64, found f64 + | ^^^^^ expected `i64`, found `f64` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:24:16 | LL | foo::(x_f32); - | ^^^^^ expected i64, found f32 + | ^^^^^ expected `i64`, found `f32` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:25:16 | LL | foo::(x_f64); - | ^^^^^ expected u32, found f64 + | ^^^^^ expected `u32`, found `f64` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:26:16 | LL | foo::(x_f32); - | ^^^^^ expected u32, found f32 + | ^^^^^ expected `u32`, found `f32` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:27:16 | LL | foo::(x_f64); - | ^^^^^ expected i32, found f64 + | ^^^^^ expected `i32`, found `f64` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:28:16 | LL | foo::(x_f32); - | ^^^^^ expected i32, found f32 + | ^^^^^ expected `i32`, found `f32` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:29:16 | LL | foo::(x_f64); - | ^^^^^ expected u16, found f64 + | ^^^^^ expected `u16`, found `f64` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:30:16 | LL | foo::(x_f32); - | ^^^^^ expected u16, found f32 + | ^^^^^ expected `u16`, found `f32` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:31:16 | LL | foo::(x_f64); - | ^^^^^ expected i16, found f64 + | ^^^^^ expected `i16`, found `f64` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:32:16 | LL | foo::(x_f32); - | ^^^^^ expected i16, found f32 + | ^^^^^ expected `i16`, found `f32` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:33:15 | LL | foo::(x_f64); - | ^^^^^ expected u8, found f64 + | ^^^^^ expected `u8`, found `f64` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:34:15 | LL | foo::(x_f32); - | ^^^^^ expected u8, found f32 + | ^^^^^ expected `u8`, found `f32` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:35:15 | LL | foo::(x_f64); - | ^^^^^ expected i8, found f64 + | ^^^^^ expected `i8`, found `f64` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:36:15 | LL | foo::(x_f32); - | ^^^^^ expected i8, found f32 + | ^^^^^ expected `i8`, found `f32` error[E0308]: mismatched types --> $DIR/numeric-cast-without-suggestion.rs:37:16 | LL | foo::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(-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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(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::(-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/or-patterns/consistent-bindings.stderr b/src/test/ui/or-patterns/consistent-bindings.stderr index d787cae4343..433a02dfb31 100644 --- a/src/test/ui/or-patterns/consistent-bindings.stderr +++ b/src/test/ui/or-patterns/consistent-bindings.stderr @@ -10,7 +10,7 @@ error[E0308]: mismatched types --> $DIR/consistent-bindings.rs:44:9 | LL | let () = 0; - | ^^ expected integer, found () + | ^^ 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 4502ae0c0cc..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,7 +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 + | ^ 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 be06f3666cb..253f3ef7725 100644 --- a/src/test/ui/or-patterns/or-pattern-mismatch.stderr +++ b/src/test/ui/or-patterns/or-pattern-mismatch.stderr @@ -2,7 +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 + | ^ expected `usize`, found `isize` error: aborting due to previous error diff --git a/src/test/ui/output-type-mismatch.stderr b/src/test/ui/output-type-mismatch.stderr index 91ee46c55a7..533bd87c9cc 100644 --- a/src/test/ui/output-type-mismatch.stderr +++ b/src/test/ui/output-type-mismatch.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/output-type-mismatch.rs:5:31 | LL | fn main() { let i: isize; i = f(); } - | ^^^ expected isize, found () + | ^^^ 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 2a751e9d43a..4d93e130901 100644 --- a/src/test/ui/parser/expr-as-stmt.stderr +++ b/src/test/ui/parser/expr-as-stmt.stderr @@ -47,25 +47,25 @@ error[E0308]: mismatched types --> $DIR/expr-as-stmt.rs:7:6 | LL | {2} + {2} - | ^ expected (), found integer + | ^ expected `()`, found integer error[E0308]: mismatched types --> $DIR/expr-as-stmt.rs:12:6 | LL | {2} + 2 - | ^ expected (), found integer + | ^ expected `()`, found integer error[E0308]: mismatched types --> $DIR/expr-as-stmt.rs:18:7 | LL | { 42 } + foo; - | ^^ expected (), found integer + | ^^ expected `()`, found integer error[E0308]: mismatched types --> $DIR/expr-as-stmt.rs:24:7 | LL | { 3 } * 3 - | ^ expected (), found 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 ad28c9d3dce..2d1554183cc 100644 --- a/src/test/ui/parser/fn-arg-doc-comment.rs +++ b/src/test/ui/parser/fn-arg-doc-comment.rs @@ -17,10 +17,10 @@ fn main() { // verify that the parser recovered and properly typechecked the args f("", ""); //~^ ERROR mismatched types - //~| NOTE expected u8, found &str + //~| NOTE expected `u8`, found `&str` //~| ERROR mismatched types - //~| NOTE expected u8, found &str + //~| NOTE expected `u8`, found `&str` bar(""); //~^ ERROR mismatched types - //~| NOTE expected i32, found &str + //~| 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 5ea1eef0e4f..41f2c080b94 100644 --- a/src/test/ui/parser/fn-arg-doc-comment.stderr +++ b/src/test/ui/parser/fn-arg-doc-comment.stderr @@ -20,19 +20,19 @@ error[E0308]: mismatched types --> $DIR/fn-arg-doc-comment.rs:18:7 | LL | f("", ""); - | ^^ expected u8, found &str + | ^^ expected `u8`, found `&str` error[E0308]: mismatched types --> $DIR/fn-arg-doc-comment.rs:18:11 | LL | f("", ""); - | ^^ expected u8, found &str + | ^^ expected `u8`, found `&str` error[E0308]: mismatched types --> $DIR/fn-arg-doc-comment.rs:23:9 | LL | bar(""); - | ^^ expected i32, found &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 b0d41a27dc9..ac320f095a2 100644 --- a/src/test/ui/parser/issue-33413.stderr +++ b/src/test/ui/parser/issue-33413.stderr @@ -8,7 +8,7 @@ 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 diff --git a/src/test/ui/parser/issue-62881.stderr b/src/test/ui/parser/issue-62881.stderr index ddb97b40e95..fdf772fcbdb 100644 --- a/src/test/ui/parser/issue-62881.stderr +++ b/src/test/ui/parser/issue-62881.stderr @@ -17,7 +17,7 @@ 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 diff --git a/src/test/ui/parser/issue-62895.stderr b/src/test/ui/parser/issue-62895.stderr index e46152fad0e..ed4d2340fc5 100644 --- a/src/test/ui/parser/issue-62895.stderr +++ b/src/test/ui/parser/issue-62895.stderr @@ -37,7 +37,7 @@ 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 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 db2b9c70a03..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,7 +43,7 @@ error[E0308]: mismatched types --> $DIR/lex-bad-char-literals-6.rs:15:20 | LL | let a: usize = ""; - | ^^ expected usize, found &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 b9d0f13c065..58343e86d7b 100644 --- a/src/test/ui/parser/match-vec-invalid.stderr +++ b/src/test/ui/parser/match-vec-invalid.stderr @@ -34,7 +34,7 @@ error[E0308]: mismatched types --> $DIR/match-vec-invalid.rs:13:30 | LL | const RECOVERY_WITNESS: () = 0; - | ^ expected (), found 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 2ef6aa6f113..d9585e7cbf2 100644 --- a/src/test/ui/parser/numeric-lifetime.stderr +++ b/src/test/ui/parser/numeric-lifetime.stderr @@ -14,7 +14,7 @@ error[E0308]: mismatched types --> $DIR/numeric-lifetime.rs:6:20 | LL | let x: usize = ""; - | ^^ expected usize, found &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 bfb8866437b..cb8bf62a8fe 100644 --- a/src/test/ui/parser/pat-lt-bracket-6.stderr +++ b/src/test/ui/parser/pat-lt-bracket-6.stderr @@ -17,7 +17,7 @@ error[E0308]: mismatched types --> $DIR/pat-lt-bracket-6.rs:10:30 | LL | const RECOVERY_WITNESS: () = 0; - | ^ expected (), found 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 d30a3bc0b14..aa115659d47 100644 --- a/src/test/ui/parser/pat-lt-bracket-7.stderr +++ b/src/test/ui/parser/pat-lt-bracket-7.stderr @@ -8,7 +8,7 @@ error[E0308]: mismatched types --> $DIR/pat-lt-bracket-7.rs:9:30 | LL | const RECOVERY_WITNESS: () = 0; - | ^ expected (), found 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 9472237a22e..6c64290e144 100644 --- a/src/test/ui/parser/pat-tuple-4.stderr +++ b/src/test/ui/parser/pat-tuple-4.stderr @@ -17,7 +17,7 @@ error[E0308]: mismatched types --> $DIR/pat-tuple-4.rs:11:30 | LL | const RECOVERY_WITNESS: () = 0; - | ^ expected (), found 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 3513b516ea8..3579a2c4e09 100644 --- a/src/test/ui/parser/pat-tuple-5.stderr +++ b/src/test/ui/parser/pat-tuple-5.stderr @@ -19,7 +19,7 @@ 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 tuple `({integer}, {integer})` found type `u8` 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 74ac926cb02..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,7 +17,7 @@ error[E0308]: mismatched types --> $DIR/recover-for-loop-parens-around-head.rs:13:38 | LL | const RECOVERY_WITNESS: () = 0; - | ^ expected (), found 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 3f5a986f086..51a7c8e0802 100644 --- a/src/test/ui/parser/recover-from-homoglyph.stderr +++ b/src/test/ui/parser/recover-from-homoglyph.stderr @@ -13,7 +13,7 @@ error[E0308]: mismatched types --> $DIR/recover-from-homoglyph.rs:3:20 | LL | let x: usize = (); - | ^^ expected usize, found () + | ^^ 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 1ccf8b22c53..b824f92dfaa 100644 --- a/src/test/ui/parser/recover-missing-semi.stderr +++ b/src/test/ui/parser/recover-missing-semi.stderr @@ -20,13 +20,13 @@ error[E0308]: mismatched types --> $DIR/recover-missing-semi.rs:2:20 | LL | let _: usize = () - | ^^ expected usize, found () + | ^^ expected `usize`, found `()` error[E0308]: mismatched types --> $DIR/recover-missing-semi.rs:9:20 | LL | let _: usize = () - | ^^ expected usize, found () + | ^^ expected `usize`, found `()` error: aborting due to 4 previous errors diff --git a/src/test/ui/parser/recover-tuple.stderr b/src/test/ui/parser/recover-tuple.stderr index 1bd2e986753..e6e094dc2e3 100644 --- a/src/test/ui/parser/recover-tuple.stderr +++ b/src/test/ui/parser/recover-tuple.stderr @@ -8,7 +8,7 @@ error[E0308]: mismatched types --> $DIR/recover-tuple.rs:6:20 | LL | let y: usize = ""; - | ^^ expected usize, found &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 f5766881249..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,13 +45,13 @@ error[E0308]: mismatched types --> $DIR/require-parens-for-chained-comparison.rs:8:14 | LL | false == 0 < 2; - | ^ expected bool, found 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 + | ^ 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 5f70588c0b2..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,7 +21,7 @@ LL | while || Foo { | ___________^ LL | | x: 3 LL | | }.hi() { - | |__________^ expected bool, found closure + | |__________^ expected `bool`, found closure | = note: expected type `bool` found closure `[closure@$DIR/struct-literal-restrictions-in-lamda.rs:12:11: 14:11]` diff --git a/src/test/ui/parser/unclosed-delimiter-in-dep.stderr b/src/test/ui/parser/unclosed-delimiter-in-dep.stderr index c4a9251b1b1..426748b5086 100644 --- a/src/test/ui/parser/unclosed-delimiter-in-dep.stderr +++ b/src/test/ui/parser/unclosed-delimiter-in-dep.stderr @@ -13,7 +13,7 @@ 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 enum `std::result::Result` diff --git a/src/test/ui/pattern/pat-tuple-bad-type.stderr b/src/test/ui/pattern/pat-tuple-bad-type.stderr index a6224d89894..95cca38f7de 100644 --- a/src/test/ui/pattern/pat-tuple-bad-type.stderr +++ b/src/test/ui/pattern/pat-tuple-bad-type.stderr @@ -13,7 +13,7 @@ error[E0308]: mismatched types --> $DIR/pat-tuple-bad-type.rs:10:9 | LL | (..) => {} - | ^^^^ expected u8, found () + | ^^^^ expected `u8`, found `()` error: aborting due to 2 previous errors diff --git a/src/test/ui/pattern/pattern-error-continue.rs b/src/test/ui/pattern/pattern-error-continue.rs index eb57210f454..8635622ab37 100644 --- a/src/test/ui/pattern/pattern-error-continue.rs +++ b/src/test/ui/pattern/pattern-error-continue.rs @@ -21,13 +21,13 @@ fn main() { match 'c' { S { .. } => (), //~^ ERROR mismatched types - //~| 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 22da0d5e0db..2f9fe1981bc 100644 --- a/src/test/ui/pattern/pattern-error-continue.stderr +++ b/src/test/ui/pattern/pattern-error-continue.stderr @@ -30,13 +30,13 @@ error[E0308]: mismatched types LL | match 'c' { | --- this match expression has type `char` LL | S { .. } => (), - | ^^^^^^^^ expected char, found struct `S` + | ^^^^^^^^ expected `char`, found struct `S` error[E0308]: mismatched types --> $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 4805b0f2d57..338eb6ff0c8 100644 --- a/src/test/ui/pattern/pattern-ident-path-generics.stderr +++ b/src/test/ui/pattern/pattern-ident-path-generics.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/pattern-ident-path-generics.rs:3:9 | LL | None:: => {} - | ^^^^^^^^^^^^^ expected &str, found isize + | ^^^^^^^^^^^^^ expected `&str`, found `isize` | = note: expected enum `std::option::Option<&str>` found enum `std::option::Option` diff --git a/src/test/ui/pattern/pattern-tyvar.stderr b/src/test/ui/pattern/pattern-tyvar.stderr index 54e0e5b53a4..b2afeacdf68 100644 --- a/src/test/ui/pattern/pattern-tyvar.stderr +++ b/src/test/ui/pattern/pattern-tyvar.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | match t { | - this match expression has type `std::option::Option>` LL | Bar::T1(_, Some::(x)) => { - | ^^^^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found isize + | ^^^^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found `isize` | = note: expected enum `std::option::Option>` found enum `std::option::Option` 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 c61f9a7039b..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,7 +2,7 @@ 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 reference `&bool` found reference `&{integer}` 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 b73ab6e5d9f..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,7 +8,7 @@ LL | return 0i32; | ---- ...is found to be `i32` here LL | } LL | 1u32 - | ^^^^ expected i32, found u32 + | ^^^^ expected `i32`, found `u32` error[E0308]: mismatched types --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:13:16 @@ -20,7 +20,7 @@ LL | return 0i32; | ---- ...is found to be `i32` here LL | } else { LL | return 1u32; - | ^^^^ expected i32, found u32 + | ^^^^ expected `i32`, found `u32` error[E0308]: mismatched types --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:22:9 @@ -32,7 +32,7 @@ LL | return 0i32; | ---- ...is found to be `i32` here LL | } else { LL | 1u32 - | ^^^^ expected i32, found 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 @@ -42,7 +42,7 @@ 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 @@ -56,7 +56,7 @@ LL | match 13 { LL | 0 => return 0i32, | ---- ...is found to be `i32` here LL | _ => 1u32, - | ^^^^ expected i32, found u32 + | ^^^^ expected `i32`, found `u32` error[E0308]: mismatched types --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:45:5 @@ -70,7 +70,7 @@ LL | | 0 => return 0i32, LL | | 1 => 1u32, LL | | _ => 2u32, LL | | } - | |_____^ expected i32, found u32 + | |_____^ expected `i32`, found `u32` error[E0308]: mismatched types --> $DIR/point-to-type-err-cause-on-impl-trait-return.rs:59:13 @@ -82,7 +82,7 @@ LL | return 0i32; | ---- ...is found to be `i32` here ... LL | 1u32 - | ^^^^ expected i32, found 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(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 34a20330094..d107697d2bf 100644 --- a/src/test/ui/proc-macro/attribute-spans-preserved.stderr +++ b/src/test/ui/proc-macro/attribute-spans-preserved.stderr @@ -2,13 +2,13 @@ error[E0308]: mismatched types --> $DIR/attribute-spans-preserved.rs:7:23 | LL | #[ foo ( let y: u32 = "z"; ) ] - | ^^^ expected u32, found &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 &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 e810e9ad658..391a259c380 100644 --- a/src/test/ui/proc-macro/attribute-with-error.stderr +++ b/src/test/ui/proc-macro/attribute-with-error.stderr @@ -2,25 +2,25 @@ error[E0308]: mismatched types --> $DIR/attribute-with-error.rs:10:18 | LL | let a: i32 = "foo"; - | ^^^^^ expected i32, found &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 &str + | ^^^^^^ expected `i32`, found `&str` error[E0308]: mismatched types --> $DIR/attribute-with-error.rs:25:22 | LL | let a: i32 = "foo"; - | ^^^^^ expected i32, found &str + | ^^^^^ expected `i32`, found `&str` error[E0308]: mismatched types --> $DIR/attribute-with-error.rs:35:22 | LL | let a: i32 = "foo"; - | ^^^^^ expected i32, found &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 9c35115857f..f2c833e69f9 100644 --- a/src/test/ui/proc-macro/issue-37788.stderr +++ b/src/test/ui/proc-macro/issue-37788.stderr @@ -7,7 +7,7 @@ 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 unit type `()` found struct `std::cell::Cell<{integer}>` 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 e6d1c9356ea..09e13c7014b 100644 --- a/src/test/ui/proc-macro/nested-item-spans.stderr +++ b/src/test/ui/proc-macro/nested-item-spans.stderr @@ -2,13 +2,13 @@ error[E0308]: mismatched types --> $DIR/nested-item-spans.rs:9:22 | LL | let x: u32 = "x"; - | ^^^ expected u32, found &str + | ^^^ expected `u32`, found `&str` error[E0308]: mismatched types --> $DIR/nested-item-spans.rs:18:22 | LL | let x: u32 = "x"; - | ^^^ expected u32, found &str + | ^^^ expected `u32`, found `&str` error: aborting due to 2 previous errors diff --git a/src/test/ui/proc-macro/span-preservation.stderr b/src/test/ui/proc-macro/span-preservation.stderr index 86d2bee2068..f669b4e9265 100644 --- a/src/test/ui/proc-macro/span-preservation.stderr +++ b/src/test/ui/proc-macro/span-preservation.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/span-preservation.rs:11:20 | LL | let x: usize = "hello"; - | ^^^^^^^ expected usize, found &str + | ^^^^^^^ expected `usize`, found `&str` error[E0308]: mismatched types --> $DIR/span-preservation.rs:17:29 @@ -11,13 +11,13 @@ LL | fn b(x: Option) -> 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 @@ -44,7 +44,7 @@ error[E0308]: mismatched types LL | extern "C" fn baz() { | - possibly return type missing here? LL | 0 - | ^ expected (), found integer + | ^ expected `()`, found integer error[E0308]: mismatched types --> $DIR/span-preservation.rs:49:5 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/repeat_count.rs b/src/test/ui/repeat_count.rs index 7e899ec37d2..aca7af144a9 100644 --- a/src/test/ui/repeat_count.rs +++ b/src/test/ui/repeat_count.rs @@ -6,26 +6,26 @@ fn main() { //~^ ERROR attempt to use a non-constant value in a constant [E0435] let b = [0; ()]; //~^ ERROR mismatched types - //~| 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 usize, found floating-point number + //~| expected `usize`, found floating-point number let e = [0; "foo"]; //~^ ERROR mismatched types - //~| expected usize, found &str + //~| 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 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 76e90af7557..efad00b272c 100644 --- a/src/test/ui/repeat_count.stderr +++ b/src/test/ui/repeat_count.stderr @@ -8,31 +8,31 @@ error[E0308]: mismatched types --> $DIR/repeat_count.rs:7:17 | LL | let b = [0; ()]; - | ^^ expected usize, found () + | ^^ expected `usize`, found `()` error[E0308]: mismatched types --> $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:13:17 | LL | let d = [0; 0.5]; - | ^^^ expected usize, found floating-point number + | ^^^ expected `usize`, found floating-point number error[E0308]: mismatched types --> $DIR/repeat_count.rs:16:17 | LL | let e = [0; "foo"]; - | ^^^^^ expected usize, found &str + | ^^^^^ expected `usize`, found `&str` error[E0308]: mismatched types --> $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 | @@ -43,7 +43,7 @@ error[E0308]: mismatched types --> $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 | @@ -54,7 +54,7 @@ error[E0308]: mismatched types --> $DIR/repeat_count.rs:28:17 | LL | let g = [0; G { g: () }]; - | ^^^^^^^^^^^ expected usize, found struct `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 7977d7cd20f..aeeb0c45191 100644 --- a/src/test/ui/resolve/name-clash-nullary.stderr +++ b/src/test/ui/resolve/name-clash-nullary.stderr @@ -2,7 +2,7 @@ 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 enum `std::option::Option<_>` diff --git a/src/test/ui/resolve/resolve-inconsistent-binding-mode.stderr b/src/test/ui/resolve/resolve-inconsistent-binding-mode.stderr index 361c79dabd1..58455024d38 100644 --- a/src/test/ui/resolve/resolve-inconsistent-binding-mode.stderr +++ b/src/test/ui/resolve/resolve-inconsistent-binding-mode.stderr @@ -24,13 +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 + | ^ 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 + | ^ 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 04edc2da256..271495012da 100644 --- a/src/test/ui/resolve/resolve-inconsistent-names.stderr +++ b/src/test/ui/resolve/resolve-inconsistent-names.stderr @@ -87,7 +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 + | ^^^^^ expected enum `E`, found `&E` error: aborting due to 9 previous errors diff --git a/src/test/ui/return/return-from-diverging.stderr b/src/test/ui/return/return-from-diverging.stderr index c1dcc1d5d8f..0c1fb4d9c59 100644 --- a/src/test/ui/return/return-from-diverging.stderr +++ b/src/test/ui/return/return-from-diverging.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | fn fail() -> ! { | - expected `!` because of return type LL | return "wow"; - | ^^^^^ expected !, found &str + | ^^^^^ expected `!`, found `&str` | = note: expected type `!` found reference `&'static str` diff --git a/src/test/ui/return/return-type.stderr b/src/test/ui/return/return-type.stderr index 40f12347101..535428f1c91 100644 --- a/src/test/ui/return/return-type.stderr +++ b/src/test/ui/return/return-type.stderr @@ -2,7 +2,7 @@ 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 unit type `()` found struct `S` 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 8e1873c0659..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,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/const.rs:14:9 | LL | FOO => {}, - | ^^^ expected &Foo, found struct `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 fd48c56c07b..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,7 +2,7 @@ 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 reference `&'static str` @@ -11,7 +11,7 @@ error[E0308]: mismatched types --> $DIR/lit.rs:16:9 | LL | b"abc" => true, - | ^^^^^^ expected &[u8], found array `[u8; 3]` + | ^^^^^^ expected `&[u8]`, found array `[u8; 3]` | = note: expected type `&&[u8]` found reference `&'static [u8; 3]` 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 a04b109ba6d..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,7 +537,7 @@ 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` error[E0614]: type `bool` cannot be dereferenced @@ -578,14 +578,14 @@ 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` 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 struct `std::ops::Range` @@ -594,7 +594,7 @@ 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 struct `std::ops::RangeTo` @@ -603,7 +603,7 @@ 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 struct `std::ops::RangeFrom` @@ -614,7 +614,7 @@ 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 struct `std::ops::Range<_>` @@ -623,7 +623,7 @@ 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 struct `std::ops::Range` @@ -634,7 +634,7 @@ 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 struct `std::ops::Range<_>` @@ -643,7 +643,7 @@ 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 struct `std::ops::Range` @@ -661,7 +661,7 @@ 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 closure `[closure@$DIR/disallowed-positions.rs:78:41: 78:48]` @@ -670,7 +670,7 @@ 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 struct `std::ops::Range` @@ -681,7 +681,7 @@ 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 struct `std::ops::Range<_>` @@ -690,13 +690,13 @@ error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:86:44 | LL | if let Range { start: true, end } = t..&&false {} - | ^^^^^^^ expected bool, found &&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 struct `std::ops::Range` @@ -716,7 +716,7 @@ 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` error[E0614]: type `bool` cannot be dereferenced @@ -757,14 +757,14 @@ 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` 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 struct `std::ops::Range` @@ -773,7 +773,7 @@ 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 struct `std::ops::RangeTo` @@ -782,7 +782,7 @@ 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 struct `std::ops::RangeFrom` @@ -793,7 +793,7 @@ 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 struct `std::ops::Range<_>` @@ -802,7 +802,7 @@ 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 struct `std::ops::Range` @@ -813,7 +813,7 @@ 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 struct `std::ops::Range<_>` @@ -822,7 +822,7 @@ 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 struct `std::ops::Range` @@ -840,7 +840,7 @@ 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 closure `[closure@$DIR/disallowed-positions.rs:142:44: 142:51]` @@ -849,7 +849,7 @@ 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 struct `std::ops::Range` @@ -860,7 +860,7 @@ 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 struct `std::ops::Range<_>` @@ -869,13 +869,13 @@ error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:150:47 | LL | while let Range { start: true, end } = t..&&false {} - | ^^^^^^^ expected bool, found &&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 struct `std::ops::Range` @@ -927,7 +927,7 @@ 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 struct `std::ops::Range<_>` @@ -939,7 +939,7 @@ LL | fn outside_if_and_while_expr() { | - help: try adding a return type: `-> &bool` ... LL | &let 0 = 0 - | ^^^^^^^^^^ expected (), found &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/span/coerce-suggestions.stderr b/src/test/ui/span/coerce-suggestions.stderr index da9ac04e348..5918888ff89 100644 --- a/src/test/ui/span/coerce-suggestions.stderr +++ b/src/test/ui/span/coerce-suggestions.stderr @@ -2,7 +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` + | ^^^^^^^^^^^^^ expected `usize`, found struct `std::string::String` error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:9:19 @@ -10,7 +10,7 @@ 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()` error[E0308]: mismatched types @@ -44,7 +44,7 @@ error[E0308]: mismatched types --> $DIR/coerce-suggestions.rs:21:9 | LL | s = format!("foo"); - | ^^^^^^^^^^^^^^ expected &mut std::string::String, found struct `std::string::String` + | ^^^^^^^^^^^^^^ expected `&mut std::string::String`, found struct `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) diff --git a/src/test/ui/span/issue-34264.stderr b/src/test/ui/span/issue-34264.stderr index c0e9d6cfab8..56a2686945c 100644 --- a/src/test/ui/span/issue-34264.stderr +++ b/src/test/ui/span/issue-34264.stderr @@ -55,7 +55,7 @@ error[E0308]: mismatched types --> $DIR/issue-34264.rs:8:13 | LL | bar("", ""); - | ^^ expected usize, found &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 e2ba768d7a3..9637d1d82ec 100644 --- a/src/test/ui/span/issue-39018.stderr +++ b/src/test/ui/span/issue-39018.stderr @@ -70,7 +70,7 @@ 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` error[E0369]: binary operation `+` cannot be applied to type `&std::string::String` diff --git a/src/test/ui/span/move-closure.stderr b/src/test/ui/span/move-closure.stderr index f6ee7d4d44e..9914d7e8507 100644 --- a/src/test/ui/span/move-closure.stderr +++ b/src/test/ui/span/move-closure.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/move-closure.rs:5:17 | LL | let x: () = move || (); - | ^^^^^^^^^^ expected (), found closure + | ^^^^^^^^^^ expected `()`, found closure | = note: expected unit type `()` found closure `[closure@$DIR/move-closure.rs:5:17: 5:27]` diff --git a/src/test/ui/specialization/specialization-default-projection.stderr b/src/test/ui/specialization/specialization-default-projection.stderr index bad7fc35edf..d03aec7ab30 100644 --- a/src/test/ui/specialization/specialization-default-projection.stderr +++ b/src/test/ui/specialization/specialization-default-projection.stderr @@ -5,7 +5,7 @@ LL | fn generic() -> ::Assoc { | ----------------- expected `::Assoc` because of return type ... LL | () - | ^^ expected associated type, found () + | ^^ expected associated type, found `()` | = note: expected associated type `::Assoc` found unit type `()` @@ -21,7 +21,7 @@ LL | fn monomorphic() -> () { LL | generic::<()>() | ^^^^^^^^^^^^^^^- help: try adding a semicolon: `;` | | - | expected (), found associated type + | expected `()`, found associated type | = note: expected unit type `()` found associated type `<() as Foo>::Assoc` 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/str/str-array-assignment.stderr b/src/test/ui/str/str-array-assignment.stderr index e8678b439d4..909ff1e0263 100644 --- a/src/test/ui/str/str-array-assignment.stderr +++ b/src/test/ui/str/str-array-assignment.stderr @@ -2,7 +2,7 @@ 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 @@ -12,7 +12,7 @@ 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]` error[E0277]: the size for values of type `str` cannot be known at compilation time @@ -34,7 +34,7 @@ error[E0308]: mismatched types LL | let w: &str = s[..2]; | ^^^^^^ | | - | expected &str, found str + | expected `&str`, found `str` | help: consider borrowing here: `&s[..2]` 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 af66fe8b880..7174fd972eb 100644 --- a/src/test/ui/str/str-lit-type-mismatch.stderr +++ b/src/test/ui/str/str-lit-type-mismatch.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | let x: &[u8] = "foo"; | ^^^^^ | | - | expected slice `[u8]`, found str + | expected slice `[u8]`, found `str` | help: consider adding a leading `b`: `b"foo"` | = note: expected reference `&[u8]` @@ -16,7 +16,7 @@ error[E0308]: mismatched types LL | let y: &[u8; 4] = "baaa"; | ^^^^^^ | | - | expected array `[u8; 4]`, found str + | expected array `[u8; 4]`, found `str` | help: consider adding a leading `b`: `b"baaa"` | = note: expected reference `&[u8; 4]` @@ -28,7 +28,7 @@ error[E0308]: mismatched types LL | let z: &str = b"foo"; | ^^^^^^ | | - | expected str, found array `[u8; 3]` + | expected `str`, found array `[u8; 3]` | help: consider removing the leading `b`: `"foo"` | = note: expected reference `&str` diff --git a/src/test/ui/struct-literal-variant-in-if.stderr b/src/test/ui/struct-literal-variant-in-if.stderr index e89111ca2c8..b75a53915b5 100644 --- a/src/test/ui/struct-literal-variant-in-if.stderr +++ b/src/test/ui/struct-literal-variant-in-if.stderr @@ -56,14 +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 `()` error[E0308]: mismatched types --> $DIR/struct-literal-variant-in-if.rs:21:20 | LL | let y: usize = (); - | ^^ expected usize, found () + | ^^ expected `usize`, found `()` error: aborting due to 7 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 63232a249f4..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 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:: { 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:: { 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 f184f81647d..4bd3acac532 100644 --- a/src/test/ui/structs/structure-constructor-type-mismatch.stderr +++ b/src/test/ui/structs/structure-constructor-type-mismatch.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | x: 1, | ^ | | - | expected f32, found integer + | expected `f32`, found integer | help: use a float literal: `1.0` error[E0308]: mismatched types @@ -13,7 +13,7 @@ error[E0308]: mismatched types LL | y: 2, | ^ | | - | expected f32, found integer + | expected `f32`, found integer | help: use a float literal: `2.0` error[E0308]: mismatched types @@ -22,7 +22,7 @@ error[E0308]: mismatched types LL | x: 3, | ^ | | - | expected f32, found integer + | expected `f32`, found integer | help: use a float literal: `3.0` error[E0308]: mismatched types @@ -31,7 +31,7 @@ error[E0308]: mismatched types LL | y: 4, | ^ | | - | expected f32, found integer + | expected `f32`, found integer | help: use a float literal: `4.0` error[E0308]: mismatched types @@ -40,7 +40,7 @@ error[E0308]: mismatched types LL | x: 5, | ^ | | - | expected f32, found integer + | expected `f32`, found integer | help: use a float literal: `5.0` error[E0308]: mismatched types @@ -49,7 +49,7 @@ error[E0308]: mismatched types LL | x: 7, | ^ | | - | expected f32, found integer + | expected `f32`, found integer | help: use a float literal: `7.0` error[E0107]: wrong number of type arguments: expected 0, found 1 @@ -64,7 +64,7 @@ error[E0308]: mismatched types LL | x: 9, | ^ | | - | expected f32, found integer + | expected `f32`, found integer | help: use a float literal: `9.0` error[E0308]: mismatched types @@ -73,7 +73,7 @@ error[E0308]: mismatched types LL | y: 10, | ^^ | | - | expected f32, found integer + | expected `f32`, found integer | help: use a float literal: `10.0` error[E0107]: wrong number of type arguments: expected 0, found 1 @@ -88,7 +88,7 @@ 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 struct `Point<{integer}>` found struct `Point` @@ -99,7 +99,7 @@ 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 struct `Point<{integer}>` found struct `Point` @@ -110,7 +110,7 @@ error[E0308]: mismatched types LL | match (Pair { x: 1, y: 2 }) { | --------------------- this match expression has type `Pair<{integer}, {integer}>` LL | PairF:: { .. } => {} - | ^^^^^^^^^^^^^^^^^^^ expected integer, found f32 + | ^^^^^^^^^^^^^^^^^^^ expected integer, found `f32` | = note: expected struct `Pair<{integer}, {integer}>` found struct `Pair` diff --git a/src/test/ui/substs-ppaux.normal.stderr b/src/test/ui/substs-ppaux.normal.stderr index 2e23e7220b7..8a233105491 100644 --- a/src/test/ui/substs-ppaux.normal.stderr +++ b/src/test/ui/substs-ppaux.normal.stderr @@ -7,7 +7,7 @@ LL | fn bar<'a, T>() where T: 'a {} LL | let x: () = >::bar::<'static, char>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | expected (), found fn item + | expected `()`, found fn item | help: use parentheses to call this function: `>::bar::<'static, char>()` | = note: expected unit type `()` @@ -22,7 +22,7 @@ LL | fn bar<'a, T>() where T: 'a {} LL | let x: () = >::bar::<'static, char>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | expected (), found fn item + | expected `()`, found fn item | help: use parentheses to call this function: `>::bar::<'static, char>()` | = note: expected unit type `()` @@ -37,7 +37,7 @@ LL | fn baz() {} LL | let x: () = >::baz; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | expected (), found fn item + | expected `()`, found fn item | help: use parentheses to call this function: `>::baz()` | = note: expected unit type `()` @@ -52,7 +52,7 @@ 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 unit type `()` diff --git a/src/test/ui/substs-ppaux.verbose.stderr b/src/test/ui/substs-ppaux.verbose.stderr index 0d26dcc4c17..ab70d02e157 100644 --- a/src/test/ui/substs-ppaux.verbose.stderr +++ b/src/test/ui/substs-ppaux.verbose.stderr @@ -7,7 +7,7 @@ LL | fn bar<'a, T>() where T: 'a {} LL | let x: () = >::bar::<'static, char>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | expected (), found fn item + | expected `()`, found fn item | help: use parentheses to call this function: `>::bar::<'static, char>()` | = note: expected unit type `()` @@ -22,7 +22,7 @@ LL | fn bar<'a, T>() where T: 'a {} LL | let x: () = >::bar::<'static, char>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | expected (), found fn item + | expected `()`, found fn item | help: use parentheses to call this function: `>::bar::<'static, char>()` | = note: expected unit type `()` @@ -37,7 +37,7 @@ LL | fn baz() {} LL | let x: () = >::baz; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | | - | expected (), found fn item + | expected `()`, found fn item | help: use parentheses to call this function: `>::baz()` | = note: expected unit type `()` @@ -52,7 +52,7 @@ 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 unit type `()` diff --git a/src/test/ui/suggestions/as-ref.stderr b/src/test/ui/suggestions/as-ref.stderr index 5379f77ae5c..1cc63f5c476 100644 --- a/src/test/ui/suggestions/as-ref.stderr +++ b/src/test/ui/suggestions/as-ref.stderr @@ -2,7 +2,7 @@ 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` @@ -10,7 +10,7 @@ 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` @@ -18,7 +18,7 @@ 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` @@ -26,7 +26,7 @@ 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` 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 7ec1daacb61..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,7 +6,7 @@ LL | | "abc" LL | | }; | | ^ | | | - | |______expected &str, found struct `std::string::String` + | |______expected `&str`, found struct `std::string::String` | in this macro invocation | = 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/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 18e5c63ff48..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,7 +21,7 @@ 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` @@ -51,7 +51,7 @@ 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` @@ -81,7 +81,7 @@ 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` @@ -96,7 +96,7 @@ 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` @@ -126,7 +126,7 @@ 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` @@ -141,7 +141,7 @@ 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` @@ -156,7 +156,7 @@ 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` @@ -171,7 +171,7 @@ 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` @@ -186,7 +186,7 @@ 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` @@ -201,7 +201,7 @@ 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` @@ -227,7 +227,7 @@ 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` diff --git a/src/test/ui/suggestions/format-borrow.stderr b/src/test/ui/suggestions/format-borrow.stderr index d43a249d9cc..4b111396431 100644 --- a/src/test/ui/suggestions/format-borrow.stderr +++ b/src/test/ui/suggestions/format-borrow.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | let a: String = &String::from("a"); | ^^^^^^^^^^^^^^^^^^ | | - | expected struct `std::string::String`, found &std::string::String + | expected struct `std::string::String`, found `&std::string::String` | help: consider removing the borrow: `String::from("a")` error[E0308]: mismatched types @@ -13,7 +13,7 @@ error[E0308]: mismatched types LL | let b: String = &format!("b"); | ^^^^^^^^^^^^^ | | - | expected struct `std::string::String`, found &std::string::String + | expected struct `std::string::String`, found `&std::string::String` | help: consider removing the borrow: `format!("b")` 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 ba7457df069..5ad6597b82e 100644 --- a/src/test/ui/suggestions/issue-52820.stderr +++ b/src/test/ui/suggestions/issue-52820.stderr @@ -4,7 +4,7 @@ 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()` error[E0308]: mismatched types @@ -13,7 +13,7 @@ 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()` 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 331a6a53b12..23991bbbe69 100644 --- a/src/test/ui/suggestions/issue-59819.stderr +++ b/src/test/ui/suggestions/issue-59819.stderr @@ -4,7 +4,7 @@ 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` error[E0308]: mismatched types @@ -13,7 +13,7 @@ error[E0308]: mismatched types LL | let b: i32 = a; | ^ | | - | expected i32, found &{integer} + | expected `i32`, found `&{integer}` | help: consider dereferencing the borrow: `*a` error[E0308]: mismatched types diff --git a/src/test/ui/suggestions/match-ergonomics.stderr b/src/test/ui/suggestions/match-ergonomics.stderr index 54aebb3bba2..abdb754acc5 100644 --- a/src/test/ui/suggestions/match-ergonomics.stderr +++ b/src/test/ui/suggestions/match-ergonomics.stderr @@ -4,7 +4,7 @@ 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` @@ -28,7 +28,7 @@ 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` @@ -40,7 +40,7 @@ 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` diff --git a/src/test/ui/suggestions/match-needing-semi.stderr b/src/test/ui/suggestions/match-needing-semi.stderr index c9e263d0db8..28abd089525 100644 --- a/src/test/ui/suggestions/match-needing-semi.stderr +++ b/src/test/ui/suggestions/match-needing-semi.stderr @@ -5,7 +5,7 @@ LL | / match 3 { LL | | 4 => 1, LL | | 3 => { LL | | 2 - | | ^ expected (), found integer + | | ^ expected `()`, found integer LL | | } LL | | _ => 2 LL | | } @@ -23,7 +23,7 @@ LL | | _ => 2 LL | | } | | ^- help: consider using a semicolon here | |_____| - | expected (), found 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/recover-from-semicolon-trailing-item.stderr b/src/test/ui/suggestions/recover-from-semicolon-trailing-item.stderr index 44c07a7c83a..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,19 +22,19 @@ error[E0308]: mismatched types --> $DIR/recover-from-semicolon-trailing-item.rs:10:20 | LL | let _: usize = S {}; - | ^^^^ expected usize, found struct `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` + | ^^^^ expected `usize`, found struct `main::X` error[E0308]: mismatched types --> $DIR/recover-from-semicolon-trailing-item.rs:14:9 | LL | foo(""); - | ^^ expected usize, found &str + | ^^ expected `usize`, found `&str` error: aborting due to 6 previous errors 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 65da1ccd975..256ec1713d4 100644 --- a/src/test/ui/suppressed-error.rs +++ b/src/test/ui/suppressed-error.rs @@ -3,6 +3,6 @@ fn main() { //~^ ERROR mismatched types //~| expected unit type `()` //~| found tuple `(_, _)` -//~| expected (), found tuple +//~| expected `()`, found tuple return x; } diff --git a/src/test/ui/suppressed-error.stderr b/src/test/ui/suppressed-error.stderr index 994011f3f0e..846cd2adcd8 100644 --- a/src/test/ui/suppressed-error.stderr +++ b/src/test/ui/suppressed-error.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/suppressed-error.rs:2:9 | LL | let (x, y) = (); - | ^^^^^^ expected (), found tuple + | ^^^^^^ expected `()`, found tuple | = note: expected unit type `()` found tuple `(_, _)` diff --git a/src/test/ui/switched-expectations.stderr b/src/test/ui/switched-expectations.stderr index d65adea1ed4..dca9c6ce4d3 100644 --- a/src/test/ui/switched-expectations.stderr +++ b/src/test/ui/switched-expectations.stderr @@ -2,7 +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 + | ^^^ 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 ebe81c314a8..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 @@ -12,5 +12,5 @@ fn main() { //~^ ERROR mismatched types //~| expected type `char` //~| found enum `std::option::Option<_>` - //~| expected char, 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 c71474ab266..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,7 +2,7 @@ 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 enum `std::option::Option<_>` 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 5e49fcdf95a..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,8 +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 +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 cea937ca8b1..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,8 +1,8 @@ error[E0308]: mismatched types --> $DIR/non-whitespace-trimming-unicode.rs:4:415 | -LL | ...♯♰♱♲♳♴♵♶♷♸♹♺♻♼♽♾♿⚀⚁⚂⚃⚄⚅⚆⚈⚉4"; let _: () = 42; let _: &str = "🦀☀☁☂☃☄★☆☇☈☉☊☋☌☍☎☏☐☑☒☓ ☖☗☘☙☚☛☜☝☞☟☠☡☢☣☤☥☦☧☨☩☪☫☬☭☮☯☰☱☲☳☴☵☶☷☸☹☺☻☼☽☾☿♀♁♂♃♄♅♆... - | ^^ expected (), found 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 b024d2ace37..a8f2212b557 100644 --- a/src/test/ui/terminal-width/non-whitespace-trimming.stderr +++ b/src/test/ui/terminal-width/non-whitespace-trimming.stderr @@ -1,8 +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 +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 3013019df26..97a64e603b7 100644 --- a/src/test/ui/terminal-width/whitespace-trimming-2.stderr +++ b/src/test/ui/terminal-width/whitespace-trimming-2.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | ...-> usize { | ----- expected `usize` because of return type LL | ... () - | ^^ expected usize, found () + | ^^ 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 d3064d8bfb9..903673266cc 100644 --- a/src/test/ui/terminal-width/whitespace-trimming.stderr +++ b/src/test/ui/terminal-width/whitespace-trimming.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/whitespace-trimming.rs:4:193 | LL | ... let _: () = 42; - | ^^ expected (), found integer + | ^^ expected `()`, found integer error: aborting due to previous error 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 19374ba49c5..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,7 +2,7 @@ error[E0271]: type mismatch resolving ` as std::iter::It --> $DIR/traits-assoc-type-in-supertrait-bad.rs:11:6 | LL | impl Foo for IntoIter { - | ^^^ expected i32, found 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 75ff998d3bf..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,13 +17,13 @@ error[E0271]: type mismatch resolving ` as std::op --> $DIR/try-block-bad-type.rs:12:9 | LL | "" - | ^^ expected i32, found &str + | ^^ expected `i32`, found `&str` error[E0271]: type mismatch resolving ` as std::ops::Try>::Ok == ()` --> $DIR/try-block-bad-type.rs:15:39 | LL | let res: Result = try { }; - | ^ expected i32, found () + | ^ 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 63f2c02bc71..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,14 +4,14 @@ error[E0271]: type mismatch resolving ` as std::ops::Tr LL | 42 | ^^ | | - | expected f32, found integer + | expected `f32`, found integer | help: use a float literal: `42.0` error[E0271]: type mismatch resolving ` as std::ops::Try>::Ok == ()` --> $DIR/try-block-type-error.rs:16:5 | LL | }; - | ^ expected i32, found () + | ^ expected `i32`, found `()` 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 bbe152d69d7..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,7 +5,7 @@ LL | impl Enum { | - this type parameter LL | fn ts_variant() { LL | Self::TSVariant(()); - | ^^ expected type parameter `T`, found () + | ^^ expected type parameter `T`, found `()` | = note: expected type parameter `T` found unit type `()` @@ -31,7 +31,7 @@ LL | impl Enum { | - this type parameter ... LL | Self::<()>::TSVariant(()); - | ^^ expected type parameter `T`, found () + | ^^ expected type parameter `T`, found `()` | = note: expected type parameter `T` found unit type `()` @@ -57,7 +57,7 @@ LL | impl Enum { | - this type parameter ... LL | Self::SVariant { v: () }; - | ^^ expected type parameter `T`, found () + | ^^ expected type parameter `T`, found `()` | = note: expected type parameter `T` found unit type `()` @@ -77,7 +77,7 @@ LL | impl Enum { | - this type parameter ... LL | Self::SVariant::<()> { v: () }; - | ^^ expected type parameter `T`, found () + | ^^ expected type parameter `T`, found `()` | = note: expected type parameter `T` found unit type `()` @@ -97,7 +97,7 @@ LL | impl Enum { | - this type parameter ... LL | Self::<()>::SVariant { v: () }; - | ^^ expected type parameter `T`, found () + | ^^ expected type parameter `T`, found `()` | = note: expected type parameter `T` found unit type `()` @@ -123,7 +123,7 @@ LL | impl Enum { | - this type parameter ... LL | Self::<()>::SVariant::<()> { v: () }; - | ^^ expected type parameter `T`, found () + | ^^ expected type parameter `T`, found `()` | = note: expected type parameter `T` found unit type `()` 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 a1afd5e9a0e..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,7 +11,7 @@ error[E0308]: mismatched types --> $DIR/enum-variant-priority-higher-than-other-inherent.rs:22:17 | LL | let _: u8 = ::V; - | ^^^^^^^ expected u8, found enum `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 7e744925a7c..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,7 +8,7 @@ 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 opaque type `WrongGeneric::<&{integer}>` 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 c1237e7e6df..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,7 +8,7 @@ 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 opaque type `WrongGeneric::<&{integer}>` 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 bb5f1d3bbc9..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,7 +2,7 @@ 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 opaque type `Closure` found unit type `()` 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 5411456b34b..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,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/never_reveal_concrete_type.rs:13:27 | LL | let _: &'static str = x; - | ^ expected &str, found opaque type + | ^ expected `&str`, found opaque type | = note: expected reference `&'static str` found opaque type `NoReveal` 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 aaf5e286643..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,7 +2,7 @@ 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 reference `&str` found opaque type `Boo` @@ -13,7 +13,7 @@ error[E0308]: mismatched types LL | fn bomp() -> boo::Boo { | -------- expected `Boo` because of return type LL | "" - | ^^ expected opaque type, found &str + | ^^ expected opaque type, found `&str` | = note: expected opaque type `Boo` found reference `&'static str` diff --git a/src/test/ui/type/type-ascription-precedence.stderr b/src/test/ui/type/type-ascription-precedence.stderr index 5f42ed228dd..92d3f18e82f 100644 --- a/src/test/ui/type/type-ascription-precedence.stderr +++ b/src/test/ui/type/type-ascription-precedence.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/type-ascription-precedence.rs:31:7 | LL | &(S: &S); - | ^ expected &S, found struct `S` + | ^ expected `&S`, found struct `S` error[E0308]: mismatched types --> $DIR/type-ascription-precedence.rs:35:7 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 f210fd62d7d..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,7 +4,7 @@ error[E0308]: mismatched types LL | let _: bool = 0 = 0; | ^^^^^ | | - | expected bool, found () + | expected `bool`, found `()` | help: try comparing for equality: `0 == 0` error[E0308]: mismatched types @@ -13,7 +13,7 @@ error[E0308]: mismatched types LL | 0 => 0 = 0, | ^^^^^ | | - | expected bool, found () + | expected `bool`, found `()` | help: try comparing for equality: `0 == 0` error[E0308]: mismatched types @@ -22,7 +22,7 @@ error[E0308]: mismatched types LL | _ => 0 = 0, | ^^^^^ | | - | expected bool, found () + | expected `bool`, found `()` | help: try comparing for equality: `0 == 0` error[E0308]: mismatched types @@ -31,7 +31,7 @@ error[E0308]: mismatched types LL | true => 0 = 0, | ^^^^^ | | - | expected bool, found () + | expected `bool`, found `()` | help: try comparing for equality: `0 == 0` error[E0308]: mismatched types @@ -40,7 +40,7 @@ error[E0308]: mismatched types LL | if 0 = 0 {} | ^^^^^ | | - | expected bool, found () + | expected `bool`, found `()` | help: try comparing for equality: `0 == 0` error[E0308]: mismatched types @@ -49,7 +49,7 @@ error[E0308]: mismatched types LL | let _: bool = if { 0 = 0 } { | ^^^^^ | | - | expected bool, found () + | expected `bool`, found `()` | help: try comparing for equality: `0 == 0` error[E0308]: mismatched types @@ -58,7 +58,7 @@ error[E0308]: mismatched types LL | 0 = 0 | ^^^^^ | | - | expected bool, found () + | expected `bool`, found `()` | help: try comparing for equality: `0 == 0` error[E0308]: mismatched types @@ -67,7 +67,7 @@ error[E0308]: mismatched types LL | 0 = 0 | ^^^^^ | | - | expected bool, found () + | expected `bool`, found `()` | help: try comparing for equality: `0 == 0` error[E0308]: mismatched types @@ -76,7 +76,7 @@ error[E0308]: mismatched types LL | let _ = (0 = 0) | ^^^^^^^ | | - | expected bool, found () + | expected `bool`, found `()` | help: try comparing for equality: `0 == 0` error[E0308]: mismatched types @@ -85,7 +85,7 @@ error[E0308]: mismatched types LL | && { 0 = 0 } | ^^^^^ | | - | expected bool, found () + | expected `bool`, found `()` | help: try comparing for equality: `0 == 0` error[E0308]: mismatched types @@ -94,7 +94,7 @@ error[E0308]: mismatched types LL | || (0 = 0); | ^^^^^^^ | | - | expected bool, found () + | expected `bool`, found `()` | help: try comparing for equality: `0 == 0` error[E0070]: invalid left-hand side expression @@ -107,7 +107,7 @@ error[E0308]: mismatched types --> $DIR/assignment-expected-bool.rs:31:20 | LL | let _: usize = 0 = 0; - | ^^^^^ expected usize, found () + | ^^^^^ 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 789902bbb94..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,7 +4,7 @@ error[E0308]: mismatched types LL | if x = x { | ^^^^^ | | - | expected bool, found () + | expected `bool`, found `()` | help: try comparing for equality: `x == x` error[E0308]: mismatched types @@ -13,7 +13,7 @@ error[E0308]: mismatched types LL | if (x = x) { | ^^^^^^^ | | - | expected bool, found () + | expected `bool`, found `()` | help: try comparing for equality: `x == x` error[E0308]: mismatched types @@ -22,7 +22,7 @@ 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 })` error[E0308]: mismatched types @@ -31,7 +31,7 @@ error[E0308]: mismatched types LL | if 3 = x { | ^^^^^ | | - | expected bool, found () + | expected `bool`, found `()` | help: try comparing for equality: `3 == x` error[E0308]: mismatched types @@ -40,7 +40,7 @@ error[E0308]: mismatched types LL | x = 4 | ^^^^^ | | - | expected bool, found () + | expected `bool`, found `()` | help: try comparing for equality: `x == 4` error[E0308]: mismatched types @@ -49,7 +49,7 @@ error[E0308]: mismatched types LL | x = 5 | ^^^^^ | | - | expected bool, found () + | expected `bool`, found `()` | help: try comparing for equality: `x == 5` 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 720bde93711..16dc6475c6f 100644 --- a/src/test/ui/type/type-error-break-tail.stderr +++ b/src/test/ui/type/type-error-break-tail.stderr @@ -7,7 +7,7 @@ LL | loop { LL | if false { break; } | ^^^^^ | | - | expected i32, found () + | expected `i32`, found `()` | help: give it a value of the expected type: `break 42` 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 6270ee64713..55d6ceef1de 100644 --- a/src/test/ui/type/type-mismatch-multiple.rs +++ b/src/test/ui/type/type-mismatch-multiple.rs @@ -2,6 +2,6 @@ fn main() { let a: bool = 1; let b: i32 = true; } //~^ ERROR mismatched types -//~| 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 6de8a056978..d615e599501 100644 --- a/src/test/ui/type/type-mismatch-multiple.stderr +++ b/src/test/ui/type/type-mismatch-multiple.stderr @@ -2,13 +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 + | ^ 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.stderr b/src/test/ui/type/type-mismatch.stderr index e6016bdef18..24c71c63103 100644 --- a/src/test/ui/type/type-mismatch.stderr +++ b/src/test/ui/type/type-mismatch.stderr @@ -2,19 +2,19 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:17:17 | LL | want::(f); - | ^ expected struct `foo`, found usize + | ^ expected struct `foo`, found `usize` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:18:17 | LL | want::(f); - | ^ expected struct `bar`, found usize + | ^ expected struct `bar`, found `usize` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:19:24 | LL | want::>(f); - | ^ expected struct `Foo`, found usize + | ^ expected struct `Foo`, found `usize` | = note: expected struct `Foo` found type `usize` @@ -23,7 +23,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:20:27 | LL | want::>(f); - | ^ expected struct `Foo`, found usize + | ^ expected struct `Foo`, found `usize` | = note: expected struct `Foo` found type `usize` @@ -32,7 +32,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:21:22 | LL | want::>(f); - | ^ expected struct `Foo`, found usize + | ^ expected struct `Foo`, found `usize` | = note: expected struct `Foo` found type `usize` @@ -41,7 +41,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:22:25 | LL | want::>(f); - | ^ expected struct `Foo`, found usize + | ^ expected struct `Foo`, found `usize` | = note: expected struct `Foo` found type `usize` @@ -50,7 +50,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:23:22 | LL | want::>(f); - | ^ expected struct `Foo`, found usize + | ^ expected struct `Foo`, found `usize` | = note: expected struct `Foo` found type `usize` @@ -59,7 +59,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:24:25 | LL | want::>(f); - | ^ expected struct `Foo`, found usize + | ^ expected struct `Foo`, found `usize` | = note: expected struct `Foo` found type `usize` @@ -68,7 +68,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:28:19 | LL | want::(f); - | ^ expected usize, found struct `foo` + | ^ expected `usize`, found struct `foo` error[E0308]: mismatched types --> $DIR/type-mismatch.rs:29:17 @@ -134,7 +134,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:39:19 | LL | want::(f); - | ^ expected usize, found struct `Foo` + | ^ expected `usize`, found struct `Foo` | = note: expected type `usize` found struct `Foo` @@ -161,7 +161,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:42:24 | LL | want::>(f); - | ^ expected usize, found struct `foo` + | ^ expected `usize`, found struct `foo` | = note: expected struct `Foo` found struct `Foo` @@ -170,7 +170,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:43:27 | LL | want::>(f); - | ^ expected usize, found struct `foo` + | ^ expected `usize`, found struct `foo` | = note: expected struct `Foo` found struct `Foo` @@ -208,7 +208,7 @@ error[E0308]: mismatched types LL | want::<&Foo>(f); | ^ | | - | expected &Foo, found struct `Foo` + | expected `&Foo`, found struct `Foo` | help: consider borrowing here: `&f` | = note: expected reference `&Foo` @@ -218,7 +218,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:48:26 | LL | want::<&Foo>(f); - | ^ expected &Foo, found struct `Foo` + | ^ expected `&Foo`, found struct `Foo` | = note: expected reference `&Foo` found struct `Foo` @@ -227,7 +227,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:52:19 | LL | want::(f); - | ^ expected usize, found struct `Foo` + | ^ expected `usize`, found struct `Foo` | = note: expected type `usize` found struct `Foo` @@ -254,7 +254,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:55:24 | LL | want::>(f); - | ^ expected usize, found struct `foo` + | ^ expected `usize`, found struct `foo` | = note: expected struct `Foo` found struct `Foo` @@ -263,7 +263,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:56:27 | LL | want::>(f); - | ^ expected usize, found struct `foo` + | ^ expected `usize`, found struct `foo` | = note: expected struct `Foo` found struct `Foo` @@ -299,7 +299,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:60:23 | LL | want::<&Foo>(f); - | ^ expected &Foo, found struct `Foo` + | ^ expected `&Foo`, found struct `Foo` | = note: expected reference `&Foo` found struct `Foo` @@ -310,7 +310,7 @@ error[E0308]: mismatched types LL | want::<&Foo>(f); | ^ | | - | expected &Foo, found struct `Foo` + | expected `&Foo`, found struct `Foo` | help: consider borrowing here: `&f` | = note: expected reference `&Foo` @@ -320,7 +320,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:65:19 | LL | want::(f); - | ^ expected usize, found struct `Foo` + | ^ expected `usize`, found struct `Foo` | = note: expected type `usize` found struct `Foo` @@ -347,7 +347,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:68:24 | LL | want::>(f); - | ^ expected usize, found struct `foo` + | ^ expected `usize`, found struct `foo` | = note: expected struct `Foo` found struct `Foo` @@ -356,7 +356,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:69:27 | LL | want::>(f); - | ^ expected usize, found struct `foo` + | ^ expected `usize`, found struct `foo` | = note: expected struct `Foo` found struct `Foo` @@ -401,7 +401,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:74:23 | LL | want::<&Foo>(f); - | ^ expected &Foo, found struct `Foo` + | ^ expected `&Foo`, found struct `Foo` | = note: expected reference `&Foo` found struct `Foo` @@ -410,7 +410,7 @@ error[E0308]: mismatched types --> $DIR/type-mismatch.rs:75:26 | LL | want::<&Foo>(f); - | ^ expected &Foo, found struct `Foo` + | ^ expected `&Foo`, found struct `Foo` | = note: expected reference `&Foo` found struct `Foo` diff --git a/src/test/ui/type/type-shadow.stderr b/src/test/ui/type/type-shadow.stderr index 70be30ed53e..b5a80766804 100644 --- a/src/test/ui/type/type-shadow.stderr +++ b/src/test/ui/type/type-shadow.stderr @@ -2,7 +2,7 @@ error[E0308]: mismatched types --> $DIR/type-shadow.rs:6:20 | LL | let y: Y = "hello"; - | ^^^^^^^ expected isize, found &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 aca9c3f558a..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,7 +4,7 @@ error[E0308]: mismatched types LL | fn ice(x: Box>) { | - possibly return type missing here? LL | *x - | ^^ expected (), found trait std::iter::Iterator + | ^^ expected `()`, found trait `std::iter::Iterator` | = note: expected unit type `()` found trait object `(dyn std::iter::Iterator + 'static)` 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 | >::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 | >::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/while-type-error.stderr b/src/test/ui/while-type-error.stderr index 850fcedf39f..529cbff0563 100644 --- a/src/test/ui/while-type-error.stderr +++ b/src/test/ui/while-type-error.stderr @@ -2,7 +2,7 @@ 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 fn item `fn() {main}` diff --git a/src/test/ui/wrong-mul-method-signature.stderr b/src/test/ui/wrong-mul-method-signature.stderr index fb21980805f..c0888b3b9d4 100644 --- a/src/test/ui/wrong-mul-method-signature.stderr +++ b/src/test/ui/wrong-mul-method-signature.stderr @@ -2,7 +2,7 @@ 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 fn pointer `fn(Vec1, f64) -> Vec1` found fn pointer `fn(Vec1, &f64) -> Vec1` @@ -11,7 +11,7 @@ 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 fn pointer `fn(Vec2, Vec2) -> f64` found fn pointer `fn(Vec2, f64) -> Vec2` @@ -20,7 +20,7 @@ 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 fn pointer `fn(Vec3, f64) -> i32` found fn pointer `fn(Vec3, f64) -> f64` @@ -35,7 +35,7 @@ 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 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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