From af91dd213e33d0bbf42ab9baa0fd6260066bfe5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Thu, 29 Feb 2024 16:30:01 +0000 Subject: [PATCH 1/4] Account for unmet `T: !Copy` in E0277 message --- .../src/traits/error_reporting/suggestions.rs | 16 +++++++++++----- tests/ui/traits/negative-bounds/simple.stderr | 8 ++++---- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index e82e94993d249..f95a5be7ff004 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -4773,11 +4773,17 @@ pub(super) fn get_explanation_based_on_obligation<'tcx>( Some(desc) => format!(" {desc}"), None => String::new(), }; - format!( - "{pre_message}the trait `{}` is not implemented for{desc} `{}`{post}", - trait_predicate.print_modifiers_and_trait_path(), - tcx.short_ty_string(trait_ref.skip_binder().self_ty(), &mut None), - ) + if let ty::ImplPolarity::Positive = trait_predicate.polarity() { + format!( + "{pre_message}the trait `{}` is not implemented for{desc} `{}`{post}", + trait_predicate.print_modifiers_and_trait_path(), + tcx.short_ty_string(trait_ref.skip_binder().self_ty(), &mut None), + ) + } else { + // "the trait bound `!Send: T` is not satisfied" reads better than "`!Send` is + // not implemented for `T`". + format!("{pre_message}the trait bound `{trait_predicate}` is not satisfied{post}") + } } } diff --git a/tests/ui/traits/negative-bounds/simple.stderr b/tests/ui/traits/negative-bounds/simple.stderr index 6d750739e197c..b8d12138794bf 100644 --- a/tests/ui/traits/negative-bounds/simple.stderr +++ b/tests/ui/traits/negative-bounds/simple.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait bound `T: !Copy` is not satisfied --> $DIR/simple.rs:10:16 | LL | not_copy::(); - | ^ the trait `!Copy` is not implemented for `T` + | ^ the trait bound `T: !Copy` is not satisfied | note: required by a bound in `not_copy` --> $DIR/simple.rs:3:16 @@ -14,7 +14,7 @@ error[E0277]: the trait bound `T: !Copy` is not satisfied --> $DIR/simple.rs:15:16 | LL | not_copy::(); - | ^ the trait `!Copy` is not implemented for `T` + | ^ the trait bound `T: !Copy` is not satisfied | note: required by a bound in `not_copy` --> $DIR/simple.rs:3:16 @@ -26,7 +26,7 @@ error[E0277]: the trait bound `Copyable: !Copy` is not satisfied --> $DIR/simple.rs:30:16 | LL | not_copy::(); - | ^^^^^^^^ the trait `!Copy` is not implemented for `Copyable` + | ^^^^^^^^ the trait bound `Copyable: !Copy` is not satisfied | = help: the trait `Copy` is implemented for `Copyable` note: required by a bound in `not_copy` @@ -44,7 +44,7 @@ error[E0277]: the trait bound `NotNecessarilyCopyable: !Copy` is not satisfied --> $DIR/simple.rs:37:16 | LL | not_copy::(); - | ^^^^^^^^^^^^^^^^^^^^^^ the trait `!Copy` is not implemented for `NotNecessarilyCopyable` + | ^^^^^^^^^^^^^^^^^^^^^^ the trait bound `NotNecessarilyCopyable: !Copy` is not satisfied | note: required by a bound in `not_copy` --> $DIR/simple.rs:3:16 From 3ea12d49cac435ed1c6a4ace7c2821cd32b57d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Wed, 28 Feb 2024 21:28:33 +0000 Subject: [PATCH 2/4] Reword E0277 default error message ``` error[E0277]: the trait `Copy` is not implemented for `X` --> $DIR/trait-impl-bound-suggestions.rs:14:52 | LL | fn return_the_constrained_type(&self, x: X) -> ConstrainedStruct { | ^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `X` ``` --- .../error_reporting/type_err_ctxt_ext.rs | 13 ++- .../const-generics/hash-tyvid-regression-1.rs | 4 +- .../issue-77708-1.rs | 2 +- .../issue-88022.rs | 8 +- .../diagnostic-derive-doc-comment-field.rs | 4 +- ...diagnostic-derive-doc-comment-field.stderr | 4 +- .../session-diagnostic/diagnostic-derive.rs | 2 +- .../diagnostic-derive.stderr | 2 +- tests/ui/allocator/not-an-allocator.stderr | 8 +- tests/ui/array-slice-vec/repeat_empty_ok.rs | 4 +- .../ui/array-slice-vec/repeat_empty_ok.stderr | 4 +- .../associated-const-array-len.rs | 2 +- .../associated-const-array-len.stderr | 2 +- tests/ui/associated-consts/issue-105330.rs | 4 +- .../ui/associated-consts/issue-105330.stderr | 4 +- .../generic-associated-types-bad.item.stderr | 4 +- .../generic-associated-types-bad.local.stderr | 2 +- .../generic-associated-types-bad.rs | 6 +- .../unsatisfied-bounds-inferred-type.rs | 2 +- .../unsatisfied-bounds-inferred-type.stderr | 2 +- ...tisfied-bounds-where-clause-on-assoc-ty.rs | 2 +- ...ied-bounds-where-clause-on-assoc-ty.stderr | 2 +- ...ed-types-ICE-when-projecting-out-of-err.rs | 2 +- ...ypes-ICE-when-projecting-out-of-err.stderr | 2 +- .../associated-types-bound-failure.stderr | 2 +- .../associated-types-for-unimpl-trait.fixed | 4 +- .../associated-types-for-unimpl-trait.rs | 4 +- .../associated-types-for-unimpl-trait.stderr | 4 +- ...ted-types-invalid-trait-ref-issue-18865.rs | 2 +- ...types-invalid-trait-ref-issue-18865.stderr | 2 +- .../associated-types-no-suitable-bound.rs | 4 +- .../associated-types-no-suitable-bound.stderr | 4 +- ...sociated-types-no-suitable-supertrait-2.rs | 4 +- ...ated-types-no-suitable-supertrait-2.stderr | 4 +- ...associated-types-no-suitable-supertrait.rs | 10 +-- ...ciated-types-no-suitable-supertrait.stderr | 10 +-- .../associated-types-path-2.rs | 8 +- .../associated-types-path-2.stderr | 8 +- ...ted-trait-in-method-without-default.stderr | 2 +- .../associated-types/defaults-suitability.rs | 16 ++-- .../defaults-suitability.stderr | 16 ++-- .../defaults-unsound-62211-1.rs | 4 +- .../defaults-unsound-62211-1.stderr | 4 +- .../defaults-unsound-62211-2.rs | 4 +- .../defaults-unsound-62211-2.stderr | 4 +- .../hr-associated-type-bound-1.rs | 4 +- .../hr-associated-type-bound-1.stderr | 4 +- .../hr-associated-type-bound-object.rs | 8 +- .../hr-associated-type-bound-object.stderr | 8 +- .../hr-associated-type-bound-param-1.rs | 4 +- .../hr-associated-type-bound-param-1.stderr | 4 +- .../hr-associated-type-bound-param-2.rs | 12 +-- .../hr-associated-type-bound-param-2.stderr | 12 +-- .../hr-associated-type-bound-param-3.rs | 4 +- .../hr-associated-type-bound-param-3.stderr | 4 +- .../hr-associated-type-bound-param-4.rs | 4 +- .../hr-associated-type-bound-param-4.stderr | 4 +- .../hr-associated-type-bound-param-5.rs | 6 +- .../hr-associated-type-bound-param-5.stderr | 6 +- .../hr-associated-type-bound-param-6.rs | 6 +- .../hr-associated-type-bound-param-6.stderr | 6 +- .../issue-27675-unchecked-bounds.rs | 2 +- .../issue-27675-unchecked-bounds.stderr | 2 +- tests/ui/associated-types/issue-38821.rs | 36 ++++---- tests/ui/associated-types/issue-38821.stderr | 36 ++++---- .../issue-43784-associated-type.rs | 2 +- .../issue-43784-associated-type.stderr | 2 +- tests/ui/associated-types/issue-43924.rs | 3 +- tests/ui/associated-types/issue-43924.stderr | 4 +- tests/ui/associated-types/issue-59324.rs | 12 +-- tests/ui/associated-types/issue-59324.stderr | 12 +-- tests/ui/associated-types/issue-64855.rs | 2 +- tests/ui/associated-types/issue-64855.stderr | 2 +- tests/ui/associated-types/issue-65774-1.rs | 4 +- .../ui/associated-types/issue-65774-1.stderr | 4 +- tests/ui/associated-types/issue-65774-2.rs | 4 +- .../ui/associated-types/issue-65774-2.stderr | 4 +- .../issue-85103-layout-debug.rs | 2 +- .../issue-85103-layout-debug.stderr | 2 +- .../point-at-type-on-obligation-failure-2.rs | 6 +- ...int-at-type-on-obligation-failure-2.stderr | 6 +- tests/ui/async-await/coroutine-not-future.rs | 6 +- .../async-await/coroutine-not-future.stderr | 6 +- tests/ui/async-await/issue-64130-3-other.rs | 2 +- .../ui/async-await/issue-64130-3-other.stderr | 2 +- tests/ui/async-await/issue-72442.rs | 2 +- tests/ui/async-await/issue-72442.stderr | 2 +- .../str-contains-slice-conceptually.rs | 2 +- .../str-contains-slice-conceptually.stderr | 2 +- ...-default-trait-impl-constituent-types-2.rs | 2 +- ...ault-trait-impl-constituent-types-2.stderr | 2 +- ...ck-default-trait-impl-constituent-types.rs | 2 +- ...efault-trait-impl-constituent-types.stderr | 2 +- .../typeck-default-trait-impl-negation.rs | 4 +- .../typeck-default-trait-impl-negation.stderr | 4 +- .../typeck-default-trait-impl-precedence.rs | 2 +- ...ypeck-default-trait-impl-precedence.stderr | 2 +- tests/ui/block-result/issue-22645.stderr | 2 +- .../coerce-issue-49593-box-never-windows.rs | 4 +- ...ce-issue-49593-box-never.nofallback.stderr | 4 +- .../coercion/coerce-issue-49593-box-never.rs | 4 +- .../coherence-unsafe-trait-object-impl.stderr | 2 +- .../const_param_ty_impl_no_structural_eq.rs | 4 +- ...onst_param_ty_impl_no_structural_eq.stderr | 4 +- .../associated-type-bound-fail.rs | 2 +- .../associated-type-bound-fail.stderr | 2 +- .../defaults/rp_impl_trait_fail.rs | 6 +- .../defaults/rp_impl_trait_fail.stderr | 6 +- .../defaults/trait_objects_fail.rs | 4 +- .../defaults/trait_objects_fail.stderr | 4 +- tests/ui/const-generics/defaults/wfness.rs | 4 +- .../ui/const-generics/defaults/wfness.stderr | 4 +- .../dont-evaluate-array-len-on-err-1.rs | 2 +- .../dont-evaluate-array-len-on-err-1.stderr | 2 +- tests/ui/const-generics/exhaustive-value.rs | 2 +- .../ui/const-generics/exhaustive-value.stderr | 2 +- .../generic_const_exprs/issue-85848.rs | 2 +- .../generic_const_exprs/issue-85848.stderr | 2 +- .../ui/const-generics/issues/issue-61336-2.rs | 2 +- .../issues/issue-61336-2.stderr | 2 +- tests/ui/const-generics/issues/issue-61336.rs | 2 +- .../const-generics/issues/issue-61336.stderr | 2 +- .../ui/const-generics/issues/issue-67185-2.rs | 12 +-- .../issues/issue-67185-2.stderr | 12 +-- tests/ui/const-generics/issues/issue-86530.rs | 2 +- .../const-generics/issues/issue-86530.stderr | 2 +- .../occurs-check/unused-substs-1.rs | 2 +- .../occurs-check/unused-substs-1.stderr | 2 +- .../const-blocks/fn-call-in-non-const.rs | 2 +- .../const-blocks/fn-call-in-non-const.stderr | 2 +- tests/ui/consts/const-blocks/migrate-fail.rs | 4 +- .../consts/const-blocks/migrate-fail.stderr | 4 +- tests/ui/consts/const-blocks/nll-fail.rs | 4 +- tests/ui/consts/const-blocks/nll-fail.stderr | 4 +- tests/ui/consts/const-blocks/trait-error.rs | 2 +- .../ui/consts/const-blocks/trait-error.stderr | 2 +- tests/ui/consts/const-fn-in-vec.rs | 6 +- tests/ui/consts/const-fn-in-vec.stderr | 6 +- .../ct-var-in-collect_all_mismatches.rs | 2 +- .../ct-var-in-collect_all_mismatches.stderr | 2 +- tests/ui/consts/issue-94675.rs | 2 +- tests/ui/consts/missing-larger-array-impl.rs | 2 +- .../consts/missing-larger-array-impl.stderr | 2 +- tests/ui/coroutine/clone-impl-async.rs | 24 ++--- tests/ui/coroutine/clone-impl-async.stderr | 24 ++--- tests/ui/coroutine/clone-impl-static.rs | 4 +- tests/ui/coroutine/clone-impl-static.stderr | 4 +- tests/ui/coroutine/clone-impl.rs | 12 +-- tests/ui/coroutine/clone-impl.stderr | 12 +-- tests/ui/coroutine/gen_block_is_coro.rs | 6 +- tests/ui/coroutine/gen_block_is_coro.stderr | 6 +- tests/ui/coroutine/issue-105084.rs | 2 +- tests/ui/coroutine/issue-105084.stderr | 2 +- tests/ui/cross/cross-fn-cache-hole.rs | 4 +- tests/ui/cross/cross-fn-cache-hole.stderr | 4 +- tests/ui/custom_test_frameworks/mismatch.rs | 2 +- .../ui/custom_test_frameworks/mismatch.stderr | 2 +- ...ives-span-Clone-enum-struct-variant.stderr | 2 +- .../ui/derives/derives-span-Clone-enum.stderr | 2 +- .../derives/derives-span-Clone-struct.stderr | 2 +- .../derives-span-Clone-tuple-struct.stderr | 2 +- .../derives-span-Default-struct.stderr | 2 +- .../derives-span-Default-tuple-struct.stderr | 2 +- ...derives-span-Eq-enum-struct-variant.stderr | 2 +- tests/ui/derives/derives-span-Eq-enum.stderr | 2 +- .../ui/derives/derives-span-Eq-struct.stderr | 2 +- .../derives-span-Eq-tuple-struct.stderr | 2 +- ...rives-span-Hash-enum-struct-variant.stderr | 2 +- .../ui/derives/derives-span-Hash-enum.stderr | 2 +- .../derives/derives-span-Hash-struct.stderr | 2 +- .../derives-span-Hash-tuple-struct.stderr | 2 +- ...erives-span-Ord-enum-struct-variant.stderr | 2 +- tests/ui/derives/derives-span-Ord-enum.stderr | 2 +- .../ui/derives/derives-span-Ord-struct.stderr | 2 +- .../derives-span-Ord-tuple-struct.stderr | 2 +- .../deriving-no-inner-impl-error-message.rs | 2 +- ...eriving-no-inner-impl-error-message.stderr | 2 +- tests/ui/deriving/issue-103157.rs | 2 +- tests/ui/deriving/issue-103157.stderr | 2 +- ...options_of_the_internal_rustc_attribute.rs | 2 +- ...ons_of_the_internal_rustc_attribute.stderr | 2 +- ...o_not_fail_parsing_on_invalid_options_1.rs | 4 +- ...t_fail_parsing_on_invalid_options_1.stderr | 4 +- ...issue-21659-show-relevant-trait-impls-1.rs | 2 +- ...e-21659-show-relevant-trait-impls-1.stderr | 2 +- ...issue-21659-show-relevant-trait-impls-2.rs | 2 +- ...e-21659-show-relevant-trait-impls-2.stderr | 2 +- .../issue-39802-show-5-trait-impls.rs | 6 +- .../issue-39802-show-5-trait-impls.stderr | 6 +- .../dropck/explicit-drop-bounds.bad1.stderr | 4 +- .../dropck/explicit-drop-bounds.bad2.stderr | 4 +- tests/ui/dropck/explicit-drop-bounds.rs | 8 +- tests/ui/dst/dst-bad-coerce1.rs | 4 +- tests/ui/dst/dst-bad-coerce1.stderr | 4 +- ...ue-90528-unsizing-not-suggestion-110063.rs | 4 +- ...0528-unsizing-not-suggestion-110063.stderr | 4 +- .../dst/issue-90528-unsizing-suggestion-1.rs | 6 +- .../issue-90528-unsizing-suggestion-1.stderr | 6 +- .../dst/issue-90528-unsizing-suggestion-2.rs | 10 +-- .../issue-90528-unsizing-suggestion-2.stderr | 10 +-- .../dst/issue-90528-unsizing-suggestion-3.rs | 8 +- .../issue-90528-unsizing-suggestion-3.stderr | 8 +- .../dst/issue-90528-unsizing-suggestion-4.rs | 8 +- .../issue-90528-unsizing-suggestion-4.stderr | 8 +- tests/ui/dyn-star/error.rs | 2 +- tests/ui/dyn-star/error.stderr | 2 +- tests/ui/error-codes/E0229.rs | 4 +- tests/ui/error-codes/E0229.stderr | 4 +- tests/ui/error-codes/E0277.rs | 2 +- tests/ui/error-codes/E0277.stderr | 2 +- tests/ui/error-should-say-copy-not-pod.rs | 2 +- tests/ui/error-should-say-copy-not-pod.stderr | 2 +- .../blame-trait-error.rs | 26 +++--- .../blame-trait-error.stderr | 26 +++--- .../blame-trait-error-spans-on-exprs.rs | 28 +++--- .../blame-trait-error-spans-on-exprs.stderr | 28 +++--- .../feature-gate-trivial_bounds.stderr | 14 +-- tests/ui/fmt/ifmt-unimpl.rs | 2 +- tests/ui/fmt/ifmt-unimpl.stderr | 2 +- tests/ui/for/issue-20605.next.stderr | 2 +- tests/ui/for/issue-20605.rs | 2 +- ...-gat-normalization-for-nested-goals.stderr | 2 +- .../cross-crate-bounds.rs | 2 +- .../cross-crate-bounds.stderr | 2 +- .../generic-associated-types/impl_bounds.rs | 4 +- .../impl_bounds.stderr | 4 +- .../generic-associated-types/issue-101020.rs | 2 +- .../issue-101020.stderr | 2 +- .../issue-68641-check-gat-bounds.rs | 2 +- .../issue-68641-check-gat-bounds.stderr | 2 +- .../generic-associated-types/issue-74816.rs | 2 +- .../issue-74816.stderr | 2 +- .../generic-associated-types/issue-74824.rs | 4 +- .../issue-74824.stderr | 4 +- .../generic-associated-types/issue-79636-1.rs | 2 +- .../issue-79636-1.stderr | 2 +- .../multiple-type-params-with-unmet-bounds.rs | 2 +- ...tiple-type-params-with-unmet-bounds.stderr | 2 +- .../own-bound-span.rs | 2 +- .../own-bound-span.stderr | 2 +- .../type-param-defaults.rs | 2 +- .../type-param-defaults.stderr | 2 +- .../unknown-lifetime-ice-119827.rs | 2 +- .../unknown-lifetime-ice-119827.stderr | 2 +- .../trivially-unsatisfied-bounds-0.rs | 2 +- .../trivially-unsatisfied-bounds-0.stderr | 2 +- .../generic-const-items/unsatisfied-bounds.rs | 8 +- .../unsatisfied-bounds.stderr | 8 +- ...igher-ranker-supertraits-transitive.stderr | 2 +- .../hrtb-higher-ranker-supertraits.rs | 4 +- .../hrtb-higher-ranker-supertraits.stderr | 4 +- .../normalize-under-binder/issue-85455.rs | 4 +- .../normalize-under-binder/issue-85455.stderr | 4 +- .../normalize-under-binder/issue-89118.rs | 6 +- .../normalize-under-binder/issue-89118.stderr | 6 +- ...plicit-hrtb-without-dyn.edition2015.stderr | 2 +- ...plicit-hrtb-without-dyn.edition2021.stderr | 2 +- .../generic-with-implicit-hrtb-without-dyn.rs | 4 +- tests/ui/impl-trait/impl_trait_projections.rs | 4 +- .../impl-trait/impl_trait_projections.stderr | 4 +- ...ctive-visibilities-during-object-safety.rs | 4 +- ...e-visibilities-during-object-safety.stderr | 4 +- tests/ui/impl-trait/in-trait/issue-102140.rs | 4 +- .../impl-trait/in-trait/issue-102140.stderr | 4 +- .../in-trait/return-dont-satisfy-bounds.rs | 4 +- .../return-dont-satisfy-bounds.stderr | 4 +- tests/ui/impl-trait/issue-55872-1.rs | 4 +- tests/ui/impl-trait/issue-55872-1.stderr | 4 +- tests/ui/impl-trait/issue-55872-3.rs | 2 +- tests/ui/impl-trait/issue-55872-3.stderr | 2 +- tests/ui/impl-trait/issues/issue-62742.rs | 6 +- tests/ui/impl-trait/issues/issue-62742.stderr | 6 +- tests/ui/impl-trait/nested-rpit-hrtb.rs | 6 +- tests/ui/impl-trait/nested-rpit-hrtb.stderr | 6 +- tests/ui/impl-trait/nested_impl_trait.rs | 4 +- tests/ui/impl-trait/nested_impl_trait.stderr | 4 +- ...int-at-index-for-obligation-failure.stderr | 2 +- tests/ui/issues/issue-18611.rs | 4 +- tests/ui/issues/issue-18611.stderr | 4 +- .../issue-1920-absolute-paths/issue-1920-1.rs | 2 +- .../issue-1920-1.stderr | 2 +- .../issue-1920-absolute-paths/issue-1920-2.rs | 2 +- .../issue-1920-2.stderr | 2 +- .../issue-1920-absolute-paths/issue-1920-3.rs | 2 +- .../issue-1920-3.stderr | 2 +- tests/ui/issues/issue-20162.rs | 2 +- tests/ui/issues/issue-20162.stderr | 2 +- tests/ui/issues/issue-21160.rs | 2 +- tests/ui/issues/issue-21160.stderr | 2 +- tests/ui/issues/issue-21837.rs | 2 +- tests/ui/issues/issue-21837.stderr | 2 +- tests/ui/issues/issue-25076.rs | 2 +- tests/ui/issues/issue-25076.stderr | 2 +- tests/ui/issues/issue-27340.rs | 2 +- tests/ui/issues/issue-27340.stderr | 2 +- tests/ui/issues/issue-35570.rs | 4 +- tests/ui/issues/issue-35570.stderr | 4 +- tests/ui/issues/issue-45801.rs | 2 +- tests/ui/issues/issue-45801.stderr | 2 +- tests/ui/issues/issue-60218.stderr | 2 +- tests/ui/issues/issue-66353.rs | 4 +- tests/ui/issues/issue-66353.stderr | 4 +- tests/ui/kindck/kindck-copy.rs | 22 ++--- tests/ui/kindck/kindck-copy.stderr | 22 ++--- tests/ui/kindck/kindck-impl-type-params-2.rs | 2 +- .../kindck/kindck-impl-type-params-2.stderr | 2 +- tests/ui/kindck/kindck-impl-type-params.rs | 8 +- .../ui/kindck/kindck-impl-type-params.stderr | 8 +- .../kindck-inherited-copy-bound.curr.stderr | 2 +- ...copy-bound.object_safe_for_dispatch.stderr | 2 +- ...has-lazy-type-aliases.locally_eager.stderr | 2 +- ...-has-lazy-type-aliases.locally_lazy.stderr | 2 +- .../extern-crate-has-lazy-type-aliases.rs | 2 +- .../lazy-type-alias/trailing-where-clause.rs | 2 +- .../trailing-where-clause.stderr | 2 +- .../could-not-resolve-issue-121503.rs | 2 +- .../could-not-resolve-issue-121503.stderr | 2 +- .../lifetime-elision-return-type-trait.rs | 2 +- .../lifetime-elision-return-type-trait.stderr | 2 +- tests/ui/malformed/malformed-derive-entry.rs | 4 +- .../malformed/malformed-derive-entry.stderr | 4 +- .../overlap-marker-trait.stderr | 2 +- tests/ui/namespace/namespace-mix.stderr | 88 +++++++++---------- .../defaulted-never-note.fallback.stderr | 2 +- tests/ui/never_type/defaulted-never-note.rs | 2 +- ...diverging-fallback-no-leak.fallback.stderr | 2 +- .../never_type/diverging-fallback-no-leak.rs | 2 +- .../feature-gate-never_type_fallback.stderr | 2 +- tests/ui/never_type/impl_trait_fallback2.rs | 4 +- .../ui/never_type/impl_trait_fallback2.stderr | 4 +- tests/ui/never_type/impl_trait_fallback3.rs | 2 +- .../ui/never_type/impl_trait_fallback3.stderr | 2 +- tests/ui/never_type/impl_trait_fallback4.rs | 2 +- .../ui/never_type/impl_trait_fallback4.stderr | 2 +- ...lue-fallback-issue-66757.nofallback.stderr | 2 +- .../never-value-fallback-issue-66757.rs | 2 +- tests/ui/not-clone-closure.rs | 2 +- tests/ui/not-clone-closure.stderr | 2 +- ...lifetime-default-dyn-binding-nonstatic3.rs | 2 +- ...time-default-dyn-binding-nonstatic3.stderr | 2 +- tests/ui/on-unimplemented/impl-substs.rs | 2 +- tests/ui/on-unimplemented/impl-substs.stderr | 2 +- .../ui/on-unimplemented/multiple-impls.stderr | 12 +-- tests/ui/on-unimplemented/on-impl.stderr | 4 +- tests/ui/on-unimplemented/on-trait.stderr | 4 +- tests/ui/on-unimplemented/parent-label.rs | 8 +- tests/ui/on-unimplemented/parent-label.stderr | 8 +- .../impl-item-type-no-body-semantic-fail.rs | 4 +- ...mpl-item-type-no-body-semantic-fail.stderr | 4 +- .../sealed-traits/sealed-trait-local.rs | 6 +- .../sealed-traits/sealed-trait-local.stderr | 6 +- tests/ui/proc-macro/bad-projection.rs | 6 +- tests/ui/proc-macro/bad-projection.stderr | 6 +- .../issue-104884-trait-impl-sugg-err.rs | 2 +- .../issue-104884-trait-impl-sugg-err.stderr | 2 +- tests/ui/range/range-1.rs | 2 +- tests/ui/range/range-1.stderr | 2 +- tests/ui/range/range_traits-1.stderr | 12 +-- ...ions-implied-bounds-projection-gap-hr-1.rs | 4 +- ...-implied-bounds-projection-gap-hr-1.stderr | 4 +- .../repeat-expr/repeat-to-run-dtor-twice.rs | 2 +- .../repeat-to-run-dtor-twice.stderr | 2 +- .../issue-103052-1.rs | 2 +- .../issue-103052-1.stderr | 2 +- .../issue-103052-2.rs | 2 +- .../issue-103052-2.stderr | 2 +- .../termination-trait-test-wrong-type.stderr | 2 +- .../feature-gate-do_not_recommend.rs | 2 +- .../feature-gate-do_not_recommend.stderr | 2 +- ...-type-const-bound-usage-0.qualified.stderr | 2 +- ...-type-const-bound-usage-1.qualified.stderr | 2 +- .../rfc-2632-const-trait-impl/assoc-type.rs | 2 +- .../assoc-type.stderr | 2 +- .../call-const-trait-method-fail.rs | 2 +- .../call-const-trait-method-fail.stderr | 2 +- .../call-generic-method-nonconst.rs | 2 +- .../call-generic-method-nonconst.stderr | 2 +- .../const-default-method-bodies.rs | 2 +- .../const-default-method-bodies.stderr | 2 +- .../cross-crate.gatednc.stderr | 2 +- .../rfc-2632-const-trait-impl/cross-crate.rs | 2 +- ...ault-method-body-is-const-body-checking.rs | 2 +- ...ault-method-body-is-const-same-trait-ck.rs | 2 +- ...-method-body-is-const-same-trait-ck.stderr | 2 +- .../effects/project.stderr | 10 +-- .../rfc-2632-const-trait-impl/issue-102985.rs | 4 +- .../rfc-2632-const-trait-impl/issue-88155.rs | 2 +- .../specializing-constness-2.rs | 2 +- .../super-traits-fail.rs | 2 +- .../trait-where-clause-const.rs | 4 +- .../trait-where-clause-const.stderr | 4 +- .../trait-where-clause.rs | 4 +- .../trait-where-clause.stderr | 4 +- .../unsatisfied-const-trait-bound.rs | 2 +- .../unsatisfied-const-trait-bound.stderr | 2 +- tests/ui/span/issue-29595.rs | 2 +- tests/ui/span/issue-29595.stderr | 2 +- .../default-associated-type-bound-1.rs | 2 +- .../default-associated-type-bound-1.stderr | 2 +- .../defaultimpl/specialization-wfcheck.rs | 2 +- .../defaultimpl/specialization-wfcheck.stderr | 2 +- tests/ui/specialization/issue-33017.rs | 2 +- tests/ui/specialization/issue-33017.stderr | 2 +- tests/ui/specialization/issue-38091.rs | 2 +- tests/ui/specialization/issue-38091.stderr | 2 +- tests/ui/specialization/issue-44861.rs | 2 +- tests/ui/specialization/issue-44861.stderr | 2 +- tests/ui/specialization/issue-59435.rs | 2 +- tests/ui/specialization/issue-59435.stderr | 2 +- .../min_specialization/issue-79224.rs | 8 +- .../min_specialization/issue-79224.stderr | 8 +- tests/ui/structs/struct-path-alias-bounds.rs | 2 +- .../structs/struct-path-alias-bounds.stderr | 2 +- tests/ui/suggestions/assoc-const-as-fn.rs | 2 +- tests/ui/suggestions/assoc-const-as-fn.stderr | 2 +- .../suggestions/call-on-unimplemented-ctor.rs | 2 +- .../call-on-unimplemented-ctor.stderr | 2 +- .../call-on-unimplemented-fn-ptr.rs | 2 +- .../call-on-unimplemented-fn-ptr.stderr | 2 +- .../call-on-unimplemented-with-autoderef.rs | 2 +- ...all-on-unimplemented-with-autoderef.stderr | 2 +- ...correct-binder-for-arbitrary-bound-sugg.rs | 2 +- ...ect-binder-for-arbitrary-bound-sugg.stderr | 2 +- .../ui/suggestions/derive-clone-for-eq.stderr | 2 +- .../derive-macro-missing-bounds.rs | 8 +- .../derive-macro-missing-bounds.stderr | 8 +- ...rg-where-it-should-have-been-called.stderr | 4 +- ...-ref-trait-object-literal-bound-regions.rs | 2 +- ...-trait-object-literal-bound-regions.stderr | 2 +- .../imm-ref-trait-object-literal.rs | 2 +- .../imm-ref-trait-object-literal.stderr | 2 +- .../impl-trait-return-trailing-semicolon.rs | 4 +- ...mpl-trait-return-trailing-semicolon.stderr | 4 +- tests/ui/suggestions/into-str.rs | 2 +- tests/ui/suggestions/into-str.stderr | 2 +- tests/ui/suggestions/issue-101623.rs | 2 +- tests/ui/suggestions/issue-101623.stderr | 2 +- tests/ui/suggestions/issue-105645.rs | 2 +- tests/ui/suggestions/issue-105645.stderr | 2 +- .../issue-106443-sugg-clone-for-bound.rs | 4 +- .../issue-106443-sugg-clone-for-bound.stderr | 4 +- .../suggestions/issue-71394-no-from-impl.rs | 2 +- .../issue-71394-no-from-impl.stderr | 2 +- tests/ui/suggestions/issue-84973-blacklist.rs | 4 +- .../suggestions/issue-84973-blacklist.stderr | 4 +- tests/ui/suggestions/issue-84973-negative.rs | 2 +- .../suggestions/issue-84973-negative.stderr | 2 +- tests/ui/suggestions/issue-88696.stderr | 2 +- tests/ui/suggestions/issue-89333.rs | 2 +- tests/ui/suggestions/issue-89333.stderr | 2 +- tests/ui/suggestions/issue-96223.rs | 2 +- tests/ui/suggestions/issue-96223.stderr | 2 +- tests/ui/suggestions/issue-99080.rs | 2 +- tests/ui/suggestions/issue-99080.stderr | 2 +- .../missing-bound-in-derive-copy-impl-2.fixed | 8 +- .../missing-bound-in-derive-copy-impl-2.rs | 8 +- ...missing-bound-in-derive-copy-impl-2.stderr | 8 +- .../missing-bound-in-derive-copy-impl.rs | 8 +- .../missing-bound-in-derive-copy-impl.stderr | 8 +- .../suggestions/mut-borrow-needed-by-trait.rs | 4 +- .../mut-borrow-needed-by-trait.stderr | 4 +- tests/ui/suggestions/suggest-change-mut.rs | 2 +- .../ui/suggestions/suggest-change-mut.stderr | 2 +- .../ui/test-attrs/test-function-signature.rs | 2 +- .../test-attrs/test-function-signature.stderr | 2 +- .../trait-bounds/issue-119530-sugg-from-fn.rs | 2 +- .../issue-119530-sugg-from-fn.stderr | 2 +- tests/ui/trait-bounds/issue-82038.stderr | 2 +- tests/ui/trait-impl-bound-suggestions.fixed | 8 +- tests/ui/trait-impl-bound-suggestions.rs | 8 +- tests/ui/trait-impl-bound-suggestions.stderr | 8 +- tests/ui/traits/alias/wf.rs | 2 +- tests/ui/traits/alias/wf.stderr | 2 +- .../check-trait-object-bounds-1.rs | 2 +- .../check-trait-object-bounds-1.stderr | 2 +- .../check-trait-object-bounds-4.rs | 2 +- .../check-trait-object-bounds-4.stderr | 2 +- .../bound/on-structs-and-enums-in-fns.stderr | 4 +- .../on-structs-and-enums-in-impls.stderr | 2 +- .../bound/on-structs-and-enums-locals.stderr | 4 +- .../bound/on-structs-and-enums-static.stderr | 4 +- .../bound/on-structs-and-enums-xc.stderr | 4 +- .../bound/on-structs-and-enums-xc1.stderr | 4 +- tests/ui/traits/bound/on-structs-and-enums.rs | 2 +- .../traits/bound/on-structs-and-enums.stderr | 14 +-- tests/ui/traits/bound/same-crate-name.stderr | 8 +- tests/ui/traits/coercion-generic-bad.rs | 2 +- tests/ui/traits/coercion-generic-bad.stderr | 2 +- tests/ui/traits/copy-impl-cannot-normalize.rs | 2 +- .../traits/copy-impl-cannot-normalize.stderr | 2 +- .../deny-builtin-object-impl.current.stderr | 2 +- .../deny-builtin-object-impl.next.stderr | 2 +- tests/ui/traits/deny-builtin-object-impl.rs | 2 +- .../dont-autoderef-ty-with-escaping-var.rs | 2 +- ...dont-autoderef-ty-with-escaping-var.stderr | 2 +- tests/ui/traits/fn-trait-cast-diagnostic.rs | 4 +- .../ui/traits/fn-trait-cast-diagnostic.stderr | 4 +- tests/ui/traits/impl-bounds-checking.rs | 2 +- tests/ui/traits/impl-bounds-checking.stderr | 2 +- .../supertrait-auto-trait.stderr | 2 +- .../inheritance/repeated-supertrait-ambig.rs | 10 +-- .../repeated-supertrait-ambig.stderr | 10 +-- tests/ui/traits/issue-32963.rs | 2 +- tests/ui/traits/issue-32963.stderr | 2 +- tests/ui/traits/issue-43784-supertrait.rs | 2 +- tests/ui/traits/issue-43784-supertrait.stderr | 2 +- tests/ui/traits/issue-71036.rs | 2 +- tests/ui/traits/issue-71036.stderr | 2 +- tests/ui/traits/issue-71136.stderr | 2 +- tests/ui/traits/issue-79458.rs | 2 +- tests/ui/traits/issue-79458.stderr | 2 +- tests/ui/traits/issue-91594.rs | 2 +- tests/ui/traits/issue-91594.stderr | 2 +- tests/ui/traits/issue-97576.rs | 2 +- tests/ui/traits/issue-97576.stderr | 2 +- tests/ui/traits/issue-99875.rs | 4 +- tests/ui/traits/issue-99875.stderr | 4 +- tests/ui/traits/map-types.rs | 2 +- tests/ui/traits/map-types.stderr | 2 +- .../opaque-type-unsatisfied-bound.rs | 2 +- .../opaque-type-unsatisfied-bound.stderr | 2 +- tests/ui/traits/negative-bounds/simple.rs | 8 +- .../const-param-placeholder.fail.stderr | 2 +- .../next-solver/const-param-placeholder.rs | 2 +- .../traits/next-solver/coroutine.fail.stderr | 2 +- tests/ui/traits/next-solver/coroutine.rs | 2 +- .../incompleteness-unstable-result.rs | 2 +- .../incompleteness-unstable-result.stderr | 2 +- .../cycles/inductive-cycle-but-err.rs | 2 +- .../cycles/inductive-cycle-but-err.stderr | 2 +- .../param-candidate-shadows-project.rs | 2 +- .../param-candidate-shadows-project.stderr | 2 +- .../traits/next-solver/more-object-bound.rs | 2 +- .../next-solver/more-object-bound.stderr | 2 +- .../ui/traits/next-solver/object-unsafety.rs | 2 +- .../traits/next-solver/object-unsafety.stderr | 2 +- .../next-solver/projection-discr-kind.rs | 2 +- .../next-solver/projection-discr-kind.stderr | 2 +- .../stall-num-var-auto-trait.fallback.stderr | 2 +- .../next-solver/stall-num-var-auto-trait.rs | 2 +- ...valuated-const-impl-trait-ref.fails.stderr | 2 +- .../unevaluated-const-impl-trait-ref.rs | 2 +- .../non_lifetime_binders/bad-copy-cond.rs | 2 +- .../non_lifetime_binders/bad-copy-cond.stderr | 2 +- tests/ui/traits/non_lifetime_binders/fail.rs | 2 +- .../traits/non_lifetime_binders/fail.stderr | 2 +- .../non_lifetime_binders/universe-error1.rs | 2 +- .../universe-error1.stderr | 2 +- tests/ui/traits/object-does-not-impl-trait.rs | 2 +- .../traits/object-does-not-impl-trait.stderr | 2 +- .../reservation-impl/no-use.next.stderr | 2 +- .../traits/reservation-impl/no-use.old.stderr | 2 +- tests/ui/traits/reservation-impl/no-use.rs | 2 +- .../suggest-dereferences/issue-39029.fixed | 2 +- .../suggest-dereferences/issue-39029.rs | 2 +- .../suggest-dereferences/issue-39029.stderr | 2 +- .../suggest-dereferences/issue-62530.fixed | 2 +- .../suggest-dereferences/issue-62530.rs | 2 +- .../suggest-dereferences/issue-62530.stderr | 2 +- .../suggest-dereferences/multiple-0.fixed | 2 +- .../traits/suggest-dereferences/multiple-0.rs | 2 +- .../suggest-dereferences/multiple-0.stderr | 2 +- .../traits/suggest-dereferences/multiple-1.rs | 2 +- .../suggest-dereferences/multiple-1.stderr | 2 +- ...gest-dereferencing-receiver-argument.fixed | 2 +- ...suggest-dereferencing-receiver-argument.rs | 2 +- ...est-dereferencing-receiver-argument.stderr | 2 +- tests/ui/traits/suggest-where-clause.rs | 6 +- tests/ui/traits/suggest-where-clause.stderr | 6 +- tests/ui/traits/vtable-res-trait-param.rs | 2 +- tests/ui/traits/vtable-res-trait-param.stderr | 2 +- .../trivial-bounds/trivial-bounds-leak.stderr | 4 +- tests/ui/try-trait/try-operator-on-main.rs | 2 +- .../ui/try-trait/try-operator-on-main.stderr | 2 +- .../bounds-are-checked-2.rs | 2 +- .../bounds-are-checked-2.stderr | 2 +- tests/ui/type-alias-impl-trait/future.rs | 2 +- tests/ui/type-alias-impl-trait/future.stderr | 2 +- .../generic_duplicate_param_use9.rs | 2 +- .../generic_duplicate_param_use9.stderr | 2 +- .../generic_underconstrained.rs | 4 +- .../generic_underconstrained.stderr | 4 +- .../impl_trait_for_tait_bound.rs | 2 +- .../impl_trait_for_tait_bound.stderr | 2 +- .../impl_trait_for_tait_bound2.rs | 2 +- .../impl_trait_for_tait_bound2.stderr | 2 +- tests/ui/type-alias-impl-trait/issue-52843.rs | 2 +- .../type-alias-impl-trait/issue-52843.stderr | 2 +- .../ui/type-alias-impl-trait/issue-53092-2.rs | 2 +- .../issue-53092-2.stderr | 2 +- tests/ui/type-alias-impl-trait/issue-53092.rs | 2 +- .../type-alias-impl-trait/issue-53092.stderr | 2 +- tests/ui/type-alias-impl-trait/issue-60371.rs | 2 +- .../type-alias-impl-trait/issue-60371.stderr | 2 +- tests/ui/type-alias-impl-trait/issue-89686.rs | 2 +- .../type-alias-impl-trait/issue-89686.stderr | 2 +- .../ui/type-alias-impl-trait/issue-90400-1.rs | 2 +- .../issue-90400-1.stderr | 2 +- .../ui/type-alias-impl-trait/issue-90400-2.rs | 2 +- .../issue-90400-2.stderr | 2 +- .../multiple-def-uses-in-one-fn.rs | 2 +- .../multiple-def-uses-in-one-fn.stderr | 2 +- .../nested-tait-inference.rs | 2 +- .../nested-tait-inference.stderr | 2 +- .../nested-tait-inference2.rs | 2 +- .../nested-tait-inference2.stderr | 2 +- .../not_a_defining_use.rs | 2 +- .../not_a_defining_use.stderr | 2 +- .../underconstrained_generic.rs | 2 +- .../underconstrained_generic.stderr | 2 +- .../type-alias-impl-trait/wf-check-fn-def.rs | 2 +- .../wf-check-fn-def.stderr | 2 +- .../wf_check_closures.rs | 2 +- .../wf_check_closures.stderr | 2 +- tests/ui/type/type-check-defaults.rs | 8 +- tests/ui/type/type-check-defaults.stderr | 8 +- .../type-params-in-different-spaces-2.stderr | 4 +- tests/ui/typeck/bad-index-due-to-nested.rs | 4 +- .../ui/typeck/bad-index-due-to-nested.stderr | 4 +- tests/ui/typeck/escaping_bound_vars.rs | 4 +- tests/ui/typeck/escaping_bound_vars.stderr | 4 +- tests/ui/typeck/issue-90101.stderr | 2 +- ...0804-incorrect-reference-suggestion.stderr | 2 +- .../unboxed-closure-sugar-default.stderr | 2 +- .../unboxed-closure-sugar-equiv.stderr | 2 +- .../unevaluated_fixed_size_array_len.stderr | 2 +- tests/ui/union/issue-81199.rs | 2 +- tests/ui/union/issue-81199.stderr | 2 +- .../projection-as-union-type-error-2.stderr | 2 +- .../projection-as-union-type-error.stderr | 2 +- tests/ui/union/union-derive-clone.rs | 2 +- tests/ui/union/union-derive-clone.stderr | 2 +- tests/ui/union/union-derive-eq.rs | 2 +- tests/ui/union/union-derive-eq.stderr | 2 +- tests/ui/union/union-generic.rs | 4 +- tests/ui/union/union-generic.stderr | 4 +- tests/ui/unsized/issue-71659.current.stderr | 2 +- tests/ui/unsized/issue-71659.next.stderr | 2 +- tests/ui/unsized/issue-71659.rs | 2 +- tests/ui/unsized/issue-75707.rs | 2 +- tests/ui/unsized/issue-75707.stderr | 2 +- tests/ui/wf/hir-wf-canonicalized.rs | 4 +- tests/ui/wf/hir-wf-canonicalized.stderr | 4 +- tests/ui/wf/issue-103573.rs | 2 +- tests/ui/wf/issue-103573.stderr | 2 +- tests/ui/wf/issue-95665.rs | 2 +- tests/ui/wf/issue-95665.stderr | 2 +- tests/ui/wf/issue-96810.rs | 2 +- tests/ui/wf/issue-96810.stderr | 2 +- tests/ui/wf/wf-complex-assoc-type.rs | 2 +- tests/ui/wf/wf-complex-assoc-type.stderr | 2 +- tests/ui/wf/wf-const-type.stderr | 4 +- tests/ui/wf/wf-enum-bound.stderr | 2 +- .../wf/wf-enum-fields-struct-variant.stderr | 2 +- tests/ui/wf/wf-enum-fields.stderr | 2 +- tests/ui/wf/wf-fn-where-clause.stderr | 2 +- tests/ui/wf/wf-foreign-fn-decl-ret.rs | 4 +- tests/ui/wf/wf-foreign-fn-decl-ret.stderr | 4 +- tests/ui/wf/wf-impl-associated-type-trait.rs | 2 +- .../wf/wf-impl-associated-type-trait.stderr | 2 +- tests/ui/wf/wf-in-fn-arg.stderr | 2 +- tests/ui/wf/wf-in-fn-ret.stderr | 2 +- tests/ui/wf/wf-in-fn-type-arg.stderr | 2 +- tests/ui/wf/wf-in-fn-type-ret.stderr | 2 +- tests/ui/wf/wf-in-fn-where-clause.stderr | 2 +- tests/ui/wf/wf-in-obj-type-trait.stderr | 2 +- ...f-inherent-impl-method-where-clause.stderr | 2 +- .../wf/wf-inherent-impl-where-clause.stderr | 2 +- ...-packed-on-proj-of-type-as-unimpl-trait.rs | 2 +- ...ked-on-proj-of-type-as-unimpl-trait.stderr | 2 +- tests/ui/wf/wf-static-type.stderr | 4 +- tests/ui/wf/wf-struct-bound.stderr | 2 +- tests/ui/wf/wf-struct-field.stderr | 2 +- .../wf/wf-trait-associated-type-bound.stderr | 2 +- .../wf/wf-trait-associated-type-trait.stderr | 2 +- tests/ui/wf/wf-trait-bound.stderr | 2 +- tests/ui/wf/wf-trait-default-fn-arg.stderr | 2 +- tests/ui/wf/wf-trait-default-fn-ret.stderr | 2 +- .../wf-trait-default-fn-where-clause.stderr | 2 +- tests/ui/wf/wf-trait-fn-arg.stderr | 2 +- tests/ui/wf/wf-trait-fn-ret.stderr | 2 +- tests/ui/wf/wf-trait-fn-where-clause.stderr | 2 +- tests/ui/wf/wf-trait-superbound.stderr | 2 +- .../higher-ranked-fn-type.quiet.stderr | 2 +- .../ui/where-clauses/higher-ranked-fn-type.rs | 4 +- .../higher-ranked-fn-type.verbose.stderr | 2 +- .../self-in-where-clause-allowed.rs | 2 +- .../self-in-where-clause-allowed.stderr | 2 +- ...constraints-are-local-for-inherent-impl.rs | 2 +- ...traints-are-local-for-inherent-impl.stderr | 2 +- ...se-constraints-are-local-for-trait-impl.rs | 2 +- ...onstraints-are-local-for-trait-impl.stderr | 2 +- .../where-clause-method-substituion.rs | 2 +- .../where-clause-method-substituion.stderr | 2 +- .../where-clauses-method-unsatisfied.rs | 2 +- .../where-clauses-method-unsatisfied.stderr | 2 +- .../where-clauses-unsatisfied.rs | 2 +- .../where-clauses-unsatisfied.stderr | 2 +- 698 files changed, 1282 insertions(+), 1270 deletions(-) diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs index dcbb63f00f78b..12deaa38854ab 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs @@ -2941,7 +2941,18 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { } }) .unwrap_or_else(|| { - format!("the trait bound `{trait_predicate}` is not satisfied{post_message}") + if let ty::ImplPolarity::Positive = trait_predicate.polarity() { + format!( + "the trait `{}` is not implemented for `{}`{post_message}", + trait_predicate.print_modifiers_and_trait_path(), + self.tcx + .short_ty_string(trait_predicate.skip_binder().self_ty(), &mut None), + ) + } else { + // "the trait bound `!Send: T` is not satisfied" reads better than "`!Send` is + // not implemented for `T`". + format!("the trait bound `{trait_predicate}` is not satisfied{post_message}") + } }) } diff --git a/tests/incremental/const-generics/hash-tyvid-regression-1.rs b/tests/incremental/const-generics/hash-tyvid-regression-1.rs index 727dceb2d2729..2e8de5c200e9d 100644 --- a/tests/incremental/const-generics/hash-tyvid-regression-1.rs +++ b/tests/incremental/const-generics/hash-tyvid-regression-1.rs @@ -20,8 +20,8 @@ where { use std::convert::TryFrom; <[T; N.get()]>::try_from(()) - //~^ error: the trait bound - //~| error: the trait bound + //~^ ERROR the trait `From<()>` is not implemented for `[T; N.get()]` + //~| ERROR the trait `From<()>` is not implemented for `[T; N.get()]` //~| error: mismatched types } diff --git a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-1.rs b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-1.rs index 0233a0b197ab1..78ba04a2a0bf1 100644 --- a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-1.rs +++ b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-77708-1.rs @@ -11,7 +11,7 @@ where C: Delegates>, { writes_to_specific_path(&cap); - //~^ error: the trait bound + //~^ ERROR the trait `Delegates>` is not implemented for `&C` } fn writes_to_specific_path(cap: &C) diff --git a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-88022.rs b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-88022.rs index 99eb92f432c27..27c4c63d28f6f 100644 --- a/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-88022.rs +++ b/tests/incremental/const-generics/try_unify_abstract_const_regression_tests/issue-88022.rs @@ -14,13 +14,13 @@ where [(); { S * 2 }]: Default; impl<'a, T, const S: usize> Iterator for BufferIter<'a, T, S> { - //~^ error: the trait bound - //~^^ error: unconstrained generic constant + //~^ ERROR the trait `Default` is not implemented for `[(); { S * 2 }]` + //~| ERROR unconstrained generic constant type Item = &'a T; fn next(&mut self) -> Option { - //~^ error: the trait bound - //~^^ error: unconstrained generic constant + //~^ ERROR the trait `Default` is not implemented for `[(); { S * 2 }]` + //~| ERROR unconstrained generic constant None } } diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs index 90bea03ffd5e1..de3bea1808564 100644 --- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs +++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs @@ -34,7 +34,7 @@ struct Test { span: Span, /// A doc comment arg: NotIntoDiagnosticArg, - //~^ ERROR the trait bound `NotIntoDiagnosticArg: IntoDiagnosticArg` is not satisfied + //~^ ERROR trait `IntoDiagnosticArg` is not implemented for `NotIntoDiagnosticArg` } #[derive(Subdiagnostic)] @@ -44,5 +44,5 @@ struct SubTest { span: Span, /// A doc comment arg: NotIntoDiagnosticArg, - //~^ ERROR the trait bound `NotIntoDiagnosticArg: IntoDiagnosticArg` is not satisfied + //~^ ERROR trait `IntoDiagnosticArg` is not implemented for `NotIntoDiagnosticArg` } diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr index 98600d2822951..2b115d11d93f1 100644 --- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr +++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `NotIntoDiagnosticArg: IntoDiagnosticArg` is not satisfied +error[E0277]: the trait `IntoDiagnosticArg` is not implemented for `NotIntoDiagnosticArg` --> $DIR/diagnostic-derive-doc-comment-field.rs:36:10 | LL | #[derive(Diagnostic)] @@ -12,7 +12,7 @@ note: required by a bound in `Diag::<'a, G>::arg` --> $COMPILER_DIR/rustc_errors/src/diagnostic.rs:LL:CC = note: this error originates in the macro `with_fn` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `NotIntoDiagnosticArg: IntoDiagnosticArg` is not satisfied +error[E0277]: the trait `IntoDiagnosticArg` is not implemented for `NotIntoDiagnosticArg` --> $DIR/diagnostic-derive-doc-comment-field.rs:46:10 | LL | #[derive(Subdiagnostic)] diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs index f2f42f054817d..82d6aa2743fa2 100644 --- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs +++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs @@ -347,7 +347,7 @@ struct ArgFieldWithoutSkip { #[primary_span] span: Span, other: Hello, - //~^ ERROR the trait bound `Hello: IntoDiagnosticArg` is not satisfied + //~^ ERROR trait `IntoDiagnosticArg` is not implemented for `Hello` } #[derive(Diagnostic)] diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr index 058c88d315be0..563226dc1d23a 100644 --- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr +++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr @@ -618,7 +618,7 @@ LL | #[derive(Diagnostic)] | = note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Hello: IntoDiagnosticArg` is not satisfied +error[E0277]: the trait `IntoDiagnosticArg` is not implemented for `Hello` --> $DIR/diagnostic-derive.rs:349:12 | LL | #[derive(Diagnostic)] diff --git a/tests/ui/allocator/not-an-allocator.stderr b/tests/ui/allocator/not-an-allocator.stderr index e1967b700133e..928b1eedc50e4 100644 --- a/tests/ui/allocator/not-an-allocator.stderr +++ b/tests/ui/allocator/not-an-allocator.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied +error[E0277]: the trait `GlobalAlloc` is not implemented for `usize` --> $DIR/not-an-allocator.rs:2:11 | LL | #[global_allocator] @@ -9,7 +9,7 @@ LL | static A: usize = 0; = help: the trait `GlobalAlloc` is implemented for `System` = note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied +error[E0277]: the trait `GlobalAlloc` is not implemented for `usize` --> $DIR/not-an-allocator.rs:2:11 | LL | #[global_allocator] @@ -21,7 +21,7 @@ LL | static A: usize = 0; = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied +error[E0277]: the trait `GlobalAlloc` is not implemented for `usize` --> $DIR/not-an-allocator.rs:2:11 | LL | #[global_allocator] @@ -33,7 +33,7 @@ LL | static A: usize = 0; = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied +error[E0277]: the trait `GlobalAlloc` is not implemented for `usize` --> $DIR/not-an-allocator.rs:2:11 | LL | #[global_allocator] diff --git a/tests/ui/array-slice-vec/repeat_empty_ok.rs b/tests/ui/array-slice-vec/repeat_empty_ok.rs index 25463ea5ee841..2d412a5edd174 100644 --- a/tests/ui/array-slice-vec/repeat_empty_ok.rs +++ b/tests/ui/array-slice-vec/repeat_empty_ok.rs @@ -6,10 +6,10 @@ pub struct Header<'a> { pub fn test() { let headers = [Header{value: &[]}; 128]; - //~^ ERROR the trait bound + //~^ ERROR the trait } pub fn test2() { let headers = [Header{value: &[0]}; 128]; - //~^ ERROR the trait bound + //~^ ERROR the trait } diff --git a/tests/ui/array-slice-vec/repeat_empty_ok.stderr b/tests/ui/array-slice-vec/repeat_empty_ok.stderr index c272d47d9617f..755ef7bdf99f6 100644 --- a/tests/ui/array-slice-vec/repeat_empty_ok.stderr +++ b/tests/ui/array-slice-vec/repeat_empty_ok.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Header<'_>: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Header<'_>` --> $DIR/repeat_empty_ok.rs:8:20 | LL | let headers = [Header{value: &[]}; 128]; @@ -13,7 +13,7 @@ LL + #[derive(Copy)] LL | pub struct Header<'a> { | -error[E0277]: the trait bound `Header<'_>: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Header<'_>` --> $DIR/repeat_empty_ok.rs:13:20 | LL | let headers = [Header{value: &[0]}; 128]; diff --git a/tests/ui/associated-consts/associated-const-array-len.rs b/tests/ui/associated-consts/associated-const-array-len.rs index 17d7824273ea7..a02aa912dfdc2 100644 --- a/tests/ui/associated-consts/associated-const-array-len.rs +++ b/tests/ui/associated-consts/associated-const-array-len.rs @@ -3,7 +3,7 @@ trait Foo { } const X: [i32; ::ID] = [0, 1, 2]; -//~^ ERROR the trait bound `i32: Foo` is not satisfied +//~^ ERROR trait `Foo` is not implemented for `i32` fn main() { assert_eq!(1, X); diff --git a/tests/ui/associated-consts/associated-const-array-len.stderr b/tests/ui/associated-consts/associated-const-array-len.stderr index f804cf20591f2..78a0936acf96a 100644 --- a/tests/ui/associated-consts/associated-const-array-len.stderr +++ b/tests/ui/associated-consts/associated-const-array-len.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `i32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `i32` --> $DIR/associated-const-array-len.rs:5:17 | LL | const X: [i32; ::ID] = [0, 1, 2]; diff --git a/tests/ui/associated-consts/issue-105330.rs b/tests/ui/associated-consts/issue-105330.rs index fb2169ab43f2e..3c52c3a0b2fd6 100644 --- a/tests/ui/associated-consts/issue-105330.rs +++ b/tests/ui/associated-consts/issue-105330.rs @@ -10,7 +10,7 @@ impl TraitWAssocConst for impl Demo { //~ ERROR E0404 fn foo>() { //~ ERROR E0658 foo::()(); - //~^ ERROR is not satisfied + //~^ ERROR is not implemented //~| ERROR type mismatch //~| ERROR expected function, found `()` } @@ -20,5 +20,5 @@ fn main>() { //~| ERROR E0131 foo::(); //~^ ERROR type mismatch - //~| ERROR is not satisfied + //~| ERROR is not implemented } diff --git a/tests/ui/associated-consts/issue-105330.stderr b/tests/ui/associated-consts/issue-105330.stderr index 50ce69b33815d..f84c83e9e5747 100644 --- a/tests/ui/associated-consts/issue-105330.stderr +++ b/tests/ui/associated-consts/issue-105330.stderr @@ -49,7 +49,7 @@ error[E0131]: `main` function is not allowed to have generic parameters LL | fn main>() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` cannot have generic parameters -error[E0277]: the trait bound `Demo: TraitWAssocConst` is not satisfied +error[E0277]: the trait `TraitWAssocConst` is not implemented for `Demo` --> $DIR/issue-105330.rs:12:11 | LL | foo::()(); @@ -86,7 +86,7 @@ LL | foo::()(); | | | call expression requires function -error[E0277]: the trait bound `Demo: TraitWAssocConst` is not satisfied +error[E0277]: the trait `TraitWAssocConst` is not implemented for `Demo` --> $DIR/issue-105330.rs:21:11 | LL | foo::(); diff --git a/tests/ui/associated-inherent-types/generic-associated-types-bad.item.stderr b/tests/ui/associated-inherent-types/generic-associated-types-bad.item.stderr index 0620725ca3334..c9030c23da091 100644 --- a/tests/ui/associated-inherent-types/generic-associated-types-bad.item.stderr +++ b/tests/ui/associated-inherent-types/generic-associated-types-bad.item.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/generic-associated-types-bad.rs:16:10 | LL | const _: Ty::Pr = String::new(); @@ -10,7 +10,7 @@ note: required by a bound in `Ty::Pr` LL | type Pr = T; | ^^^^ required by this bound in `Ty::Pr` -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/generic-associated-types-bad.rs:16:27 | LL | const _: Ty::Pr = String::new(); diff --git a/tests/ui/associated-inherent-types/generic-associated-types-bad.local.stderr b/tests/ui/associated-inherent-types/generic-associated-types-bad.local.stderr index 5859834053887..025c45c4d9dc0 100644 --- a/tests/ui/associated-inherent-types/generic-associated-types-bad.local.stderr +++ b/tests/ui/associated-inherent-types/generic-associated-types-bad.local.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Vec<()>: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Vec<()>` --> $DIR/generic-associated-types-bad.rs:21:12 | LL | let _: Ty::Pr>; diff --git a/tests/ui/associated-inherent-types/generic-associated-types-bad.rs b/tests/ui/associated-inherent-types/generic-associated-types-bad.rs index fdc2a0f64e491..f06d3590497f6 100644 --- a/tests/ui/associated-inherent-types/generic-associated-types-bad.rs +++ b/tests/ui/associated-inherent-types/generic-associated-types-bad.rs @@ -13,12 +13,12 @@ impl Ty { } #[cfg(item)] -const _: Ty::Pr = String::new(); //[item]~ the trait bound `String: Copy` is not satisfied -//[item]~^ the trait bound `String: Copy` is not satisfied +const _: Ty::Pr = String::new(); //[item]~ ERROR trait `Copy` is not implemented for `String` +//[item]~^ ERROR trait `Copy` is not implemented for `String` fn main() { #[cfg(local)] - let _: Ty::Pr>; //[local]~ ERROR the trait bound `Vec<()>: Copy` is not satisfied + let _: Ty::Pr>; //[local]~ ERROR trait `Copy` is not implemented for `Vec<()>` } fn user<'a>() { diff --git a/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.rs b/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.rs index d081c4d5b78e6..6a109bddfc680 100644 --- a/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.rs +++ b/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.rs @@ -8,5 +8,5 @@ impl S { } fn main() { - let _: S<_>::T = String::new(); //~ ERROR the trait bound `String: Copy` is not satisfied + let _: S<_>::T = String::new(); //~ ERROR trait `Copy` is not implemented for `String` } diff --git a/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.stderr b/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.stderr index 7ce69a94bf8c1..92574f09a0fdc 100644 --- a/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.stderr +++ b/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/unsatisfied-bounds-inferred-type.rs:11:12 | LL | let _: S<_>::T = String::new(); diff --git a/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.rs b/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.rs index 97bd2c421604a..4cdcc06032f3a 100644 --- a/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.rs +++ b/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.rs @@ -10,5 +10,5 @@ impl S { } fn main() { - let _: S::::X; //~ ERROR the trait bound `String: Copy` is not satisfied + let _: S::::X; //~ ERROR trait `Copy` is not implemented for `String` } diff --git a/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.stderr b/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.stderr index cb35cdde0b4be..579c8ad8919f1 100644 --- a/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.stderr +++ b/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/unsatisfied-bounds-where-clause-on-assoc-ty.rs:13:12 | LL | let _: S::::X; diff --git a/tests/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.rs b/tests/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.rs index 707bcac78bf92..e66024270421a 100644 --- a/tests/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.rs +++ b/tests/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.rs @@ -21,5 +21,5 @@ trait Add { fn ice(a: A) { let r = loop {}; r = r + a; - //~^ ERROR the trait bound `(): Add` is not satisfied + //~^ ERROR trait `Add` is not implemented for `()` } diff --git a/tests/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.stderr b/tests/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.stderr index ebe56c8cd6894..1c8f7ad94a23c 100644 --- a/tests/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.stderr +++ b/tests/ui/associated-types/associated-types-ICE-when-projecting-out-of-err.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): Add` is not satisfied +error[E0277]: the trait `Add` is not implemented for `()` --> $DIR/associated-types-ICE-when-projecting-out-of-err.rs:23:11 | LL | r = r + a; diff --git a/tests/ui/associated-types/associated-types-bound-failure.stderr b/tests/ui/associated-types/associated-types-bound-failure.stderr index 0b404819c2c0d..497e48319a7aa 100644 --- a/tests/ui/associated-types/associated-types-bound-failure.stderr +++ b/tests/ui/associated-types/associated-types-bound-failure.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `::R: ToInt` is not satisfied +error[E0277]: the trait `ToInt` is not implemented for `::R` --> $DIR/associated-types-bound-failure.rs:19:19 | LL | ToInt::to_int(&g.get()) diff --git a/tests/ui/associated-types/associated-types-for-unimpl-trait.fixed b/tests/ui/associated-types/associated-types-for-unimpl-trait.fixed index bce6148f9e199..ca87fb8f70c6c 100644 --- a/tests/ui/associated-types/associated-types-for-unimpl-trait.fixed +++ b/tests/ui/associated-types/associated-types-for-unimpl-trait.fixed @@ -9,8 +9,8 @@ trait Get { trait Other { fn uhoh(&self, foo: U, bar: ::Value) where Self: Sized, Self: Get, Self: Get {} - //~^ ERROR the trait bound `Self: Get` is not satisfied - //~| ERROR the trait bound `Self: Get` is not satisfied + //~^ ERROR trait `Get` is not implemented for `Self` + //~| ERROR trait `Get` is not implemented for `Self` } fn main() {} diff --git a/tests/ui/associated-types/associated-types-for-unimpl-trait.rs b/tests/ui/associated-types/associated-types-for-unimpl-trait.rs index 94c9a1ee1e622..2ab9ede1c0e59 100644 --- a/tests/ui/associated-types/associated-types-for-unimpl-trait.rs +++ b/tests/ui/associated-types/associated-types-for-unimpl-trait.rs @@ -9,8 +9,8 @@ trait Get { trait Other { fn uhoh(&self, foo: U, bar: ::Value) where Self: Sized {} - //~^ ERROR the trait bound `Self: Get` is not satisfied - //~| ERROR the trait bound `Self: Get` is not satisfied + //~^ ERROR trait `Get` is not implemented for `Self` + //~| ERROR trait `Get` is not implemented for `Self` } fn main() {} diff --git a/tests/ui/associated-types/associated-types-for-unimpl-trait.stderr b/tests/ui/associated-types/associated-types-for-unimpl-trait.stderr index 4cba3990049a5..57c28d47d71d7 100644 --- a/tests/ui/associated-types/associated-types-for-unimpl-trait.stderr +++ b/tests/ui/associated-types/associated-types-for-unimpl-trait.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Self: Get` is not satisfied +error[E0277]: the trait `Get` is not implemented for `Self` --> $DIR/associated-types-for-unimpl-trait.rs:11:41 | LL | fn uhoh(&self, foo: U, bar: ::Value) where Self: Sized {} @@ -9,7 +9,7 @@ help: consider further restricting `Self` LL | fn uhoh(&self, foo: U, bar: ::Value) where Self: Sized, Self: Get {} | +++++++++++ -error[E0277]: the trait bound `Self: Get` is not satisfied +error[E0277]: the trait `Get` is not implemented for `Self` --> $DIR/associated-types-for-unimpl-trait.rs:11:81 | LL | fn uhoh(&self, foo: U, bar: ::Value) where Self: Sized {} diff --git a/tests/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.rs b/tests/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.rs index 3bd3f3a757c53..f366d9a83cf10 100644 --- a/tests/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.rs +++ b/tests/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.rs @@ -8,7 +8,7 @@ trait Foo { fn f>(t: &T) { let u: >::Bar = t.get_bar(); - //~^ ERROR the trait bound `T: Foo` is not satisfied + //~^ ERROR trait `Foo` is not implemented for `T` } fn main() { } diff --git a/tests/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.stderr b/tests/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.stderr index adde31b4a321c..468be5fa4039e 100644 --- a/tests/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.stderr +++ b/tests/ui/associated-types/associated-types-invalid-trait-ref-issue-18865.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `T` --> $DIR/associated-types-invalid-trait-ref-issue-18865.rs:10:13 | LL | let u: >::Bar = t.get_bar(); diff --git a/tests/ui/associated-types/associated-types-no-suitable-bound.rs b/tests/ui/associated-types/associated-types-no-suitable-bound.rs index 7019c476237bb..cf099e9a2a458 100644 --- a/tests/ui/associated-types/associated-types-no-suitable-bound.rs +++ b/tests/ui/associated-types/associated-types-no-suitable-bound.rs @@ -9,8 +9,8 @@ struct Struct { impl Struct { fn uhoh(foo: ::Value) {} - //~^ ERROR the trait bound `T: Get` is not satisfied - //~| ERROR the trait bound `T: Get` is not satisfied + //~^ ERROR trait `Get` is not implemented for `T` + //~| ERROR trait `Get` is not implemented for `T` } fn main() {} diff --git a/tests/ui/associated-types/associated-types-no-suitable-bound.stderr b/tests/ui/associated-types/associated-types-no-suitable-bound.stderr index 9713051d97327..99d7a90295b1d 100644 --- a/tests/ui/associated-types/associated-types-no-suitable-bound.stderr +++ b/tests/ui/associated-types/associated-types-no-suitable-bound.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Get` is not satisfied +error[E0277]: the trait `Get` is not implemented for `T` --> $DIR/associated-types-no-suitable-bound.rs:11:21 | LL | fn uhoh(foo: ::Value) {} @@ -9,7 +9,7 @@ help: consider restricting type parameter `T` LL | fn uhoh(foo: ::Value) {} | +++++ -error[E0277]: the trait bound `T: Get` is not satisfied +error[E0277]: the trait `Get` is not implemented for `T` --> $DIR/associated-types-no-suitable-bound.rs:11:40 | LL | fn uhoh(foo: ::Value) {} diff --git a/tests/ui/associated-types/associated-types-no-suitable-supertrait-2.rs b/tests/ui/associated-types/associated-types-no-suitable-supertrait-2.rs index 5dc1ac88c8a9e..e666270da0ff2 100644 --- a/tests/ui/associated-types/associated-types-no-suitable-supertrait-2.rs +++ b/tests/ui/associated-types/associated-types-no-suitable-supertrait-2.rs @@ -15,8 +15,8 @@ trait Get { trait Other { fn uhoh(&self, foo: U, bar: ::Value) {} - //~^ ERROR the trait bound `Self: Get` is not satisfied - //~| ERROR the trait bound `Self: Get` is not satisfied + //~^ ERROR trait `Get` is not implemented for `Self` + //~| ERROR trait `Get` is not implemented for `Self` } fn main() { } diff --git a/tests/ui/associated-types/associated-types-no-suitable-supertrait-2.stderr b/tests/ui/associated-types/associated-types-no-suitable-supertrait-2.stderr index c5dcfc00925d7..1b732cea7a607 100644 --- a/tests/ui/associated-types/associated-types-no-suitable-supertrait-2.stderr +++ b/tests/ui/associated-types/associated-types-no-suitable-supertrait-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Self: Get` is not satisfied +error[E0277]: the trait `Get` is not implemented for `Self` --> $DIR/associated-types-no-suitable-supertrait-2.rs:17:40 | LL | fn uhoh(&self, foo: U, bar: ::Value) {} @@ -9,7 +9,7 @@ help: consider further restricting `Self` LL | fn uhoh(&self, foo: U, bar: ::Value) where Self: Get {} | +++++++++++++++ -error[E0277]: the trait bound `Self: Get` is not satisfied +error[E0277]: the trait `Get` is not implemented for `Self` --> $DIR/associated-types-no-suitable-supertrait-2.rs:17:62 | LL | fn uhoh(&self, foo: U, bar: ::Value) {} diff --git a/tests/ui/associated-types/associated-types-no-suitable-supertrait.rs b/tests/ui/associated-types/associated-types-no-suitable-supertrait.rs index 144812fa4d1c6..a73abad995b3f 100644 --- a/tests/ui/associated-types/associated-types-no-suitable-supertrait.rs +++ b/tests/ui/associated-types/associated-types-no-suitable-supertrait.rs @@ -15,15 +15,15 @@ trait Get { trait Other { fn uhoh(&self, foo: U, bar: ::Value) {} - //~^ ERROR the trait bound `Self: Get` is not satisfied - //~| ERROR the trait bound `Self: Get` is not satisfied + //~^ ERROR trait `Get` is not implemented for `Self` + //~| ERROR trait `Get` is not implemented for `Self` } impl Other for T { fn uhoh(&self, foo: U, bar: <(T, U) as Get>::Value) {} - //~^ ERROR the trait bound `(T, U): Get` is not satisfied - //~| ERROR the trait bound `(T, U): Get` is not satisfied - //~| ERROR the trait bound `(T, U): Get` is not satisfied + //~^ ERROR trait `Get` is not implemented for `(T, U)` + //~| ERROR trait `Get` is not implemented for `(T, U)` + //~| ERROR trait `Get` is not implemented for `(T, U)` } fn main() { } diff --git a/tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr b/tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr index 46cebda078e46..576949c7529ec 100644 --- a/tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr +++ b/tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(T, U): Get` is not satisfied +error[E0277]: the trait `Get` is not implemented for `(T, U)` --> $DIR/associated-types-no-suitable-supertrait.rs:23:5 | LL | fn uhoh(&self, foo: U, bar: <(T, U) as Get>::Value) {} @@ -10,7 +10,7 @@ help: this trait has no implementations, consider adding one LL | trait Get { | ^^^^^^^^^ -error[E0277]: the trait bound `(T, U): Get` is not satisfied +error[E0277]: the trait `Get` is not implemented for `(T, U)` --> $DIR/associated-types-no-suitable-supertrait.rs:23:40 | LL | fn uhoh(&self, foo: U, bar: <(T, U) as Get>::Value) {} @@ -22,7 +22,7 @@ help: this trait has no implementations, consider adding one LL | trait Get { | ^^^^^^^^^ -error[E0277]: the trait bound `Self: Get` is not satisfied +error[E0277]: the trait `Get` is not implemented for `Self` --> $DIR/associated-types-no-suitable-supertrait.rs:17:40 | LL | fn uhoh(&self, foo: U, bar: ::Value) {} @@ -33,7 +33,7 @@ help: consider further restricting `Self` LL | fn uhoh(&self, foo: U, bar: ::Value) where Self: Get {} | +++++++++++++++ -error[E0277]: the trait bound `Self: Get` is not satisfied +error[E0277]: the trait `Get` is not implemented for `Self` --> $DIR/associated-types-no-suitable-supertrait.rs:17:62 | LL | fn uhoh(&self, foo: U, bar: ::Value) {} @@ -44,7 +44,7 @@ help: consider further restricting `Self` LL | fn uhoh(&self, foo: U, bar: ::Value) where Self: Get {} | +++++++++++++++ -error[E0277]: the trait bound `(T, U): Get` is not satisfied +error[E0277]: the trait `Get` is not implemented for `(T, U)` --> $DIR/associated-types-no-suitable-supertrait.rs:23:64 | LL | fn uhoh(&self, foo: U, bar: <(T, U) as Get>::Value) {} diff --git a/tests/ui/associated-types/associated-types-path-2.rs b/tests/ui/associated-types/associated-types-path-2.rs index c993e1d27202d..a80d06d153ddd 100644 --- a/tests/ui/associated-types/associated-types-path-2.rs +++ b/tests/ui/associated-types/associated-types-path-2.rs @@ -27,14 +27,14 @@ pub fn f1_int_uint() { pub fn f1_uint_uint() { f1(2u32, 4u32); - //~^ ERROR `u32: Foo` is not satisfied - //~| ERROR `u32: Foo` is not satisfied + //~^ ERROR trait `Foo` is not implemented for `u32` + //~| ERROR trait `Foo` is not implemented for `u32` } pub fn f1_uint_int() { f1(2u32, 4i32); - //~^ ERROR `u32: Foo` is not satisfied - //~| ERROR `u32: Foo` is not satisfied + //~^ ERROR trait `Foo` is not implemented for `u32` + //~| ERROR trait `Foo` is not implemented for `u32` } pub fn f2_int() { diff --git a/tests/ui/associated-types/associated-types-path-2.stderr b/tests/ui/associated-types/associated-types-path-2.stderr index 5edd5c864e135..c263d19e4a14e 100644 --- a/tests/ui/associated-types/associated-types-path-2.stderr +++ b/tests/ui/associated-types/associated-types-path-2.stderr @@ -16,7 +16,7 @@ help: change the type of the numeric literal from `i32` to `u32` LL | f1(2i32, 4u32); | ~~~ -error[E0277]: the trait bound `u32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `u32` --> $DIR/associated-types-path-2.rs:29:8 | LL | f1(2u32, 4u32); @@ -31,7 +31,7 @@ note: required by a bound in `f1` LL | pub fn f1(a: T, x: T::A) {} | ^^^ required by this bound in `f1` -error[E0277]: the trait bound `u32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `u32` --> $DIR/associated-types-path-2.rs:29:14 | LL | f1(2u32, 4u32); @@ -39,7 +39,7 @@ LL | f1(2u32, 4u32); | = help: the trait `Foo` is implemented for `i32` -error[E0277]: the trait bound `u32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `u32` --> $DIR/associated-types-path-2.rs:35:8 | LL | f1(2u32, 4i32); @@ -54,7 +54,7 @@ note: required by a bound in `f1` LL | pub fn f1(a: T, x: T::A) {} | ^^^ required by this bound in `f1` -error[E0277]: the trait bound `u32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `u32` --> $DIR/associated-types-path-2.rs:35:14 | LL | f1(2u32, 4i32); diff --git a/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.stderr b/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.stderr index 79200dc3acc24..189372b89acf7 100644 --- a/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.stderr +++ b/tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Self: Get` is not satisfied +error[E0277]: the trait `Get` is not implemented for `Self` --> $DIR/associated-types-projection-to-unrelated-trait-in-method-without-default.rs:11:40 | LL | fn okay(&self, foo: U, bar: ::Value); diff --git a/tests/ui/associated-types/defaults-suitability.rs b/tests/ui/associated-types/defaults-suitability.rs index 504c957d98753..67692202706ca 100644 --- a/tests/ui/associated-types/defaults-suitability.rs +++ b/tests/ui/associated-types/defaults-suitability.rs @@ -11,7 +11,7 @@ struct NotClone; // Assoc. type bounds must hold for the default type trait Tr { type Ty: Clone = NotClone; - //~^ ERROR the trait bound `NotClone: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `NotClone` } // Where-clauses defined on the trait must also be considered @@ -20,19 +20,19 @@ where Self::Ty: Clone, { type Ty = NotClone; - //~^ ERROR the trait bound `NotClone: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `NotClone` } // Involved type parameters must fulfill all bounds required by defaults that mention them trait Foo { type Bar: Clone = Vec; - //~^ ERROR the trait bound `T: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `T` } trait Bar: Sized { // `(): Foo` might hold for some possible impls but not all. type Assoc: Foo = (); - //~^ ERROR the trait bound `(): Foo` is not satisfied + //~^ ERROR trait `Foo` is not implemented for `()` } trait IsU8 {} @@ -54,7 +54,7 @@ trait D where bool: IsU8, { type Assoc = NotClone; - //~^ ERROR the trait bound `NotClone: IsU8` is not satisfied + //~^ ERROR trait `IsU8` is not implemented for `NotClone` } // Test behavior of the check when defaults refer to other defaults: @@ -63,7 +63,7 @@ trait D where // `Clone`. trait Foo2 { type Bar: Clone = Vec; - //~^ ERROR the trait bound `>::Baz: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `>::Baz` type Baz = T; } @@ -72,7 +72,7 @@ trait Foo2 { // this would be accepted. trait Foo25 { type Bar: Clone = Vec; - //~^ ERROR the trait bound `>::Baz: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `>::Baz` type Baz = T; } @@ -85,7 +85,7 @@ where { type Bar = Vec; type Baz = T; - //~^ ERROR the trait bound `T: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `T` } // This one finally works, with `Clone` bounds on all assoc. types and the type diff --git a/tests/ui/associated-types/defaults-suitability.stderr b/tests/ui/associated-types/defaults-suitability.stderr index 82b35a4863788..3ba9319fc3500 100644 --- a/tests/ui/associated-types/defaults-suitability.stderr +++ b/tests/ui/associated-types/defaults-suitability.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `NotClone: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `NotClone` --> $DIR/defaults-suitability.rs:13:22 | LL | type Ty: Clone = NotClone; @@ -15,7 +15,7 @@ LL + #[derive(Clone)] LL | struct NotClone; | -error[E0277]: the trait bound `NotClone: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `NotClone` --> $DIR/defaults-suitability.rs:22:15 | LL | type Ty = NotClone; @@ -35,7 +35,7 @@ LL + #[derive(Clone)] LL | struct NotClone; | -error[E0277]: the trait bound `T: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `T` --> $DIR/defaults-suitability.rs:28:23 | LL | type Bar: Clone = Vec; @@ -52,7 +52,7 @@ help: consider restricting type parameter `T` LL | trait Foo { | +++++++++++++++++++ -error[E0277]: the trait bound `(): Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `()` --> $DIR/defaults-suitability.rs:34:29 | LL | type Assoc: Foo = (); @@ -69,7 +69,7 @@ note: required by a bound in `Bar::Assoc` LL | type Assoc: Foo = (); | ^^^^^^^^^ required by this bound in `Bar::Assoc` -error[E0277]: the trait bound `NotClone: IsU8` is not satisfied +error[E0277]: the trait `IsU8` is not implemented for `NotClone` --> $DIR/defaults-suitability.rs:56:18 | LL | type Assoc = NotClone; @@ -84,7 +84,7 @@ LL | Self::Assoc: IsU8, LL | type Assoc = NotClone; | ----- required by a bound in this associated type -error[E0277]: the trait bound `>::Baz: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `>::Baz` --> $DIR/defaults-suitability.rs:65:23 | LL | type Bar: Clone = Vec; @@ -101,7 +101,7 @@ help: consider further restricting the associated type LL | trait Foo2 where >::Baz: Clone { | +++++++++++++++++++++++++++++++++++ -error[E0277]: the trait bound `>::Baz: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `>::Baz` --> $DIR/defaults-suitability.rs:74:23 | LL | type Bar: Clone = Vec; @@ -118,7 +118,7 @@ help: consider further restricting the associated type LL | trait Foo25 where >::Baz: Clone { | ++++++++++++++++++++++++++++++++++++ -error[E0277]: the trait bound `T: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `T` --> $DIR/defaults-suitability.rs:87:16 | LL | type Baz = T; diff --git a/tests/ui/associated-types/defaults-unsound-62211-1.rs b/tests/ui/associated-types/defaults-unsound-62211-1.rs index fa6a208b4f1ba..0ef9ebff7202c 100644 --- a/tests/ui/associated-types/defaults-unsound-62211-1.rs +++ b/tests/ui/associated-types/defaults-unsound-62211-1.rs @@ -18,8 +18,8 @@ trait UncheckedCopy: Sized { // This Output is said to be Copy. Yet we default to Self // and it's accepted, not knowing if Self ineed is Copy type Output: Copy + Deref + AddAssign<&'static str> + From + Display = Self; - //~^ ERROR the trait bound `Self: Copy` is not satisfied - //~| ERROR the trait bound `Self: Deref` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `Self` + //~| ERROR trait `Deref` is not implemented for `Self` //~| ERROR cannot add-assign `&'static str` to `Self` //~| ERROR `Self` doesn't implement `std::fmt::Display` diff --git a/tests/ui/associated-types/defaults-unsound-62211-1.stderr b/tests/ui/associated-types/defaults-unsound-62211-1.stderr index 5cd1cb4a1a712..fdcd6cd1e286e 100644 --- a/tests/ui/associated-types/defaults-unsound-62211-1.stderr +++ b/tests/ui/associated-types/defaults-unsound-62211-1.stderr @@ -31,7 +31,7 @@ help: consider further restricting `Self` LL | trait UncheckedCopy: Sized + AddAssign<&'static str> { | +++++++++++++++++++++++++ -error[E0277]: the trait bound `Self: Deref` is not satisfied +error[E0277]: the trait `Deref` is not implemented for `Self` --> $DIR/defaults-unsound-62211-1.rs:20:96 | LL | type Output: Copy + Deref + AddAssign<&'static str> + From + Display = Self; @@ -47,7 +47,7 @@ help: consider further restricting `Self` LL | trait UncheckedCopy: Sized + Deref { | +++++++ -error[E0277]: the trait bound `Self: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Self` --> $DIR/defaults-unsound-62211-1.rs:20:96 | LL | type Output: Copy + Deref + AddAssign<&'static str> + From + Display = Self; diff --git a/tests/ui/associated-types/defaults-unsound-62211-2.rs b/tests/ui/associated-types/defaults-unsound-62211-2.rs index c13ec776afe2b..4eb55de5a5ad0 100644 --- a/tests/ui/associated-types/defaults-unsound-62211-2.rs +++ b/tests/ui/associated-types/defaults-unsound-62211-2.rs @@ -18,8 +18,8 @@ trait UncheckedCopy: Sized { // This Output is said to be Copy. Yet we default to Self // and it's accepted, not knowing if Self ineed is Copy type Output: Copy + Deref + AddAssign<&'static str> + From + Display = Self; - //~^ ERROR the trait bound `Self: Copy` is not satisfied - //~| ERROR the trait bound `Self: Deref` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `Self` + //~| ERROR trait `Deref` is not implemented for `Self` //~| ERROR cannot add-assign `&'static str` to `Self` //~| ERROR `Self` doesn't implement `std::fmt::Display` diff --git a/tests/ui/associated-types/defaults-unsound-62211-2.stderr b/tests/ui/associated-types/defaults-unsound-62211-2.stderr index 89319bb7563cc..769073aa2939e 100644 --- a/tests/ui/associated-types/defaults-unsound-62211-2.stderr +++ b/tests/ui/associated-types/defaults-unsound-62211-2.stderr @@ -31,7 +31,7 @@ help: consider further restricting `Self` LL | trait UncheckedCopy: Sized + AddAssign<&'static str> { | +++++++++++++++++++++++++ -error[E0277]: the trait bound `Self: Deref` is not satisfied +error[E0277]: the trait `Deref` is not implemented for `Self` --> $DIR/defaults-unsound-62211-2.rs:20:96 | LL | type Output: Copy + Deref + AddAssign<&'static str> + From + Display = Self; @@ -47,7 +47,7 @@ help: consider further restricting `Self` LL | trait UncheckedCopy: Sized + Deref { | +++++++ -error[E0277]: the trait bound `Self: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Self` --> $DIR/defaults-unsound-62211-2.rs:20:96 | LL | type Output: Copy + Deref + AddAssign<&'static str> + From + Display = Self; diff --git a/tests/ui/associated-types/hr-associated-type-bound-1.rs b/tests/ui/associated-types/hr-associated-type-bound-1.rs index 37c1a47fcd279..f9dcdf5781622 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-1.rs +++ b/tests/ui/associated-types/hr-associated-type-bound-1.rs @@ -10,10 +10,10 @@ where impl X<'_> for i32 { type U = str; - //~^ ERROR the trait bound `str: Clone` + //~^ ERROR trait `Clone` is not implemented for `str` } fn main() { 1i32.f("abc"); - //~^ ERROR the trait bound `str: Clone` + //~^ ERROR trait `Clone` is not implemented for `str` } diff --git a/tests/ui/associated-types/hr-associated-type-bound-1.stderr b/tests/ui/associated-types/hr-associated-type-bound-1.stderr index 8830048ed4e31..356cc7522ad5a 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-1.stderr +++ b/tests/ui/associated-types/hr-associated-type-bound-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-1.rs:12:14 | LL | type U = str; @@ -14,7 +14,7 @@ LL | where LL | for<'b> >::U: Clone, | ^^^^^ required by this bound in `X` -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-1.rs:17:10 | LL | 1i32.f("abc"); diff --git a/tests/ui/associated-types/hr-associated-type-bound-object.rs b/tests/ui/associated-types/hr-associated-type-bound-object.rs index fec253f9289ac..20e566d548da4 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-object.rs +++ b/tests/ui/associated-types/hr-associated-type-bound-object.rs @@ -5,11 +5,11 @@ where type U: ?Sized; } fn f<'a, T: X<'a> + ?Sized>(x: &>::U) { - //~^ ERROR the trait bound `for<'b> >::U: Clone` is not satisfied + //~^ ERROR trait `for<'b> Clone` is not implemented for `>::U` <>::U>::clone(x); - //~^ ERROR the trait bound `for<'b> >::U: Clone` is not satisfied - //~| ERROR the trait bound `for<'b> >::U: Clone` is not satisfied - //~| ERROR the trait bound `>::U: Clone` is not satisfied + //~^ ERROR trait `for<'b> Clone` is not implemented for `>::U` + //~| ERROR trait `for<'b> Clone` is not implemented for `>::U` + //~| ERROR trait `Clone` is not implemented for `>::U` } pub fn main() { diff --git a/tests/ui/associated-types/hr-associated-type-bound-object.stderr b/tests/ui/associated-types/hr-associated-type-bound-object.stderr index 322d6e7b947c8..a45ecfb2fa187 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-object.stderr +++ b/tests/ui/associated-types/hr-associated-type-bound-object.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'b> >::U: Clone` is not satisfied +error[E0277]: the trait `for<'b> Clone` is not implemented for `>::U` --> $DIR/hr-associated-type-bound-object.rs:7:13 | LL | fn f<'a, T: X<'a> + ?Sized>(x: &>::U) { @@ -17,7 +17,7 @@ help: consider further restricting the associated type LL | fn f<'a, T: X<'a> + ?Sized>(x: &>::U) where for<'b> >::U: Clone { | ++++++++++++++++++++++++++++++++++++ -error[E0277]: the trait bound `for<'b> >::U: Clone` is not satisfied +error[E0277]: the trait `for<'b> Clone` is not implemented for `>::U` --> $DIR/hr-associated-type-bound-object.rs:9:7 | LL | <>::U>::clone(x); @@ -36,7 +36,7 @@ help: consider further restricting the associated type LL | fn f<'a, T: X<'a> + ?Sized>(x: &>::U) where for<'b> >::U: Clone { | ++++++++++++++++++++++++++++++++++++ -error[E0277]: the trait bound `>::U: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `>::U` --> $DIR/hr-associated-type-bound-object.rs:9:6 | LL | <>::U>::clone(x); @@ -47,7 +47,7 @@ help: consider further restricting the associated type LL | fn f<'a, T: X<'a> + ?Sized>(x: &>::U) where >::U: Clone { | ++++++++++++++++++++++++++++ -error[E0277]: the trait bound `for<'b> >::U: Clone` is not satisfied +error[E0277]: the trait `for<'b> Clone` is not implemented for `>::U` --> $DIR/hr-associated-type-bound-object.rs:9:5 | LL | <>::U>::clone(x); diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-1.rs b/tests/ui/associated-types/hr-associated-type-bound-param-1.rs index 763d48252f7ac..3183836e62e43 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-param-1.rs +++ b/tests/ui/associated-types/hr-associated-type-bound-param-1.rs @@ -12,10 +12,10 @@ where impl<'a> Y<'a, u8> for u8 { type V = str; - //~^ ERROR the trait bound `str: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `str` } fn main() { 1u8.g("abc"); - //~^ ERROR the trait bound `str: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `str` } diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-1.stderr b/tests/ui/associated-types/hr-associated-type-bound-param-1.stderr index ad6d3e176843f..8b52ace6f78d6 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-param-1.stderr +++ b/tests/ui/associated-types/hr-associated-type-bound-param-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-param-1.rs:14:14 | LL | type V = str; @@ -14,7 +14,7 @@ LL | trait Y<'a, T: ?Sized> LL | for<'b> >::V: Clone, | ^^^^^ required by this bound in `Y` -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-param-1.rs:19:9 | LL | 1u8.g("abc"); diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-2.rs b/tests/ui/associated-types/hr-associated-type-bound-param-2.rs index b1a6fe871594b..f3c3483df9172 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-param-2.rs +++ b/tests/ui/associated-types/hr-associated-type-bound-param-2.rs @@ -1,24 +1,24 @@ trait Z<'a, T: ?Sized> where T: Z<'a, u16>, - //~^ the trait bound `str: Clone` is not satisfied - //~| the trait bound `str: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `str` + //~| ERROR trait `Clone` is not implemented for `str` for<'b> >::W: Clone, { type W: ?Sized; fn h(&self, x: &T::W) { ::clone(x); - //~^ the trait bound `str: Clone` is not satisfied - //~| the trait bound `str: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `str` + //~| ERROR trait `Clone` is not implemented for `str` } } impl<'a> Z<'a, u16> for u16 { type W = str; - //~^ ERROR the trait bound `str: Clone + //~^ ERROR the trait `Clone` is not implemented for `str` } fn main() { 1u16.h("abc"); - //~^ ERROR Clone` is not satisfied + //~^ ERROR the trait `Clone` is not implemented for `str` } diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-2.stderr b/tests/ui/associated-types/hr-associated-type-bound-param-2.stderr index 6a5729e7784f7..29df1be5c88ba 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-param-2.stderr +++ b/tests/ui/associated-types/hr-associated-type-bound-param-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-param-2.rs:3:8 | LL | T: Z<'a, u16>, @@ -14,7 +14,7 @@ LL | trait Z<'a, T: ?Sized> LL | for<'b> >::W: Clone, | ^^^^^ required by this bound in `Z` -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-param-2.rs:17:14 | LL | type W = str; @@ -30,7 +30,7 @@ LL | trait Z<'a, T: ?Sized> LL | for<'b> >::W: Clone, | ^^^^^ required by this bound in `Z` -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-param-2.rs:3:8 | LL | T: Z<'a, u16>, @@ -47,7 +47,7 @@ LL | for<'b> >::W: Clone, | ^^^^^ required by this bound in `Z` = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-param-2.rs:10:10 | LL | ::clone(x); @@ -63,7 +63,7 @@ LL | { LL | type W: ?Sized; | - required by a bound in this associated type -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-param-2.rs:10:9 | LL | ::clone(x); @@ -79,7 +79,7 @@ LL | trait Z<'a, T: ?Sized> LL | for<'b> >::W: Clone, | ^^^^^ required by this bound in `Z` -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-param-2.rs:22:10 | LL | 1u16.h("abc"); diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-3.rs b/tests/ui/associated-types/hr-associated-type-bound-param-3.rs index 8b4c84aa349b5..768251815c2c2 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-param-3.rs +++ b/tests/ui/associated-types/hr-associated-type-bound-param-3.rs @@ -11,10 +11,10 @@ where impl X<'_, (T,)> for (S,) { type U = str; - //~^ ERROR the trait bound `str: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `str` } pub fn main() { <(i32,) as X<(i32,)>>::f("abc"); - //~^ ERROR the trait bound `str: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `str` } diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-3.stderr b/tests/ui/associated-types/hr-associated-type-bound-param-3.stderr index 70e030f2d1cfc..281238372f046 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-param-3.stderr +++ b/tests/ui/associated-types/hr-associated-type-bound-param-3.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-param-3.rs:13:14 | LL | type U = str; @@ -14,7 +14,7 @@ LL | trait X<'a, T> LL | for<'b> >::U: Clone, | ^^^^^ required by this bound in `X` -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-param-3.rs:18:5 | LL | <(i32,) as X<(i32,)>>::f("abc"); diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-4.rs b/tests/ui/associated-types/hr-associated-type-bound-param-4.rs index b75bd896cc8b2..f1adc2c8b6ea3 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-param-4.rs +++ b/tests/ui/associated-types/hr-associated-type-bound-param-4.rs @@ -11,10 +11,10 @@ where impl X<'_, T> for (S,) { type U = str; - //~^ ERROR the trait bound `str: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `str` } pub fn main() { <(i32,) as X>::f("abc"); - //~^ ERROR the trait bound `str: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `str` } diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-4.stderr b/tests/ui/associated-types/hr-associated-type-bound-param-4.stderr index cba12afd67471..57f633828f0f6 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-param-4.stderr +++ b/tests/ui/associated-types/hr-associated-type-bound-param-4.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-param-4.rs:13:14 | LL | type U = str; @@ -14,7 +14,7 @@ LL | trait X<'a, T> LL | for<'b> <(T,) as X<'b, T>>::U: Clone, | ^^^^^ required by this bound in `X` -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-param-4.rs:18:5 | LL | <(i32,) as X>::f("abc"); diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-5.rs b/tests/ui/associated-types/hr-associated-type-bound-param-5.rs index 672ade9aa5ee5..d2a5c50978206 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-param-5.rs +++ b/tests/ui/associated-types/hr-associated-type-bound-param-5.rs @@ -24,15 +24,15 @@ where impl X<'_, Vec> for S { type U = str; - //~^ ERROR the trait bound `str: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `str` } impl X<'_, Box> for S { type U = str; - //~^ ERROR the trait bound `str: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `str` } pub fn main() { >>::f("abc"); - //~^ ERROR the trait bound `str: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `str` } diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-5.stderr b/tests/ui/associated-types/hr-associated-type-bound-param-5.stderr index ac96187749a36..21e3877aad0a0 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-param-5.stderr +++ b/tests/ui/associated-types/hr-associated-type-bound-param-5.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-param-5.rs:26:14 | LL | type U = str; @@ -14,7 +14,7 @@ LL | trait X<'a, T: Cycle + for<'b> X<'b, T>> LL | for<'b> >::U: Clone, | ^^^^^ required by this bound in `X` -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-param-5.rs:31:14 | LL | type U = str; @@ -30,7 +30,7 @@ LL | trait X<'a, T: Cycle + for<'b> X<'b, T>> LL | for<'b> >::U: Clone, | ^^^^^ required by this bound in `X` -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/hr-associated-type-bound-param-5.rs:36:5 | LL | >>::f("abc"); diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-6.rs b/tests/ui/associated-types/hr-associated-type-bound-param-6.rs index f6639904ab33a..ba42310ccd40b 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-param-6.rs +++ b/tests/ui/associated-types/hr-associated-type-bound-param-6.rs @@ -10,12 +10,12 @@ where } impl X<'_, T> for (S,) { - //~^ ERROR the trait bound `for<'b> T: X<'b, T>` is not satisfied + //~^ ERROR trait `for<'b> X<'b, T>` is not implemented for `T` type U = str; } pub fn main() { <(i32,) as X>::f("abc"); - //~^ ERROR the trait bound `for<'b> i32: X<'b, i32>` is not satisfied - //~| ERROR the trait bound `i32: X<'_, i32>` is not satisfied + //~^ ERROR trait `X<'_, i32>` is not implemented for `i32` + //~| ERROR trait `for<'b> X<'b, i32>` is not implemented for `i32` } diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-6.stderr b/tests/ui/associated-types/hr-associated-type-bound-param-6.stderr index cba83120fdc7d..5ad3d0a07d5d4 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-param-6.stderr +++ b/tests/ui/associated-types/hr-associated-type-bound-param-6.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'b> T: X<'b, T>` is not satisfied +error[E0277]: the trait `for<'b> X<'b, T>` is not implemented for `T` --> $DIR/hr-associated-type-bound-param-6.rs:12:12 | LL | impl X<'_, T> for (S,) { @@ -9,7 +9,7 @@ help: consider restricting type parameter `T` LL | impl X<'b, T>> X<'_, T> for (S,) { | ++++++++++++++++++ -error[E0277]: the trait bound `for<'b> i32: X<'b, i32>` is not satisfied +error[E0277]: the trait `for<'b> X<'b, i32>` is not implemented for `i32` --> $DIR/hr-associated-type-bound-param-6.rs:18:5 | LL | <(i32,) as X>::f("abc"); @@ -17,7 +17,7 @@ LL | <(i32,) as X>::f("abc"); | = help: the trait `X<'_, T>` is implemented for `(S,)` -error[E0277]: the trait bound `i32: X<'_, i32>` is not satisfied +error[E0277]: the trait `X<'_, i32>` is not implemented for `i32` --> $DIR/hr-associated-type-bound-param-6.rs:18:27 | LL | <(i32,) as X>::f("abc"); diff --git a/tests/ui/associated-types/issue-27675-unchecked-bounds.rs b/tests/ui/associated-types/issue-27675-unchecked-bounds.rs index 1cfc230453120..c947c28388c01 100644 --- a/tests/ui/associated-types/issue-27675-unchecked-bounds.rs +++ b/tests/ui/associated-types/issue-27675-unchecked-bounds.rs @@ -13,7 +13,7 @@ fn copy(from: &U::From) -> U::From { pub fn copy_any(t: &T) -> T { copy::>(t) - //~^ ERROR the trait bound `T: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `T` } fn main() {} diff --git a/tests/ui/associated-types/issue-27675-unchecked-bounds.stderr b/tests/ui/associated-types/issue-27675-unchecked-bounds.stderr index 70bf90150b8fa..283f29aafebee 100644 --- a/tests/ui/associated-types/issue-27675-unchecked-bounds.stderr +++ b/tests/ui/associated-types/issue-27675-unchecked-bounds.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/issue-27675-unchecked-bounds.rs:15:12 | LL | copy::>(t) diff --git a/tests/ui/associated-types/issue-38821.rs b/tests/ui/associated-types/issue-38821.rs index c9be1369f1634..30dded174b1f8 100644 --- a/tests/ui/associated-types/issue-38821.rs +++ b/tests/ui/associated-types/issue-38821.rs @@ -21,25 +21,25 @@ pub trait Expression { pub trait Column: Expression {} #[derive(Debug, Copy, Clone)] -//~^ ERROR the trait bound `::SqlType: NotNull` is not satisfied -//~| ERROR the trait bound `::SqlType: NotNull` is not satisfied -//~| ERROR the trait bound `::SqlType: NotNull` is not satisfied -//~| ERROR the trait bound `::SqlType: NotNull` is not satisfied -//~| ERROR the trait bound `::SqlType: NotNull` is not satisfied -//~| ERROR the trait bound `::SqlType: NotNull` is not satisfied -//~| ERROR the trait bound `::SqlType: NotNull` is not satisfied -//~| ERROR the trait bound `::SqlType: NotNull` is not satisfied -//~| ERROR the trait bound `::SqlType: NotNull` is not satisfied -//~| ERROR the trait bound `::SqlType: NotNull` is not satisfied -//~| ERROR the trait bound `::SqlType: NotNull` is not satisfied -//~| ERROR the trait bound `::SqlType: NotNull` is not satisfied -//~| ERROR the trait bound `::SqlType: NotNull` is not satisfied -//~| ERROR the trait bound `::SqlType: NotNull` is not satisfied -//~| ERROR the trait bound `::SqlType: NotNull` is not satisfied -//~| ERROR the trait bound `::SqlType: NotNull` is not satisfied +//~^ ERROR trait `NotNull` is not implemented for `::SqlType` +//~| ERROR trait `NotNull` is not implemented for `::SqlType` +//~| ERROR trait `NotNull` is not implemented for `::SqlType` +//~| ERROR trait `NotNull` is not implemented for `::SqlType` +//~| ERROR trait `NotNull` is not implemented for `::SqlType` +//~| ERROR trait `NotNull` is not implemented for `::SqlType` +//~| ERROR trait `NotNull` is not implemented for `::SqlType` +//~| ERROR trait `NotNull` is not implemented for `::SqlType` +//~| ERROR trait `NotNull` is not implemented for `::SqlType` +//~| ERROR trait `NotNull` is not implemented for `::SqlType` +//~| ERROR trait `NotNull` is not implemented for `::SqlType` +//~| ERROR trait `NotNull` is not implemented for `::SqlType` +//~| ERROR trait `NotNull` is not implemented for `::SqlType` +//~| ERROR trait `NotNull` is not implemented for `::SqlType` +//~| ERROR trait `NotNull` is not implemented for `::SqlType` +//~| ERROR trait `NotNull` is not implemented for `::SqlType` pub enum ColumnInsertValue where -//~^ ERROR the trait bound `::SqlType: NotNull` is not satisfied -//~| ERROR the trait bound `::SqlType: NotNull` is not satisfied +//~^ ERROR trait `NotNull` is not implemented for `::SqlType` +//~| ERROR trait `NotNull` is not implemented for `::SqlType` Col: Column, Expr: Expression::Nullable>, { diff --git a/tests/ui/associated-types/issue-38821.stderr b/tests/ui/associated-types/issue-38821.stderr index acf6bb2810c99..6fa637625bcaf 100644 --- a/tests/ui/associated-types/issue-38821.stderr +++ b/tests/ui/associated-types/issue-38821.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:23:17 | LL | #[derive(Debug, Copy, Clone)] @@ -17,7 +17,7 @@ help: consider further restricting the associated type LL | Expr: Expression::Nullable>, ::SqlType: NotNull, | +++++++++++++++++++++++++++++++++++++++ -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:40:1 | LL | pub enum ColumnInsertValue where @@ -35,7 +35,7 @@ help: consider extending the `where` clause, but there might be an alternative b LL | Expr: Expression::Nullable>, ::SqlType: NotNull | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:40:1 | LL | / pub enum ColumnInsertValue where @@ -59,7 +59,7 @@ help: consider extending the `where` clause, but there might be an alternative b LL | Expr: Expression::Nullable>, ::SqlType: NotNull | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:23:10 | LL | #[derive(Debug, Copy, Clone)] @@ -78,7 +78,7 @@ help: consider further restricting the associated type LL | Expr: Expression::Nullable>, ::SqlType: NotNull, | +++++++++++++++++++++++++++++++++++++++ -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:23:10 | LL | #[derive(Debug, Copy, Clone)] @@ -98,7 +98,7 @@ help: consider further restricting the associated type LL | Expr: Expression::Nullable>, ::SqlType: NotNull, | +++++++++++++++++++++++++++++++++++++++ -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:23:10 | LL | #[derive(Debug, Copy, Clone)] @@ -113,7 +113,7 @@ LL | impl IntoNullable for T { | unsatisfied trait bound introduced here = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:23:10 | LL | #[derive(Debug, Copy, Clone)] @@ -129,7 +129,7 @@ LL | impl IntoNullable for T { = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:23:17 | LL | #[derive(Debug, Copy, Clone)] @@ -149,7 +149,7 @@ help: consider further restricting the associated type LL | Expr: Expression::Nullable>, ::SqlType: NotNull, | +++++++++++++++++++++++++++++++++++++++ -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:23:23 | LL | #[derive(Debug, Copy, Clone)] @@ -168,7 +168,7 @@ help: consider further restricting the associated type LL | Expr: Expression::Nullable>, ::SqlType: NotNull, | +++++++++++++++++++++++++++++++++++++++ -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:23:23 | LL | #[derive(Debug, Copy, Clone)] @@ -188,7 +188,7 @@ help: consider further restricting the associated type LL | Expr: Expression::Nullable>, ::SqlType: NotNull, | +++++++++++++++++++++++++++++++++++++++ -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:23:23 | LL | #[derive(Debug, Copy, Clone)] @@ -203,7 +203,7 @@ LL | impl IntoNullable for T { | unsatisfied trait bound introduced here = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:23:23 | LL | #[derive(Debug, Copy, Clone)] @@ -219,7 +219,7 @@ LL | impl IntoNullable for T { = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:23:10 | LL | #[derive(Debug, Copy, Clone)] @@ -235,7 +235,7 @@ LL | impl IntoNullable for T { = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:23:10 | LL | #[derive(Debug, Copy, Clone)] @@ -251,7 +251,7 @@ LL | impl IntoNullable for T { = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:23:23 | LL | #[derive(Debug, Copy, Clone)] @@ -267,7 +267,7 @@ LL | impl IntoNullable for T { = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:23:23 | LL | #[derive(Debug, Copy, Clone)] @@ -283,7 +283,7 @@ LL | impl IntoNullable for T { = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:23:10 | LL | #[derive(Debug, Copy, Clone)] @@ -299,7 +299,7 @@ LL | impl IntoNullable for T { = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `::SqlType: NotNull` is not satisfied +error[E0277]: the trait `NotNull` is not implemented for `::SqlType` --> $DIR/issue-38821.rs:23:23 | LL | #[derive(Debug, Copy, Clone)] diff --git a/tests/ui/associated-types/issue-43784-associated-type.rs b/tests/ui/associated-types/issue-43784-associated-type.rs index 78815d8d3fadc..a2187e3957a32 100644 --- a/tests/ui/associated-types/issue-43784-associated-type.rs +++ b/tests/ui/associated-types/issue-43784-associated-type.rs @@ -11,7 +11,7 @@ impl Partial for T::Assoc where } impl Complete for T { - type Assoc = T; //~ ERROR the trait bound `T: Copy` is not satisfied + type Assoc = T; //~ ERROR trait `Copy` is not implemented for `T` } fn main() {} diff --git a/tests/ui/associated-types/issue-43784-associated-type.stderr b/tests/ui/associated-types/issue-43784-associated-type.stderr index b2cbe8ee86e56..61c7e35e40d55 100644 --- a/tests/ui/associated-types/issue-43784-associated-type.stderr +++ b/tests/ui/associated-types/issue-43784-associated-type.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/issue-43784-associated-type.rs:14:18 | LL | type Assoc = T; diff --git a/tests/ui/associated-types/issue-43924.rs b/tests/ui/associated-types/issue-43924.rs index 6a63b3e093674..8f308a4600adb 100644 --- a/tests/ui/associated-types/issue-43924.rs +++ b/tests/ui/associated-types/issue-43924.rs @@ -4,7 +4,8 @@ // type-checked. trait Foo { - type Out: Default + ToString + ?Sized = dyn ToString; //~ ERROR not satisfied + type Out: Default + ToString + ?Sized = dyn ToString; + //~^ ERROR the trait `Default` is not implemented for `(dyn ToString + 'static)` } impl Foo for () {} diff --git a/tests/ui/associated-types/issue-43924.stderr b/tests/ui/associated-types/issue-43924.stderr index ab1a9511ec6c7..4feac22bdcc7f 100644 --- a/tests/ui/associated-types/issue-43924.stderr +++ b/tests/ui/associated-types/issue-43924.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(dyn ToString + 'static): Default` is not satisfied +error[E0277]: the trait `Default` is not implemented for `(dyn ToString + 'static)` --> $DIR/issue-43924.rs:7:45 | LL | type Out: Default + ToString + ?Sized = dyn ToString; @@ -11,7 +11,7 @@ LL | type Out: Default + ToString + ?Sized = dyn ToString; | ^^^^^^^ required by this bound in `Foo::Out` error[E0599]: no function or associated item named `default` found for trait object `(dyn ToString + 'static)` in the current scope - --> $DIR/issue-43924.rs:14:39 + --> $DIR/issue-43924.rs:15:39 | LL | assert_eq!(<() as Foo>::Out::default().to_string(), "false"); | ^^^^^^^ function or associated item not found in `dyn ToString` diff --git a/tests/ui/associated-types/issue-59324.rs b/tests/ui/associated-types/issue-59324.rs index 7421e08c89888..b942dfdbfd1f5 100644 --- a/tests/ui/associated-types/issue-59324.rs +++ b/tests/ui/associated-types/issue-59324.rs @@ -9,20 +9,20 @@ pub trait Service { } pub trait ThriftService: -//~^ ERROR the trait bound `Bug: Foo` is not satisfied -//~| ERROR the trait bound `Bug: Foo` is not satisfied +//~^ ERROR trait `Foo` is not implemented for `Bug` +//~| ERROR trait `Foo` is not implemented for `Bug` Service::OnlyFoo> { fn get_service( - //~^ ERROR the trait bound `Bug: Foo` is not satisfied + //~^ ERROR trait `Foo` is not implemented for `Bug` &self, ) -> Self::AssocType; - //~^ ERROR the trait bound `Bug: Foo` is not satisfied + //~^ ERROR trait `Foo` is not implemented for `Bug` } fn with_factory(factory: dyn ThriftService<()>) {} -//~^ ERROR the trait bound `(): Foo` is not satisfied -//~| ERROR the trait bound `(): Foo` is not satisfied +//~^ ERROR trait `Foo` is not implemented for `()` +//~| ERROR trait `Foo` is not implemented for `()` //~| ERROR cannot be known at compilation time fn main() {} diff --git a/tests/ui/associated-types/issue-59324.stderr b/tests/ui/associated-types/issue-59324.stderr index f50d86580f8b0..e081f545bac7b 100644 --- a/tests/ui/associated-types/issue-59324.stderr +++ b/tests/ui/associated-types/issue-59324.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Bug: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `Bug` --> $DIR/issue-59324.rs:11:1 | LL | / pub trait ThriftService: @@ -12,7 +12,7 @@ help: consider further restricting this bound LL | pub trait ThriftService: | +++++ -error[E0277]: the trait bound `Bug: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `Bug` --> $DIR/issue-59324.rs:11:1 | LL | / pub trait ThriftService: @@ -29,7 +29,7 @@ help: consider further restricting this bound LL | pub trait ThriftService: | +++++ -error[E0277]: the trait bound `Bug: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `Bug` --> $DIR/issue-59324.rs:16:5 | LL | / fn get_service( @@ -43,7 +43,7 @@ help: consider further restricting this bound LL | pub trait ThriftService: | +++++ -error[E0277]: the trait bound `(): Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `()` --> $DIR/issue-59324.rs:23:29 | LL | fn with_factory(factory: dyn ThriftService<()>) {} @@ -55,7 +55,7 @@ help: this trait has no implementations, consider adding one LL | pub trait Foo: NotFoo { | ^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: the trait bound `Bug: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `Bug` --> $DIR/issue-59324.rs:19:10 | LL | ) -> Self::AssocType; @@ -66,7 +66,7 @@ help: consider further restricting this bound LL | pub trait ThriftService: | +++++ -error[E0277]: the trait bound `(): Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `()` --> $DIR/issue-59324.rs:23:52 | LL | fn with_factory(factory: dyn ThriftService<()>) {} diff --git a/tests/ui/associated-types/issue-64855.rs b/tests/ui/associated-types/issue-64855.rs index 81cf3ae6e83b6..cd368d8940292 100644 --- a/tests/ui/associated-types/issue-64855.rs +++ b/tests/ui/associated-types/issue-64855.rs @@ -3,6 +3,6 @@ pub trait Foo { } pub struct Bar(::Type) where Self: ; -//~^ ERROR the trait bound `Bar: Foo` is not satisfied +//~^ ERROR trait `Foo` is not implemented for `Bar` fn main() {} diff --git a/tests/ui/associated-types/issue-64855.stderr b/tests/ui/associated-types/issue-64855.stderr index 7c09abdb3b6f3..5fbd35b152631 100644 --- a/tests/ui/associated-types/issue-64855.stderr +++ b/tests/ui/associated-types/issue-64855.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Bar: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `Bar` --> $DIR/issue-64855.rs:5:19 | LL | pub struct Bar(::Type) where Self: ; diff --git a/tests/ui/associated-types/issue-65774-1.rs b/tests/ui/associated-types/issue-65774-1.rs index 9345140558b07..f058840d891c6 100644 --- a/tests/ui/associated-types/issue-65774-1.rs +++ b/tests/ui/associated-types/issue-65774-1.rs @@ -8,7 +8,7 @@ struct T; trait MPU { type MpuConfig: MyDisplay = T; - //~^ ERROR the trait bound `T: MyDisplay` is not satisfied + //~^ ERROR trait `MyDisplay` is not implemented for `T` } struct S; @@ -42,7 +42,7 @@ impl ProcessType for Process { // FulfillmentError(Obligation(predicate=Binder(TraitPredicate()), // depth=1),Unimplemented) let closure = |config: &mut ::MpuConfig| writer.my_write(&config); - //~^ ERROR the trait bound `T: MyDisplay` is not satisfied + //~^ ERROR trait `MyDisplay` is not implemented for `T` closure(valref); } } diff --git a/tests/ui/associated-types/issue-65774-1.stderr b/tests/ui/associated-types/issue-65774-1.stderr index 9748a8fbbf491..28e0fdcce447c 100644 --- a/tests/ui/associated-types/issue-65774-1.stderr +++ b/tests/ui/associated-types/issue-65774-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: MyDisplay` is not satisfied +error[E0277]: the trait `MyDisplay` is not implemented for `T` --> $DIR/issue-65774-1.rs:10:33 | LL | type MpuConfig: MyDisplay = T; @@ -11,7 +11,7 @@ note: required by a bound in `MPU::MpuConfig` LL | type MpuConfig: MyDisplay = T; | ^^^^^^^^^ required by this bound in `MPU::MpuConfig` -error[E0277]: the trait bound `T: MyDisplay` is not satisfied +error[E0277]: the trait `MyDisplay` is not implemented for `T` --> $DIR/issue-65774-1.rs:44:76 | LL | let closure = |config: &mut ::MpuConfig| writer.my_write(&config); diff --git a/tests/ui/associated-types/issue-65774-2.rs b/tests/ui/associated-types/issue-65774-2.rs index 171e0893b4719..057bfbda5b77c 100644 --- a/tests/ui/associated-types/issue-65774-2.rs +++ b/tests/ui/associated-types/issue-65774-2.rs @@ -8,7 +8,7 @@ struct T; trait MPU { type MpuConfig: MyDisplay = T; - //~^ ERROR the trait bound `T: MyDisplay` is not satisfied + //~^ ERROR trait `MyDisplay` is not implemented for `T` } struct S; @@ -37,7 +37,7 @@ impl ProcessType for Process { // // `Unimplemented` selecting `Binder()` during codegen // writer.my_write(valref) - //~^ ERROR the trait bound `T: MyDisplay` is not satisfied + //~^ ERROR trait `MyDisplay` is not implemented for `T` // This one causes the ICE: // FulfillmentError(Obligation(predicate=Binder(TraitPredicate()), diff --git a/tests/ui/associated-types/issue-65774-2.stderr b/tests/ui/associated-types/issue-65774-2.stderr index ca8a727f0fe21..b4e6af9229db1 100644 --- a/tests/ui/associated-types/issue-65774-2.stderr +++ b/tests/ui/associated-types/issue-65774-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: MyDisplay` is not satisfied +error[E0277]: the trait `MyDisplay` is not implemented for `T` --> $DIR/issue-65774-2.rs:10:33 | LL | type MpuConfig: MyDisplay = T; @@ -11,7 +11,7 @@ note: required by a bound in `MPU::MpuConfig` LL | type MpuConfig: MyDisplay = T; | ^^^^^^^^^ required by this bound in `MPU::MpuConfig` -error[E0277]: the trait bound `T: MyDisplay` is not satisfied +error[E0277]: the trait `MyDisplay` is not implemented for `T` --> $DIR/issue-65774-2.rs:39:25 | LL | writer.my_write(valref) diff --git a/tests/ui/associated-types/issue-85103-layout-debug.rs b/tests/ui/associated-types/issue-85103-layout-debug.rs index 77c9876ffa57f..dc0aa9b06e35e 100644 --- a/tests/ui/associated-types/issue-85103-layout-debug.rs +++ b/tests/ui/associated-types/issue-85103-layout-debug.rs @@ -4,6 +4,6 @@ use std::borrow::Cow; #[rustc_layout(debug)] type Edges<'a, E> = Cow<'a, [E]>; -//~^ the trait bound `[E]: ToOwned` is not satisfied +//~^ ERROR trait `ToOwned` is not implemented for `[E]` fn main() {} diff --git a/tests/ui/associated-types/issue-85103-layout-debug.stderr b/tests/ui/associated-types/issue-85103-layout-debug.stderr index c79543e73cd0b..38e61121e426b 100644 --- a/tests/ui/associated-types/issue-85103-layout-debug.stderr +++ b/tests/ui/associated-types/issue-85103-layout-debug.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `[E]: ToOwned` is not satisfied +error[E0277]: the trait `ToOwned` is not implemented for `[E]` --> $DIR/issue-85103-layout-debug.rs:6:21 | LL | type Edges<'a, E> = Cow<'a, [E]>; diff --git a/tests/ui/associated-types/point-at-type-on-obligation-failure-2.rs b/tests/ui/associated-types/point-at-type-on-obligation-failure-2.rs index 4b3d6e9d6067f..575c8f4ad1ee5 100644 --- a/tests/ui/associated-types/point-at-type-on-obligation-failure-2.rs +++ b/tests/ui/associated-types/point-at-type-on-obligation-failure-2.rs @@ -5,7 +5,7 @@ trait Foo { } impl Foo for () { - type Assoc = bool; //~ ERROR the trait bound `bool: Bar` is not satisfied + type Assoc = bool; //~ ERROR trait `Bar` is not implemented for `bool` } trait Baz @@ -16,7 +16,7 @@ where } impl Baz for () { - type Assoc = bool; //~ ERROR the trait bound `bool: Bar` is not satisfied + type Assoc = bool; //~ ERROR trait `Bar` is not implemented for `bool` } trait Bat @@ -27,7 +27,7 @@ where } impl Bat for () { - type Assoc = bool; //~ ERROR the trait bound `bool: Bar` is not satisfied + type Assoc = bool; //~ ERROR trait `Bar` is not implemented for `bool` } fn main() {} diff --git a/tests/ui/associated-types/point-at-type-on-obligation-failure-2.stderr b/tests/ui/associated-types/point-at-type-on-obligation-failure-2.stderr index 056d9201b4abb..9e18b6dbf2e73 100644 --- a/tests/ui/associated-types/point-at-type-on-obligation-failure-2.stderr +++ b/tests/ui/associated-types/point-at-type-on-obligation-failure-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `bool: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `bool` --> $DIR/point-at-type-on-obligation-failure-2.rs:8:18 | LL | type Assoc = bool; @@ -15,7 +15,7 @@ note: required by a bound in `Foo::Assoc` LL | type Assoc: Bar; | ^^^ required by this bound in `Foo::Assoc` -error[E0277]: the trait bound `bool: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `bool` --> $DIR/point-at-type-on-obligation-failure-2.rs:19:18 | LL | type Assoc = bool; @@ -35,7 +35,7 @@ LL | { LL | type Assoc; | ----- required by a bound in this associated type -error[E0277]: the trait bound `bool: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `bool` --> $DIR/point-at-type-on-obligation-failure-2.rs:30:18 | LL | type Assoc = bool; diff --git a/tests/ui/async-await/coroutine-not-future.rs b/tests/ui/async-await/coroutine-not-future.rs index 2993f58378a44..8385c2cbd2c16 100644 --- a/tests/ui/async-await/coroutine-not-future.rs +++ b/tests/ui/async-await/coroutine-not-future.rs @@ -29,11 +29,11 @@ fn main() { // async futures are not coroutines: takes_coroutine(async_fn()); - //~^ ERROR the trait bound + //~^ ERROR the trait takes_coroutine(returns_async_block()); - //~^ ERROR the trait bound + //~^ ERROR the trait takes_coroutine(async {}); - //~^ ERROR the trait bound + //~^ ERROR the trait // coroutines are not futures: takes_future(returns_coroutine()); diff --git a/tests/ui/async-await/coroutine-not-future.stderr b/tests/ui/async-await/coroutine-not-future.stderr index 130c5ef526b39..f4c25cbddca9c 100644 --- a/tests/ui/async-await/coroutine-not-future.stderr +++ b/tests/ui/async-await/coroutine-not-future.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `impl Future: Coroutine<_>` is not satisfied +error[E0277]: the trait `Coroutine<_>` is not implemented for `impl Future` --> $DIR/coroutine-not-future.rs:31:21 | LL | takes_coroutine(async_fn()); @@ -12,7 +12,7 @@ note: required by a bound in `takes_coroutine` LL | fn takes_coroutine(_g: impl Coroutine) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_coroutine` -error[E0277]: the trait bound `impl Future: Coroutine<_>` is not satisfied +error[E0277]: the trait `Coroutine<_>` is not implemented for `impl Future` --> $DIR/coroutine-not-future.rs:33:21 | LL | takes_coroutine(returns_async_block()); @@ -26,7 +26,7 @@ note: required by a bound in `takes_coroutine` LL | fn takes_coroutine(_g: impl Coroutine) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_coroutine` -error[E0277]: the trait bound `{async block@$DIR/coroutine-not-future.rs:35:21: 35:29}: Coroutine<_>` is not satisfied +error[E0277]: the trait `Coroutine<_>` is not implemented for `{async block@$DIR/coroutine-not-future.rs:35:21: 35:29}` --> $DIR/coroutine-not-future.rs:35:21 | LL | takes_coroutine(async {}); diff --git a/tests/ui/async-await/issue-64130-3-other.rs b/tests/ui/async-await/issue-64130-3-other.rs index c7df8b6de74ed..c931ceb52e95c 100644 --- a/tests/ui/async-await/issue-64130-3-other.rs +++ b/tests/ui/async-await/issue-64130-3-other.rs @@ -23,5 +23,5 @@ async fn baz() {} fn main() { is_qux(bar()); - //~^ ERROR the trait bound `Foo: Qux` is not satisfied in `impl Future` + //~^ ERROR the trait `Qux` is not implemented for `Foo` in `impl Future` } diff --git a/tests/ui/async-await/issue-64130-3-other.stderr b/tests/ui/async-await/issue-64130-3-other.stderr index e3a73920c921a..e750377679fc7 100644 --- a/tests/ui/async-await/issue-64130-3-other.stderr +++ b/tests/ui/async-await/issue-64130-3-other.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Foo: Qux` is not satisfied in `impl Future` +error[E0277]: the trait `Qux` is not implemented for `Foo` in `impl Future` --> $DIR/issue-64130-3-other.rs:25:12 | LL | async fn bar() { diff --git a/tests/ui/async-await/issue-72442.rs b/tests/ui/async-await/issue-72442.rs index de24fc9fdcb99..52b3171ea7469 100644 --- a/tests/ui/async-await/issue-72442.rs +++ b/tests/ui/async-await/issue-72442.rs @@ -10,7 +10,7 @@ fn main() -> Result<(), Box> { { let path = std::path::Path::new("."); let mut f = File::open(path.to_str())?; - //~^ ERROR the trait bound + //~^ ERROR the trait let mut src = String::new(); f.read_to_string(&mut src)?; Ok(()) diff --git a/tests/ui/async-await/issue-72442.stderr b/tests/ui/async-await/issue-72442.stderr index e68f7a299908f..8746a05876f6f 100644 --- a/tests/ui/async-await/issue-72442.stderr +++ b/tests/ui/async-await/issue-72442.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Option<&str>: AsRef` is not satisfied +error[E0277]: the trait `AsRef` is not implemented for `Option<&str>` --> $DIR/issue-72442.rs:12:36 | LL | let mut f = File::open(path.to_str())?; diff --git a/tests/ui/auto-traits/str-contains-slice-conceptually.rs b/tests/ui/auto-traits/str-contains-slice-conceptually.rs index 6a16fdcf2842f..1c2184cbdc114 100644 --- a/tests/ui/auto-traits/str-contains-slice-conceptually.rs +++ b/tests/ui/auto-traits/str-contains-slice-conceptually.rs @@ -9,5 +9,5 @@ fn needs_auto_trait() {} fn main() { needs_auto_trait::(); - //~^ ERROR the trait bound `[u8]: AutoTrait` is not satisfied in `str` + //~^ ERROR the trait `AutoTrait` is not implemented for `[u8]` in `str` } diff --git a/tests/ui/auto-traits/str-contains-slice-conceptually.stderr b/tests/ui/auto-traits/str-contains-slice-conceptually.stderr index ebd3a556e7579..92959d24791d3 100644 --- a/tests/ui/auto-traits/str-contains-slice-conceptually.stderr +++ b/tests/ui/auto-traits/str-contains-slice-conceptually.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `[u8]: AutoTrait` is not satisfied in `str` +error[E0277]: the trait `AutoTrait` is not implemented for `[u8]` in `str` --> $DIR/str-contains-slice-conceptually.rs:11:22 | LL | needs_auto_trait::(); diff --git a/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.rs b/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.rs index f2fb67f1108f9..73e84b80f0765 100644 --- a/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.rs +++ b/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.rs @@ -15,5 +15,5 @@ fn main() { is_mytrait::(); is_mytrait::<(MyS2, MyS)>(); - //~^ ERROR `MyS2: MyTrait` is not satisfied + //~^ ERROR trait `MyTrait` is not implemented for `MyS2` } diff --git a/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.stderr b/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.stderr index b7c9738991274..cea2b797a5c3f 100644 --- a/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.stderr +++ b/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `MyS2: MyTrait` is not satisfied in `(MyS2, MyS)` +error[E0277]: the trait `MyTrait` is not implemented for `MyS2` in `(MyS2, MyS)` --> $DIR/typeck-default-trait-impl-constituent-types-2.rs:17:18 | LL | is_mytrait::<(MyS2, MyS)>(); diff --git a/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.rs b/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.rs index 73ff46d05e466..97571015af799 100644 --- a/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.rs +++ b/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.rs @@ -19,5 +19,5 @@ fn main() { is_mytrait::(); is_mytrait::(); - //~^ ERROR `MyS2: MyTrait` is not satisfied + //~^ ERROR trait `MyTrait` is not implemented for `MyS2` } diff --git a/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.stderr b/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.stderr index 668cbc8aeb43e..9e2754179a9d4 100644 --- a/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.stderr +++ b/tests/ui/auto-traits/typeck-default-trait-impl-constituent-types.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `MyS2: MyTrait` is not satisfied +error[E0277]: the trait `MyTrait` is not implemented for `MyS2` --> $DIR/typeck-default-trait-impl-constituent-types.rs:21:18 | LL | is_mytrait::(); diff --git a/tests/ui/auto-traits/typeck-default-trait-impl-negation.rs b/tests/ui/auto-traits/typeck-default-trait-impl-negation.rs index f7f56f97f614e..c33163816e369 100644 --- a/tests/ui/auto-traits/typeck-default-trait-impl-negation.rs +++ b/tests/ui/auto-traits/typeck-default-trait-impl-negation.rs @@ -20,10 +20,10 @@ fn is_my_unsafe_trait() {} fn main() { is_my_trait::(); is_my_trait::(); - //~^ ERROR `ThisImplsUnsafeTrait: MyTrait` is not satisfied + //~^ ERROR trait `MyTrait` is not implemented for `ThisImplsUnsafeTrait` is_my_unsafe_trait::(); - //~^ ERROR `ThisImplsTrait: MyUnsafeTrait` is not satisfied + //~^ ERROR trait `MyUnsafeTrait` is not implemented for `ThisImplsTrait` is_my_unsafe_trait::(); } diff --git a/tests/ui/auto-traits/typeck-default-trait-impl-negation.stderr b/tests/ui/auto-traits/typeck-default-trait-impl-negation.stderr index fa8dd41da237b..c7ad5c334402f 100644 --- a/tests/ui/auto-traits/typeck-default-trait-impl-negation.stderr +++ b/tests/ui/auto-traits/typeck-default-trait-impl-negation.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `ThisImplsUnsafeTrait: MyTrait` is not satisfied +error[E0277]: the trait `MyTrait` is not implemented for `ThisImplsUnsafeTrait` --> $DIR/typeck-default-trait-impl-negation.rs:22:19 | LL | is_my_trait::(); @@ -10,7 +10,7 @@ note: required by a bound in `is_my_trait` LL | fn is_my_trait() {} | ^^^^^^^ required by this bound in `is_my_trait` -error[E0277]: the trait bound `ThisImplsTrait: MyUnsafeTrait` is not satisfied +error[E0277]: the trait `MyUnsafeTrait` is not implemented for `ThisImplsTrait` --> $DIR/typeck-default-trait-impl-negation.rs:25:26 | LL | is_my_unsafe_trait::(); diff --git a/tests/ui/auto-traits/typeck-default-trait-impl-precedence.rs b/tests/ui/auto-traits/typeck-default-trait-impl-precedence.rs index 2bbe82270bd06..d129e19942b74 100644 --- a/tests/ui/auto-traits/typeck-default-trait-impl-precedence.rs +++ b/tests/ui/auto-traits/typeck-default-trait-impl-precedence.rs @@ -17,5 +17,5 @@ impl Signed for i32 { } fn main() { is_defaulted::<&'static i32>(); is_defaulted::<&'static u32>(); - //~^ ERROR `u32: Signed` is not satisfied + //~^ ERROR trait `Signed` is not implemented for `u32` } diff --git a/tests/ui/auto-traits/typeck-default-trait-impl-precedence.stderr b/tests/ui/auto-traits/typeck-default-trait-impl-precedence.stderr index e699422ae2b86..41a11fd232691 100644 --- a/tests/ui/auto-traits/typeck-default-trait-impl-precedence.stderr +++ b/tests/ui/auto-traits/typeck-default-trait-impl-precedence.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `u32: Signed` is not satisfied +error[E0277]: the trait `Signed` is not implemented for `u32` --> $DIR/typeck-default-trait-impl-precedence.rs:19:20 | LL | is_defaulted::<&'static u32>(); diff --git a/tests/ui/block-result/issue-22645.stderr b/tests/ui/block-result/issue-22645.stderr index 2a267ce792fde..e7c0182874629 100644 --- a/tests/ui/block-result/issue-22645.stderr +++ b/tests/ui/block-result/issue-22645.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `{integer}: Scalar` is not satisfied +error[E0277]: the trait `Scalar` is not implemented for `{integer}` --> $DIR/issue-22645.rs:15:5 | LL | b + 3 diff --git a/tests/ui/coercion/coerce-issue-49593-box-never-windows.rs b/tests/ui/coercion/coerce-issue-49593-box-never-windows.rs index b317841ab6e71..b52592b47e203 100644 --- a/tests/ui/coercion/coerce-issue-49593-box-never-windows.rs +++ b/tests/ui/coercion/coerce-issue-49593-box-never-windows.rs @@ -16,12 +16,12 @@ fn raw_ptr_box(t: T) -> *mut T { fn foo(x: !) -> Box { /* *mut $0 is coerced to Box here */ Box::<_ /* ! */>::new(x) - //[nofallback]~^ ERROR trait bound `(): std::error::Error` is not satisfied + //[nofallback]~^ ERROR trait `std::error::Error` is not implemented for `()` } fn foo_raw_ptr(x: !) -> *mut dyn Error { /* *mut $0 is coerced to *mut Error here */ raw_ptr_box::<_ /* ! */>(x) - //[nofallback]~^ ERROR trait bound `(): std::error::Error` is not satisfied + //[nofallback]~^ ERROR trait `std::error::Error` is not implemented for `()` } fn no_coercion(d: *mut dyn Error) -> *mut dyn Error { diff --git a/tests/ui/coercion/coerce-issue-49593-box-never.nofallback.stderr b/tests/ui/coercion/coerce-issue-49593-box-never.nofallback.stderr index 0d98fa93e5a4b..7f20e5696003f 100644 --- a/tests/ui/coercion/coerce-issue-49593-box-never.nofallback.stderr +++ b/tests/ui/coercion/coerce-issue-49593-box-never.nofallback.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): std::error::Error` is not satisfied +error[E0277]: the trait `std::error::Error` is not implemented for `()` --> $DIR/coerce-issue-49593-box-never.rs:18:53 | LL | /* *mut $0 is coerced to Box here */ Box::<_ /* ! */>::new(x) @@ -6,7 +6,7 @@ LL | /* *mut $0 is coerced to Box here */ Box::<_ /* ! */>::new(x | = note: required for the cast from `Box<()>` to `Box<(dyn std::error::Error + 'static)>` -error[E0277]: the trait bound `(): std::error::Error` is not satisfied +error[E0277]: the trait `std::error::Error` is not implemented for `()` --> $DIR/coerce-issue-49593-box-never.rs:23:49 | LL | /* *mut $0 is coerced to *mut Error here */ raw_ptr_box::<_ /* ! */>(x) diff --git a/tests/ui/coercion/coerce-issue-49593-box-never.rs b/tests/ui/coercion/coerce-issue-49593-box-never.rs index 19a2c036fbcb3..c5de5529c73ba 100644 --- a/tests/ui/coercion/coerce-issue-49593-box-never.rs +++ b/tests/ui/coercion/coerce-issue-49593-box-never.rs @@ -16,12 +16,12 @@ fn raw_ptr_box(t: T) -> *mut T { fn foo(x: !) -> Box { /* *mut $0 is coerced to Box here */ Box::<_ /* ! */>::new(x) - //[nofallback]~^ ERROR trait bound `(): std::error::Error` is not satisfied + //[nofallback]~^ ERROR trait `std::error::Error` is not implemented for `()` } fn foo_raw_ptr(x: !) -> *mut dyn Error { /* *mut $0 is coerced to *mut Error here */ raw_ptr_box::<_ /* ! */>(x) - //[nofallback]~^ ERROR trait bound `(): std::error::Error` is not satisfied + //[nofallback]~^ ERROR trait `std::error::Error` is not implemented for `()` } fn no_coercion(d: *mut dyn Error) -> *mut dyn Error { diff --git a/tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr b/tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr index 4f898ec127b9f..d8d0d3471e409 100644 --- a/tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr +++ b/tests/ui/coherence/coherence-unsafe-trait-object-impl.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&dyn Trait: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `&dyn Trait` --> $DIR/coherence-unsafe-trait-object-impl.rs:15:13 | LL | takes_t(t); diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.rs b/tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.rs index dfb8a36ec5350..533e09fc6cf3a 100644 --- a/tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.rs +++ b/tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.rs @@ -9,11 +9,11 @@ struct CantParam(ImplementsConstParamTy); impl std::marker::ConstParamTy for CantParam {} //~^ error: the type `CantParam` does not `#[derive(PartialEq)]` -//~| the trait bound `CantParam: Eq` is not satisfied +//~| ERROR trait `Eq` is not implemented for `CantParam` #[derive(std::marker::ConstParamTy)] //~^ error: the type `CantParamDerive` does not `#[derive(PartialEq)]` -//~| the trait bound `CantParamDerive: Eq` is not satisfied +//~| ERROR trait `Eq` is not implemented for `CantParamDerive` struct CantParamDerive(ImplementsConstParamTy); fn check() {} diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.stderr b/tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.stderr index e213808cf7bd6..0a3ad80346e00 100644 --- a/tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.stderr +++ b/tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `CantParam: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `CantParam` --> $DIR/const_param_ty_impl_no_structural_eq.rs:10:36 | LL | impl std::marker::ConstParamTy for CantParam {} @@ -21,7 +21,7 @@ LL | impl std::marker::ConstParamTy for CantParam {} note: required by a bound in `ConstParamTy` --> $SRC_DIR/core/src/marker.rs:LL:COL -error[E0277]: the trait bound `CantParamDerive: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `CantParamDerive` --> $DIR/const_param_ty_impl_no_structural_eq.rs:14:10 | LL | #[derive(std::marker::ConstParamTy)] diff --git a/tests/ui/const-generics/associated-type-bound-fail.rs b/tests/ui/const-generics/associated-type-bound-fail.rs index 937b8bcb63057..133502c43bea9 100644 --- a/tests/ui/const-generics/associated-type-bound-fail.rs +++ b/tests/ui/const-generics/associated-type-bound-fail.rs @@ -6,7 +6,7 @@ trait Foo { impl Bar<3> for u16 {} impl Foo for i16 { - type Assoc = u16; //~ ERROR the trait bound `u16: Bar` + type Assoc = u16; //~ ERROR trait `Bar` is not implemented for `u16` } fn main() {} diff --git a/tests/ui/const-generics/associated-type-bound-fail.stderr b/tests/ui/const-generics/associated-type-bound-fail.stderr index 602a8927a8530..f0ed95046a572 100644 --- a/tests/ui/const-generics/associated-type-bound-fail.stderr +++ b/tests/ui/const-generics/associated-type-bound-fail.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `u16: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `u16` --> $DIR/associated-type-bound-fail.rs:9:18 | LL | type Assoc = u16; diff --git a/tests/ui/const-generics/defaults/rp_impl_trait_fail.rs b/tests/ui/const-generics/defaults/rp_impl_trait_fail.rs index ba41bf38a3379..da4902d479d0d 100644 --- a/tests/ui/const-generics/defaults/rp_impl_trait_fail.rs +++ b/tests/ui/const-generics/defaults/rp_impl_trait_fail.rs @@ -4,7 +4,7 @@ trait Trait {} impl Trait for Uwu {} fn rawr() -> impl Trait { - //~^ error: the trait bound `Uwu<10, 12>: Trait` is not satisfied + //~^ ERROR trait `Trait` is not implemented for `Uwu<10, 12>` Uwu::<10, 12> } @@ -14,12 +14,12 @@ impl Traitor for u32 {} impl Traitor<1, 2> for u64 {} fn uwu() -> impl Traitor { - //~^ error: the trait bound `u32: Traitor` is not satisfied + //~^ ERROR trait `Traitor` is not implemented for `u32` 1_u32 } fn owo() -> impl Traitor { - //~^ error: the trait bound `u64: Traitor` is not satisfied + //~^ ERROR trait `Traitor` is not implemented for `u64` 1_u64 } diff --git a/tests/ui/const-generics/defaults/rp_impl_trait_fail.stderr b/tests/ui/const-generics/defaults/rp_impl_trait_fail.stderr index 4ed1c0ded9f86..de5ea052f1bbc 100644 --- a/tests/ui/const-generics/defaults/rp_impl_trait_fail.stderr +++ b/tests/ui/const-generics/defaults/rp_impl_trait_fail.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Uwu<10, 12>: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `Uwu<10, 12>` --> $DIR/rp_impl_trait_fail.rs:6:14 | LL | fn rawr() -> impl Trait { @@ -9,7 +9,7 @@ LL | Uwu::<10, 12> | = help: the trait `Trait` is implemented for `Uwu` -error[E0277]: the trait bound `u32: Traitor` is not satisfied +error[E0277]: the trait `Traitor` is not implemented for `u32` --> $DIR/rp_impl_trait_fail.rs:16:26 | LL | fn uwu() -> impl Traitor { @@ -20,7 +20,7 @@ LL | 1_u32 | = help: the trait `Traitor` is implemented for `u32` -error[E0277]: the trait bound `u64: Traitor` is not satisfied +error[E0277]: the trait `Traitor` is not implemented for `u64` --> $DIR/rp_impl_trait_fail.rs:21:13 | LL | fn owo() -> impl Traitor { diff --git a/tests/ui/const-generics/defaults/trait_objects_fail.rs b/tests/ui/const-generics/defaults/trait_objects_fail.rs index 6ab803f990920..509f36b42a241 100644 --- a/tests/ui/const-generics/defaults/trait_objects_fail.rs +++ b/tests/ui/const-generics/defaults/trait_objects_fail.rs @@ -24,7 +24,7 @@ fn bar(arg: &dyn Traitor) -> u8 { fn main() { foo(&10_u32); - //~^ error: the trait bound `u32: Trait` is not satisfied + //~^ ERROR trait `Trait` is not implemented for `u32` bar(&true); - //~^ error: the trait bound `bool: Traitor<_>` is not satisfied + //~^ ERROR trait `Traitor<_>` is not implemented for `bool` } diff --git a/tests/ui/const-generics/defaults/trait_objects_fail.stderr b/tests/ui/const-generics/defaults/trait_objects_fail.stderr index 481d77728b9ef..8ac5e27c89452 100644 --- a/tests/ui/const-generics/defaults/trait_objects_fail.stderr +++ b/tests/ui/const-generics/defaults/trait_objects_fail.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `u32: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `u32` --> $DIR/trait_objects_fail.rs:26:9 | LL | foo(&10_u32); @@ -7,7 +7,7 @@ LL | foo(&10_u32); = help: the trait `Trait<2>` is implemented for `u32` = note: required for the cast from `&u32` to `&dyn Trait` -error[E0277]: the trait bound `bool: Traitor<_>` is not satisfied +error[E0277]: the trait `Traitor<_>` is not implemented for `bool` --> $DIR/trait_objects_fail.rs:28:9 | LL | bar(&true); diff --git a/tests/ui/const-generics/defaults/wfness.rs b/tests/ui/const-generics/defaults/wfness.rs index a93f670815a03..eca07f5fae8db 100644 --- a/tests/ui/const-generics/defaults/wfness.rs +++ b/tests/ui/const-generics/defaults/wfness.rs @@ -6,7 +6,7 @@ impl Trait<3> for () {} struct WhereClause where (): Trait; -//~^ error: the trait bound `(): Trait<2>` is not satisfied +//~^ ERROR trait `Trait<2>` is not implemented for `()` trait Traitor {} struct WhereClauseTooGeneric(T) @@ -16,7 +16,7 @@ where // no error on struct def struct DependentDefaultWfness>(T); fn foo() -> DependentDefaultWfness { - //~^ error: the trait bound `(): Trait<1>` is not satisfied + //~^ ERROR trait `Trait<1>` is not implemented for `()` loop {} } diff --git a/tests/ui/const-generics/defaults/wfness.stderr b/tests/ui/const-generics/defaults/wfness.stderr index bd9bfcd7dadf6..bce6a1ee47da2 100644 --- a/tests/ui/const-generics/defaults/wfness.stderr +++ b/tests/ui/const-generics/defaults/wfness.stderr @@ -4,7 +4,7 @@ error[E0080]: evaluation of constant value failed LL | struct Ooopsies; | ^^^^^^^^^^^ attempt to compute `u8::MAX + 1_u8`, which would overflow -error[E0277]: the trait bound `(): Trait<2>` is not satisfied +error[E0277]: the trait `Trait<2>` is not implemented for `()` --> $DIR/wfness.rs:8:9 | LL | (): Trait; @@ -12,7 +12,7 @@ LL | (): Trait; | = help: the trait `Trait<3>` is implemented for `()` -error[E0277]: the trait bound `(): Trait<1>` is not satisfied +error[E0277]: the trait `Trait<1>` is not implemented for `()` --> $DIR/wfness.rs:18:13 | LL | fn foo() -> DependentDefaultWfness { diff --git a/tests/ui/const-generics/dont-evaluate-array-len-on-err-1.rs b/tests/ui/const-generics/dont-evaluate-array-len-on-err-1.rs index 6c4ee1af210ba..6931475938739 100644 --- a/tests/ui/const-generics/dont-evaluate-array-len-on-err-1.rs +++ b/tests/ui/const-generics/dont-evaluate-array-len-on-err-1.rs @@ -13,7 +13,7 @@ trait Foo { [Adt; std::mem::size_of::()]: , { <[Adt; std::mem::size_of::()] as Foo>::bar() - //~^ Error: the trait bound + //~^ Error: the trait } fn bar() {} diff --git a/tests/ui/const-generics/dont-evaluate-array-len-on-err-1.stderr b/tests/ui/const-generics/dont-evaluate-array-len-on-err-1.stderr index 4e9e001f2c1a4..7c048224fb04f 100644 --- a/tests/ui/const-generics/dont-evaluate-array-len-on-err-1.stderr +++ b/tests/ui/const-generics/dont-evaluate-array-len-on-err-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `[Adt; std::mem::size_of::()]: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `[Adt; std::mem::size_of::()]` --> $DIR/dont-evaluate-array-len-on-err-1.rs:15:10 | LL | <[Adt; std::mem::size_of::()] as Foo>::bar() diff --git a/tests/ui/const-generics/exhaustive-value.rs b/tests/ui/const-generics/exhaustive-value.rs index 778d498343e08..0a3161a4947db 100644 --- a/tests/ui/const-generics/exhaustive-value.rs +++ b/tests/ui/const-generics/exhaustive-value.rs @@ -259,7 +259,7 @@ impl Foo<254> for () {} impl Foo<255> for () {} fn foo() { - <() as Foo>::test() //~ ERROR the trait bound `(): Foo` + <() as Foo>::test() //~ ERROR trait `Foo` is not implemented for `()` } fn main() { diff --git a/tests/ui/const-generics/exhaustive-value.stderr b/tests/ui/const-generics/exhaustive-value.stderr index 42814c1fb7056..26450439269c4 100644 --- a/tests/ui/const-generics/exhaustive-value.stderr +++ b/tests/ui/const-generics/exhaustive-value.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `()` --> $DIR/exhaustive-value.rs:262:6 | LL | <() as Foo>::test() diff --git a/tests/ui/const-generics/generic_const_exprs/issue-85848.rs b/tests/ui/const-generics/generic_const_exprs/issue-85848.rs index 3a7f4c6184cf1..a34868550d6d6 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-85848.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-85848.rs @@ -22,7 +22,7 @@ impl Contains() }> for U where T: _Contains {} fn writes_to_path(cap: &C) { writes_to_specific_path(&cap); - //~^ ERROR: the trait bound `(): _Contains<&C>` is not satisfied [E0277] + //~^ ERROR trait `_Contains<&C>` is not implemented for `()` //~| ERROR: unconstrained generic constant //~| ERROR: mismatched types [E0308] } diff --git a/tests/ui/const-generics/generic_const_exprs/issue-85848.stderr b/tests/ui/const-generics/generic_const_exprs/issue-85848.stderr index 3acccba026f26..5309cf8d6b41b 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-85848.stderr +++ b/tests/ui/const-generics/generic_const_exprs/issue-85848.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): _Contains<&C>` is not satisfied +error[E0277]: the trait `_Contains<&C>` is not implemented for `()` --> $DIR/issue-85848.rs:24:29 | LL | writes_to_specific_path(&cap); diff --git a/tests/ui/const-generics/issues/issue-61336-2.rs b/tests/ui/const-generics/issues/issue-61336-2.rs index b7cd29f89323a..ffce220c6035b 100644 --- a/tests/ui/const-generics/issues/issue-61336-2.rs +++ b/tests/ui/const-generics/issues/issue-61336-2.rs @@ -4,7 +4,7 @@ fn f(x: T) -> [T; N] { fn g(x: T) -> [T; N] { [x; { N }] - //~^ ERROR the trait bound `T: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `T` } fn main() { diff --git a/tests/ui/const-generics/issues/issue-61336-2.stderr b/tests/ui/const-generics/issues/issue-61336-2.stderr index b0864689f7400..ca4fa9880fc89 100644 --- a/tests/ui/const-generics/issues/issue-61336-2.stderr +++ b/tests/ui/const-generics/issues/issue-61336-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/issue-61336-2.rs:6:6 | LL | [x; { N }] diff --git a/tests/ui/const-generics/issues/issue-61336.rs b/tests/ui/const-generics/issues/issue-61336.rs index 80be1d8e5e540..f92e2d93a732e 100644 --- a/tests/ui/const-generics/issues/issue-61336.rs +++ b/tests/ui/const-generics/issues/issue-61336.rs @@ -4,7 +4,7 @@ fn f(x: T) -> [T; N] { fn g(x: T) -> [T; N] { [x; N] - //~^ ERROR the trait bound `T: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `T` } fn main() { diff --git a/tests/ui/const-generics/issues/issue-61336.stderr b/tests/ui/const-generics/issues/issue-61336.stderr index 111afbda343f7..261074460c1b2 100644 --- a/tests/ui/const-generics/issues/issue-61336.stderr +++ b/tests/ui/const-generics/issues/issue-61336.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/issue-61336.rs:6:6 | LL | [x; N] diff --git a/tests/ui/const-generics/issues/issue-67185-2.rs b/tests/ui/const-generics/issues/issue-67185-2.rs index 18bb6f6bc1edc..4e53f11044b3e 100644 --- a/tests/ui/const-generics/issues/issue-67185-2.rs +++ b/tests/ui/const-generics/issues/issue-67185-2.rs @@ -11,20 +11,20 @@ impl Bar for [[u16; 3]; 3] {} trait Foo where - [::Quaks; 2]: Bar, //~ ERROR the trait bound `[[u16; 3]; 2]: Bar` is not satisfied [E0277] - ::Quaks: Bar, //~ ERROR the trait bound `[u16; 3]: Bar` is not satisfied [E0277] + [::Quaks; 2]: Bar, //~ ERROR trait `Bar` is not implemented for `[[u16; 3]; 2]` + ::Quaks: Bar, //~ ERROR trait `Bar` is not implemented for `[u16; 3]` { } struct FooImpl; impl Foo for FooImpl {} -//~^ ERROR the trait bound `[u16; 3]: Bar` is not satisfied [E0277] -//~^^ ERROR the trait bound `[[u16; 3]; 2]: Bar` is not satisfied [E0277] +//~^ ERROR trait `Bar` is not implemented for `[u16; 3]` +//~^^ ERROR trait `Bar` is not implemented for `[[u16; 3]; 2]` fn f(_: impl Foo) {} -//~^ ERROR the trait bound `[u16; 3]: Bar` is not satisfied [E0277] -//~^^ ERROR the trait bound `[[u16; 3]; 2]: Bar` is not satisfied [E0277] +//~^ ERROR trait `Bar` is not implemented for `[u16; 3]` +//~^^ ERROR trait `Bar` is not implemented for `[[u16; 3]; 2]` fn main() { f(FooImpl) diff --git a/tests/ui/const-generics/issues/issue-67185-2.stderr b/tests/ui/const-generics/issues/issue-67185-2.stderr index 24a2d60f2e1f0..f0bff1130a559 100644 --- a/tests/ui/const-generics/issues/issue-67185-2.stderr +++ b/tests/ui/const-generics/issues/issue-67185-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `[u16; 3]` --> $DIR/issue-67185-2.rs:15:5 | LL | ::Quaks: Bar, @@ -10,7 +10,7 @@ LL | ::Quaks: Bar, = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable -error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `[[u16; 3]; 2]` --> $DIR/issue-67185-2.rs:14:5 | LL | [::Quaks; 2]: Bar, @@ -22,7 +22,7 @@ LL | [::Quaks; 2]: Bar, = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable -error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `[u16; 3]` --> $DIR/issue-67185-2.rs:21:6 | LL | impl Foo for FooImpl {} @@ -40,7 +40,7 @@ LL | trait Foo LL | ::Quaks: Bar, | ^^^ required by this bound in `Foo` -error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `[[u16; 3]; 2]` --> $DIR/issue-67185-2.rs:21:6 | LL | impl Foo for FooImpl {} @@ -58,7 +58,7 @@ LL | where LL | [::Quaks; 2]: Bar, | ^^^ required by this bound in `Foo` -error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `[[u16; 3]; 2]` --> $DIR/issue-67185-2.rs:25:14 | LL | fn f(_: impl Foo) {} @@ -76,7 +76,7 @@ LL | where LL | [::Quaks; 2]: Bar, | ^^^ required by this bound in `Foo` -error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `[u16; 3]` --> $DIR/issue-67185-2.rs:25:14 | LL | fn f(_: impl Foo) {} diff --git a/tests/ui/const-generics/issues/issue-86530.rs b/tests/ui/const-generics/issues/issue-86530.rs index b024decd4e11c..8dd74db2fe008 100644 --- a/tests/ui/const-generics/issues/issue-86530.rs +++ b/tests/ui/const-generics/issues/issue-86530.rs @@ -14,7 +14,7 @@ where fn unit_literals() { z(" "); - //~^ ERROR: the trait bound `&str: X` is not satisfied + //~^ ERROR trait `X` is not implemented for `&str` } fn main() {} diff --git a/tests/ui/const-generics/issues/issue-86530.stderr b/tests/ui/const-generics/issues/issue-86530.stderr index aa8aa4e10a81e..cb5f1dc6d8805 100644 --- a/tests/ui/const-generics/issues/issue-86530.stderr +++ b/tests/ui/const-generics/issues/issue-86530.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&str: X` is not satisfied +error[E0277]: the trait `X` is not implemented for `&str` --> $DIR/issue-86530.rs:16:7 | LL | z(" "); diff --git a/tests/ui/const-generics/occurs-check/unused-substs-1.rs b/tests/ui/const-generics/occurs-check/unused-substs-1.rs index 9d12250c91433..2b13a3eb823a8 100644 --- a/tests/ui/const-generics/occurs-check/unused-substs-1.rs +++ b/tests/ui/const-generics/occurs-check/unused-substs-1.rs @@ -9,5 +9,5 @@ where A: Bar; fn main() { - let _ = A; //~ERROR the trait bound + let _ = A; //~ERROR the trait } diff --git a/tests/ui/const-generics/occurs-check/unused-substs-1.stderr b/tests/ui/const-generics/occurs-check/unused-substs-1.stderr index 8c66c4fefb7ed..383b82f3c28fc 100644 --- a/tests/ui/const-generics/occurs-check/unused-substs-1.stderr +++ b/tests/ui/const-generics/occurs-check/unused-substs-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `A<_>: Bar<_>` is not satisfied +error[E0277]: the trait `Bar<_>` is not implemented for `A<_>` --> $DIR/unused-substs-1.rs:12:13 | LL | let _ = A; diff --git a/tests/ui/consts/const-blocks/fn-call-in-non-const.rs b/tests/ui/consts/const-blocks/fn-call-in-non-const.rs index 18b4dc714ded0..d245a4b83aca8 100644 --- a/tests/ui/consts/const-blocks/fn-call-in-non-const.rs +++ b/tests/ui/consts/const-blocks/fn-call-in-non-const.rs @@ -12,5 +12,5 @@ const fn copy() -> u32 { fn main() { let _: [u32; 2] = [copy(); 2]; let _: [Option; 2] = [no_copy(); 2]; - //~^ ERROR the trait bound `Bar: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `Bar` } diff --git a/tests/ui/consts/const-blocks/fn-call-in-non-const.stderr b/tests/ui/consts/const-blocks/fn-call-in-non-const.stderr index 14bce10f78744..7c862b78b05f0 100644 --- a/tests/ui/consts/const-blocks/fn-call-in-non-const.stderr +++ b/tests/ui/consts/const-blocks/fn-call-in-non-const.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Bar: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Bar` --> $DIR/fn-call-in-non-const.rs:14:32 | LL | let _: [Option; 2] = [no_copy(); 2]; diff --git a/tests/ui/consts/const-blocks/migrate-fail.rs b/tests/ui/consts/const-blocks/migrate-fail.rs index fddbfbb9d3247..656c255ec3434 100644 --- a/tests/ui/consts/const-blocks/migrate-fail.rs +++ b/tests/ui/consts/const-blocks/migrate-fail.rs @@ -9,13 +9,13 @@ mod non_constants { fn no_impl_copy_empty_value_multiple_elements() { let x = None; let arr: [Option; 2] = [x; 2]; - //~^ ERROR the trait bound `Bar: Copy` is not satisfied [E0277] + //~^ ERROR trait `Copy` is not implemented for `Bar` } fn no_impl_copy_value_multiple_elements() { let x = Some(Bar); let arr: [Option; 2] = [x; 2]; - //~^ ERROR the trait bound `Bar: Copy` is not satisfied [E0277] + //~^ ERROR trait `Copy` is not implemented for `Bar` } } diff --git a/tests/ui/consts/const-blocks/migrate-fail.stderr b/tests/ui/consts/const-blocks/migrate-fail.stderr index 3887658f74835..3e0e41d560d95 100644 --- a/tests/ui/consts/const-blocks/migrate-fail.stderr +++ b/tests/ui/consts/const-blocks/migrate-fail.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Bar: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Bar` --> $DIR/migrate-fail.rs:11:38 | LL | let arr: [Option; 2] = [x; 2]; @@ -14,7 +14,7 @@ LL + #[derive(Copy)] LL | struct Bar; | -error[E0277]: the trait bound `Bar: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Bar` --> $DIR/migrate-fail.rs:17:38 | LL | let arr: [Option; 2] = [x; 2]; diff --git a/tests/ui/consts/const-blocks/nll-fail.rs b/tests/ui/consts/const-blocks/nll-fail.rs index fddbfbb9d3247..656c255ec3434 100644 --- a/tests/ui/consts/const-blocks/nll-fail.rs +++ b/tests/ui/consts/const-blocks/nll-fail.rs @@ -9,13 +9,13 @@ mod non_constants { fn no_impl_copy_empty_value_multiple_elements() { let x = None; let arr: [Option; 2] = [x; 2]; - //~^ ERROR the trait bound `Bar: Copy` is not satisfied [E0277] + //~^ ERROR trait `Copy` is not implemented for `Bar` } fn no_impl_copy_value_multiple_elements() { let x = Some(Bar); let arr: [Option; 2] = [x; 2]; - //~^ ERROR the trait bound `Bar: Copy` is not satisfied [E0277] + //~^ ERROR trait `Copy` is not implemented for `Bar` } } diff --git a/tests/ui/consts/const-blocks/nll-fail.stderr b/tests/ui/consts/const-blocks/nll-fail.stderr index a2ea833f650e3..c987c3d17b4f6 100644 --- a/tests/ui/consts/const-blocks/nll-fail.stderr +++ b/tests/ui/consts/const-blocks/nll-fail.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Bar: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Bar` --> $DIR/nll-fail.rs:11:38 | LL | let arr: [Option; 2] = [x; 2]; @@ -14,7 +14,7 @@ LL + #[derive(Copy)] LL | struct Bar; | -error[E0277]: the trait bound `Bar: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Bar` --> $DIR/nll-fail.rs:17:38 | LL | let arr: [Option; 2] = [x; 2]; diff --git a/tests/ui/consts/const-blocks/trait-error.rs b/tests/ui/consts/const-blocks/trait-error.rs index 49d1e9b943420..489802d19100b 100644 --- a/tests/ui/consts/const-blocks/trait-error.rs +++ b/tests/ui/consts/const-blocks/trait-error.rs @@ -3,5 +3,5 @@ struct Foo(T); fn main() { [Foo(String::new()); 4]; - //~^ ERROR the trait bound `String: Copy` is not satisfied [E0277] + //~^ ERROR trait `Copy` is not implemented for `String` } diff --git a/tests/ui/consts/const-blocks/trait-error.stderr b/tests/ui/consts/const-blocks/trait-error.stderr index b0b1378bb7de0..9b4620ee24e01 100644 --- a/tests/ui/consts/const-blocks/trait-error.stderr +++ b/tests/ui/consts/const-blocks/trait-error.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/trait-error.rs:5:6 | LL | [Foo(String::new()); 4]; diff --git a/tests/ui/consts/const-fn-in-vec.rs b/tests/ui/consts/const-fn-in-vec.rs index 0483800efefd1..11a62bd01fb07 100644 --- a/tests/ui/consts/const-fn-in-vec.rs +++ b/tests/ui/consts/const-fn-in-vec.rs @@ -1,11 +1,11 @@ static _MAYBE_STRINGS: [Option; 5] = [None; 5]; -//~^ ERROR the trait bound `String: Copy` is not satisfied +//~^ ERROR trait `Copy` is not implemented for `String` fn main() { // should hint to create an inline `const` block // or to create a new `const` item let _strings: [String; 5] = [String::new(); 5]; - //~^ ERROR the trait bound `String: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `String` let _maybe_strings: [Option; 5] = [None; 5]; - //~^ ERROR the trait bound `String: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `String` } diff --git a/tests/ui/consts/const-fn-in-vec.stderr b/tests/ui/consts/const-fn-in-vec.stderr index 12098e8199cd7..9c7a5dbcb96b3 100644 --- a/tests/ui/consts/const-fn-in-vec.stderr +++ b/tests/ui/consts/const-fn-in-vec.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/const-fn-in-vec.rs:1:47 | LL | static _MAYBE_STRINGS: [Option; 5] = [None; 5]; @@ -13,7 +13,7 @@ LL + const ARRAY_REPEAT_VALUE: Option = None; LL ~ static _MAYBE_STRINGS: [Option; 5] = [ARRAY_REPEAT_VALUE; 5]; | -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/const-fn-in-vec.rs:7:34 | LL | let _strings: [String; 5] = [String::new(); 5]; @@ -27,7 +27,7 @@ LL ~ const ARRAY_REPEAT_VALUE: String = String::new(); LL ~ let _strings: [String; 5] = [ARRAY_REPEAT_VALUE; 5]; | -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/const-fn-in-vec.rs:9:48 | LL | let _maybe_strings: [Option; 5] = [None; 5]; diff --git a/tests/ui/consts/ct-var-in-collect_all_mismatches.rs b/tests/ui/consts/ct-var-in-collect_all_mismatches.rs index 5fb633de9831c..8ebaff3ba10cd 100644 --- a/tests/ui/consts/ct-var-in-collect_all_mismatches.rs +++ b/tests/ui/consts/ct-var-in-collect_all_mismatches.rs @@ -7,7 +7,7 @@ trait Bar {} impl Foo { fn trigger(self) { self.unsatisfied() - //~^ ERROR the trait bound `T: Bar` is not satisfied + //~^ ERROR trait `Bar` is not implemented for `T` } fn unsatisfied(self) diff --git a/tests/ui/consts/ct-var-in-collect_all_mismatches.stderr b/tests/ui/consts/ct-var-in-collect_all_mismatches.stderr index 24572040b9104..01457e35d7cab 100644 --- a/tests/ui/consts/ct-var-in-collect_all_mismatches.stderr +++ b/tests/ui/consts/ct-var-in-collect_all_mismatches.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `T` --> $DIR/ct-var-in-collect_all_mismatches.rs:9:14 | LL | self.unsatisfied() diff --git a/tests/ui/consts/issue-94675.rs b/tests/ui/consts/issue-94675.rs index 00f5c3251e0a9..90cff790284ba 100644 --- a/tests/ui/consts/issue-94675.rs +++ b/tests/ui/consts/issue-94675.rs @@ -11,7 +11,7 @@ impl<'a> Foo<'a> { self.bar[0] = baz.len(); //FIXME ~^ ERROR: cannot call //FIXME ~| ERROR: cannot call - //FIXME ~| ERROR: the trait bound + //FIXME ~| ERROR: the trait } } diff --git a/tests/ui/consts/missing-larger-array-impl.rs b/tests/ui/consts/missing-larger-array-impl.rs index e6c879c8ebdab..56fc2c6fc7c4e 100644 --- a/tests/ui/consts/missing-larger-array-impl.rs +++ b/tests/ui/consts/missing-larger-array-impl.rs @@ -5,5 +5,5 @@ struct X; fn main() { <[X; 35] as Default>::default(); - //~^ ERROR the trait bound `[X; 35]: Default` is not satisfied + //~^ ERROR trait `Default` is not implemented for `[X; 35]` } diff --git a/tests/ui/consts/missing-larger-array-impl.stderr b/tests/ui/consts/missing-larger-array-impl.stderr index acf38d00ec64a..e180ff4da5c08 100644 --- a/tests/ui/consts/missing-larger-array-impl.stderr +++ b/tests/ui/consts/missing-larger-array-impl.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `[X; 35]: Default` is not satisfied +error[E0277]: the trait `Default` is not implemented for `[X; 35]` --> $DIR/missing-larger-array-impl.rs:7:6 | LL | <[X; 35] as Default>::default(); diff --git a/tests/ui/coroutine/clone-impl-async.rs b/tests/ui/coroutine/clone-impl-async.rs index d7ba1143b5c22..e91fe935ba59c 100644 --- a/tests/ui/coroutine/clone-impl-async.rs +++ b/tests/ui/coroutine/clone-impl-async.rs @@ -15,42 +15,42 @@ fn main() { drop(non_clone); }; check_copy(&inner_non_clone); - //~^ ERROR : Copy` is not satisfied + //~^ ERROR the trait `Copy` is not implemented for check_clone(&inner_non_clone); - //~^ ERROR : Clone` is not satisfied + //~^ ERROR the trait `Clone` is not implemented for let non_clone = NonClone; let outer_non_clone = async move { drop(non_clone); }; check_copy(&outer_non_clone); - //~^ ERROR : Copy` is not satisfied + //~^ ERROR the trait `Copy` is not implemented for check_clone(&outer_non_clone); - //~^ ERROR : Clone` is not satisfied + //~^ ERROR the trait `Clone` is not implemented for let maybe_copy_clone = async move {}; check_copy(&maybe_copy_clone); - //~^ ERROR : Copy` is not satisfied + //~^ ERROR the trait `Copy` is not implemented for check_clone(&maybe_copy_clone); - //~^ ERROR : Clone` is not satisfied + //~^ ERROR the trait `Clone` is not implemented for let inner_non_clone_fn = the_inner_non_clone_fn(); check_copy(&inner_non_clone_fn); - //~^ ERROR : Copy` is not satisfied + //~^ ERROR the trait `Copy` is not implemented for check_clone(&inner_non_clone_fn); - //~^ ERROR : Clone` is not satisfied + //~^ ERROR the trait `Clone` is not implemented for let outer_non_clone_fn = the_outer_non_clone_fn(NonClone); check_copy(&outer_non_clone_fn); - //~^ ERROR : Copy` is not satisfied + //~^ ERROR the trait `Copy` is not implemented for check_clone(&outer_non_clone_fn); - //~^ ERROR : Clone` is not satisfied + //~^ ERROR the trait `Clone` is not implemented for let maybe_copy_clone_fn = the_maybe_copy_clone_fn(); check_copy(&maybe_copy_clone_fn); - //~^ ERROR : Copy` is not satisfied + //~^ ERROR the trait `Copy` is not implemented for check_clone(&maybe_copy_clone_fn); - //~^ ERROR : Clone` is not satisfied + //~^ ERROR the trait `Clone` is not implemented for } async fn the_inner_non_clone_fn() { diff --git a/tests/ui/coroutine/clone-impl-async.stderr b/tests/ui/coroutine/clone-impl-async.stderr index d172dff3abd22..36593a1936770 100644 --- a/tests/ui/coroutine/clone-impl-async.stderr +++ b/tests/ui/coroutine/clone-impl-async.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:12:27: 16:6}: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `{async block@$DIR/clone-impl-async.rs:12:27: 16:6}` --> $DIR/clone-impl-async.rs:17:16 | LL | check_copy(&inner_non_clone); @@ -12,7 +12,7 @@ note: required by a bound in `check_copy` LL | fn check_copy(_x: &T) {} | ^^^^ required by this bound in `check_copy` -error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:12:27: 16:6}: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `{async block@$DIR/clone-impl-async.rs:12:27: 16:6}` --> $DIR/clone-impl-async.rs:19:17 | LL | check_clone(&inner_non_clone); @@ -26,7 +26,7 @@ note: required by a bound in `check_clone` LL | fn check_clone(_x: &T) {} | ^^^^^ required by this bound in `check_clone` -error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:23:27: 25:6}: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `{async block@$DIR/clone-impl-async.rs:23:27: 25:6}` --> $DIR/clone-impl-async.rs:26:16 | LL | check_copy(&outer_non_clone); @@ -40,7 +40,7 @@ note: required by a bound in `check_copy` LL | fn check_copy(_x: &T) {} | ^^^^ required by this bound in `check_copy` -error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:23:27: 25:6}: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `{async block@$DIR/clone-impl-async.rs:23:27: 25:6}` --> $DIR/clone-impl-async.rs:28:17 | LL | check_clone(&outer_non_clone); @@ -54,7 +54,7 @@ note: required by a bound in `check_clone` LL | fn check_clone(_x: &T) {} | ^^^^^ required by this bound in `check_clone` -error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:31:28: 31:41}: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `{async block@$DIR/clone-impl-async.rs:31:28: 31:41}` --> $DIR/clone-impl-async.rs:32:16 | LL | check_copy(&maybe_copy_clone); @@ -68,7 +68,7 @@ note: required by a bound in `check_copy` LL | fn check_copy(_x: &T) {} | ^^^^ required by this bound in `check_copy` -error[E0277]: the trait bound `{async block@$DIR/clone-impl-async.rs:31:28: 31:41}: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `{async block@$DIR/clone-impl-async.rs:31:28: 31:41}` --> $DIR/clone-impl-async.rs:34:17 | LL | check_clone(&maybe_copy_clone); @@ -82,7 +82,7 @@ note: required by a bound in `check_clone` LL | fn check_clone(_x: &T) {} | ^^^^^ required by this bound in `check_clone` -error[E0277]: the trait bound `impl Future: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `impl Future` --> $DIR/clone-impl-async.rs:38:16 | LL | check_copy(&inner_non_clone_fn); @@ -96,7 +96,7 @@ note: required by a bound in `check_copy` LL | fn check_copy(_x: &T) {} | ^^^^ required by this bound in `check_copy` -error[E0277]: the trait bound `impl Future: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `impl Future` --> $DIR/clone-impl-async.rs:40:17 | LL | check_clone(&inner_non_clone_fn); @@ -110,7 +110,7 @@ note: required by a bound in `check_clone` LL | fn check_clone(_x: &T) {} | ^^^^^ required by this bound in `check_clone` -error[E0277]: the trait bound `impl Future: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `impl Future` --> $DIR/clone-impl-async.rs:44:16 | LL | check_copy(&outer_non_clone_fn); @@ -124,7 +124,7 @@ note: required by a bound in `check_copy` LL | fn check_copy(_x: &T) {} | ^^^^ required by this bound in `check_copy` -error[E0277]: the trait bound `impl Future: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `impl Future` --> $DIR/clone-impl-async.rs:46:17 | LL | check_clone(&outer_non_clone_fn); @@ -138,7 +138,7 @@ note: required by a bound in `check_clone` LL | fn check_clone(_x: &T) {} | ^^^^^ required by this bound in `check_clone` -error[E0277]: the trait bound `impl Future: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `impl Future` --> $DIR/clone-impl-async.rs:50:16 | LL | check_copy(&maybe_copy_clone_fn); @@ -152,7 +152,7 @@ note: required by a bound in `check_copy` LL | fn check_copy(_x: &T) {} | ^^^^ required by this bound in `check_copy` -error[E0277]: the trait bound `impl Future: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `impl Future` --> $DIR/clone-impl-async.rs:52:17 | LL | check_clone(&maybe_copy_clone_fn); diff --git a/tests/ui/coroutine/clone-impl-static.rs b/tests/ui/coroutine/clone-impl-static.rs index 9a165cf4672e6..5b844460a2a46 100644 --- a/tests/ui/coroutine/clone-impl-static.rs +++ b/tests/ui/coroutine/clone-impl-static.rs @@ -8,9 +8,9 @@ fn main() { yield; }; check_copy(&gen); - //~^ ERROR Copy` is not satisfied + //~^ ERROR the trait `Copy` is not implemented for check_clone(&gen); - //~^ ERROR Clone` is not satisfied + //~^ ERROR the trait `Clone` is not implemented for } fn check_copy(_x: &T) {} diff --git a/tests/ui/coroutine/clone-impl-static.stderr b/tests/ui/coroutine/clone-impl-static.stderr index 8fa9fb12bf685..466d5dbd29bf8 100644 --- a/tests/ui/coroutine/clone-impl-static.stderr +++ b/tests/ui/coroutine/clone-impl-static.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `{static coroutine@$DIR/clone-impl-static.rs:7:15: 7:29}: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `{static coroutine@$DIR/clone-impl-static.rs:7:15: 7:29}` --> $DIR/clone-impl-static.rs:10:16 | LL | check_copy(&gen); @@ -12,7 +12,7 @@ note: required by a bound in `check_copy` LL | fn check_copy(_x: &T) {} | ^^^^ required by this bound in `check_copy` -error[E0277]: the trait bound `{static coroutine@$DIR/clone-impl-static.rs:7:15: 7:29}: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `{static coroutine@$DIR/clone-impl-static.rs:7:15: 7:29}` --> $DIR/clone-impl-static.rs:12:17 | LL | check_clone(&gen); diff --git a/tests/ui/coroutine/clone-impl.rs b/tests/ui/coroutine/clone-impl.rs index eed6f851bd028..440936b0120ba 100644 --- a/tests/ui/coroutine/clone-impl.rs +++ b/tests/ui/coroutine/clone-impl.rs @@ -40,8 +40,8 @@ fn main() { drop(clonable_0); }; check_copy(&gen_clone_0); - //~^ ERROR the trait bound `Vec: Copy` is not satisfied - //~| ERROR the trait bound `Vec: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `Vec` + //~| ERROR trait `Copy` is not implemented for `Vec` check_clone(&gen_clone_0); let gen_clone_1 = move || { let v = vec!['a']; @@ -56,17 +56,17 @@ fn main() { drop(clonable_1); }; check_copy(&gen_clone_1); - //~^ ERROR the trait bound `Vec: Copy` is not satisfied - //~| ERROR the trait bound `Vec: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `Vec` + //~| ERROR trait `Copy` is not implemented for `Vec` check_clone(&gen_clone_1); let gen_non_clone = move || { yield; drop(non_clonable); }; check_copy(&gen_non_clone); - //~^ ERROR the trait bound `NonClone: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `NonClone` check_clone(&gen_non_clone); - //~^ ERROR the trait bound `NonClone: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `NonClone` } fn check_copy(_x: &T) {} diff --git a/tests/ui/coroutine/clone-impl.stderr b/tests/ui/coroutine/clone-impl.stderr index 1d4804501d8bc..cbd145b5a1524 100644 --- a/tests/ui/coroutine/clone-impl.stderr +++ b/tests/ui/coroutine/clone-impl.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Vec: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}` +error[E0277]: the trait `Copy` is not implemented for `Vec` in `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}` --> $DIR/clone-impl.rs:42:5 | LL | let gen_clone_0 = move || { @@ -18,7 +18,7 @@ note: required by a bound in `check_copy` LL | fn check_copy(_x: &T) {} | ^^^^ required by this bound in `check_copy` -error[E0277]: the trait bound `Vec: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}` +error[E0277]: the trait `Copy` is not implemented for `Vec` in `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}` --> $DIR/clone-impl.rs:42:5 | LL | let gen_clone_0 = move || { @@ -40,7 +40,7 @@ note: required by a bound in `check_copy` LL | fn check_copy(_x: &T) {} | ^^^^ required by this bound in `check_copy` -error[E0277]: the trait bound `Vec: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}` +error[E0277]: the trait `Copy` is not implemented for `Vec` in `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}` --> $DIR/clone-impl.rs:58:5 | LL | let gen_clone_1 = move || { @@ -60,7 +60,7 @@ note: required by a bound in `check_copy` LL | fn check_copy(_x: &T) {} | ^^^^ required by this bound in `check_copy` -error[E0277]: the trait bound `Vec: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}` +error[E0277]: the trait `Copy` is not implemented for `Vec` in `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}` --> $DIR/clone-impl.rs:58:5 | LL | let gen_clone_1 = move || { @@ -83,7 +83,7 @@ note: required by a bound in `check_copy` LL | fn check_copy(_x: &T) {} | ^^^^ required by this bound in `check_copy` -error[E0277]: the trait bound `NonClone: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}` +error[E0277]: the trait `Copy` is not implemented for `NonClone` in `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}` --> $DIR/clone-impl.rs:66:5 | LL | let gen_non_clone = move || { @@ -108,7 +108,7 @@ LL + #[derive(Copy)] LL | struct NonClone; | -error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}` +error[E0277]: the trait `Clone` is not implemented for `NonClone` in `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}` --> $DIR/clone-impl.rs:68:5 | LL | let gen_non_clone = move || { diff --git a/tests/ui/coroutine/gen_block_is_coro.rs b/tests/ui/coroutine/gen_block_is_coro.rs index 970646ac47008..392ab6ba7f370 100644 --- a/tests/ui/coroutine/gen_block_is_coro.rs +++ b/tests/ui/coroutine/gen_block_is_coro.rs @@ -3,15 +3,15 @@ use std::ops::Coroutine; -fn foo() -> impl Coroutine { //~ ERROR: Coroutine` is not satisfied +fn foo() -> impl Coroutine { //~ ERROR the trait `Coroutine` is not implemented for gen { yield 42 } } -fn bar() -> impl Coroutine { //~ ERROR: Coroutine` is not satisfied +fn bar() -> impl Coroutine { //~ ERROR the trait `Coroutine` is not implemented for gen { yield 42 } } -fn baz() -> impl Coroutine { //~ ERROR: Coroutine` is not satisfied +fn baz() -> impl Coroutine { //~ ERROR the trait `Coroutine` is not implemented for gen { yield 42 } } diff --git a/tests/ui/coroutine/gen_block_is_coro.stderr b/tests/ui/coroutine/gen_block_is_coro.stderr index 83a674fa53ce3..b5e3acfb1e9f9 100644 --- a/tests/ui/coroutine/gen_block_is_coro.stderr +++ b/tests/ui/coroutine/gen_block_is_coro.stderr @@ -1,16 +1,16 @@ -error[E0277]: the trait bound `{gen block@$DIR/gen_block_is_coro.rs:7:5: 7:21}: Coroutine` is not satisfied +error[E0277]: the trait `Coroutine` is not implemented for `{gen block@$DIR/gen_block_is_coro.rs:7:5: 7:21}` --> $DIR/gen_block_is_coro.rs:6:13 | LL | fn foo() -> impl Coroutine { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Coroutine` is not implemented for `{gen block@$DIR/gen_block_is_coro.rs:7:5: 7:21}` -error[E0277]: the trait bound `{gen block@$DIR/gen_block_is_coro.rs:11:5: 11:21}: Coroutine` is not satisfied +error[E0277]: the trait `Coroutine` is not implemented for `{gen block@$DIR/gen_block_is_coro.rs:11:5: 11:21}` --> $DIR/gen_block_is_coro.rs:10:13 | LL | fn bar() -> impl Coroutine { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Coroutine` is not implemented for `{gen block@$DIR/gen_block_is_coro.rs:11:5: 11:21}` -error[E0277]: the trait bound `{gen block@$DIR/gen_block_is_coro.rs:15:5: 15:21}: Coroutine` is not satisfied +error[E0277]: the trait `Coroutine` is not implemented for `{gen block@$DIR/gen_block_is_coro.rs:15:5: 15:21}` --> $DIR/gen_block_is_coro.rs:14:13 | LL | fn baz() -> impl Coroutine { diff --git a/tests/ui/coroutine/issue-105084.rs b/tests/ui/coroutine/issue-105084.rs index 7801f1bcea0db..fb26d130a99fa 100644 --- a/tests/ui/coroutine/issue-105084.rs +++ b/tests/ui/coroutine/issue-105084.rs @@ -29,7 +29,7 @@ fn main() { // As it is not taken into account for trait computation, // the coroutine is `Copy`. let mut h = copy(g); - //~^ ERROR the trait bound `Box<(i32, ())>: Copy` is not satisfied in + //~^ ERROR trait `Copy` is not implemented for `Box<(i32, ())>` // We now have 2 boxes with the same backing allocation: // one inside `g` and one inside `h`. diff --git a/tests/ui/coroutine/issue-105084.stderr b/tests/ui/coroutine/issue-105084.stderr index c8a6522dbd938..fbfdc6cf05ae6 100644 --- a/tests/ui/coroutine/issue-105084.stderr +++ b/tests/ui/coroutine/issue-105084.stderr @@ -22,7 +22,7 @@ help: consider cloning the value if the performance cost is acceptable LL | let mut h = copy(g.clone()); | ++++++++ -error[E0277]: the trait bound `Box<(i32, ())>: Copy` is not satisfied in `{coroutine@$DIR/issue-105084.rs:14:17: 14:19}` +error[E0277]: the trait `Copy` is not implemented for `Box<(i32, ())>` in `{coroutine@$DIR/issue-105084.rs:14:17: 14:19}` --> $DIR/issue-105084.rs:31:17 | LL | let mut g = || { diff --git a/tests/ui/cross/cross-fn-cache-hole.rs b/tests/ui/cross/cross-fn-cache-hole.rs index 4aa08ea2e1792..824fb25c05e2f 100644 --- a/tests/ui/cross/cross-fn-cache-hole.rs +++ b/tests/ui/cross/cross-fn-cache-hole.rs @@ -13,7 +13,7 @@ trait Bar { } // We don't always check where clauses for sanity, but in this case // wfcheck does report an error here: fn vacuous() - where i32: Foo //~ ERROR the trait bound `i32: Bar` is not satisfied + where i32: Foo //~ ERROR trait `Bar` is not implemented for `i32` { // ... the original intention was to check that we don't use that // vacuous where clause (which could never be satisfied) to accept @@ -28,5 +28,5 @@ fn require() fn main() { require::(); - //~^ ERROR `i32: Bar` is not satisfied + //~^ ERROR trait `Bar` is not implemented for `i32` } diff --git a/tests/ui/cross/cross-fn-cache-hole.stderr b/tests/ui/cross/cross-fn-cache-hole.stderr index dec2f2553c2c2..e35565689bc35 100644 --- a/tests/ui/cross/cross-fn-cache-hole.stderr +++ b/tests/ui/cross/cross-fn-cache-hole.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `i32: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `i32` --> $DIR/cross-fn-cache-hole.rs:16:11 | LL | where i32: Foo @@ -12,7 +12,7 @@ LL | trait Bar { } = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable -error[E0277]: the trait bound `i32: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `i32` --> $DIR/cross-fn-cache-hole.rs:30:15 | LL | require::(); diff --git a/tests/ui/custom_test_frameworks/mismatch.rs b/tests/ui/custom_test_frameworks/mismatch.rs index c4773c13264e8..063694702a671 100644 --- a/tests/ui/custom_test_frameworks/mismatch.rs +++ b/tests/ui/custom_test_frameworks/mismatch.rs @@ -7,4 +7,4 @@ extern crate example_runner; #[test] fn wrong_kind(){} -//~^ ERROR trait bound `TestDescAndFn: Testable` is not satisfied +//~^ ERROR trait `Testable` is not implemented for `TestDescAndFn` diff --git a/tests/ui/custom_test_frameworks/mismatch.stderr b/tests/ui/custom_test_frameworks/mismatch.stderr index dad93cfbba4cb..f56e40eecde67 100644 --- a/tests/ui/custom_test_frameworks/mismatch.stderr +++ b/tests/ui/custom_test_frameworks/mismatch.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `TestDescAndFn: Testable` is not satisfied +error[E0277]: the trait `Testable` is not implemented for `TestDescAndFn` --> $DIR/mismatch.rs:9:1 | LL | #[test] diff --git a/tests/ui/derives/derives-span-Clone-enum-struct-variant.stderr b/tests/ui/derives/derives-span-Clone-enum-struct-variant.stderr index 2c8d9431646d6..d146ad5dd1dcf 100644 --- a/tests/ui/derives/derives-span-Clone-enum-struct-variant.stderr +++ b/tests/ui/derives/derives-span-Clone-enum-struct-variant.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `Error` --> $DIR/derives-span-Clone-enum-struct-variant.rs:9:6 | LL | #[derive(Clone)] diff --git a/tests/ui/derives/derives-span-Clone-enum.stderr b/tests/ui/derives/derives-span-Clone-enum.stderr index b683a8b89441a..9c753ee98856d 100644 --- a/tests/ui/derives/derives-span-Clone-enum.stderr +++ b/tests/ui/derives/derives-span-Clone-enum.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `Error` --> $DIR/derives-span-Clone-enum.rs:9:6 | LL | #[derive(Clone)] diff --git a/tests/ui/derives/derives-span-Clone-struct.stderr b/tests/ui/derives/derives-span-Clone-struct.stderr index 305a92752716f..efc6a873c5705 100644 --- a/tests/ui/derives/derives-span-Clone-struct.stderr +++ b/tests/ui/derives/derives-span-Clone-struct.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `Error` --> $DIR/derives-span-Clone-struct.rs:8:5 | LL | #[derive(Clone)] diff --git a/tests/ui/derives/derives-span-Clone-tuple-struct.stderr b/tests/ui/derives/derives-span-Clone-tuple-struct.stderr index b636404ad9ed7..08c762ad84260 100644 --- a/tests/ui/derives/derives-span-Clone-tuple-struct.stderr +++ b/tests/ui/derives/derives-span-Clone-tuple-struct.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `Error` --> $DIR/derives-span-Clone-tuple-struct.rs:8:5 | LL | #[derive(Clone)] diff --git a/tests/ui/derives/derives-span-Default-struct.stderr b/tests/ui/derives/derives-span-Default-struct.stderr index 359b61528e183..415088e179630 100644 --- a/tests/ui/derives/derives-span-Default-struct.stderr +++ b/tests/ui/derives/derives-span-Default-struct.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Default` is not satisfied +error[E0277]: the trait `Default` is not implemented for `Error` --> $DIR/derives-span-Default-struct.rs:8:5 | LL | #[derive(Default)] diff --git a/tests/ui/derives/derives-span-Default-tuple-struct.stderr b/tests/ui/derives/derives-span-Default-tuple-struct.stderr index 1ddb4ec3f642e..a916eeef246c1 100644 --- a/tests/ui/derives/derives-span-Default-tuple-struct.stderr +++ b/tests/ui/derives/derives-span-Default-tuple-struct.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Default` is not satisfied +error[E0277]: the trait `Default` is not implemented for `Error` --> $DIR/derives-span-Default-tuple-struct.rs:8:5 | LL | #[derive(Default)] diff --git a/tests/ui/derives/derives-span-Eq-enum-struct-variant.stderr b/tests/ui/derives/derives-span-Eq-enum-struct-variant.stderr index c9edc89e1bc56..de84328cfc550 100644 --- a/tests/ui/derives/derives-span-Eq-enum-struct-variant.stderr +++ b/tests/ui/derives/derives-span-Eq-enum-struct-variant.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `Error` --> $DIR/derives-span-Eq-enum-struct-variant.rs:9:6 | LL | #[derive(Eq,PartialEq)] diff --git a/tests/ui/derives/derives-span-Eq-enum.stderr b/tests/ui/derives/derives-span-Eq-enum.stderr index 7db13e9711141..73b67a0635d1b 100644 --- a/tests/ui/derives/derives-span-Eq-enum.stderr +++ b/tests/ui/derives/derives-span-Eq-enum.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `Error` --> $DIR/derives-span-Eq-enum.rs:9:6 | LL | #[derive(Eq,PartialEq)] diff --git a/tests/ui/derives/derives-span-Eq-struct.stderr b/tests/ui/derives/derives-span-Eq-struct.stderr index 36eeb89bde18e..0900e0831c238 100644 --- a/tests/ui/derives/derives-span-Eq-struct.stderr +++ b/tests/ui/derives/derives-span-Eq-struct.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `Error` --> $DIR/derives-span-Eq-struct.rs:8:5 | LL | #[derive(Eq,PartialEq)] diff --git a/tests/ui/derives/derives-span-Eq-tuple-struct.stderr b/tests/ui/derives/derives-span-Eq-tuple-struct.stderr index 126d105354066..cbfc4c95058c2 100644 --- a/tests/ui/derives/derives-span-Eq-tuple-struct.stderr +++ b/tests/ui/derives/derives-span-Eq-tuple-struct.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `Error` --> $DIR/derives-span-Eq-tuple-struct.rs:8:5 | LL | #[derive(Eq,PartialEq)] diff --git a/tests/ui/derives/derives-span-Hash-enum-struct-variant.stderr b/tests/ui/derives/derives-span-Hash-enum-struct-variant.stderr index ae973228cacbc..c69998820137f 100644 --- a/tests/ui/derives/derives-span-Hash-enum-struct-variant.stderr +++ b/tests/ui/derives/derives-span-Hash-enum-struct-variant.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Hash` is not satisfied +error[E0277]: the trait `Hash` is not implemented for `Error` --> $DIR/derives-span-Hash-enum-struct-variant.rs:9:6 | LL | #[derive(Hash)] diff --git a/tests/ui/derives/derives-span-Hash-enum.stderr b/tests/ui/derives/derives-span-Hash-enum.stderr index 85e26c84fa7a1..aeef0d41f3cb3 100644 --- a/tests/ui/derives/derives-span-Hash-enum.stderr +++ b/tests/ui/derives/derives-span-Hash-enum.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Hash` is not satisfied +error[E0277]: the trait `Hash` is not implemented for `Error` --> $DIR/derives-span-Hash-enum.rs:8:6 | LL | #[derive(Hash)] diff --git a/tests/ui/derives/derives-span-Hash-struct.stderr b/tests/ui/derives/derives-span-Hash-struct.stderr index f9a654b2df798..3a9a121cb1a9f 100644 --- a/tests/ui/derives/derives-span-Hash-struct.stderr +++ b/tests/ui/derives/derives-span-Hash-struct.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Hash` is not satisfied +error[E0277]: the trait `Hash` is not implemented for `Error` --> $DIR/derives-span-Hash-struct.rs:8:5 | LL | #[derive(Hash)] diff --git a/tests/ui/derives/derives-span-Hash-tuple-struct.stderr b/tests/ui/derives/derives-span-Hash-tuple-struct.stderr index 0a5fbe286587b..bc32b543fa387 100644 --- a/tests/ui/derives/derives-span-Hash-tuple-struct.stderr +++ b/tests/ui/derives/derives-span-Hash-tuple-struct.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Hash` is not satisfied +error[E0277]: the trait `Hash` is not implemented for `Error` --> $DIR/derives-span-Hash-tuple-struct.rs:8:5 | LL | #[derive(Hash)] diff --git a/tests/ui/derives/derives-span-Ord-enum-struct-variant.stderr b/tests/ui/derives/derives-span-Ord-enum-struct-variant.stderr index 96ef59ca9631b..019bf73b1bc5c 100644 --- a/tests/ui/derives/derives-span-Ord-enum-struct-variant.stderr +++ b/tests/ui/derives/derives-span-Ord-enum-struct-variant.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Ord` is not satisfied +error[E0277]: the trait `Ord` is not implemented for `Error` --> $DIR/derives-span-Ord-enum-struct-variant.rs:9:6 | LL | #[derive(Ord,Eq,PartialOrd,PartialEq)] diff --git a/tests/ui/derives/derives-span-Ord-enum.stderr b/tests/ui/derives/derives-span-Ord-enum.stderr index 7c75ecb6432e2..5265f8986c2e2 100644 --- a/tests/ui/derives/derives-span-Ord-enum.stderr +++ b/tests/ui/derives/derives-span-Ord-enum.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Ord` is not satisfied +error[E0277]: the trait `Ord` is not implemented for `Error` --> $DIR/derives-span-Ord-enum.rs:9:6 | LL | #[derive(Ord,Eq,PartialOrd,PartialEq)] diff --git a/tests/ui/derives/derives-span-Ord-struct.stderr b/tests/ui/derives/derives-span-Ord-struct.stderr index 429e7e06f5d9f..023adbc698524 100644 --- a/tests/ui/derives/derives-span-Ord-struct.stderr +++ b/tests/ui/derives/derives-span-Ord-struct.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Ord` is not satisfied +error[E0277]: the trait `Ord` is not implemented for `Error` --> $DIR/derives-span-Ord-struct.rs:8:5 | LL | #[derive(Ord,Eq,PartialOrd,PartialEq)] diff --git a/tests/ui/derives/derives-span-Ord-tuple-struct.stderr b/tests/ui/derives/derives-span-Ord-tuple-struct.stderr index a46133834c6ad..ebde2ff0959f8 100644 --- a/tests/ui/derives/derives-span-Ord-tuple-struct.stderr +++ b/tests/ui/derives/derives-span-Ord-tuple-struct.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Error: Ord` is not satisfied +error[E0277]: the trait `Ord` is not implemented for `Error` --> $DIR/derives-span-Ord-tuple-struct.rs:8:5 | LL | #[derive(Ord,Eq,PartialOrd,PartialEq)] diff --git a/tests/ui/derives/deriving-no-inner-impl-error-message.rs b/tests/ui/derives/deriving-no-inner-impl-error-message.rs index b3ce31bf0d356..b8497897a57e4 100644 --- a/tests/ui/derives/deriving-no-inner-impl-error-message.rs +++ b/tests/ui/derives/deriving-no-inner-impl-error-message.rs @@ -7,7 +7,7 @@ struct E { #[derive(Clone)] struct C { x: NoCloneOrEq - //~^ ERROR `NoCloneOrEq: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `NoCloneOrEq` } diff --git a/tests/ui/derives/deriving-no-inner-impl-error-message.stderr b/tests/ui/derives/deriving-no-inner-impl-error-message.stderr index ab99ba9fab5a6..56a2634666fe6 100644 --- a/tests/ui/derives/deriving-no-inner-impl-error-message.stderr +++ b/tests/ui/derives/deriving-no-inner-impl-error-message.stderr @@ -19,7 +19,7 @@ LL + #[derive(PartialEq)] LL | struct NoCloneOrEq; | -error[E0277]: the trait bound `NoCloneOrEq: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `NoCloneOrEq` --> $DIR/deriving-no-inner-impl-error-message.rs:9:5 | LL | #[derive(Clone)] diff --git a/tests/ui/deriving/issue-103157.rs b/tests/ui/deriving/issue-103157.rs index ca06989787813..70f1ea3bd8f5a 100644 --- a/tests/ui/deriving/issue-103157.rs +++ b/tests/ui/deriving/issue-103157.rs @@ -3,7 +3,7 @@ #[derive(PartialEq, Eq)] pub enum Value { Boolean(Option), - Float(Option), //~ ERROR the trait bound `f64: Eq` is not satisfied + Float(Option), //~ ERROR trait `Eq` is not implemented for `f64` } fn main() { diff --git a/tests/ui/deriving/issue-103157.stderr b/tests/ui/deriving/issue-103157.stderr index f76701860efb5..8db7674b211f7 100644 --- a/tests/ui/deriving/issue-103157.stderr +++ b/tests/ui/deriving/issue-103157.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `f64: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `f64` --> $DIR/issue-103157.rs:6:11 | LL | #[derive(PartialEq, Eq)] diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs index eb985c062f3dd..a13f51eaeb499 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs +++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.rs @@ -61,7 +61,7 @@ fn main() { takes_foo(()); //~^ERROR trait has `()` and `i32` as params takes_bar(()); - //~^ERROR the trait bound `(): Bar` is not satisfied + //~^ERROR the trait `Bar` is not implemented for `()` takes_baz(()); //~^ERROR {from_desugaring}{direct}{cause}{integral}{integer} } diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr index 75a701f0b5f65..4dc4f2d3d0d15 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr @@ -175,7 +175,7 @@ LL | #[diagnostic::on_unimplemented = "Message"] = help: only `message`, `note` and `label` are allowed as options = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error[E0277]: the trait bound `(): Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `()` --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:63:15 | LL | takes_bar(()); diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs index 12fe988170ac1..31c1a8a6b0974 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs +++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs @@ -41,13 +41,13 @@ fn take_test(_: impl Test) {} fn main() { take_foo(1_i32); - //~^ERROR the trait bound `i32: Foo` is not satisfied + //~^ERROR the trait `Foo` is not implemented for `i32` take_baz(1_i32); //~^ERROR Boom take_boom(1_i32); //~^ERROR Boom take_whatever(1_i32); - //~^ERROR the trait bound `i32: Whatever` is not satisfied + //~^ERROR the trait `Whatever` is not implemented for `i32` take_test(()); //~^ERROR {DoesNotExist} } diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr index 11263580b15e2..2c1079466970e 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr @@ -63,7 +63,7 @@ LL | #[diagnostic::on_unimplemented(unsupported = "foo")] = help: only `message`, `note` and `label` are allowed as options = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error[E0277]: the trait bound `i32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `i32` --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:43:14 | LL | take_foo(1_i32); @@ -147,7 +147,7 @@ LL | #[diagnostic::on_unimplemented] = help: at least one of the `message`, `note` and `label` options are expected = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error[E0277]: the trait bound `i32: Whatever` is not satisfied +error[E0277]: the trait `Whatever` is not implemented for `i32` --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:49:19 | LL | take_whatever(1_i32); diff --git a/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.rs b/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.rs index 1749137d4384e..fd95867c84661 100644 --- a/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.rs +++ b/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.rs @@ -22,5 +22,5 @@ fn main() { let f1 = Bar; f1.foo(1usize); - //~^ error: the trait bound `Bar: Foo` is not satisfied + //~^ ERROR trait `Foo` is not implemented for `Bar` } diff --git a/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr b/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr index 9cbce93c8e009..c200dceeeb1bd 100644 --- a/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr +++ b/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Bar: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `Bar` --> $DIR/issue-21659-show-relevant-trait-impls-1.rs:24:12 | LL | f1.foo(1usize); diff --git a/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.rs b/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.rs index e898b224ed14b..fece962d028ab 100644 --- a/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.rs +++ b/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.rs @@ -26,5 +26,5 @@ fn main() { let f1 = Bar; f1.foo(1usize); - //~^ error: the trait bound `Bar: Foo` is not satisfied + //~^ ERROR trait `Foo` is not implemented for `Bar` } diff --git a/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr b/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr index 6ac0bf21e4aca..3ac93ccdebb75 100644 --- a/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr +++ b/tests/ui/did_you_mean/issue-21659-show-relevant-trait-impls-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Bar: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `Bar` --> $DIR/issue-21659-show-relevant-trait-impls-2.rs:28:12 | LL | f1.foo(1usize); diff --git a/tests/ui/did_you_mean/issue-39802-show-5-trait-impls.rs b/tests/ui/did_you_mean/issue-39802-show-5-trait-impls.rs index 63a8c547c6f01..f2fe523aeb6dd 100644 --- a/tests/ui/did_you_mean/issue-39802-show-5-trait-impls.rs +++ b/tests/ui/did_you_mean/issue-39802-show-5-trait-impls.rs @@ -21,7 +21,7 @@ impl Foo for bool {} impl Foo for bool {} fn main() { - Foo::::bar(&1i8); //~ ERROR is not satisfied - Foo::::bar(&1u8); //~ ERROR is not satisfied - Foo::::bar(&true); //~ ERROR is not satisfied + Foo::::bar(&1i8); //~ ERROR is not implemented + Foo::::bar(&1u8); //~ ERROR is not implemented + Foo::::bar(&true); //~ ERROR is not implemented } diff --git a/tests/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr b/tests/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr index ae15e054f6288..0bb0e8d16ad2b 100644 --- a/tests/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr +++ b/tests/ui/did_you_mean/issue-39802-show-5-trait-impls.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `i8: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `i8` --> $DIR/issue-39802-show-5-trait-impls.rs:24:21 | LL | Foo::::bar(&1i8); @@ -13,7 +13,7 @@ LL | Foo::::bar(&1i8); > > -error[E0277]: the trait bound `u8: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `u8` --> $DIR/issue-39802-show-5-trait-impls.rs:25:21 | LL | Foo::::bar(&1u8); @@ -27,7 +27,7 @@ LL | Foo::::bar(&1u8); > > -error[E0277]: the trait bound `bool: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `bool` --> $DIR/issue-39802-show-5-trait-impls.rs:26:21 | LL | Foo::::bar(&true); diff --git a/tests/ui/dropck/explicit-drop-bounds.bad1.stderr b/tests/ui/dropck/explicit-drop-bounds.bad1.stderr index 3ef11e2c0bbd1..c3c56bed6708e 100644 --- a/tests/ui/dropck/explicit-drop-bounds.bad1.stderr +++ b/tests/ui/dropck/explicit-drop-bounds.bad1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/explicit-drop-bounds.rs:27:18 | LL | impl Drop for DropMe @@ -14,7 +14,7 @@ help: consider further restricting type parameter `T` LL | [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply `T: Copy` | ~~~~~~~~~~~~~~~~~~~~~~ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/explicit-drop-bounds.rs:32:18 | LL | fn drop(&mut self) {} diff --git a/tests/ui/dropck/explicit-drop-bounds.bad2.stderr b/tests/ui/dropck/explicit-drop-bounds.bad2.stderr index 8138b86ddea46..5069329818698 100644 --- a/tests/ui/dropck/explicit-drop-bounds.bad2.stderr +++ b/tests/ui/dropck/explicit-drop-bounds.bad2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/explicit-drop-bounds.rs:37:18 | LL | impl Drop for DropMe @@ -14,7 +14,7 @@ help: consider restricting type parameter `T` LL | impl Drop for DropMe | +++++++++++++++++++ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/explicit-drop-bounds.rs:40:18 | LL | fn drop(&mut self) {} diff --git a/tests/ui/dropck/explicit-drop-bounds.rs b/tests/ui/dropck/explicit-drop-bounds.rs index 6ddac4d314f41..483df386fec96 100644 --- a/tests/ui/dropck/explicit-drop-bounds.rs +++ b/tests/ui/dropck/explicit-drop-bounds.rs @@ -25,20 +25,20 @@ where #[cfg(bad1)] impl Drop for DropMe -//[bad1]~^ ERROR the trait bound `T: Copy` is not satisfied +//[bad1]~^ ERROR trait `Copy` is not implemented for `T` where [T; 1]: Copy, // But `[T; 1]: Copy` does not imply `T: Copy` { fn drop(&mut self) {} - //[bad1]~^ ERROR the trait bound `T: Copy` is not satisfied + //[bad1]~^ ERROR trait `Copy` is not implemented for `T` } #[cfg(bad2)] impl Drop for DropMe -//[bad2]~^ ERROR the trait bound `T: Copy` is not satisfied +//[bad2]~^ ERROR trait `Copy` is not implemented for `T` { fn drop(&mut self) {} - //[bad2]~^ ERROR the trait bound `T: Copy` is not satisfied + //[bad2]~^ ERROR trait `Copy` is not implemented for `T` } fn main() {} diff --git a/tests/ui/dst/dst-bad-coerce1.rs b/tests/ui/dst/dst-bad-coerce1.rs index 7ef237e39e36e..dc8015220375e 100644 --- a/tests/ui/dst/dst-bad-coerce1.rs +++ b/tests/ui/dst/dst-bad-coerce1.rs @@ -20,7 +20,7 @@ pub fn main() { let f1 = Fat { ptr: Foo }; let f2: &Fat = &f1; let f3: &Fat = f2; - //~^ ERROR `Foo: Bar` is not satisfied + //~^ ERROR trait `Bar` is not implemented for `Foo` // Tuple with a vec of isize. let f1 = ([1, 2, 3],); @@ -32,5 +32,5 @@ pub fn main() { let f1 = (Foo,); let f2: &(Foo,) = &f1; let f3: &(dyn Bar,) = f2; - //~^ ERROR `Foo: Bar` is not satisfied + //~^ ERROR trait `Bar` is not implemented for `Foo` } diff --git a/tests/ui/dst/dst-bad-coerce1.stderr b/tests/ui/dst/dst-bad-coerce1.stderr index 455d15e935fae..0161198fd76e0 100644 --- a/tests/ui/dst/dst-bad-coerce1.stderr +++ b/tests/ui/dst/dst-bad-coerce1.stderr @@ -9,7 +9,7 @@ LL | let f3: &Fat<[usize]> = f2; = note: expected reference `&Fat<[usize]>` found reference `&Fat<[isize; 3]>` -error[E0277]: the trait bound `Foo: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `Foo` --> $DIR/dst-bad-coerce1.rs:22:29 | LL | let f3: &Fat = f2; @@ -33,7 +33,7 @@ LL | let f3: &([usize],) = f2; = note: expected reference `&([usize],)` found reference `&([isize; 3],)` -error[E0277]: the trait bound `Foo: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `Foo` --> $DIR/dst-bad-coerce1.rs:34:27 | LL | let f3: &(dyn Bar,) = f2; diff --git a/tests/ui/dst/issue-90528-unsizing-not-suggestion-110063.rs b/tests/ui/dst/issue-90528-unsizing-not-suggestion-110063.rs index c6ef8379f455c..dbc5a5f23d01d 100644 --- a/tests/ui/dst/issue-90528-unsizing-not-suggestion-110063.rs +++ b/tests/ui/dst/issue-90528-unsizing-not-suggestion-110063.rs @@ -7,7 +7,7 @@ fn needs_test() -> T { fn main() { needs_test::<[u8; 1]>(); - //~^ ERROR the trait bound + //~^ ERROR the trait let x: [u8; 1] = needs_test(); - //~^ ERROR the trait bound + //~^ ERROR the trait } diff --git a/tests/ui/dst/issue-90528-unsizing-not-suggestion-110063.stderr b/tests/ui/dst/issue-90528-unsizing-not-suggestion-110063.stderr index 2d7956f1958c5..322273394fa2e 100644 --- a/tests/ui/dst/issue-90528-unsizing-not-suggestion-110063.stderr +++ b/tests/ui/dst/issue-90528-unsizing-not-suggestion-110063.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `[u8; 1]: Test` is not satisfied +error[E0277]: the trait `Test` is not implemented for `[u8; 1]` --> $DIR/issue-90528-unsizing-not-suggestion-110063.rs:9:18 | LL | needs_test::<[u8; 1]>(); @@ -11,7 +11,7 @@ note: required by a bound in `needs_test` LL | fn needs_test() -> T { | ^^^^ required by this bound in `needs_test` -error[E0277]: the trait bound `[u8; 1]: Test` is not satisfied +error[E0277]: the trait `Test` is not implemented for `[u8; 1]` --> $DIR/issue-90528-unsizing-not-suggestion-110063.rs:11:22 | LL | let x: [u8; 1] = needs_test(); diff --git a/tests/ui/dst/issue-90528-unsizing-suggestion-1.rs b/tests/ui/dst/issue-90528-unsizing-suggestion-1.rs index 52863e22bb6fa..e51cd13501229 100644 --- a/tests/ui/dst/issue-90528-unsizing-suggestion-1.rs +++ b/tests/ui/dst/issue-90528-unsizing-suggestion-1.rs @@ -11,10 +11,10 @@ fn wants_read(_: impl Read) {} fn main() { wants_read([0u8]); - //~^ ERROR the trait bound `[u8; 1]: Read` is not satisfied + //~^ ERROR trait `Read` is not implemented for `[u8; 1]` wants_read(&[0u8]); - //~^ ERROR the trait bound `&[u8; 1]: Read` is not satisfied + //~^ ERROR trait `Read` is not implemented for `&[u8; 1]` wants_read(&[0u8][..]); wants_read(&mut [0u8]); - //~^ ERROR the trait bound `&mut [u8; 1]: Read` is not satisfied + //~^ ERROR trait `Read` is not implemented for `&mut [u8; 1]` } diff --git a/tests/ui/dst/issue-90528-unsizing-suggestion-1.stderr b/tests/ui/dst/issue-90528-unsizing-suggestion-1.stderr index 27ef3fe97a5b0..b203cf1944af9 100644 --- a/tests/ui/dst/issue-90528-unsizing-suggestion-1.stderr +++ b/tests/ui/dst/issue-90528-unsizing-suggestion-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `[u8; 1]: Read` is not satisfied +error[E0277]: the trait `Read` is not implemented for `[u8; 1]` --> $DIR/issue-90528-unsizing-suggestion-1.rs:13:16 | LL | wants_read([0u8]); @@ -17,7 +17,7 @@ help: convert the array to a `&[u8]` slice instead LL | wants_read(&[0u8][..]); | + ++++ -error[E0277]: the trait bound `&[u8; 1]: Read` is not satisfied +error[E0277]: the trait `Read` is not implemented for `&[u8; 1]` --> $DIR/issue-90528-unsizing-suggestion-1.rs:15:16 | LL | wants_read(&[0u8]); @@ -36,7 +36,7 @@ help: convert the array to a `&[u8]` slice instead LL | wants_read(&[0u8][..]); | ++++ -error[E0277]: the trait bound `&mut [u8; 1]: Read` is not satisfied +error[E0277]: the trait `Read` is not implemented for `&mut [u8; 1]` --> $DIR/issue-90528-unsizing-suggestion-1.rs:18:16 | LL | wants_read(&mut [0u8]); diff --git a/tests/ui/dst/issue-90528-unsizing-suggestion-2.rs b/tests/ui/dst/issue-90528-unsizing-suggestion-2.rs index f2762ad421ba5..cf06b0357a3a5 100644 --- a/tests/ui/dst/issue-90528-unsizing-suggestion-2.rs +++ b/tests/ui/dst/issue-90528-unsizing-suggestion-2.rs @@ -12,17 +12,17 @@ fn wants_read(_: impl Read) {} fn main() { let x = [0u8]; wants_read(x); - //~^ ERROR the trait bound `[u8; 1]: Read` is not satisfied + //~^ ERROR trait `Read` is not implemented for `[u8; 1]` wants_read(&x); - //~^ ERROR the trait bound `&[u8; 1]: Read` is not satisfied + //~^ ERROR trait `Read` is not implemented for `&[u8; 1]` wants_read(&x[..]); let x = &[0u8]; wants_read(x); - //~^ ERROR the trait bound `&[u8; 1]: Read` is not satisfied + //~^ ERROR trait `Read` is not implemented for `&[u8; 1]` wants_read(&x); - //~^ ERROR the trait bound `&&[u8; 1]: Read` is not satisfied + //~^ ERROR trait `Read` is not implemented for `&&[u8; 1]` wants_read(*x); - //~^ ERROR the trait bound `[u8; 1]: Read` is not satisfied + //~^ ERROR trait `Read` is not implemented for `[u8; 1]` wants_read(&x[..]); } diff --git a/tests/ui/dst/issue-90528-unsizing-suggestion-2.stderr b/tests/ui/dst/issue-90528-unsizing-suggestion-2.stderr index ae0c4ca506ab2..2421ecf9a8a26 100644 --- a/tests/ui/dst/issue-90528-unsizing-suggestion-2.stderr +++ b/tests/ui/dst/issue-90528-unsizing-suggestion-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `[u8; 1]: Read` is not satisfied +error[E0277]: the trait `Read` is not implemented for `[u8; 1]` --> $DIR/issue-90528-unsizing-suggestion-2.rs:14:16 | LL | wants_read(x); @@ -17,7 +17,7 @@ help: convert the array to a `&[u8]` slice instead LL | wants_read(&x[..]); | + ++++ -error[E0277]: the trait bound `&[u8; 1]: Read` is not satisfied +error[E0277]: the trait `Read` is not implemented for `&[u8; 1]` --> $DIR/issue-90528-unsizing-suggestion-2.rs:16:16 | LL | wants_read(&x); @@ -36,7 +36,7 @@ help: convert the array to a `&[u8]` slice instead LL | wants_read(&x[..]); | ++++ -error[E0277]: the trait bound `&[u8; 1]: Read` is not satisfied +error[E0277]: the trait `Read` is not implemented for `&[u8; 1]` --> $DIR/issue-90528-unsizing-suggestion-2.rs:21:16 | LL | wants_read(x); @@ -55,7 +55,7 @@ help: convert the array to a `&[u8]` slice instead LL | wants_read(&x[..]); | + ++++ -error[E0277]: the trait bound `&&[u8; 1]: Read` is not satisfied +error[E0277]: the trait `Read` is not implemented for `&&[u8; 1]` --> $DIR/issue-90528-unsizing-suggestion-2.rs:23:16 | LL | wants_read(&x); @@ -70,7 +70,7 @@ note: required by a bound in `wants_read` LL | fn wants_read(_: impl Read) {} | ^^^^ required by this bound in `wants_read` -error[E0277]: the trait bound `[u8; 1]: Read` is not satisfied +error[E0277]: the trait `Read` is not implemented for `[u8; 1]` --> $DIR/issue-90528-unsizing-suggestion-2.rs:25:16 | LL | wants_read(*x); diff --git a/tests/ui/dst/issue-90528-unsizing-suggestion-3.rs b/tests/ui/dst/issue-90528-unsizing-suggestion-3.rs index 218843d050028..8aacaeac2ca03 100644 --- a/tests/ui/dst/issue-90528-unsizing-suggestion-3.rs +++ b/tests/ui/dst/issue-90528-unsizing-suggestion-3.rs @@ -11,12 +11,12 @@ fn wants_write(_: impl Write) {} fn main() { wants_write([0u8]); - //~^ ERROR the trait bound `[u8; 1]: Write` is not satisfied + //~^ ERROR trait `Write` is not implemented for `[u8; 1]` wants_write(&mut [0u8]); - //~^ ERROR the trait bound `&mut [u8; 1]: Write` is not satisfied + //~^ ERROR trait `Write` is not implemented for `&mut [u8; 1]` wants_write(&mut [0u8][..]); wants_write(&[0u8]); - //~^ ERROR the trait bound `&[u8; 1]: Write` is not satisfied + //~^ ERROR trait `Write` is not implemented for `&[u8; 1]` wants_write(&[0u8][..]); - //~^ ERROR the trait bound `&[u8]: Write` is not satisfied + //~^ ERROR trait `Write` is not implemented for `&[u8]` } diff --git a/tests/ui/dst/issue-90528-unsizing-suggestion-3.stderr b/tests/ui/dst/issue-90528-unsizing-suggestion-3.stderr index 774d5ba3c892c..9913086cb4ab3 100644 --- a/tests/ui/dst/issue-90528-unsizing-suggestion-3.stderr +++ b/tests/ui/dst/issue-90528-unsizing-suggestion-3.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `[u8; 1]: Write` is not satisfied +error[E0277]: the trait `Write` is not implemented for `[u8; 1]` --> $DIR/issue-90528-unsizing-suggestion-3.rs:13:17 | LL | wants_write([0u8]); @@ -17,7 +17,7 @@ help: convert the array to a `&mut [u8]` slice instead LL | wants_write(&mut [0u8][..]); | ++++ ++++ -error[E0277]: the trait bound `&mut [u8; 1]: Write` is not satisfied +error[E0277]: the trait `Write` is not implemented for `&mut [u8; 1]` --> $DIR/issue-90528-unsizing-suggestion-3.rs:15:17 | LL | wants_write(&mut [0u8]); @@ -36,7 +36,7 @@ help: convert the array to a `&mut [u8]` slice instead LL | wants_write(&mut [0u8][..]); | ++++ -error[E0277]: the trait bound `&[u8; 1]: Write` is not satisfied +error[E0277]: the trait `Write` is not implemented for `&[u8; 1]` --> $DIR/issue-90528-unsizing-suggestion-3.rs:18:17 | LL | wants_write(&[0u8]); @@ -51,7 +51,7 @@ note: required by a bound in `wants_write` LL | fn wants_write(_: impl Write) {} | ^^^^^ required by this bound in `wants_write` -error[E0277]: the trait bound `&[u8]: Write` is not satisfied +error[E0277]: the trait `Write` is not implemented for `&[u8]` --> $DIR/issue-90528-unsizing-suggestion-3.rs:20:17 | LL | wants_write(&[0u8][..]); diff --git a/tests/ui/dst/issue-90528-unsizing-suggestion-4.rs b/tests/ui/dst/issue-90528-unsizing-suggestion-4.rs index eae953c61ff09..2ba5d880eb2f2 100644 --- a/tests/ui/dst/issue-90528-unsizing-suggestion-4.rs +++ b/tests/ui/dst/issue-90528-unsizing-suggestion-4.rs @@ -12,15 +12,15 @@ fn wants_write(_: impl Write) {} fn main() { let mut x = [0u8]; wants_write(x); - //~^ ERROR the trait bound `[u8; 1]: Write` is not satisfied + //~^ ERROR trait `Write` is not implemented for `[u8; 1]` wants_write(&mut x); - //~^ ERROR the trait bound `&mut [u8; 1]: Write` is not satisfied + //~^ ERROR trait `Write` is not implemented for `&mut [u8; 1]` wants_write(&mut x[..]); let x = &mut [0u8]; wants_write(x); - //~^ ERROR the trait bound `&mut [u8; 1]: Write` is not satisfied + //~^ ERROR trait `Write` is not implemented for `&mut [u8; 1]` wants_write(*x); - //~^ ERROR the trait bound `[u8; 1]: Write` is not satisfied + //~^ ERROR trait `Write` is not implemented for `[u8; 1]` wants_write(&mut x[..]); } diff --git a/tests/ui/dst/issue-90528-unsizing-suggestion-4.stderr b/tests/ui/dst/issue-90528-unsizing-suggestion-4.stderr index a4020ee070808..fe9b70af61d06 100644 --- a/tests/ui/dst/issue-90528-unsizing-suggestion-4.stderr +++ b/tests/ui/dst/issue-90528-unsizing-suggestion-4.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `[u8; 1]: Write` is not satisfied +error[E0277]: the trait `Write` is not implemented for `[u8; 1]` --> $DIR/issue-90528-unsizing-suggestion-4.rs:14:17 | LL | wants_write(x); @@ -17,7 +17,7 @@ help: convert the array to a `&mut [u8]` slice instead LL | wants_write(&mut x[..]); | ++++ ++++ -error[E0277]: the trait bound `&mut [u8; 1]: Write` is not satisfied +error[E0277]: the trait `Write` is not implemented for `&mut [u8; 1]` --> $DIR/issue-90528-unsizing-suggestion-4.rs:16:17 | LL | wants_write(&mut x); @@ -36,7 +36,7 @@ help: convert the array to a `&mut [u8]` slice instead LL | wants_write(&mut x[..]); | ++++ -error[E0277]: the trait bound `&mut [u8; 1]: Write` is not satisfied +error[E0277]: the trait `Write` is not implemented for `&mut [u8; 1]` --> $DIR/issue-90528-unsizing-suggestion-4.rs:21:17 | LL | wants_write(x); @@ -55,7 +55,7 @@ help: convert the array to a `&mut [u8]` slice instead LL | wants_write(&mut x[..]); | ++++ ++++ -error[E0277]: the trait bound `[u8; 1]: Write` is not satisfied +error[E0277]: the trait `Write` is not implemented for `[u8; 1]` --> $DIR/issue-90528-unsizing-suggestion-4.rs:23:17 | LL | wants_write(*x); diff --git a/tests/ui/dyn-star/error.rs b/tests/ui/dyn-star/error.rs index d8261387efa9e..5b65cdbce9424 100644 --- a/tests/ui/dyn-star/error.rs +++ b/tests/ui/dyn-star/error.rs @@ -7,7 +7,7 @@ trait Foo {} fn make_dyn_star() { let i = 42; - let dyn_i: dyn* Foo = i; //~ ERROR trait bound `{integer}: Foo` is not satisfied + let dyn_i: dyn* Foo = i; //~ ERROR trait `Foo` is not implemented for `{integer}` } fn main() {} diff --git a/tests/ui/dyn-star/error.stderr b/tests/ui/dyn-star/error.stderr index a9f4a05451927..1bfe73f614756 100644 --- a/tests/ui/dyn-star/error.stderr +++ b/tests/ui/dyn-star/error.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `{integer}: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `{integer}` --> $DIR/error.rs:10:27 | LL | let dyn_i: dyn* Foo = i; diff --git a/tests/ui/error-codes/E0229.rs b/tests/ui/error-codes/E0229.rs index 558baae37f767..6ce999cd7c090 100644 --- a/tests/ui/error-codes/E0229.rs +++ b/tests/ui/error-codes/E0229.rs @@ -14,8 +14,8 @@ fn baz(x: &>::A) {} //~^ ERROR associated type bindings are not allowed here [E0229] //~| ERROR associated type bindings are not allowed here [E0229] //~| ERROR associated type bindings are not allowed here [E0229] -//~| ERROR the trait bound `I: Foo` is not satisfied -//~| ERROR the trait bound `I: Foo` is not satisfied +//~| ERROR trait `Foo` is not implemented for `I` +//~| ERROR trait `Foo` is not implemented for `I` fn main() { } diff --git a/tests/ui/error-codes/E0229.stderr b/tests/ui/error-codes/E0229.stderr index bd8e1955ac684..33d433ebb45e2 100644 --- a/tests/ui/error-codes/E0229.stderr +++ b/tests/ui/error-codes/E0229.stderr @@ -20,7 +20,7 @@ LL | fn baz(x: &>::A) {} | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` -error[E0277]: the trait bound `I: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `I` --> $DIR/E0229.rs:13:15 | LL | fn baz(x: &>::A) {} @@ -31,7 +31,7 @@ help: consider restricting type parameter `I` LL | fn baz(x: &>::A) {} | +++++ -error[E0277]: the trait bound `I: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `I` --> $DIR/E0229.rs:13:37 | LL | fn baz(x: &>::A) {} diff --git a/tests/ui/error-codes/E0277.rs b/tests/ui/error-codes/E0277.rs index f0de4e3deb10f..1341495242f4d 100644 --- a/tests/ui/error-codes/E0277.rs +++ b/tests/ui/error-codes/E0277.rs @@ -13,5 +13,5 @@ fn f(p: Path) { } fn main() { some_func(5i32); - //~^ ERROR the trait bound `i32: Foo` is not satisfied + //~^ ERROR trait `Foo` is not implemented for `i32` } diff --git a/tests/ui/error-codes/E0277.stderr b/tests/ui/error-codes/E0277.stderr index aeb97290cf856..2919fa2accd24 100644 --- a/tests/ui/error-codes/E0277.stderr +++ b/tests/ui/error-codes/E0277.stderr @@ -13,7 +13,7 @@ help: function arguments must have a statically known size, borrowed types alway LL | fn f(p: &Path) { } | + -error[E0277]: the trait bound `i32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `i32` --> $DIR/E0277.rs:15:15 | LL | some_func(5i32); diff --git a/tests/ui/error-should-say-copy-not-pod.rs b/tests/ui/error-should-say-copy-not-pod.rs index 40c4730ef699b..7098ad17fe111 100644 --- a/tests/ui/error-should-say-copy-not-pod.rs +++ b/tests/ui/error-should-say-copy-not-pod.rs @@ -3,5 +3,5 @@ fn check_bound(_: T) {} fn main() { - check_bound("nocopy".to_string()); //~ ERROR : Copy` is not satisfied + check_bound("nocopy".to_string()); //~ ERROR the trait `Copy` is not implemented for `String` } diff --git a/tests/ui/error-should-say-copy-not-pod.stderr b/tests/ui/error-should-say-copy-not-pod.stderr index 6aa129fa29b53..a0e36baa64d9e 100644 --- a/tests/ui/error-should-say-copy-not-pod.stderr +++ b/tests/ui/error-should-say-copy-not-pod.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/error-should-say-copy-not-pod.rs:6:17 | LL | check_bound("nocopy".to_string()); diff --git a/tests/ui/errors/trait-bound-error-spans/blame-trait-error.rs b/tests/ui/errors/trait-bound-error-spans/blame-trait-error.rs index 0fbd851431ea6..54a796515d913 100644 --- a/tests/ui/errors/trait-bound-error-spans/blame-trait-error.rs +++ b/tests/ui/errors/trait-bound-error-spans/blame-trait-error.rs @@ -51,7 +51,7 @@ impl T1 for ExampleActuallyTupleStruct where A: T3 {} fn example(q: Q) { want(Wrapper { value: Burrito { filling: q } }); - //~^ ERROR the trait bound `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` want(Some(())); //~^ ERROR `()` is not an iterator [E0277] @@ -63,40 +63,40 @@ fn example(q: Q) { //~^ ERROR `Q` is not an iterator [E0277] want(&ExampleTuple::ExampleTupleVariant(q)); - //~^ ERROR `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` want(&ExampleTupleVariant(q)); - //~^ ERROR `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` want(&ExampleOtherTuple::ExampleTupleVariant(q)); - //~^ ERROR `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` want(&ExampleDifferentTupleVariantName(q)); - //~^ ERROR `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` want(&ExampleYetAnotherTupleVariantName(q)); - //~^ ERROR `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` want(&ExampleStruct::ExampleStructVariant { field: q }); - //~^ ERROR `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` want(&ExampleStructVariant { field: q }); - //~^ ERROR `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` want(&ExampleOtherStruct::ExampleStructVariant { field: q }); - //~^ ERROR `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` want(&ExampleDifferentStructVariantName { field: q }); - //~^ ERROR `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` want(&ExampleYetAnotherStructVariantName { field: q }); - //~^ ERROR `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` want(&ExampleActuallyTupleStruct(q, 0)); - //~^ ERROR `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` want(&ExampleActuallyTupleStructOther(q, 0)); - //~^ ERROR `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` } fn main() {} diff --git a/tests/ui/errors/trait-bound-error-spans/blame-trait-error.stderr b/tests/ui/errors/trait-bound-error-spans/blame-trait-error.stderr index bd4e934822751..123b0dec0dbfb 100644 --- a/tests/ui/errors/trait-bound-error-spans/blame-trait-error.stderr +++ b/tests/ui/errors/trait-bound-error-spans/blame-trait-error.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error.rs:53:46 | LL | want(Wrapper { value: Burrito { filling: q } }); @@ -105,7 +105,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | +++++++++++++++++++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error.rs:65:45 | LL | want(&ExampleTuple::ExampleTupleVariant(q)); @@ -130,7 +130,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error.rs:68:31 | LL | want(&ExampleTupleVariant(q)); @@ -155,7 +155,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error.rs:71:50 | LL | want(&ExampleOtherTuple::ExampleTupleVariant(q)); @@ -180,7 +180,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error.rs:74:44 | LL | want(&ExampleDifferentTupleVariantName(q)); @@ -205,7 +205,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error.rs:77:45 | LL | want(&ExampleYetAnotherTupleVariantName(q)); @@ -230,7 +230,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error.rs:80:56 | LL | want(&ExampleStruct::ExampleStructVariant { field: q }); @@ -253,7 +253,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error.rs:83:41 | LL | want(&ExampleStructVariant { field: q }); @@ -278,7 +278,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error.rs:86:61 | LL | want(&ExampleOtherStruct::ExampleStructVariant { field: q }); @@ -301,7 +301,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error.rs:89:54 | LL | want(&ExampleDifferentStructVariantName { field: q }); @@ -324,7 +324,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error.rs:92:55 | LL | want(&ExampleYetAnotherStructVariantName { field: q }); @@ -347,7 +347,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error.rs:95:38 | LL | want(&ExampleActuallyTupleStruct(q, 0)); @@ -372,7 +372,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error.rs:98:43 | LL | want(&ExampleActuallyTupleStructOther(q, 0)); diff --git a/tests/ui/errors/traits/blame-trait-error-spans-on-exprs.rs b/tests/ui/errors/traits/blame-trait-error-spans-on-exprs.rs index 6fea409ed4716..8fd5c66aa8140 100644 --- a/tests/ui/errors/traits/blame-trait-error-spans-on-exprs.rs +++ b/tests/ui/errors/traits/blame-trait-error-spans-on-exprs.rs @@ -79,59 +79,59 @@ fn example(q: Q) { // Verifies for struct: want(Wrapper { value: Burrito { spicy: false, filling: q } }); - //~^ ERROR the trait bound `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` // Verifies for enum with named fields in variant: want(Wrapper { value: BurritoKinds::SmallBurrito { spicy: true, small_filling: q } }); - //~^ ERROR the trait bound `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` // Verifies for tuple struct: want(Wrapper { value: Taco(false, q) }); - //~^ ERROR the trait bound `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` // Verifies for tuple enum variant: want(Wrapper { value: TacoKinds::OneTaco(false, q) }); - //~^ ERROR the trait bound `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` // Verifies for generic type with multiple parameters: want(Wrapper { value: GenericBurrito { spiciness: NotSpicy, filling: q } }); - //~^ ERROR the trait bound `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` // Verifies for tuple: want((3, q)); - //~^ ERROR the trait bound `Q: T2` is not satisfied [E0277] + //~^ ERROR trait `T2` is not implemented for `Q` // Verifies for nested tuple: want(Wrapper { value: (3, q) }); - //~^ ERROR the trait bound `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` // Verifies for nested tuple: want(((3, q), 5)); - //~^ ERROR the trait bound `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` want(DoubleWrapper { item: Wrapper { value: q } }); - //~^ ERROR the trait bound `Q: T1` is not satisfied [E0277] + //~^ ERROR trait `T1` is not implemented for `Q` want(DoubleWrapper { item: Wrapper { value: DoubleWrapper { item: Wrapper { value: q } } } }); - //~^ ERROR the trait bound `Q: T1` is not satisfied [E0277] + //~^ ERROR trait `T1` is not implemented for `Q` // Verifies for type alias to struct: want(Wrapper { value: AliasBurrito { spiciness: q, filling: q } }); - //~^ ERROR the trait bound `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` want(Two { a: Two { a: (), b: q }, b: () }); - //~^ ERROR the trait bound `Q: T1` is not satisfied [E0277] + //~^ ERROR trait `T1` is not implemented for `Q` // We *should* blame the 'q'. // FIXME: Right now, the wrong field is blamed. want( Two { a: Two { a: (), b: Two { a: Two { a: (), b: q }, b: () } }, b: () }, - //~^ ERROR the trait bound `Q: T1` is not satisfied [E0277] + //~^ ERROR trait `T1` is not implemented for `Q` ); // Verifies for reference: want(&Burrito { spicy: false, filling: q }); - //~^ ERROR the trait bound `Q: T3` is not satisfied [E0277] + //~^ ERROR trait `T3` is not implemented for `Q` } fn main() {} diff --git a/tests/ui/errors/traits/blame-trait-error-spans-on-exprs.stderr b/tests/ui/errors/traits/blame-trait-error-spans-on-exprs.stderr index a2df6843f43b9..7ae9946637e6f 100644 --- a/tests/ui/errors/traits/blame-trait-error-spans-on-exprs.stderr +++ b/tests/ui/errors/traits/blame-trait-error-spans-on-exprs.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error-spans-on-exprs.rs:81:60 | LL | want(Wrapper { value: Burrito { spicy: false, filling: q } }); @@ -28,7 +28,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error-spans-on-exprs.rs:85:84 | LL | want(Wrapper { value: BurritoKinds::SmallBurrito { spicy: true, small_filling: q } }); @@ -58,7 +58,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error-spans-on-exprs.rs:89:39 | LL | want(Wrapper { value: Taco(false, q) }); @@ -90,7 +90,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error-spans-on-exprs.rs:93:53 | LL | want(Wrapper { value: TacoKinds::OneTaco(false, q) }); @@ -122,7 +122,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error-spans-on-exprs.rs:97:74 | LL | want(Wrapper { value: GenericBurrito { spiciness: NotSpicy, filling: q } }); @@ -152,7 +152,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T2` is not satisfied +error[E0277]: the trait `T2` is not implemented for `Q` --> $DIR/blame-trait-error-spans-on-exprs.rs:101:14 | LL | want((3, q)); @@ -177,7 +177,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error-spans-on-exprs.rs:105:31 | LL | want(Wrapper { value: (3, q) }); @@ -209,7 +209,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error-spans-on-exprs.rs:109:15 | LL | want(((3, q), 5)); @@ -241,7 +241,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T1` is not satisfied +error[E0277]: the trait `T1` is not implemented for `Q` --> $DIR/blame-trait-error-spans-on-exprs.rs:112:49 | LL | want(DoubleWrapper { item: Wrapper { value: q } }); @@ -266,7 +266,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T1` is not satisfied +error[E0277]: the trait `T1` is not implemented for `Q` --> $DIR/blame-trait-error-spans-on-exprs.rs:115:88 | LL | want(DoubleWrapper { item: Wrapper { value: DoubleWrapper { item: Wrapper { value: q } } } }); @@ -291,7 +291,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error-spans-on-exprs.rs:119:27 | LL | want(Wrapper { value: AliasBurrito { spiciness: q, filling: q } }); @@ -323,7 +323,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T1` is not satisfied +error[E0277]: the trait `T1` is not implemented for `Q` --> $DIR/blame-trait-error-spans-on-exprs.rs:122:35 | LL | want(Two { a: Two { a: (), b: q }, b: () }); @@ -348,7 +348,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T1` is not satisfied +error[E0277]: the trait `T1` is not implemented for `Q` --> $DIR/blame-trait-error-spans-on-exprs.rs:128:59 | LL | want( @@ -375,7 +375,7 @@ help: consider restricting type parameter `Q` LL | fn example(q: Q) { | ++++ -error[E0277]: the trait bound `Q: T3` is not satisfied +error[E0277]: the trait `T3` is not implemented for `Q` --> $DIR/blame-trait-error-spans-on-exprs.rs:133:44 | LL | want(&Burrito { spicy: false, filling: q }); diff --git a/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr b/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr index 7fc726409ce40..67d3801de3d48 100644 --- a/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr +++ b/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `i32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `i32` --> $DIR/feature-gate-trivial_bounds.rs:10:14 | LL | enum E where i32: Foo { V } @@ -8,7 +8,7 @@ LL | enum E where i32: Foo { V } = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable -error[E0277]: the trait bound `i32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `i32` --> $DIR/feature-gate-trivial_bounds.rs:12:16 | LL | struct S where i32: Foo; @@ -18,7 +18,7 @@ LL | struct S where i32: Foo; = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable -error[E0277]: the trait bound `i32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `i32` --> $DIR/feature-gate-trivial_bounds.rs:14:15 | LL | trait T where i32: Foo {} @@ -28,7 +28,7 @@ LL | trait T where i32: Foo {} = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable -error[E0277]: the trait bound `i32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `i32` --> $DIR/feature-gate-trivial_bounds.rs:16:15 | LL | union U where i32: Foo { f: i32 } @@ -38,7 +38,7 @@ LL | union U where i32: Foo { f: i32 } = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable -error[E0277]: the trait bound `i32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `i32` --> $DIR/feature-gate-trivial_bounds.rs:20:23 | LL | impl Foo for () where i32: Foo { @@ -48,7 +48,7 @@ LL | impl Foo for () where i32: Foo { = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable -error[E0277]: the trait bound `i32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `i32` --> $DIR/feature-gate-trivial_bounds.rs:28:14 | LL | fn f() where i32: Foo @@ -58,7 +58,7 @@ LL | fn f() where i32: Foo = help: see issue #48214 = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable -error[E0277]: the trait bound `String: Neg` is not satisfied +error[E0277]: the trait `Neg` is not implemented for `String` --> $DIR/feature-gate-trivial_bounds.rs:36:38 | LL | fn use_op(s: String) -> String where String: ::std::ops::Neg { diff --git a/tests/ui/fmt/ifmt-unimpl.rs b/tests/ui/fmt/ifmt-unimpl.rs index 258f4eea509d0..8fc10f269d681 100644 --- a/tests/ui/fmt/ifmt-unimpl.rs +++ b/tests/ui/fmt/ifmt-unimpl.rs @@ -1,4 +1,4 @@ fn main() { format!("{:X}", "3"); - //~^ ERROR: `str: UpperHex` is not satisfied + //~^ ERROR trait `UpperHex` is not implemented for `str` } diff --git a/tests/ui/fmt/ifmt-unimpl.stderr b/tests/ui/fmt/ifmt-unimpl.stderr index 3c5428e59fb59..52c70160583db 100644 --- a/tests/ui/fmt/ifmt-unimpl.stderr +++ b/tests/ui/fmt/ifmt-unimpl.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `str: UpperHex` is not satisfied +error[E0277]: the trait `UpperHex` is not implemented for `str` --> $DIR/ifmt-unimpl.rs:2:21 | LL | format!("{:X}", "3"); diff --git a/tests/ui/for/issue-20605.next.stderr b/tests/ui/for/issue-20605.next.stderr index a44faa5491d3d..cf13a5eaca199 100644 --- a/tests/ui/for/issue-20605.next.stderr +++ b/tests/ui/for/issue-20605.next.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `dyn Iterator: IntoIterator` is not satisfied +error[E0277]: the trait `IntoIterator` is not implemented for `dyn Iterator` --> $DIR/issue-20605.rs:5:17 | LL | for item in *things { *item = 0 } diff --git a/tests/ui/for/issue-20605.rs b/tests/ui/for/issue-20605.rs index 4a9f62b6612ae..7fe701ff9cede 100644 --- a/tests/ui/for/issue-20605.rs +++ b/tests/ui/for/issue-20605.rs @@ -4,7 +4,7 @@ fn changer<'a>(mut things: Box>) { for item in *things { *item = 0 } //[current]~^ ERROR the size for values of type - //[next]~^^ ERROR the trait bound `dyn Iterator: IntoIterator` is not satisfied + //[next]~^^ ERROR the trait `IntoIterator` is not implemented for `dyn Iterator` //[next]~| ERROR the type ` as IntoIterator>::IntoIter` is not well-formed //[next]~| ERROR the type `&mut as IntoIterator>::IntoIter` is not well-formed //[next]~| ERROR the type `Option<< as IntoIterator>::IntoIter as Iterator>::Item>` is not well-formed diff --git a/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.stderr b/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.stderr index 314a5509da8bc..51ee2368b73e1 100644 --- a/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.stderr +++ b/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `::Bar<()>: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `::Bar<()>` --> $DIR/assume-gat-normalization-for-nested-goals.rs:6:30 | LL | type Bar: Baz = i32; diff --git a/tests/ui/generic-associated-types/cross-crate-bounds.rs b/tests/ui/generic-associated-types/cross-crate-bounds.rs index 84b903aa6aecd..e734c130ddd48 100644 --- a/tests/ui/generic-associated-types/cross-crate-bounds.rs +++ b/tests/ui/generic-associated-types/cross-crate-bounds.rs @@ -13,7 +13,7 @@ pub struct FooImpl; impl Foo for FooImpl { type Bar = (); - //~^ ERROR the trait bound `(): AsRef<()>` is not satisfied + //~^ ERROR trait `AsRef<()>` is not implemented for `()` fn foo(&self) -> Pin + '_>> { panic!() } diff --git a/tests/ui/generic-associated-types/cross-crate-bounds.stderr b/tests/ui/generic-associated-types/cross-crate-bounds.stderr index ebd733c2ef1f8..f59044498f745 100644 --- a/tests/ui/generic-associated-types/cross-crate-bounds.stderr +++ b/tests/ui/generic-associated-types/cross-crate-bounds.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): AsRef<()>` is not satisfied +error[E0277]: the trait `AsRef<()>` is not implemented for `()` --> $DIR/cross-crate-bounds.rs:15:16 | LL | type Bar = (); diff --git a/tests/ui/generic-associated-types/impl_bounds.rs b/tests/ui/generic-associated-types/impl_bounds.rs index e45bdcf921340..d90d8ed4ed896 100644 --- a/tests/ui/generic-associated-types/impl_bounds.rs +++ b/tests/ui/generic-associated-types/impl_bounds.rs @@ -16,9 +16,9 @@ impl Foo for Fooy { type B<'a, 'b> = (&'a(), &'b ()) where 'b: 'a; //~^ ERROR impl has stricter requirements than trait type C = String where Self: Copy; - //~^ ERROR the trait bound `T: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `T` fn d() where Self: Copy {} - //~^ ERROR the trait bound `T: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `T` } fn main() {} diff --git a/tests/ui/generic-associated-types/impl_bounds.stderr b/tests/ui/generic-associated-types/impl_bounds.stderr index c3b119e21443d..6c0fd0636b8e4 100644 --- a/tests/ui/generic-associated-types/impl_bounds.stderr +++ b/tests/ui/generic-associated-types/impl_bounds.stderr @@ -21,7 +21,7 @@ help: copy the `where` clause predicates from the trait LL | type B<'a, 'b> = (&'a(), &'b ()) where 'a: 'b; | ~~~~~~~~~~~~ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/impl_bounds.rs:18:33 | LL | type C = String where Self: Copy; @@ -46,7 +46,7 @@ help: consider restricting type parameter `T` LL | impl Foo for Fooy { | +++++++++++++++++++ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/impl_bounds.rs:20:24 | LL | fn d() where Self: Copy {} diff --git a/tests/ui/generic-associated-types/issue-101020.rs b/tests/ui/generic-associated-types/issue-101020.rs index 80d0fa5ad34be..177ddcb3c2d4d 100644 --- a/tests/ui/generic-associated-types/issue-101020.rs +++ b/tests/ui/generic-associated-types/issue-101020.rs @@ -29,7 +29,7 @@ trait Foo {} fn map_test() { (&mut EmptyIter).consume(()); - //~^ ERROR the trait bound `for<'a> &'a mut (): Foo<&'a mut ()>` is not satisfied + //~^ ERROR trait `for<'a> Foo<&'a mut ()>` is not implemented for `&'a mut ()` } fn main() {} diff --git a/tests/ui/generic-associated-types/issue-101020.stderr b/tests/ui/generic-associated-types/issue-101020.stderr index 7faab4e527463..ef65a98397902 100644 --- a/tests/ui/generic-associated-types/issue-101020.stderr +++ b/tests/ui/generic-associated-types/issue-101020.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'a> &'a mut (): Foo<&'a mut ()>` is not satisfied +error[E0277]: the trait `for<'a> Foo<&'a mut ()>` is not implemented for `&'a mut ()` --> $DIR/issue-101020.rs:31:22 | LL | (&mut EmptyIter).consume(()); diff --git a/tests/ui/generic-associated-types/issue-68641-check-gat-bounds.rs b/tests/ui/generic-associated-types/issue-68641-check-gat-bounds.rs index f1e779fcb0063..1feb4dfcfa964 100644 --- a/tests/ui/generic-associated-types/issue-68641-check-gat-bounds.rs +++ b/tests/ui/generic-associated-types/issue-68641-check-gat-bounds.rs @@ -10,7 +10,7 @@ trait UnsafeCopy { impl UnsafeCopy for T { type Item<'a> = T; - //~^ ERROR the trait bound `T: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `T` } fn main() { diff --git a/tests/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr b/tests/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr index 55901cf450b67..aa5703f484764 100644 --- a/tests/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr +++ b/tests/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/issue-68641-check-gat-bounds.rs:12:21 | LL | type Item<'a> = T; diff --git a/tests/ui/generic-associated-types/issue-74816.rs b/tests/ui/generic-associated-types/issue-74816.rs index 344afb87f99cf..62643056d28a3 100644 --- a/tests/ui/generic-associated-types/issue-74816.rs +++ b/tests/ui/generic-associated-types/issue-74816.rs @@ -6,7 +6,7 @@ trait Trait1 { trait Trait2 { type Associated: Trait1 = Self; - //~^ ERROR: the trait bound `Self: Trait1` is not satisfied + //~^ ERROR trait `Trait1` is not implemented for `Self` //~| the size for values of type `Self` cannot be known } diff --git a/tests/ui/generic-associated-types/issue-74816.stderr b/tests/ui/generic-associated-types/issue-74816.stderr index 45018e6976cfb..61019a550e65d 100644 --- a/tests/ui/generic-associated-types/issue-74816.stderr +++ b/tests/ui/generic-associated-types/issue-74816.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Self: Trait1` is not satisfied +error[E0277]: the trait `Trait1` is not implemented for `Self` --> $DIR/issue-74816.rs:8:31 | LL | type Associated: Trait1 = Self; diff --git a/tests/ui/generic-associated-types/issue-74824.rs b/tests/ui/generic-associated-types/issue-74824.rs index 10c45d1336420..b6d76859302e2 100644 --- a/tests/ui/generic-associated-types/issue-74824.rs +++ b/tests/ui/generic-associated-types/issue-74824.rs @@ -4,8 +4,8 @@ use std::ops::Deref; trait UnsafeCopy { type Copy: Copy = Box; - //~^ ERROR the trait bound `Box: Copy` is not satisfied - //~^^ ERROR the trait bound `T: Clone` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `Box` + //~^^ ERROR the trait `Clone` is not implemented for `T` fn copy(x: &Self::Copy) -> Self::Copy { *x } diff --git a/tests/ui/generic-associated-types/issue-74824.stderr b/tests/ui/generic-associated-types/issue-74824.stderr index 942d9583be1b1..31e89071661d7 100644 --- a/tests/ui/generic-associated-types/issue-74824.stderr +++ b/tests/ui/generic-associated-types/issue-74824.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Box: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Box` --> $DIR/issue-74824.rs:6:26 | LL | type Copy: Copy = Box; @@ -10,7 +10,7 @@ note: required by a bound in `UnsafeCopy::Copy` LL | type Copy: Copy = Box; | ^^^^ required by this bound in `UnsafeCopy::Copy` -error[E0277]: the trait bound `T: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `T` --> $DIR/issue-74824.rs:6:26 | LL | type Copy: Copy = Box; diff --git a/tests/ui/generic-associated-types/issue-79636-1.rs b/tests/ui/generic-associated-types/issue-79636-1.rs index 3357afb9d4dce..bc15979e29f05 100644 --- a/tests/ui/generic-associated-types/issue-79636-1.rs +++ b/tests/ui/generic-associated-types/issue-79636-1.rs @@ -19,5 +19,5 @@ where fn main() { assert_eq!(join(Some(Some(true))), Some(true)); - //~^ ERROR: `Option>: Monad` is not satisfied + //~^ ERROR trait `Monad` is not implemented for `Option>` } diff --git a/tests/ui/generic-associated-types/issue-79636-1.stderr b/tests/ui/generic-associated-types/issue-79636-1.stderr index c31064dec6296..cda935fa9c157 100644 --- a/tests/ui/generic-associated-types/issue-79636-1.stderr +++ b/tests/ui/generic-associated-types/issue-79636-1.stderr @@ -30,7 +30,7 @@ help: function arguments must have a statically known size, borrowed types alway LL | fn bind(&self, f: F) -> Self::Wrapped { | + -error[E0277]: the trait bound `Option>: Monad` is not satisfied +error[E0277]: the trait `Monad` is not implemented for `Option>` --> $DIR/issue-79636-1.rs:21:21 | LL | assert_eq!(join(Some(Some(true))), Some(true)); diff --git a/tests/ui/generic-associated-types/multiple-type-params-with-unmet-bounds.rs b/tests/ui/generic-associated-types/multiple-type-params-with-unmet-bounds.rs index b127b3f6e1f03..3dca219bd9162 100644 --- a/tests/ui/generic-associated-types/multiple-type-params-with-unmet-bounds.rs +++ b/tests/ui/generic-associated-types/multiple-type-params-with-unmet-bounds.rs @@ -6,5 +6,5 @@ impl Trait for () { } fn main() { let _: <() as Trait>::P; - //~^ ERROR the trait bound `String: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `String` } diff --git a/tests/ui/generic-associated-types/multiple-type-params-with-unmet-bounds.stderr b/tests/ui/generic-associated-types/multiple-type-params-with-unmet-bounds.stderr index 57bff7c9e054f..7ac90dbf34533 100644 --- a/tests/ui/generic-associated-types/multiple-type-params-with-unmet-bounds.stderr +++ b/tests/ui/generic-associated-types/multiple-type-params-with-unmet-bounds.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/multiple-type-params-with-unmet-bounds.rs:8:29 | LL | let _: <() as Trait>::P; diff --git a/tests/ui/generic-associated-types/own-bound-span.rs b/tests/ui/generic-associated-types/own-bound-span.rs index 3699f7296f5d0..f9f844acf29c1 100644 --- a/tests/ui/generic-associated-types/own-bound-span.rs +++ b/tests/ui/generic-associated-types/own-bound-span.rs @@ -12,6 +12,6 @@ impl D for S { fn main() { let _: ::P; - //~^ ERROR the trait bound `String: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `String` //~| NOTE the trait `Copy` is not implemented for `String` } diff --git a/tests/ui/generic-associated-types/own-bound-span.stderr b/tests/ui/generic-associated-types/own-bound-span.stderr index 7c34a0acdbe08..35bd6ed7e3350 100644 --- a/tests/ui/generic-associated-types/own-bound-span.stderr +++ b/tests/ui/generic-associated-types/own-bound-span.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/own-bound-span.rs:14:24 | LL | let _: ::P; diff --git a/tests/ui/generic-associated-types/type-param-defaults.rs b/tests/ui/generic-associated-types/type-param-defaults.rs index a9c8c5c12d9e8..16ccc66980d94 100644 --- a/tests/ui/generic-associated-types/type-param-defaults.rs +++ b/tests/ui/generic-associated-types/type-param-defaults.rs @@ -30,7 +30,7 @@ fn main() { // errors foo::<()>(); //~^ ERROR type mismatch - //~| ERROR `u64: Other` is not satisfied + //~| ERROR trait `Other` is not implemented for `u64` // works foo::(); } diff --git a/tests/ui/generic-associated-types/type-param-defaults.stderr b/tests/ui/generic-associated-types/type-param-defaults.stderr index 3c094d45fffcc..36ff64fb92c19 100644 --- a/tests/ui/generic-associated-types/type-param-defaults.stderr +++ b/tests/ui/generic-associated-types/type-param-defaults.stderr @@ -36,7 +36,7 @@ LL | where LL | T: Trait, | ^^^^^^^^^^^ required by this bound in `foo` -error[E0277]: the trait bound `u64: Other` is not satisfied +error[E0277]: the trait `Other` is not implemented for `u64` --> $DIR/type-param-defaults.rs:31:11 | LL | foo::<()>(); diff --git a/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.rs b/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.rs index cd3acf9bc41b1..3f616cc3c4719 100644 --- a/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.rs +++ b/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.rs @@ -10,7 +10,7 @@ impl Foo for Box {} //~| ERROR cycle detected //~| ERROR cycle detected //~| ERROR cycle detected -//~| ERROR the trait bound `Box<(dyn Foo + 'static)>: Foo` is not satisfied +//~| ERROR trait `Foo` is not implemented for `Box<(dyn Foo + 'static)>` //~| ERROR not all trait items implemented fn main() {} diff --git a/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.stderr b/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.stderr index 8e6b69f7461d9..d4816b683f909 100644 --- a/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.stderr +++ b/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.stderr @@ -80,7 +80,7 @@ LL | type Context<'c> = help: consider moving `Context` to another trait = help: only type `{type error}` implements the trait, consider using it directly instead -error[E0277]: the trait bound `Box<(dyn Foo + 'static)>: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `Box<(dyn Foo + 'static)>` --> $DIR/unknown-lifetime-ice-119827.rs:7:14 | LL | impl Foo for Box {} diff --git a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs index 93f01c9577c04..487262ae47201 100644 --- a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs +++ b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.rs @@ -8,5 +8,5 @@ where String: Copy; fn main() { - let _ = UNUSABLE; //~ ERROR the trait bound `String: Copy` is not satisfied + let _ = UNUSABLE; //~ ERROR trait `Copy` is not implemented for `String` } diff --git a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr index 407682fee5664..a4d1121fb36fc 100644 --- a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr +++ b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr @@ -6,7 +6,7 @@ LL | | where LL | | String: Copy; | |_________________^ entering unreachable code -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/trivially-unsatisfied-bounds-0.rs:11:13 | LL | let _ = UNUSABLE; diff --git a/tests/ui/generic-const-items/unsatisfied-bounds.rs b/tests/ui/generic-const-items/unsatisfied-bounds.rs index 058799001725b..0407a820907d6 100644 --- a/tests/ui/generic-const-items/unsatisfied-bounds.rs +++ b/tests/ui/generic-const-items/unsatisfied-bounds.rs @@ -27,8 +27,8 @@ impl

Trait

for () { } fn main() { - let () = C::; //~ ERROR the trait bound `String: Copy` is not satisfied - let () = K::<()>; //~ ERROR the trait bound `Infallible: From<()>` is not satisfied - let _ = <() as Trait>>::A; //~ ERROR the trait bound `Vec: Copy` is not satisfied - let _ = <() as Trait<&'static str>>::B::<()>; //~ ERROR the trait bound `Infallible: From<()>` is not satisfied + let () = C::; //~ ERROR trait `Copy` is not implemented for `String` + let () = K::<()>; //~ ERROR trait `From<()>` is not implemented for `Infallible` + let _ = <() as Trait>>::A; //~ ERROR trait `Copy` is not implemented for `Vec` + let _ = <() as Trait<&'static str>>::B::<()>; //~ ERROR trait `From<()>` is not implemented for `Infallible` } diff --git a/tests/ui/generic-const-items/unsatisfied-bounds.stderr b/tests/ui/generic-const-items/unsatisfied-bounds.stderr index 14894cef77089..66a8852ba646d 100644 --- a/tests/ui/generic-const-items/unsatisfied-bounds.stderr +++ b/tests/ui/generic-const-items/unsatisfied-bounds.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/unsatisfied-bounds.rs:30:18 | LL | let () = C::; @@ -10,7 +10,7 @@ note: required by a bound in `C` LL | const C: () = (); | ^^^^ required by this bound in `C` -error[E0277]: the trait bound `Infallible: From<()>` is not satisfied +error[E0277]: the trait `From<()>` is not implemented for `Infallible` --> $DIR/unsatisfied-bounds.rs:31:18 | LL | let () = K::<()>; @@ -27,7 +27,7 @@ LL | where LL | Infallible: From; | ^^^^^^^ required by this bound in `K` -error[E0277]: the trait bound `Vec: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Vec` --> $DIR/unsatisfied-bounds.rs:32:26 | LL | let _ = <() as Trait>>::A; @@ -42,7 +42,7 @@ LL | where LL | P: Copy; | ^^^^ required by this bound in `Trait::A` -error[E0277]: the trait bound `Infallible: From<()>` is not satisfied +error[E0277]: the trait `From<()>` is not implemented for `Infallible` --> $DIR/unsatisfied-bounds.rs:33:46 | LL | let _ = <() as Trait<&'static str>>::B::<()>; diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr index e10da26665ebb..ec5dd84f6be59 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'ccx> B: Bar<'ccx>` is not satisfied +error[E0277]: the trait `for<'ccx> Bar<'ccx>` is not implemented for `B` --> $DIR/hrtb-higher-ranker-supertraits-transitive.rs:47:26 | LL | want_bar_for_any_ccx(b); diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits.rs b/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits.rs index 33e0ec4635b66..2ffc97ecc3d93 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits.rs +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits.rs @@ -15,7 +15,7 @@ fn want_foo_for_some_tcx<'x,F>(f: &'x F) where F : Foo<'x> { want_foo_for_some_tcx(f); - want_foo_for_any_tcx(f); //~ ERROR not satisfied + want_foo_for_any_tcx(f); //~ ERROR is not implemented } fn want_foo_for_any_tcx(f: &F) //~ WARN cannot return without recursing @@ -32,7 +32,7 @@ fn want_bar_for_some_ccx<'x,B>(b: &B) want_foo_for_any_tcx(b); want_bar_for_some_ccx(b); - want_bar_for_any_ccx(b); //~ ERROR not satisfied + want_bar_for_any_ccx(b); //~ ERROR is not implemented } fn want_bar_for_any_ccx(b: &B) //~ WARN cannot return without recursing diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits.stderr index f220ba6f33893..580226644afd4 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits.stderr +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'tcx> F: Foo<'tcx>` is not satisfied +error[E0277]: the trait `for<'tcx> Foo<'tcx>` is not implemented for `F` --> $DIR/hrtb-higher-ranker-supertraits.rs:18:26 | LL | want_foo_for_any_tcx(f); @@ -18,7 +18,7 @@ help: consider further restricting this bound LL | where F : Foo<'x> + for<'tcx> Foo<'tcx> | +++++++++++++++++++++ -error[E0277]: the trait bound `for<'ccx> B: Bar<'ccx>` is not satisfied +error[E0277]: the trait `for<'ccx> Bar<'ccx>` is not implemented for `B` --> $DIR/hrtb-higher-ranker-supertraits.rs:35:26 | LL | want_bar_for_any_ccx(b); diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.rs index 8aa29926d4f9b..6874bc0275d05 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.rs @@ -6,8 +6,8 @@ trait SomeTrait<'a> { fn give_me_ice() { callee:: >::Associated>(); - //~^ ERROR the trait bound `for<'a> T: SomeTrait<'a>` is not satisfied [E0277] - //~| ERROR the trait bound `for<'a> T: SomeTrait<'a>` is not satisfied [E0277] + //~^ ERROR trait `for<'a> SomeTrait<'a>` is not implemented for `T` + //~| ERROR trait `for<'a> SomeTrait<'a>` is not implemented for `T` } fn callee>() { diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.stderr b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.stderr index e60531a876be1..e2a7bb70d1eb0 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.stderr +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'a> T: SomeTrait<'a>` is not satisfied +error[E0277]: the trait `for<'a> SomeTrait<'a>` is not implemented for `T` --> $DIR/issue-85455.rs:8:14 | LL | callee:: >::Associated>(); @@ -9,7 +9,7 @@ help: consider restricting type parameter `T` LL | fn give_me_ice SomeTrait<'a>>() { | +++++++++++++++++++++++ -error[E0277]: the trait bound `for<'a> T: SomeTrait<'a>` is not satisfied +error[E0277]: the trait `for<'a> SomeTrait<'a>` is not implemented for `T` --> $DIR/issue-85455.rs:8:5 | LL | callee:: >::Associated>(); diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89118.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89118.rs index fffb54f86ca03..e923aa965b78b 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89118.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89118.rs @@ -17,16 +17,16 @@ trait TimerContext { impl TimerContext for C where C: StackContext, - //~^ ERROR: is not satisfied [E0277] + //~^ ERROR: the trait { type Handler = Ctx; - //~^ ERROR: is not satisfied [E0277] + //~^ ERROR: the trait } struct EthernetWorker(C) where Ctx<()>: for<'a> BufferUdpStateContext<&'a ()>; impl EthernetWorker {} -//~^ ERROR: is not satisfied [E0277] +//~^ ERROR: the trait fn main() {} diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89118.stderr b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89118.stderr index 761fd9045a13a..3c77dc0ff534f 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89118.stderr +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89118.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'a> &'a (): BufferMut` is not satisfied +error[E0277]: the trait `for<'a> BufferMut` is not implemented for `&'a ()` --> $DIR/issue-89118.rs:19:8 | LL | C: StackContext, @@ -25,7 +25,7 @@ LL | where LL | Ctx<()>: for<'a> BufferUdpStateContext<&'a ()>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StackContext` -error[E0277]: the trait bound `for<'a> &'a (): BufferMut` is not satisfied +error[E0277]: the trait `for<'a> BufferMut` is not implemented for `&'a ()` --> $DIR/issue-89118.rs:29:9 | LL | impl EthernetWorker {} @@ -52,7 +52,7 @@ LL | where LL | Ctx<()>: for<'a> BufferUdpStateContext<&'a ()>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `EthernetWorker` -error[E0277]: the trait bound `for<'a> &'a (): BufferMut` is not satisfied +error[E0277]: the trait `for<'a> BufferMut` is not implemented for `&'a ()` --> $DIR/issue-89118.rs:22:20 | LL | type Handler = Ctx; diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr index 6e36922b46964..95a3baad8a25b 100644 --- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr +++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied +error[E0277]: the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()` --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:13 | LL | fn ice() -> impl AsRef { diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr index 7917fa991ee32..d00598a528dd6 100644 --- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr +++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied +error[E0277]: the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()` --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:13 | LL | fn ice() -> impl AsRef { diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs index 582386aa7596a..9ab220cecac7f 100644 --- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs +++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs @@ -4,9 +4,9 @@ #![allow(warnings)] fn ice() -> impl AsRef { - //[edition2015]~^ ERROR: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied [E0277] + //[edition2015]~^ ERROR trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()` //[edition2021]~^^ ERROR: trait objects must include the `dyn` keyword [E0782] - //[edition2021]~| ERROR: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied [E0277] + //[edition2021]~| ERROR trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()` todo!() } diff --git a/tests/ui/impl-trait/impl_trait_projections.rs b/tests/ui/impl-trait/impl_trait_projections.rs index 365ac85e2f665..e28af7d44e252 100644 --- a/tests/ui/impl-trait/impl_trait_projections.rs +++ b/tests/ui/impl-trait/impl_trait_projections.rs @@ -25,9 +25,9 @@ fn projection_with_named_trait_is_disallowed(mut x: impl Iterator) fn projection_with_named_trait_inside_path_is_disallowed() -> <::std::ops::Range as Iterator>::Item //~^ ERROR `impl Trait` is not allowed in path parameters -//~| ERROR `impl Debug: Step` is not satisfied +//~| ERROR trait `Step` is not implemented for `impl Debug` { - //~^ ERROR `impl Debug: Step` is not satisfied + //~^ ERROR trait `Step` is not implemented for `impl Debug` (1i32..100).next().unwrap() } diff --git a/tests/ui/impl-trait/impl_trait_projections.stderr b/tests/ui/impl-trait/impl_trait_projections.stderr index 421afc96eed07..a32edb0a67676 100644 --- a/tests/ui/impl-trait/impl_trait_projections.stderr +++ b/tests/ui/impl-trait/impl_trait_projections.stderr @@ -28,7 +28,7 @@ error[E0667]: `impl Trait` is not allowed in path parameters LL | fn projection_is_disallowed(x: impl Iterator) -> ::Item { | ^^^^^^^^^^^^^ -error[E0277]: the trait bound `impl Debug: Step` is not satisfied +error[E0277]: the trait `Step` is not implemented for `impl Debug` --> $DIR/impl_trait_projections.rs:26:8 | LL | -> <::std::ops::Range as Iterator>::Item @@ -46,7 +46,7 @@ LL | -> <::std::ops::Range as Iterator>::Item and 8 others = note: required for `std::ops::Range` to implement `Iterator` -error[E0277]: the trait bound `impl Debug: Step` is not satisfied +error[E0277]: the trait `Step` is not implemented for `impl Debug` --> $DIR/impl_trait_projections.rs:29:1 | LL | / { diff --git a/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs b/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs index daf29a0005dec..75c85dbbcd0b9 100644 --- a/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs +++ b/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.rs @@ -18,8 +18,8 @@ impl dyn MyTrait { fn other(&self) -> impl Marker { //~^ ERROR the trait `MyTrait` cannot be made into an object MyTrait::foo(&self) - //~^ ERROR the trait bound `&dyn MyTrait: MyTrait` is not satisfied - //~| ERROR the trait bound `&dyn MyTrait: MyTrait` is not satisfied + //~^ ERROR trait `MyTrait` is not implemented for `&dyn MyTrait` + //~| ERROR trait `MyTrait` is not implemented for `&dyn MyTrait` //~| ERROR the trait `MyTrait` cannot be made into an object } } diff --git a/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.stderr b/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.stderr index 90285d512ef03..9db73df784863 100644 --- a/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.stderr +++ b/tests/ui/impl-trait/in-trait/cycle-effective-visibilities-during-object-safety.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied +error[E0277]: the trait `MyTrait` is not implemented for `&dyn MyTrait` --> $DIR/cycle-effective-visibilities-during-object-safety.rs:20:22 | LL | MyTrait::foo(&self) @@ -24,7 +24,7 @@ LL | fn foo(&self) -> impl Marker; = help: consider moving `foo` to another trait = help: only type `Outer` implements the trait, consider using it directly instead -error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied +error[E0277]: the trait `MyTrait` is not implemented for `&dyn MyTrait` --> $DIR/cycle-effective-visibilities-during-object-safety.rs:20:9 | LL | MyTrait::foo(&self) diff --git a/tests/ui/impl-trait/in-trait/issue-102140.rs b/tests/ui/impl-trait/in-trait/issue-102140.rs index 9d703cf0df1bc..0df14b2f741d5 100644 --- a/tests/ui/impl-trait/in-trait/issue-102140.rs +++ b/tests/ui/impl-trait/in-trait/issue-102140.rs @@ -18,8 +18,8 @@ impl MyTrait for Outer { impl dyn MyTrait { fn other(&self) -> impl Marker { MyTrait::foo(&self) - //~^ ERROR the trait bound `&dyn MyTrait: MyTrait` is not satisfied - //~| ERROR the trait bound `&dyn MyTrait: MyTrait` is not satisfied + //~^ ERROR trait `MyTrait` is not implemented for `&dyn MyTrait` + //~| ERROR trait `MyTrait` is not implemented for `&dyn MyTrait` } } diff --git a/tests/ui/impl-trait/in-trait/issue-102140.stderr b/tests/ui/impl-trait/in-trait/issue-102140.stderr index dc3dcc114aed5..f1a1a63d5211f 100644 --- a/tests/ui/impl-trait/in-trait/issue-102140.stderr +++ b/tests/ui/impl-trait/in-trait/issue-102140.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied +error[E0277]: the trait `MyTrait` is not implemented for `&dyn MyTrait` --> $DIR/issue-102140.rs:20:22 | LL | MyTrait::foo(&self) @@ -12,7 +12,7 @@ LL - MyTrait::foo(&self) LL + MyTrait::foo(self) | -error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied +error[E0277]: the trait `MyTrait` is not implemented for `&dyn MyTrait` --> $DIR/issue-102140.rs:20:9 | LL | MyTrait::foo(&self) diff --git a/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.rs b/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.rs index ff265e576b90f..43cbc681070f1 100644 --- a/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.rs +++ b/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.rs @@ -6,8 +6,8 @@ struct Bar; impl Foo for Bar { fn foo>(self) -> impl Foo { - //~^ ERROR: the trait bound `impl Foo: Foo` is not satisfied [E0277] - //~| ERROR: the trait bound `Bar: Foo` is not satisfied [E0277] + //~^ ERROR trait `Foo` is not implemented for `impl Foo` + //~| ERROR trait `Foo` is not implemented for `Bar` //~| ERROR: impl has stricter requirements than trait self } diff --git a/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr b/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr index 12725c3456fd5..75519afaa5a53 100644 --- a/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr +++ b/tests/ui/impl-trait/in-trait/return-dont-satisfy-bounds.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `impl Foo: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `impl Foo` --> $DIR/return-dont-satisfy-bounds.rs:8:34 | LL | fn foo>(self) -> impl Foo { @@ -20,7 +20,7 @@ LL | fn foo(self) -> impl Foo; LL | fn foo>(self) -> impl Foo { | ^^^^^^^ impl has extra requirement `F2: Foo` -error[E0277]: the trait bound `Bar: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `Bar` --> $DIR/return-dont-satisfy-bounds.rs:8:34 | LL | fn foo>(self) -> impl Foo { diff --git a/tests/ui/impl-trait/issue-55872-1.rs b/tests/ui/impl-trait/issue-55872-1.rs index f36a310ddf310..79ceae13b4c88 100644 --- a/tests/ui/impl-trait/issue-55872-1.rs +++ b/tests/ui/impl-trait/issue-55872-1.rs @@ -11,8 +11,8 @@ impl Bar for S { fn foo() -> Self::E { //~^ ERROR impl has stricter requirements than trait - //~| ERROR the trait bound `S: Copy` is not satisfied in `(S, T)` [E0277] - //~| ERROR the trait bound `T: Copy` is not satisfied in `(S, T)` [E0277] + //~| ERROR the trait `Copy` is not implemented for `S` in `(S, T)` + //~| ERROR the trait `Copy` is not implemented for `T` in `(S, T)` (S::default(), T::default()) } } diff --git a/tests/ui/impl-trait/issue-55872-1.stderr b/tests/ui/impl-trait/issue-55872-1.stderr index 0c86824e62217..40cd7092aea4c 100644 --- a/tests/ui/impl-trait/issue-55872-1.stderr +++ b/tests/ui/impl-trait/issue-55872-1.stderr @@ -7,7 +7,7 @@ LL | fn foo() -> Self::E; LL | fn foo() -> Self::E { | ^^^^^^^ impl has extra requirement `T: Default` -error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)` +error[E0277]: the trait `Copy` is not implemented for `S` in `(S, T)` --> $DIR/issue-55872-1.rs:12:29 | LL | fn foo() -> Self::E { @@ -19,7 +19,7 @@ help: consider further restricting this bound LL | impl Bar for S { | +++++++++++++++++++ -error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)` +error[E0277]: the trait `Copy` is not implemented for `T` in `(S, T)` --> $DIR/issue-55872-1.rs:12:29 | LL | fn foo() -> Self::E { diff --git a/tests/ui/impl-trait/issue-55872-3.rs b/tests/ui/impl-trait/issue-55872-3.rs index 3f931027d9a38..94d374794a23a 100644 --- a/tests/ui/impl-trait/issue-55872-3.rs +++ b/tests/ui/impl-trait/issue-55872-3.rs @@ -11,7 +11,7 @@ pub trait Bar { impl Bar for S { type E = impl std::marker::Copy; fn foo() -> Self::E { - //~^ ERROR : Copy` is not satisfied [E0277] + //~^ ERROR the trait `Copy` is not implemented for async {} } } diff --git a/tests/ui/impl-trait/issue-55872-3.stderr b/tests/ui/impl-trait/issue-55872-3.stderr index 9af0fad9cdb94..f543887a21d7a 100644 --- a/tests/ui/impl-trait/issue-55872-3.stderr +++ b/tests/ui/impl-trait/issue-55872-3.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `{async block@$DIR/issue-55872-3.rs:15:9: 15:17}: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `{async block@$DIR/issue-55872-3.rs:15:9: 15:17}` --> $DIR/issue-55872-3.rs:13:20 | LL | fn foo() -> Self::E { diff --git a/tests/ui/impl-trait/issues/issue-62742.rs b/tests/ui/impl-trait/issues/issue-62742.rs index 11a75737e5545..dabd9d4452e14 100644 --- a/tests/ui/impl-trait/issues/issue-62742.rs +++ b/tests/ui/impl-trait/issues/issue-62742.rs @@ -2,10 +2,10 @@ use std::marker::PhantomData; fn _alias_check() { WrongImpl::foo(0i32); - //~^ ERROR the trait bound `RawImpl<_>: Raw<_>` is not satisfied - //~| ERROR the trait bound `RawImpl<_>: Raw<_>` is not satisfied + //~^ ERROR trait `Raw<_>` is not implemented for `RawImpl<_>` + //~| ERROR trait `Raw<_>` is not implemented for `RawImpl<_>` WrongImpl::<()>::foo(0i32); - //~^ ERROR the trait bound `RawImpl<()>: Raw<()>` is not satisfied + //~^ ERROR trait `Raw<()>` is not implemented for `RawImpl<()>` //~| ERROR trait bounds were not satisfied CorrectImpl::foo(0i32); } diff --git a/tests/ui/impl-trait/issues/issue-62742.stderr b/tests/ui/impl-trait/issues/issue-62742.stderr index 9ec581c231b7b..f582a574d58c7 100644 --- a/tests/ui/impl-trait/issues/issue-62742.stderr +++ b/tests/ui/impl-trait/issues/issue-62742.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied +error[E0277]: the trait `Raw<_>` is not implemented for `RawImpl<_>` --> $DIR/issue-62742.rs:4:5 | LL | WrongImpl::foo(0i32); @@ -13,7 +13,7 @@ LL | impl> SafeImpl { LL | pub fn foo(value: A::Value) {} | --- required by a bound in this associated function -error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied +error[E0277]: the trait `Raw<_>` is not implemented for `RawImpl<_>` --> $DIR/issue-62742.rs:4:5 | LL | WrongImpl::foo(0i32); @@ -51,7 +51,7 @@ note: the trait `Raw` must be implemented LL | pub trait Raw { | ^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0277]: the trait bound `RawImpl<()>: Raw<()>` is not satisfied +error[E0277]: the trait `Raw<()>` is not implemented for `RawImpl<()>` --> $DIR/issue-62742.rs:7:5 | LL | WrongImpl::<()>::foo(0i32); diff --git a/tests/ui/impl-trait/nested-rpit-hrtb.rs b/tests/ui/impl-trait/nested-rpit-hrtb.rs index a3eca741daad9..1f2b5339cc9fb 100644 --- a/tests/ui/impl-trait/nested-rpit-hrtb.rs +++ b/tests/ui/impl-trait/nested-rpit-hrtb.rs @@ -35,7 +35,7 @@ fn one_hrtb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'a> {} fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a>> {} //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet -//~| ERROR: the trait bound `for<'a> &'a (): Qux<'_>` is not satisfied +//~| ERROR trait `for<'a> Qux<'_>` is not implemented for `&'a ()` // This should resolve. fn one_hrtb_mention_fn_trait_param<'b>() -> impl for<'a> Foo<'a, Assoc = impl Qux<'b>> {} @@ -45,7 +45,7 @@ fn one_hrtb_mention_fn_outlives<'b>() -> impl for<'a> Foo<'a, Assoc = impl Sized // This should resolve. fn one_hrtb_mention_fn_trait_param_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Qux<'b>> {} -//~^ ERROR: the trait bound `for<'a> &'a (): Qux<'b>` is not satisfied +//~^ ERROR trait `for<'a> Qux<'b>` is not implemented for `&'a ()` // This should resolve. fn one_hrtb_mention_fn_outlives_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'b> {} @@ -60,7 +60,7 @@ fn two_htrb_outlives() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Sized + 'b> // This should resolve. fn two_htrb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Qux<'b>> {} -//~^ ERROR: the trait bound `for<'a, 'b> &'a (): Qux<'b>` is not satisfied +//~^ ERROR trait `for<'a, 'b> Qux<'b>` is not implemented for `&'a ()` // `'b` is not in scope for the outlives bound. fn two_htrb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Sized + 'b> {} diff --git a/tests/ui/impl-trait/nested-rpit-hrtb.stderr b/tests/ui/impl-trait/nested-rpit-hrtb.stderr index 0e0f76874e3af..f55df06d3ccca 100644 --- a/tests/ui/impl-trait/nested-rpit-hrtb.stderr +++ b/tests/ui/impl-trait/nested-rpit-hrtb.stderr @@ -86,7 +86,7 @@ LL | fn one_hrtb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'a = note: `()` must implement `Bar<'a>` = note: ...but it actually implements `Bar<'0>`, for some specific lifetime `'0` -error[E0277]: the trait bound `for<'a> &'a (): Qux<'_>` is not satisfied +error[E0277]: the trait `for<'a> Qux<'_>` is not implemented for `&'a ()` --> $DIR/nested-rpit-hrtb.rs:36:64 | LL | fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a>> {} @@ -95,7 +95,7 @@ LL | fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a> = help: the trait `Qux<'_>` is implemented for `()` = help: for that trait implementation, expected `()`, found `&'a ()` -error[E0277]: the trait bound `for<'a> &'a (): Qux<'b>` is not satisfied +error[E0277]: the trait `for<'a> Qux<'b>` is not implemented for `&'a ()` --> $DIR/nested-rpit-hrtb.rs:47:79 | LL | fn one_hrtb_mention_fn_trait_param_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Qux<'b>> {} @@ -113,7 +113,7 @@ LL | fn one_hrtb_mention_fn_outlives_uses<'b>() -> impl for<'a> Bar<'a, Assoc = = note: `()` must implement `Bar<'a>` = note: ...but it actually implements `Bar<'0>`, for some specific lifetime `'0` -error[E0277]: the trait bound `for<'a, 'b> &'a (): Qux<'b>` is not satisfied +error[E0277]: the trait `for<'a, 'b> Qux<'b>` is not implemented for `&'a ()` --> $DIR/nested-rpit-hrtb.rs:62:64 | LL | fn two_htrb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Qux<'b>> {} diff --git a/tests/ui/impl-trait/nested_impl_trait.rs b/tests/ui/impl-trait/nested_impl_trait.rs index 760102794c34e..ea246f0ba1bc9 100644 --- a/tests/ui/impl-trait/nested_impl_trait.rs +++ b/tests/ui/impl-trait/nested_impl_trait.rs @@ -5,7 +5,7 @@ fn fine(x: impl Into) -> impl Into { x } fn bad_in_ret_position(x: impl Into) -> impl Into { x } //~^ ERROR nested `impl Trait` is not allowed -//~| ERROR the trait bound `impl Debug: From>` is not satisfied +//~| ERROR trait `From>` is not implemented for `impl Debug` fn bad_in_fn_syntax(x: fn() -> impl Into) {} //~^ ERROR nested `impl Trait` is not allowed @@ -18,7 +18,7 @@ struct X; impl X { fn bad(x: impl Into) -> impl Into { x } //~^ ERROR nested `impl Trait` is not allowed - //~| ERROR the trait bound `impl Debug: From>` is not satisfied + //~| ERROR trait `From>` is not implemented for `impl Debug` } fn allowed_in_assoc_type() -> impl Iterator { diff --git a/tests/ui/impl-trait/nested_impl_trait.stderr b/tests/ui/impl-trait/nested_impl_trait.stderr index 83d1347aff431..7e6877ef218fa 100644 --- a/tests/ui/impl-trait/nested_impl_trait.stderr +++ b/tests/ui/impl-trait/nested_impl_trait.stderr @@ -42,7 +42,7 @@ LL | fn bad_in_fn_syntax(x: fn() -> impl Into) {} | = note: `impl Trait` is only allowed in arguments and return types of functions and methods -error[E0277]: the trait bound `impl Debug: From>` is not satisfied +error[E0277]: the trait `From>` is not implemented for `impl Debug` --> $DIR/nested_impl_trait.rs:6:46 | LL | fn bad_in_ret_position(x: impl Into) -> impl Into { x } @@ -51,7 +51,7 @@ LL | fn bad_in_ret_position(x: impl Into) -> impl Into { x } = help: the trait `Into` is implemented for `T` = note: required for `impl Into` to implement `Into` -error[E0277]: the trait bound `impl Debug: From>` is not satisfied +error[E0277]: the trait `From>` is not implemented for `impl Debug` --> $DIR/nested_impl_trait.rs:19:34 | LL | fn bad(x: impl Into) -> impl Into { x } diff --git a/tests/ui/indexing/point-at-index-for-obligation-failure.stderr b/tests/ui/indexing/point-at-index-for-obligation-failure.stderr index df4d7cc0683d5..25e7466aa5966 100644 --- a/tests/ui/indexing/point-at-index-for-obligation-failure.stderr +++ b/tests/ui/indexing/point-at-index-for-obligation-failure.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `String: Borrow<&str>` is not satisfied +error[E0277]: the trait `Borrow<&str>` is not implemented for `String` --> $DIR/point-at-index-for-obligation-failure.rs:5:9 | LL | &s diff --git a/tests/ui/issues/issue-18611.rs b/tests/ui/issues/issue-18611.rs index 57da57d83537c..3d05c00baddd3 100644 --- a/tests/ui/issues/issue-18611.rs +++ b/tests/ui/issues/issue-18611.rs @@ -1,6 +1,6 @@ fn add_state(op: ::State) { -//~^ ERROR `isize: HasState` is not satisfied -//~| ERROR `isize: HasState` is not satisfied +//~^ ERROR trait `HasState` is not implemented for `isize` +//~| ERROR trait `HasState` is not implemented for `isize` } trait HasState { diff --git a/tests/ui/issues/issue-18611.stderr b/tests/ui/issues/issue-18611.stderr index 76848201f7327..1f08277451d93 100644 --- a/tests/ui/issues/issue-18611.stderr +++ b/tests/ui/issues/issue-18611.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `isize: HasState` is not satisfied +error[E0277]: the trait `HasState` is not implemented for `isize` --> $DIR/issue-18611.rs:1:18 | LL | fn add_state(op: ::State) { @@ -10,7 +10,7 @@ help: this trait has no implementations, consider adding one LL | trait HasState { | ^^^^^^^^^^^^^^ -error[E0277]: the trait bound `isize: HasState` is not satisfied +error[E0277]: the trait `HasState` is not implemented for `isize` --> $DIR/issue-18611.rs:1:46 | LL | fn add_state(op: ::State) { diff --git a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-1.rs b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-1.rs index 763d07db2cde4..e58c081e889ed 100644 --- a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-1.rs +++ b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-1.rs @@ -10,5 +10,5 @@ fn assert_clone() where T : Clone { } fn main() { assert_clone::(); - //~^ ERROR `S: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `S` } diff --git a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-1.stderr b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-1.stderr index b7c7da0067239..fe8263cd4ba7e 100644 --- a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-1.stderr +++ b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `S: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `S` --> $DIR/issue-1920-1.rs:12:20 | LL | assert_clone::(); diff --git a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-2.rs b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-2.rs index b5a90b2c8e8ba..f089e2ac71bd8 100644 --- a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-2.rs +++ b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-2.rs @@ -8,5 +8,5 @@ fn assert_clone() where T : Clone { } fn main() { assert_clone::(); - //~^ ERROR `S: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `S` } diff --git a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-2.stderr b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-2.stderr index 844cb0ff1999c..9831267124ac0 100644 --- a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-2.stderr +++ b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `S: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `S` --> $DIR/issue-1920-2.rs:10:20 | LL | assert_clone::(); diff --git a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-3.rs b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-3.rs index 372c8b1511c40..e55af16f26030 100644 --- a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-3.rs +++ b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-3.rs @@ -12,5 +12,5 @@ fn assert_clone() where T : Clone { } fn main() { assert_clone::(); - //~^ ERROR `S: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `S` } diff --git a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-3.stderr b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-3.stderr index 525ca4685bb77..2293a2943b12f 100644 --- a/tests/ui/issues/issue-1920-absolute-paths/issue-1920-3.stderr +++ b/tests/ui/issues/issue-1920-absolute-paths/issue-1920-3.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `S: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `S` --> $DIR/issue-1920-3.rs:14:20 | LL | assert_clone::(); diff --git a/tests/ui/issues/issue-20162.rs b/tests/ui/issues/issue-20162.rs index b491bc37f5153..03cde6891654a 100644 --- a/tests/ui/issues/issue-20162.rs +++ b/tests/ui/issues/issue-20162.rs @@ -3,5 +3,5 @@ struct X { x: i32 } fn main() { let mut b: Vec = vec![]; b.sort(); - //~^ ERROR `X: Ord` is not satisfied + //~^ ERROR trait `Ord` is not implemented for `X` } diff --git a/tests/ui/issues/issue-20162.stderr b/tests/ui/issues/issue-20162.stderr index 8f45f0d36c71e..72f5f5993acdb 100644 --- a/tests/ui/issues/issue-20162.stderr +++ b/tests/ui/issues/issue-20162.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `X: Ord` is not satisfied +error[E0277]: the trait `Ord` is not implemented for `X` --> $DIR/issue-20162.rs:5:7 | LL | b.sort(); diff --git a/tests/ui/issues/issue-21160.rs b/tests/ui/issues/issue-21160.rs index 10136ba11aa5c..6ad99b7350562 100644 --- a/tests/ui/issues/issue-21160.rs +++ b/tests/ui/issues/issue-21160.rs @@ -6,6 +6,6 @@ impl Bar { #[derive(Hash)] struct Foo(Bar); -//~^ error: `Bar: Hash` is not satisfied +//~^ ERROR trait `Hash` is not implemented for `Bar` fn main() {} diff --git a/tests/ui/issues/issue-21160.stderr b/tests/ui/issues/issue-21160.stderr index 892a4530ebcbb..b10c04ca59b9b 100644 --- a/tests/ui/issues/issue-21160.stderr +++ b/tests/ui/issues/issue-21160.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Bar: Hash` is not satisfied +error[E0277]: the trait `Hash` is not implemented for `Bar` --> $DIR/issue-21160.rs:8:12 | LL | #[derive(Hash)] diff --git a/tests/ui/issues/issue-21837.rs b/tests/ui/issues/issue-21837.rs index 213119bd21c43..41f3c486767c3 100644 --- a/tests/ui/issues/issue-21837.rs +++ b/tests/ui/issues/issue-21837.rs @@ -5,6 +5,6 @@ pub trait Trait1 {} impl Trait1 for Foo {} pub trait Trait2 {} -impl Trait2 for Foo {} //~ ERROR the trait bound `T: Bound` is not satisfied +impl Trait2 for Foo {} //~ ERROR trait `Bound` is not implemented for `T` fn main() {} diff --git a/tests/ui/issues/issue-21837.stderr b/tests/ui/issues/issue-21837.stderr index f198939268802..e363894220f62 100644 --- a/tests/ui/issues/issue-21837.stderr +++ b/tests/ui/issues/issue-21837.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Bound` is not satisfied +error[E0277]: the trait `Bound` is not implemented for `T` --> $DIR/issue-21837.rs:8:20 | LL | impl Trait2 for Foo {} diff --git a/tests/ui/issues/issue-25076.rs b/tests/ui/issues/issue-25076.rs index 6c5a553924561..4357bd2fbadfd 100644 --- a/tests/ui/issues/issue-25076.rs +++ b/tests/ui/issues/issue-25076.rs @@ -7,5 +7,5 @@ fn do_fold>(init: B, f: F) {} fn bot() -> T { loop {} } fn main() { - do_fold(bot(), ()); //~ ERROR `(): InOut<_>` is not satisfied + do_fold(bot(), ()); //~ ERROR trait `InOut<_>` is not implemented for `()` } diff --git a/tests/ui/issues/issue-25076.stderr b/tests/ui/issues/issue-25076.stderr index 2acfe70b48542..5c637449fd42b 100644 --- a/tests/ui/issues/issue-25076.stderr +++ b/tests/ui/issues/issue-25076.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): InOut<_>` is not satisfied +error[E0277]: the trait `InOut<_>` is not implemented for `()` --> $DIR/issue-25076.rs:10:20 | LL | do_fold(bot(), ()); diff --git a/tests/ui/issues/issue-27340.rs b/tests/ui/issues/issue-27340.rs index 53ca2bc973ff8..9db047c31ebd9 100644 --- a/tests/ui/issues/issue-27340.rs +++ b/tests/ui/issues/issue-27340.rs @@ -2,6 +2,6 @@ struct Foo; #[derive(Copy, Clone)] //~^ ERROR the trait `Copy` cannot be implemented for this type struct Bar(Foo); -//~^ ERROR `Foo: Clone` is not satisfied +//~^ ERROR trait `Clone` is not implemented for `Foo` fn main() {} diff --git a/tests/ui/issues/issue-27340.stderr b/tests/ui/issues/issue-27340.stderr index 61ae660f4cf70..b5c994774cf1f 100644 --- a/tests/ui/issues/issue-27340.stderr +++ b/tests/ui/issues/issue-27340.stderr @@ -9,7 +9,7 @@ LL | struct Bar(Foo); | = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `Foo: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `Foo` --> $DIR/issue-27340.rs:4:12 | LL | #[derive(Copy, Clone)] diff --git a/tests/ui/issues/issue-35570.rs b/tests/ui/issues/issue-35570.rs index a2b0222d4f395..6ea1b45777a57 100644 --- a/tests/ui/issues/issue-35570.rs +++ b/tests/ui/issues/issue-35570.rs @@ -6,8 +6,8 @@ trait Trait2<'a> { } fn _ice(param: Box Trait1<<() as Trait2<'a>>::Ty>>) { - //~^ ERROR the trait bound `for<'a> (): Trait2<'a>` is not satisfied - //~| ERROR the trait bound `for<'a> (): Trait2<'a>` is not satisfied + //~^ ERROR trait `for<'a> Trait2<'a>` is not implemented for `()` + //~| ERROR trait `for<'a> Trait2<'a>` is not implemented for `()` let _e: (usize, usize) = unsafe{mem::transmute(param)}; } diff --git a/tests/ui/issues/issue-35570.stderr b/tests/ui/issues/issue-35570.stderr index 0aa6b5e402e44..aa79cafe34ca7 100644 --- a/tests/ui/issues/issue-35570.stderr +++ b/tests/ui/issues/issue-35570.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'a> (): Trait2<'a>` is not satisfied +error[E0277]: the trait `for<'a> Trait2<'a>` is not implemented for `()` --> $DIR/issue-35570.rs:8:40 | LL | fn _ice(param: Box Trait1<<() as Trait2<'a>>::Ty>>) { @@ -10,7 +10,7 @@ help: this trait has no implementations, consider adding one LL | trait Trait2<'a> { | ^^^^^^^^^^^^^^^^ -error[E0277]: the trait bound `for<'a> (): Trait2<'a>` is not satisfied +error[E0277]: the trait `for<'a> Trait2<'a>` is not implemented for `()` --> $DIR/issue-35570.rs:8:66 | LL | fn _ice(param: Box Trait1<<() as Trait2<'a>>::Ty>>) { diff --git a/tests/ui/issues/issue-45801.rs b/tests/ui/issues/issue-45801.rs index 780baa896676b..10e77ed0c7dc5 100644 --- a/tests/ui/issues/issue-45801.rs +++ b/tests/ui/issues/issue-45801.rs @@ -19,7 +19,7 @@ impl Pluggable for T {} fn handle(req: &mut i32) { req.get_ref::(); - //~^ ERROR the trait bound `Params: Plugin` is not satisfied + //~^ ERROR trait `Plugin` is not implemented for `Params` } fn main() {} diff --git a/tests/ui/issues/issue-45801.stderr b/tests/ui/issues/issue-45801.stderr index 5a10c429564c4..1d2f103292b42 100644 --- a/tests/ui/issues/issue-45801.stderr +++ b/tests/ui/issues/issue-45801.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Params: Plugin` is not satisfied +error[E0277]: the trait `Plugin` is not implemented for `Params` --> $DIR/issue-45801.rs:21:9 | LL | req.get_ref::(); diff --git a/tests/ui/issues/issue-60218.stderr b/tests/ui/issues/issue-60218.stderr index b9317621b77ac..98e78fa2f2490 100644 --- a/tests/ui/issues/issue-60218.stderr +++ b/tests/ui/issues/issue-60218.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&u32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `&u32` --> $DIR/issue-60218.rs:18:19 | LL | trigger_error(vec![], |x: &u32| x) diff --git a/tests/ui/issues/issue-66353.rs b/tests/ui/issues/issue-66353.rs index d8abdd5206ef4..b085a83865ada 100644 --- a/tests/ui/issues/issue-66353.rs +++ b/tests/ui/issues/issue-66353.rs @@ -10,6 +10,6 @@ trait _A { fn main() { _Func::< <() as _A>::AssocT >::func(()); - //~^ ERROR the trait bound `(): _A` is not satisfied - //~| ERROR the trait bound `(): _Func<_>` is not satisfied + //~^ ERROR trait `_A` is not implemented for `()` + //~| ERROR trait `_Func<_>` is not implemented for `()` } diff --git a/tests/ui/issues/issue-66353.stderr b/tests/ui/issues/issue-66353.stderr index 7ab7547b42dc6..c4c2adedda54d 100644 --- a/tests/ui/issues/issue-66353.stderr +++ b/tests/ui/issues/issue-66353.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): _A` is not satisfied +error[E0277]: the trait `_A` is not implemented for `()` --> $DIR/issue-66353.rs:12:15 | LL | _Func::< <() as _A>::AssocT >::func(()); @@ -10,7 +10,7 @@ help: this trait has no implementations, consider adding one LL | trait _A { | ^^^^^^^^ -error[E0277]: the trait bound `(): _Func<_>` is not satisfied +error[E0277]: the trait `_Func<_>` is not implemented for `()` --> $DIR/issue-66353.rs:12:41 | LL | _Func::< <() as _A>::AssocT >::func(()); diff --git a/tests/ui/kindck/kindck-copy.rs b/tests/ui/kindck/kindck-copy.rs index 6df98c230ea7c..474f3a0e2ed0f 100644 --- a/tests/ui/kindck/kindck-copy.rs +++ b/tests/ui/kindck/kindck-copy.rs @@ -24,14 +24,14 @@ fn test<'a,T,U:Copy>(_: &'a isize) { assert_copy::<&'a [isize]>(); // ...unless they are mutable - assert_copy::<&'static mut isize>(); //~ ERROR : Copy` is not satisfied - assert_copy::<&'a mut isize>(); //~ ERROR : Copy` is not satisfied + assert_copy::<&'static mut isize>(); //~ ERROR the trait `Copy` is not implemented for + assert_copy::<&'a mut isize>(); //~ ERROR the trait `Copy` is not implemented for // boxes are not ok - assert_copy::>(); //~ ERROR : Copy` is not satisfied - assert_copy::(); //~ ERROR : Copy` is not satisfied - assert_copy:: >(); //~ ERROR : Copy` is not satisfied - assert_copy::>(); //~ ERROR : Copy` is not satisfied + assert_copy::>(); //~ ERROR the trait `Copy` is not implemented for + assert_copy::(); //~ ERROR the trait `Copy` is not implemented for + assert_copy:: >(); //~ ERROR the trait `Copy` is not implemented for + assert_copy::>(); //~ ERROR the trait `Copy` is not implemented for // borrowed object types are generally ok assert_copy::<&'a dyn Dummy>(); @@ -39,11 +39,11 @@ fn test<'a,T,U:Copy>(_: &'a isize) { assert_copy::<&'static (dyn Dummy + Send)>(); // owned object types are not ok - assert_copy::>(); //~ ERROR : Copy` is not satisfied - assert_copy::>(); //~ ERROR : Copy` is not satisfied + assert_copy::>(); //~ ERROR the trait `Copy` is not implemented for + assert_copy::>(); //~ ERROR the trait `Copy` is not implemented for // mutable object types are not ok - assert_copy::<&'a mut (dyn Dummy + Send)>(); //~ ERROR : Copy` is not satisfied + assert_copy::<&'a mut (dyn Dummy + Send)>(); //~ ERROR the trait `Copy` is not implemented for // unsafe ptrs are ok assert_copy::<*const isize>(); @@ -61,10 +61,10 @@ fn test<'a,T,U:Copy>(_: &'a isize) { assert_copy::(); // structs containing non-POD are not ok - assert_copy::(); //~ ERROR : Copy` is not satisfied + assert_copy::(); //~ ERROR the trait `Copy` is not implemented for // ref counted types are not ok - assert_copy::>(); //~ ERROR : Copy` is not satisfied + assert_copy::>(); //~ ERROR the trait `Copy` is not implemented for } pub fn main() { diff --git a/tests/ui/kindck/kindck-copy.stderr b/tests/ui/kindck/kindck-copy.stderr index aee2aa98a60c2..c0b4cd9553ab0 100644 --- a/tests/ui/kindck/kindck-copy.stderr +++ b/tests/ui/kindck/kindck-copy.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&'static mut isize: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `&'static mut isize` --> $DIR/kindck-copy.rs:27:19 | LL | assert_copy::<&'static mut isize>(); @@ -15,7 +15,7 @@ LL - assert_copy::<&'static mut isize>(); LL + assert_copy::(); | -error[E0277]: the trait bound `&'a mut isize: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `&'a mut isize` --> $DIR/kindck-copy.rs:28:19 | LL | assert_copy::<&'a mut isize>(); @@ -32,7 +32,7 @@ LL - assert_copy::<&'a mut isize>(); LL + assert_copy::(); | -error[E0277]: the trait bound `Box: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Box` --> $DIR/kindck-copy.rs:31:19 | LL | assert_copy::>(); @@ -44,7 +44,7 @@ note: required by a bound in `assert_copy` LL | fn assert_copy() { } | ^^^^ required by this bound in `assert_copy` -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/kindck-copy.rs:32:19 | LL | assert_copy::(); @@ -56,7 +56,7 @@ note: required by a bound in `assert_copy` LL | fn assert_copy() { } | ^^^^ required by this bound in `assert_copy` -error[E0277]: the trait bound `Vec: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Vec` --> $DIR/kindck-copy.rs:33:19 | LL | assert_copy:: >(); @@ -68,7 +68,7 @@ note: required by a bound in `assert_copy` LL | fn assert_copy() { } | ^^^^ required by this bound in `assert_copy` -error[E0277]: the trait bound `Box<&'a mut isize>: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Box<&'a mut isize>` --> $DIR/kindck-copy.rs:34:19 | LL | assert_copy::>(); @@ -80,7 +80,7 @@ note: required by a bound in `assert_copy` LL | fn assert_copy() { } | ^^^^ required by this bound in `assert_copy` -error[E0277]: the trait bound `Box: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Box` --> $DIR/kindck-copy.rs:42:19 | LL | assert_copy::>(); @@ -92,7 +92,7 @@ note: required by a bound in `assert_copy` LL | fn assert_copy() { } | ^^^^ required by this bound in `assert_copy` -error[E0277]: the trait bound `Box: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Box` --> $DIR/kindck-copy.rs:43:19 | LL | assert_copy::>(); @@ -104,7 +104,7 @@ note: required by a bound in `assert_copy` LL | fn assert_copy() { } | ^^^^ required by this bound in `assert_copy` -error[E0277]: the trait bound `&'a mut (dyn Dummy + Send + 'a): Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `&'a mut (dyn Dummy + Send + 'a)` --> $DIR/kindck-copy.rs:46:19 | LL | assert_copy::<&'a mut (dyn Dummy + Send)>(); @@ -116,7 +116,7 @@ note: required by a bound in `assert_copy` LL | fn assert_copy() { } | ^^^^ required by this bound in `assert_copy` -error[E0277]: the trait bound `MyNoncopyStruct: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `MyNoncopyStruct` --> $DIR/kindck-copy.rs:64:19 | LL | assert_copy::(); @@ -128,7 +128,7 @@ note: required by a bound in `assert_copy` LL | fn assert_copy() { } | ^^^^ required by this bound in `assert_copy` -error[E0277]: the trait bound `Rc: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Rc` --> $DIR/kindck-copy.rs:67:19 | LL | assert_copy::>(); diff --git a/tests/ui/kindck/kindck-impl-type-params-2.rs b/tests/ui/kindck/kindck-impl-type-params-2.rs index 8950fc51e643c..ef606452609c3 100644 --- a/tests/ui/kindck/kindck-impl-type-params-2.rs +++ b/tests/ui/kindck/kindck-impl-type-params-2.rs @@ -11,5 +11,5 @@ fn take_param(foo: &T) { } fn main() { let x: Box<_> = Box::new(3); take_param(&x); - //~^ ERROR the trait bound `Box<{integer}>: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `Box<{integer}>` } diff --git a/tests/ui/kindck/kindck-impl-type-params-2.stderr b/tests/ui/kindck/kindck-impl-type-params-2.stderr index 46c0bda95352f..2fdbb80fc0159 100644 --- a/tests/ui/kindck/kindck-impl-type-params-2.stderr +++ b/tests/ui/kindck/kindck-impl-type-params-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Box<{integer}>: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Box<{integer}>` --> $DIR/kindck-impl-type-params-2.rs:13:16 | LL | take_param(&x); diff --git a/tests/ui/kindck/kindck-impl-type-params.rs b/tests/ui/kindck/kindck-impl-type-params.rs index 707c5dbaec30e..6b865aa521381 100644 --- a/tests/ui/kindck/kindck-impl-type-params.rs +++ b/tests/ui/kindck/kindck-impl-type-params.rs @@ -15,14 +15,14 @@ fn f(val: T) { let t: S = S(marker::PhantomData); let a = &t as &dyn Gettable; //~^ ERROR `T` cannot be sent between threads safely - //~| ERROR : Copy` is not satisfied + //~| ERROR the trait `Copy` is not implemented for } fn g(val: T) { let t: S = S(marker::PhantomData); let a: &dyn Gettable = &t; //~^ ERROR `T` cannot be sent between threads safely - //~| ERROR : Copy` is not satisfied + //~| ERROR the trait `Copy` is not implemented for } fn foo<'a>() { @@ -34,7 +34,7 @@ fn foo<'a>() { fn foo2<'a>() { let t: Box> = Box::new(S(marker::PhantomData)); let a = t as Box>; - //~^ ERROR : Copy` is not satisfied + //~^ ERROR the trait `Copy` is not implemented for } fn foo3<'a>() { @@ -42,7 +42,7 @@ fn foo3<'a>() { let t: Box> = Box::new(S(marker::PhantomData)); let a: Box> = t; - //~^ ERROR : Copy` is not satisfied + //~^ ERROR the trait `Copy` is not implemented for } fn main() { } diff --git a/tests/ui/kindck/kindck-impl-type-params.stderr b/tests/ui/kindck/kindck-impl-type-params.stderr index aad020e4ec97a..bd890fda565d3 100644 --- a/tests/ui/kindck/kindck-impl-type-params.stderr +++ b/tests/ui/kindck/kindck-impl-type-params.stderr @@ -17,7 +17,7 @@ help: consider restricting type parameter `T` LL | fn f(val: T) { | +++++++++++++++++++ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/kindck-impl-type-params.rs:16:13 | LL | let a = &t as &dyn Gettable; @@ -55,7 +55,7 @@ help: consider restricting type parameter `T` LL | fn g(val: T) { | +++++++++++++++++++ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/kindck-impl-type-params.rs:23:31 | LL | let a: &dyn Gettable = &t; @@ -74,7 +74,7 @@ help: consider restricting type parameter `T` LL | fn g(val: T) { | +++++++++++++++++++ -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/kindck-impl-type-params.rs:36:13 | LL | let a = t as Box>; @@ -90,7 +90,7 @@ LL | impl Gettable for S {} | unsatisfied trait bound introduced here = note: required for the cast from `Box>` to `Box>` -error[E0277]: the trait bound `Foo: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Foo` --> $DIR/kindck-impl-type-params.rs:44:37 | LL | let a: Box> = t; diff --git a/tests/ui/kindck/kindck-inherited-copy-bound.curr.stderr b/tests/ui/kindck/kindck-inherited-copy-bound.curr.stderr index a85815d8cc498..7442b3473abd6 100644 --- a/tests/ui/kindck/kindck-inherited-copy-bound.curr.stderr +++ b/tests/ui/kindck/kindck-inherited-copy-bound.curr.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Box<{integer}>: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Box<{integer}>` --> $DIR/kindck-inherited-copy-bound.rs:21:16 | LL | take_param(&x); diff --git a/tests/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr b/tests/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr index 687660fe7eea3..03115febf1627 100644 --- a/tests/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr +++ b/tests/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Box<{integer}>: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Box<{integer}>` --> $DIR/kindck-inherited-copy-bound.rs:21:16 | LL | take_param(&x); diff --git a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_eager.stderr b/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_eager.stderr index fdc5bae153790..6537197ad7cd0 100644 --- a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_eager.stderr +++ b/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_eager.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/extern-crate-has-lazy-type-aliases.rs:15:24 | LL | let _: lazy::Alias; diff --git a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_lazy.stderr b/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_lazy.stderr index fdc5bae153790..6537197ad7cd0 100644 --- a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_lazy.stderr +++ b/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.locally_lazy.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/extern-crate-has-lazy-type-aliases.rs:15:24 | LL | let _: lazy::Alias; diff --git a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs b/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs index 07490ad45e001..a1ece4a18cd0e 100644 --- a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs +++ b/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs @@ -12,5 +12,5 @@ )] fn main() { - let _: lazy::Alias; //~ ERROR the trait bound `String: Copy` is not satisfied + let _: lazy::Alias; //~ ERROR trait `Copy` is not implemented for `String` } diff --git a/tests/ui/lazy-type-alias/trailing-where-clause.rs b/tests/ui/lazy-type-alias/trailing-where-clause.rs index ac9598fe5f6aa..95adc87643367 100644 --- a/tests/ui/lazy-type-alias/trailing-where-clause.rs +++ b/tests/ui/lazy-type-alias/trailing-where-clause.rs @@ -9,5 +9,5 @@ where fn main() { let _: Alias<&str>; - let _: Alias<()>; //~ ERROR the trait bound `String: From<()>` is not satisfied + let _: Alias<()>; //~ ERROR trait `From<()>` is not implemented for `String` } diff --git a/tests/ui/lazy-type-alias/trailing-where-clause.stderr b/tests/ui/lazy-type-alias/trailing-where-clause.stderr index baf4215bbf788..b96a4bc7a77cc 100644 --- a/tests/ui/lazy-type-alias/trailing-where-clause.stderr +++ b/tests/ui/lazy-type-alias/trailing-where-clause.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `String: From<()>` is not satisfied +error[E0277]: the trait `From<()>` is not implemented for `String` --> $DIR/trailing-where-clause.rs:12:18 | LL | let _: Alias<()>; diff --git a/tests/ui/lifetimes/could-not-resolve-issue-121503.rs b/tests/ui/lifetimes/could-not-resolve-issue-121503.rs index 6bc70a907d9e9..77605af43055f 100644 --- a/tests/ui/lifetimes/could-not-resolve-issue-121503.rs +++ b/tests/ui/lifetimes/could-not-resolve-issue-121503.rs @@ -4,7 +4,7 @@ struct Struct; impl Struct { async fn box_ref_Struct(self: Box) -> &u32 { - //~^ ERROR the trait bound `impl FnMut(&mut Self): Allocator` is not satisfied + //~^ ERROR trait `Allocator` is not implemented for `impl FnMut(&mut Self)` //~| ERROR Box` cannot be used as the type of `self` without &1 } diff --git a/tests/ui/lifetimes/could-not-resolve-issue-121503.stderr b/tests/ui/lifetimes/could-not-resolve-issue-121503.stderr index a5d8239a2df05..03727605dbffd 100644 --- a/tests/ui/lifetimes/could-not-resolve-issue-121503.stderr +++ b/tests/ui/lifetimes/could-not-resolve-issue-121503.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `impl FnMut(&mut Self): Allocator` is not satisfied +error[E0277]: the trait `Allocator` is not implemented for `impl FnMut(&mut Self)` --> $DIR/could-not-resolve-issue-121503.rs:6:5 | LL | async fn box_ref_Struct(self: Box) -> &u32 { diff --git a/tests/ui/lifetimes/lifetime-elision-return-type-trait.rs b/tests/ui/lifetimes/lifetime-elision-return-type-trait.rs index 5168cb20d9ec4..c40e93fe2825d 100644 --- a/tests/ui/lifetimes/lifetime-elision-return-type-trait.rs +++ b/tests/ui/lifetimes/lifetime-elision-return-type-trait.rs @@ -6,7 +6,7 @@ trait Future { use std::error::Error; fn foo() -> impl Future> { - //~^ ERROR not satisfied + //~^ ERROR the trait `Future` is not implemented for `Result<(), _>` Ok(()) } diff --git a/tests/ui/lifetimes/lifetime-elision-return-type-trait.stderr b/tests/ui/lifetimes/lifetime-elision-return-type-trait.stderr index 1664466df3cb3..654799a3977d4 100644 --- a/tests/ui/lifetimes/lifetime-elision-return-type-trait.stderr +++ b/tests/ui/lifetimes/lifetime-elision-return-type-trait.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Result<(), _>: Future` is not satisfied +error[E0277]: the trait `Future` is not implemented for `Result<(), _>` --> $DIR/lifetime-elision-return-type-trait.rs:8:13 | LL | fn foo() -> impl Future> { diff --git a/tests/ui/malformed/malformed-derive-entry.rs b/tests/ui/malformed/malformed-derive-entry.rs index 77fa2f566a8fc..804883f5a1c71 100644 --- a/tests/ui/malformed/malformed-derive-entry.rs +++ b/tests/ui/malformed/malformed-derive-entry.rs @@ -1,11 +1,11 @@ #[derive(Copy(Bad))] //~^ ERROR traits in `#[derive(...)]` don't accept arguments -//~| ERROR the trait bound +//~| ERROR the trait struct Test1; #[derive(Copy="bad")] //~^ ERROR traits in `#[derive(...)]` don't accept values -//~| ERROR the trait bound +//~| ERROR the trait struct Test2; #[derive] //~ ERROR malformed `derive` attribute input diff --git a/tests/ui/malformed/malformed-derive-entry.stderr b/tests/ui/malformed/malformed-derive-entry.stderr index 3059d75d718a5..c318b7e7033f0 100644 --- a/tests/ui/malformed/malformed-derive-entry.stderr +++ b/tests/ui/malformed/malformed-derive-entry.stderr @@ -16,7 +16,7 @@ error: malformed `derive` attribute input LL | #[derive] | ^^^^^^^^^ help: must be of the form: `#[derive(Trait1, Trait2, ...)]` -error[E0277]: the trait bound `Test1: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `Test1` --> $DIR/malformed-derive-entry.rs:1:10 | LL | #[derive(Copy(Bad))] @@ -31,7 +31,7 @@ LL + #[derive(Clone)] LL | struct Test1; | -error[E0277]: the trait bound `Test2: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `Test2` --> $DIR/malformed-derive-entry.rs:6:10 | LL | #[derive(Copy="bad")] diff --git a/tests/ui/marker_trait_attr/overlap-marker-trait.stderr b/tests/ui/marker_trait_attr/overlap-marker-trait.stderr index cdad382d11cf4..a13c9ea55b9ff 100644 --- a/tests/ui/marker_trait_attr/overlap-marker-trait.stderr +++ b/tests/ui/marker_trait_attr/overlap-marker-trait.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `NotDebugOrDisplay: Marker` is not satisfied +error[E0277]: the trait `Marker` is not implemented for `NotDebugOrDisplay` --> $DIR/overlap-marker-trait.rs:28:17 | LL | is_marker::(); diff --git a/tests/ui/namespace/namespace-mix.stderr b/tests/ui/namespace/namespace-mix.stderr index 4eff08ead42ce..0cf733ec3c39a 100644 --- a/tests/ui/namespace/namespace-mix.stderr +++ b/tests/ui/namespace/namespace-mix.stderr @@ -106,7 +106,7 @@ LL - check(xm7::V); LL + check(V); | -error[E0277]: the trait bound `c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::Item` --> $DIR/namespace-mix.rs:33:11 | LL | check(m1::S{}); @@ -125,7 +125,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::S: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::S` --> $DIR/namespace-mix.rs:35:11 | LL | check(m2::S{}); @@ -144,7 +144,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::Item` --> $DIR/namespace-mix.rs:36:11 | LL | check(m2::S); @@ -163,7 +163,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::Item` --> $DIR/namespace-mix.rs:39:11 | LL | check(xm1::S{}); @@ -182,7 +182,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::S: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::S` --> $DIR/namespace-mix.rs:41:11 | LL | check(xm2::S{}); @@ -201,7 +201,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::Item` --> $DIR/namespace-mix.rs:42:11 | LL | check(xm2::S); @@ -220,7 +220,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::Item` --> $DIR/namespace-mix.rs:55:11 | LL | check(m3::TS{}); @@ -239,7 +239,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `fn() -> c::TS {c::TS}: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `fn() -> c::TS {c::TS}` --> $DIR/namespace-mix.rs:56:11 | LL | check(m3::TS); @@ -258,7 +258,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::TS: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::TS` --> $DIR/namespace-mix.rs:57:11 | LL | check(m4::TS{}); @@ -277,7 +277,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::Item` --> $DIR/namespace-mix.rs:58:11 | LL | check(m4::TS); @@ -296,7 +296,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::Item` --> $DIR/namespace-mix.rs:61:11 | LL | check(xm3::TS{}); @@ -315,7 +315,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `fn() -> namespace_mix::c::TS {namespace_mix::c::TS}: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `fn() -> namespace_mix::c::TS {namespace_mix::c::TS}` --> $DIR/namespace-mix.rs:62:11 | LL | check(xm3::TS); @@ -334,7 +334,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::TS: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::TS` --> $DIR/namespace-mix.rs:63:11 | LL | check(xm4::TS{}); @@ -353,7 +353,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::Item` --> $DIR/namespace-mix.rs:64:11 | LL | check(xm4::TS); @@ -372,7 +372,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::Item` --> $DIR/namespace-mix.rs:77:11 | LL | check(m5::US{}); @@ -391,7 +391,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::US: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::US` --> $DIR/namespace-mix.rs:78:11 | LL | check(m5::US); @@ -410,7 +410,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::US: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::US` --> $DIR/namespace-mix.rs:79:11 | LL | check(m6::US{}); @@ -429,7 +429,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::Item` --> $DIR/namespace-mix.rs:80:11 | LL | check(m6::US); @@ -448,7 +448,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::Item` --> $DIR/namespace-mix.rs:83:11 | LL | check(xm5::US{}); @@ -467,7 +467,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::US: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::US` --> $DIR/namespace-mix.rs:84:11 | LL | check(xm5::US); @@ -486,7 +486,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::US: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::US` --> $DIR/namespace-mix.rs:85:11 | LL | check(xm6::US{}); @@ -505,7 +505,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::Item` --> $DIR/namespace-mix.rs:86:11 | LL | check(xm6::US); @@ -524,7 +524,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::Item` --> $DIR/namespace-mix.rs:99:11 | LL | check(m7::V{}); @@ -543,7 +543,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::E: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::E` --> $DIR/namespace-mix.rs:101:11 | LL | check(m8::V{}); @@ -562,7 +562,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::Item` --> $DIR/namespace-mix.rs:102:11 | LL | check(m8::V); @@ -581,7 +581,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::Item` --> $DIR/namespace-mix.rs:105:11 | LL | check(xm7::V{}); @@ -600,7 +600,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::E` --> $DIR/namespace-mix.rs:107:11 | LL | check(xm8::V{}); @@ -619,7 +619,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::Item` --> $DIR/namespace-mix.rs:108:11 | LL | check(xm8::V); @@ -638,7 +638,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::Item` --> $DIR/namespace-mix.rs:121:11 | LL | check(m9::TV{}); @@ -657,7 +657,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `fn() -> c::E {c::E::TV}: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `fn() -> c::E {c::E::TV}` --> $DIR/namespace-mix.rs:122:11 | LL | check(m9::TV); @@ -676,7 +676,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::E: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::E` --> $DIR/namespace-mix.rs:123:11 | LL | check(mA::TV{}); @@ -695,7 +695,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::Item` --> $DIR/namespace-mix.rs:124:11 | LL | check(mA::TV); @@ -714,7 +714,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::Item` --> $DIR/namespace-mix.rs:127:11 | LL | check(xm9::TV{}); @@ -733,7 +733,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `fn() -> namespace_mix::c::E {namespace_mix::xm7::TV}: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `fn() -> namespace_mix::c::E {namespace_mix::xm7::TV}` --> $DIR/namespace-mix.rs:128:11 | LL | check(xm9::TV); @@ -752,7 +752,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::E` --> $DIR/namespace-mix.rs:129:11 | LL | check(xmA::TV{}); @@ -771,7 +771,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::Item` --> $DIR/namespace-mix.rs:130:11 | LL | check(xmA::TV); @@ -790,7 +790,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::Item` --> $DIR/namespace-mix.rs:143:11 | LL | check(mB::UV{}); @@ -809,7 +809,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::E: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::E` --> $DIR/namespace-mix.rs:144:11 | LL | check(mB::UV); @@ -828,7 +828,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::E: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::E` --> $DIR/namespace-mix.rs:145:11 | LL | check(mC::UV{}); @@ -847,7 +847,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `c::Item` --> $DIR/namespace-mix.rs:146:11 | LL | check(mC::UV); @@ -866,7 +866,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::Item` --> $DIR/namespace-mix.rs:149:11 | LL | check(xmB::UV{}); @@ -885,7 +885,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::E` --> $DIR/namespace-mix.rs:150:11 | LL | check(xmB::UV); @@ -904,7 +904,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::E: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::E` --> $DIR/namespace-mix.rs:151:11 | LL | check(xmC::UV{}); @@ -923,7 +923,7 @@ note: required by a bound in `check` LL | fn check(_: T) {} | ^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `namespace_mix::c::Item: Impossible` is not satisfied +error[E0277]: the trait `Impossible` is not implemented for `namespace_mix::c::Item` --> $DIR/namespace-mix.rs:152:11 | LL | check(xmC::UV); diff --git a/tests/ui/never_type/defaulted-never-note.fallback.stderr b/tests/ui/never_type/defaulted-never-note.fallback.stderr index 92fa9068cfd5e..15266e4259d35 100644 --- a/tests/ui/never_type/defaulted-never-note.fallback.stderr +++ b/tests/ui/never_type/defaulted-never-note.fallback.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `!: ImplementedForUnitButNotNever` is not satisfied +error[E0277]: the trait `ImplementedForUnitButNotNever` is not implemented for `!` --> $DIR/defaulted-never-note.rs:30:9 | LL | foo(_x); diff --git a/tests/ui/never_type/defaulted-never-note.rs b/tests/ui/never_type/defaulted-never-note.rs index f4e5273b33a76..bebf5d1b56223 100644 --- a/tests/ui/never_type/defaulted-never-note.rs +++ b/tests/ui/never_type/defaulted-never-note.rs @@ -28,7 +28,7 @@ fn foo(_t: T) {} fn smeg() { let _x = return; foo(_x); - //[fallback]~^ ERROR the trait bound + //[fallback]~^ ERROR the trait //[fallback]~| NOTE the trait `ImplementedForUnitButNotNever` is not implemented //[fallback]~| HELP trait `ImplementedForUnitButNotNever` is implemented for `()` //[fallback]~| NOTE this error might have been caused diff --git a/tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr b/tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr index ff28480bd9958..a2999d5565714 100644 --- a/tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr +++ b/tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `!: Test` is not satisfied +error[E0277]: the trait `Test` is not implemented for `!` --> $DIR/diverging-fallback-no-leak.rs:17:23 | LL | unconstrained_arg(return); diff --git a/tests/ui/never_type/diverging-fallback-no-leak.rs b/tests/ui/never_type/diverging-fallback-no-leak.rs index 425437da2077b..050530facffed 100644 --- a/tests/ui/never_type/diverging-fallback-no-leak.rs +++ b/tests/ui/never_type/diverging-fallback-no-leak.rs @@ -15,5 +15,5 @@ fn main() { // Here the type variable falls back to `!`, // and hence we get a type error. unconstrained_arg(return); - //[fallback]~^ ERROR trait bound `!: Test` is not satisfied + //[fallback]~^ ERROR trait `Test` is not implemented for `!` } diff --git a/tests/ui/never_type/feature-gate-never_type_fallback.stderr b/tests/ui/never_type/feature-gate-never_type_fallback.stderr index cbb670ea7083b..c99bddac393bc 100644 --- a/tests/ui/never_type/feature-gate-never_type_fallback.stderr +++ b/tests/ui/never_type/feature-gate-never_type_fallback.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): T` is not satisfied +error[E0277]: the trait `T` is not implemented for `()` --> $DIR/feature-gate-never_type_fallback.rs:10:9 | LL | foo(panic!()) diff --git a/tests/ui/never_type/impl_trait_fallback2.rs b/tests/ui/never_type/impl_trait_fallback2.rs index 12c187b9e82aa..b8c177133f90c 100644 --- a/tests/ui/never_type/impl_trait_fallback2.rs +++ b/tests/ui/never_type/impl_trait_fallback2.rs @@ -6,14 +6,14 @@ trait T {} impl T for i32 {} fn should_ret_unit() -> impl T { - //~^ ERROR `(): T` is not satisfied + //~^ ERROR trait `T` is not implemented for `()` panic!() } type Foo = impl T; fn a() -> Foo { - //~^ ERROR `(): T` is not satisfied + //~^ ERROR trait `T` is not implemented for `()` panic!() } diff --git a/tests/ui/never_type/impl_trait_fallback2.stderr b/tests/ui/never_type/impl_trait_fallback2.stderr index 78cc83bdbfadb..88495bf42994e 100644 --- a/tests/ui/never_type/impl_trait_fallback2.stderr +++ b/tests/ui/never_type/impl_trait_fallback2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): T` is not satisfied +error[E0277]: the trait `T` is not implemented for `()` --> $DIR/impl_trait_fallback2.rs:8:25 | LL | fn should_ret_unit() -> impl T { @@ -6,7 +6,7 @@ LL | fn should_ret_unit() -> impl T { | = help: the trait `T` is implemented for `i32` -error[E0277]: the trait bound `(): T` is not satisfied +error[E0277]: the trait `T` is not implemented for `()` --> $DIR/impl_trait_fallback2.rs:15:11 | LL | fn a() -> Foo { diff --git a/tests/ui/never_type/impl_trait_fallback3.rs b/tests/ui/never_type/impl_trait_fallback3.rs index ed645b82394a0..d623becf031ee 100644 --- a/tests/ui/never_type/impl_trait_fallback3.rs +++ b/tests/ui/never_type/impl_trait_fallback3.rs @@ -9,7 +9,7 @@ trait T { type Foo = impl T; fn a() -> Foo { - //~^ ERROR the trait bound `(): T` is not satisfied + //~^ ERROR trait `T` is not implemented for `()` // This is not a defining use, it doesn't actually constrain the opaque type. panic!() } diff --git a/tests/ui/never_type/impl_trait_fallback3.stderr b/tests/ui/never_type/impl_trait_fallback3.stderr index e2246eea17c61..2e9303c19f9d0 100644 --- a/tests/ui/never_type/impl_trait_fallback3.stderr +++ b/tests/ui/never_type/impl_trait_fallback3.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): T` is not satisfied +error[E0277]: the trait `T` is not implemented for `()` --> $DIR/impl_trait_fallback3.rs:11:11 | LL | fn a() -> Foo { diff --git a/tests/ui/never_type/impl_trait_fallback4.rs b/tests/ui/never_type/impl_trait_fallback4.rs index fe62773fa02db..b1c2d658da40f 100644 --- a/tests/ui/never_type/impl_trait_fallback4.rs +++ b/tests/ui/never_type/impl_trait_fallback4.rs @@ -11,7 +11,7 @@ trait Cake: std::fmt::Display { type Foo = impl T; fn foo() -> impl T { - //~^ ERROR `(): T` is not satisfied + //~^ ERROR trait `T` is not implemented for `()` panic!() } diff --git a/tests/ui/never_type/impl_trait_fallback4.stderr b/tests/ui/never_type/impl_trait_fallback4.stderr index 8f6b5cfea68a9..6447fceacf99c 100644 --- a/tests/ui/never_type/impl_trait_fallback4.stderr +++ b/tests/ui/never_type/impl_trait_fallback4.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): T` is not satisfied +error[E0277]: the trait `T` is not implemented for `()` --> $DIR/impl_trait_fallback4.rs:13:13 | LL | fn foo() -> impl T { diff --git a/tests/ui/never_type/never-value-fallback-issue-66757.nofallback.stderr b/tests/ui/never_type/never-value-fallback-issue-66757.nofallback.stderr index f5249814c785c..a3881042b3704 100644 --- a/tests/ui/never_type/never-value-fallback-issue-66757.nofallback.stderr +++ b/tests/ui/never_type/never-value-fallback-issue-66757.nofallback.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `E: From<()>` is not satisfied +error[E0277]: the trait `From<()>` is not implemented for `E` --> $DIR/never-value-fallback-issue-66757.rs:28:6 | LL | >::from(never); diff --git a/tests/ui/never_type/never-value-fallback-issue-66757.rs b/tests/ui/never_type/never-value-fallback-issue-66757.rs index 636757c70ec51..21151da86acf5 100644 --- a/tests/ui/never_type/never-value-fallback-issue-66757.rs +++ b/tests/ui/never_type/never-value-fallback-issue-66757.rs @@ -25,7 +25,7 @@ impl From for E { #[allow(unused_must_use)] fn foo(never: !) { >::from(never); // Ok - >::from(never); //[nofallback]~ ERROR trait bound `E: From<()>` is not satisfied + >::from(never); //[nofallback]~ ERROR trait `From<()>` is not implemented for `E` } fn main() { } diff --git a/tests/ui/not-clone-closure.rs b/tests/ui/not-clone-closure.rs index 25635bc833181..0a67df6e33ca9 100644 --- a/tests/ui/not-clone-closure.rs +++ b/tests/ui/not-clone-closure.rs @@ -8,5 +8,5 @@ fn main() { println!("Hello {}", a.0); }; - let hello = hello.clone(); //~ ERROR the trait bound `S: Clone` is not satisfied + let hello = hello.clone(); //~ ERROR trait `Clone` is not implemented for `S` } diff --git a/tests/ui/not-clone-closure.stderr b/tests/ui/not-clone-closure.stderr index 9b557b1558290..95aa2996f4a2a 100644 --- a/tests/ui/not-clone-closure.stderr +++ b/tests/ui/not-clone-closure.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `S: Clone` is not satisfied in `{closure@$DIR/not-clone-closure.rs:7:17: 7:24}` +error[E0277]: the trait `Clone` is not implemented for `S` in `{closure@$DIR/not-clone-closure.rs:7:17: 7:24}` --> $DIR/not-clone-closure.rs:11:23 | LL | let hello = move || { diff --git a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.rs b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.rs index 345c8a25f79f1..7c58d7645f8af 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.rs +++ b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.rs @@ -15,7 +15,7 @@ fn is_static(_: T) where T: 'static { } // code forces us into a conservative, hacky path. fn bar(x: &str) -> &dyn Foo { &() } //~^ ERROR please supply an explicit bound -//~| ERROR `(): Foo<'_>` is not satisfied +//~| ERROR trait `Foo<'_>` is not implemented for `()` fn main() { let s = format!("foo"); diff --git a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.stderr b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.stderr index d227c8778fe58..29b12cd7a56df 100644 --- a/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.stderr +++ b/tests/ui/object-lifetime/object-lifetime-default-dyn-binding-nonstatic3.stderr @@ -4,7 +4,7 @@ error[E0228]: the lifetime bound for this object type cannot be deduced from con LL | fn bar(x: &str) -> &dyn Foo { &() } | ^^^^^^^ -error[E0277]: the trait bound `(): Foo<'_>` is not satisfied +error[E0277]: the trait `Foo<'_>` is not implemented for `()` --> $DIR/object-lifetime-default-dyn-binding-nonstatic3.rs:16:47 | LL | fn bar(x: &str) -> &dyn Foo { &() } diff --git a/tests/ui/on-unimplemented/impl-substs.rs b/tests/ui/on-unimplemented/impl-substs.rs index fe9c50ec3d4a2..9513e9d998254 100644 --- a/tests/ui/on-unimplemented/impl-substs.rs +++ b/tests/ui/on-unimplemented/impl-substs.rs @@ -11,5 +11,5 @@ impl Foo for (A, B, C) { fn main() { Foo::::foo((1i32, 1i32, 1i32)); - //~^ ERROR the trait bound `(i32, i32, i32): Foo` is not satisfied + //~^ ERROR trait `Foo` is not implemented for `(i32, i32, i32)` } diff --git a/tests/ui/on-unimplemented/impl-substs.stderr b/tests/ui/on-unimplemented/impl-substs.stderr index e2ba2474d6c6e..3762a1d46597f 100644 --- a/tests/ui/on-unimplemented/impl-substs.stderr +++ b/tests/ui/on-unimplemented/impl-substs.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(i32, i32, i32): Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `(i32, i32, i32)` --> $DIR/impl-substs.rs:13:23 | LL | Foo::::foo((1i32, 1i32, 1i32)); diff --git a/tests/ui/on-unimplemented/multiple-impls.stderr b/tests/ui/on-unimplemented/multiple-impls.stderr index f59c93a7c375e..b7f0a41940c55 100644 --- a/tests/ui/on-unimplemented/multiple-impls.stderr +++ b/tests/ui/on-unimplemented/multiple-impls.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `[i32]: Index` is not satisfied +error[E0277]: the trait `Index` is not implemented for `[i32]` --> $DIR/multiple-impls.rs:33:33 | LL | Index::index(&[] as &[i32], 2u32); @@ -11,7 +11,7 @@ LL | Index::index(&[] as &[i32], 2u32); <[i32] as Index>> <[i32] as Index>> -error[E0277]: the trait bound `[i32]: Index>` is not satisfied +error[E0277]: the trait `Index>` is not implemented for `[i32]` --> $DIR/multiple-impls.rs:36:33 | LL | Index::index(&[] as &[i32], Foo(2u32)); @@ -24,7 +24,7 @@ LL | Index::index(&[] as &[i32], Foo(2u32)); <[i32] as Index>> <[i32] as Index>> -error[E0277]: the trait bound `[i32]: Index>` is not satisfied +error[E0277]: the trait `Index>` is not implemented for `[i32]` --> $DIR/multiple-impls.rs:39:33 | LL | Index::index(&[] as &[i32], Bar(2u32)); @@ -37,7 +37,7 @@ LL | Index::index(&[] as &[i32], Bar(2u32)); <[i32] as Index>> <[i32] as Index>> -error[E0277]: the trait bound `[i32]: Index` is not satisfied +error[E0277]: the trait `Index` is not implemented for `[i32]` --> $DIR/multiple-impls.rs:33:5 | LL | Index::index(&[] as &[i32], 2u32); @@ -48,7 +48,7 @@ LL | Index::index(&[] as &[i32], 2u32); <[i32] as Index>> <[i32] as Index>> -error[E0277]: the trait bound `[i32]: Index>` is not satisfied +error[E0277]: the trait `Index>` is not implemented for `[i32]` --> $DIR/multiple-impls.rs:36:5 | LL | Index::index(&[] as &[i32], Foo(2u32)); @@ -59,7 +59,7 @@ LL | Index::index(&[] as &[i32], Foo(2u32)); <[i32] as Index>> <[i32] as Index>> -error[E0277]: the trait bound `[i32]: Index>` is not satisfied +error[E0277]: the trait `Index>` is not implemented for `[i32]` --> $DIR/multiple-impls.rs:39:5 | LL | Index::index(&[] as &[i32], Bar(2u32)); diff --git a/tests/ui/on-unimplemented/on-impl.stderr b/tests/ui/on-unimplemented/on-impl.stderr index c7d2a78af6cba..cb8bb41b6a22e 100644 --- a/tests/ui/on-unimplemented/on-impl.stderr +++ b/tests/ui/on-unimplemented/on-impl.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `[i32]: Index` is not satisfied +error[E0277]: the trait `Index` is not implemented for `[i32]` --> $DIR/on-impl.rs:22:47 | LL | Index::::index(&[1, 2, 3] as &[i32], 2u32); @@ -10,7 +10,7 @@ LL | Index::::index(&[1, 2, 3] as &[i32], 2u32); = help: the trait `Index` is implemented for `[i32]` = help: for that trait implementation, expected `usize`, found `u32` -error[E0277]: the trait bound `[i32]: Index` is not satisfied +error[E0277]: the trait `Index` is not implemented for `[i32]` --> $DIR/on-impl.rs:22:5 | LL | Index::::index(&[1, 2, 3] as &[i32], 2u32); diff --git a/tests/ui/on-unimplemented/on-trait.stderr b/tests/ui/on-unimplemented/on-trait.stderr index 4097ee1350dbc..11e4774b5266f 100644 --- a/tests/ui/on-unimplemented/on-trait.stderr +++ b/tests/ui/on-unimplemented/on-trait.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Option>: MyFromIterator<&u8>` is not satisfied +error[E0277]: the trait `MyFromIterator<&u8>` is not implemented for `Option>` --> $DIR/on-trait.rs:28:30 | LL | let y: Option> = collect(x.iter()); // this should give approximately the same error for x.iter().collect() @@ -16,7 +16,7 @@ note: required by a bound in `collect` LL | fn collect, B: MyFromIterator>(it: I) -> B { | ^^^^^^^^^^^^^^^^^ required by this bound in `collect` -error[E0277]: the trait bound `String: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `String` --> $DIR/on-trait.rs:31:21 | LL | let x: String = foobar(); diff --git a/tests/ui/on-unimplemented/parent-label.rs b/tests/ui/on-unimplemented/parent-label.rs index b65f6496831ea..7c56ecfdceaf7 100644 --- a/tests/ui/on-unimplemented/parent-label.rs +++ b/tests/ui/on-unimplemented/parent-label.rs @@ -11,17 +11,17 @@ fn f(x: T) {} fn main() { let x = || { - f(Foo {}); //~ ERROR the trait bound `Foo: Trait` is not satisfied + f(Foo {}); //~ ERROR trait `Trait` is not implemented for `Foo` let y = || { - f(Foo {}); //~ ERROR the trait bound `Foo: Trait` is not satisfied + f(Foo {}); //~ ERROR trait `Trait` is not implemented for `Foo` }; }; { { - f(Foo {}); //~ ERROR the trait bound `Foo: Trait` is not satisfied + f(Foo {}); //~ ERROR trait `Trait` is not implemented for `Foo` } } - f(Foo {}); //~ ERROR the trait bound `Foo: Trait` is not satisfied + f(Foo {}); //~ ERROR trait `Trait` is not implemented for `Foo` } diff --git a/tests/ui/on-unimplemented/parent-label.stderr b/tests/ui/on-unimplemented/parent-label.stderr index 101a41512d280..4055de78d713d 100644 --- a/tests/ui/on-unimplemented/parent-label.stderr +++ b/tests/ui/on-unimplemented/parent-label.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Foo: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `Foo` --> $DIR/parent-label.rs:14:11 | LL | let x = || { @@ -19,7 +19,7 @@ note: required by a bound in `f` LL | fn f(x: T) {} | ^^^^^ required by this bound in `f` -error[E0277]: the trait bound `Foo: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `Foo` --> $DIR/parent-label.rs:16:15 | LL | let y = || { @@ -40,7 +40,7 @@ note: required by a bound in `f` LL | fn f(x: T) {} | ^^^^^ required by this bound in `f` -error[E0277]: the trait bound `Foo: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `Foo` --> $DIR/parent-label.rs:22:15 | LL | fn main() { @@ -62,7 +62,7 @@ note: required by a bound in `f` LL | fn f(x: T) {} | ^^^^^ required by this bound in `f` -error[E0277]: the trait bound `Foo: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `Foo` --> $DIR/parent-label.rs:26:7 | LL | fn main() { diff --git a/tests/ui/parser/impl-item-type-no-body-semantic-fail.rs b/tests/ui/parser/impl-item-type-no-body-semantic-fail.rs index bbd207be06db5..88ff805728d0c 100644 --- a/tests/ui/parser/impl-item-type-no-body-semantic-fail.rs +++ b/tests/ui/parser/impl-item-type-no-body-semantic-fail.rs @@ -14,10 +14,10 @@ impl X { //~^ ERROR associated type in `impl` without body //~| ERROR bounds on `type`s in `impl`s have no effect //~| ERROR inherent associated types are unstable - //~| ERROR `X: Eq` is not satisfied + //~| ERROR trait `Eq` is not implemented for `X` type W where Self: Eq; //~^ ERROR associated type in `impl` without body //~| ERROR inherent associated types are unstable //~| ERROR duplicate definitions - //~| ERROR `X: Eq` is not satisfied + //~| ERROR trait `Eq` is not implemented for `X` } diff --git a/tests/ui/parser/impl-item-type-no-body-semantic-fail.stderr b/tests/ui/parser/impl-item-type-no-body-semantic-fail.stderr index 1c71cdacd89b6..dc901e0ed4167 100644 --- a/tests/ui/parser/impl-item-type-no-body-semantic-fail.stderr +++ b/tests/ui/parser/impl-item-type-no-body-semantic-fail.stderr @@ -91,7 +91,7 @@ LL | type W: Ord where Self: Eq; LL | type W where Self: Eq; | ^^^^^^ duplicate definitions for `W` -error[E0277]: the trait bound `X: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `X` --> $DIR/impl-item-type-no-body-semantic-fail.rs:13:23 | LL | type W: Ord where Self: Eq; @@ -105,7 +105,7 @@ LL + #[derive(Eq)] LL | struct X; | -error[E0277]: the trait bound `X: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `X` --> $DIR/impl-item-type-no-body-semantic-fail.rs:18:18 | LL | type W where Self: Eq; diff --git a/tests/ui/privacy/sealed-traits/sealed-trait-local.rs b/tests/ui/privacy/sealed-traits/sealed-trait-local.rs index 9ae01259a7810..cc4b4dea148d8 100644 --- a/tests/ui/privacy/sealed-traits/sealed-trait-local.rs +++ b/tests/ui/privacy/sealed-traits/sealed-trait-local.rs @@ -49,7 +49,7 @@ pub mod e { } struct S; -impl a::Sealed for S {} //~ ERROR the trait bound -impl c::Sealed for S {} //~ ERROR the trait bound -impl e::Sealed for S {} //~ ERROR the trait bound +impl a::Sealed for S {} //~ ERROR the trait +impl c::Sealed for S {} //~ ERROR the trait +impl e::Sealed for S {} //~ ERROR the trait fn main() {} diff --git a/tests/ui/privacy/sealed-traits/sealed-trait-local.stderr b/tests/ui/privacy/sealed-traits/sealed-trait-local.stderr index a7f77a1c0c020..add8af5fbac4d 100644 --- a/tests/ui/privacy/sealed-traits/sealed-trait-local.stderr +++ b/tests/ui/privacy/sealed-traits/sealed-trait-local.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `S: b::Hidden` is not satisfied +error[E0277]: the trait `b::Hidden` is not implemented for `S` --> $DIR/sealed-trait-local.rs:52:20 | LL | impl a::Sealed for S {} @@ -13,7 +13,7 @@ LL | pub trait Sealed: self::b::Hidden { = help: the following type implements the trait: a::X -error[E0277]: the trait bound `S: d::Hidden` is not satisfied +error[E0277]: the trait `d::Hidden` is not implemented for `S` --> $DIR/sealed-trait-local.rs:53:20 | LL | impl c::Sealed for S {} @@ -29,7 +29,7 @@ LL | pub trait Sealed: self::d::Hidden { c::X c::Y -error[E0277]: the trait bound `S: f::Hidden` is not satisfied +error[E0277]: the trait `f::Hidden` is not implemented for `S` --> $DIR/sealed-trait-local.rs:54:20 | LL | impl e::Sealed for S {} diff --git a/tests/ui/proc-macro/bad-projection.rs b/tests/ui/proc-macro/bad-projection.rs index e633191bd310f..d6f93710f2b0e 100644 --- a/tests/ui/proc-macro/bad-projection.rs +++ b/tests/ui/proc-macro/bad-projection.rs @@ -12,7 +12,7 @@ trait Project { #[proc_macro] pub fn uwu() -> <() as Project>::Assoc {} -//~^ ERROR the trait bound `(): Project` is not satisfied -//~| ERROR the trait bound `(): Project` is not satisfied -//~| ERROR the trait bound `(): Project` is not satisfied +//~^ ERROR trait `Project` is not implemented for `()` +//~| ERROR trait `Project` is not implemented for `()` +//~| ERROR trait `Project` is not implemented for `()` //~| ERROR function is expected to take 1 argument, but it takes 0 arguments diff --git a/tests/ui/proc-macro/bad-projection.stderr b/tests/ui/proc-macro/bad-projection.stderr index 8e0d8461849b4..9e038a9ddd492 100644 --- a/tests/ui/proc-macro/bad-projection.stderr +++ b/tests/ui/proc-macro/bad-projection.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): Project` is not satisfied +error[E0277]: the trait `Project` is not implemented for `()` --> $DIR/bad-projection.rs:14:17 | LL | pub fn uwu() -> <() as Project>::Assoc {} @@ -23,7 +23,7 @@ LL | pub fn uwu() -> <() as Project>::Assoc {} note: required by a bound in `ProcMacro::bang` --> $SRC_DIR/proc_macro/src/bridge/client.rs:LL:COL -error[E0277]: the trait bound `(): Project` is not satisfied +error[E0277]: the trait `Project` is not implemented for `()` --> $DIR/bad-projection.rs:14:1 | LL | pub fn uwu() -> <() as Project>::Assoc {} @@ -35,7 +35,7 @@ help: this trait has no implementations, consider adding one LL | trait Project { | ^^^^^^^^^^^^^ -error[E0277]: the trait bound `(): Project` is not satisfied +error[E0277]: the trait `Project` is not implemented for `()` --> $DIR/bad-projection.rs:14:40 | LL | pub fn uwu() -> <() as Project>::Assoc {} diff --git a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs index 8567d812e4fb2..75d74235224f0 100644 --- a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs +++ b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs @@ -12,7 +12,7 @@ struct PriorityQueueEntry { #[derive(PartialOrd, AddImpl)] //~^ ERROR can't compare `PriorityQueue` with `PriorityQueue` -//~| ERROR the trait bound `PriorityQueue: Eq` is not satisfied +//~| ERROR trait `Eq` is not implemented for `PriorityQueue` //~| ERROR can't compare `T` with `T` //~| ERROR `BinaryHeap>` is not an iterator //~| ERROR no field `height` on type `&PriorityQueue` diff --git a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr index 6fa639877d3b1..a9d1fd2bc7c90 100644 --- a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr +++ b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.stderr @@ -9,7 +9,7 @@ note: required by a bound in `PartialOrd` --> $SRC_DIR/core/src/cmp.rs:LL:COL = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `PriorityQueue: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `PriorityQueue` --> $DIR/issue-104884-trait-impl-sugg-err.rs:13:22 | LL | #[derive(PartialOrd, AddImpl)] diff --git a/tests/ui/range/range-1.rs b/tests/ui/range/range-1.rs index 192426fe228fe..7266a838fad61 100644 --- a/tests/ui/range/range-1.rs +++ b/tests/ui/range/range-1.rs @@ -7,7 +7,7 @@ pub fn main() { // Bool => does not implement iterator. for i in false..true {} - //~^ ERROR `bool: Step` is not satisfied + //~^ ERROR trait `Step` is not implemented for `bool` // Unsized type. let arr: &[_] = &[1, 2, 3]; diff --git a/tests/ui/range/range-1.stderr b/tests/ui/range/range-1.stderr index 3d9b7a940b7c8..ce39b8578ddca 100644 --- a/tests/ui/range/range-1.stderr +++ b/tests/ui/range/range-1.stderr @@ -4,7 +4,7 @@ error[E0308]: mismatched types LL | let _ = 0u32..10i32; | ^^^^^ expected `u32`, found `i32` -error[E0277]: the trait bound `bool: Step` is not satisfied +error[E0277]: the trait `Step` is not implemented for `bool` --> $DIR/range-1.rs:9:14 | LL | for i in false..true {} diff --git a/tests/ui/range/range_traits-1.stderr b/tests/ui/range/range_traits-1.stderr index 617afc995305e..7e4fffc3b9534 100644 --- a/tests/ui/range/range_traits-1.stderr +++ b/tests/ui/range/range_traits-1.stderr @@ -70,7 +70,7 @@ LL | f: RangeToInclusive, = help: the trait `PartialOrd` is not implemented for `std::ops::RangeToInclusive` = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `std::ops::Range: Ord` is not satisfied +error[E0277]: the trait `Ord` is not implemented for `std::ops::Range` --> $DIR/range_traits-1.rs:5:5 | LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] @@ -81,7 +81,7 @@ LL | a: Range, | = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `std::ops::RangeTo: Ord` is not satisfied +error[E0277]: the trait `Ord` is not implemented for `std::ops::RangeTo` --> $DIR/range_traits-1.rs:8:5 | LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] @@ -92,7 +92,7 @@ LL | b: RangeTo, | = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `std::ops::RangeFrom: Ord` is not satisfied +error[E0277]: the trait `Ord` is not implemented for `std::ops::RangeFrom` --> $DIR/range_traits-1.rs:11:5 | LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] @@ -103,7 +103,7 @@ LL | c: RangeFrom, | = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `std::ops::RangeFull: Ord` is not satisfied +error[E0277]: the trait `Ord` is not implemented for `std::ops::RangeFull` --> $DIR/range_traits-1.rs:14:5 | LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] @@ -114,7 +114,7 @@ LL | d: RangeFull, | = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `std::ops::RangeInclusive: Ord` is not satisfied +error[E0277]: the trait `Ord` is not implemented for `std::ops::RangeInclusive` --> $DIR/range_traits-1.rs:17:5 | LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] @@ -125,7 +125,7 @@ LL | e: RangeInclusive, | = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `std::ops::RangeToInclusive: Ord` is not satisfied +error[E0277]: the trait `Ord` is not implemented for `std::ops::RangeToInclusive` --> $DIR/range_traits-1.rs:20:5 | LL | #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] diff --git a/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.rs b/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.rs index 4d77a551f6472..ff1a0ebec603d 100644 --- a/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.rs +++ b/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.rs @@ -19,9 +19,9 @@ trait Trait2<'a, 'b> { // since for it to be WF, we would need to know that `'y: 'x`, but we // do not infer that. fn callee<'x, 'y, T>(t: &'x dyn for<'z> Trait1< >::Foo >) - //~^ ERROR the trait bound `for<'z> T: Trait2<'y, 'z>` is not satisfied + //~^ ERROR trait `for<'z> Trait2<'y, 'z>` is not implemented for `T` { - //~^ ERROR the trait bound `for<'z> T: Trait2<'y, 'z>` is not satisfied + //~^ ERROR trait `for<'z> Trait2<'y, 'z>` is not implemented for `T` } fn main() { } diff --git a/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr b/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr index b17d1e0ab1136..dfd5c7b487646 100644 --- a/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr +++ b/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'z> T: Trait2<'y, 'z>` is not satisfied +error[E0277]: the trait `for<'z> Trait2<'y, 'z>` is not implemented for `T` --> $DIR/regions-implied-bounds-projection-gap-hr-1.rs:21:49 | LL | fn callee<'x, 'y, T>(t: &'x dyn for<'z> Trait1< >::Foo >) @@ -9,7 +9,7 @@ help: consider restricting type parameter `T` LL | fn callee<'x, 'y, T: for<'z> Trait2<'y, 'z>>(t: &'x dyn for<'z> Trait1< >::Foo >) | ++++++++++++++++++++++++ -error[E0277]: the trait bound `for<'z> T: Trait2<'y, 'z>` is not satisfied +error[E0277]: the trait `for<'z> Trait2<'y, 'z>` is not implemented for `T` --> $DIR/regions-implied-bounds-projection-gap-hr-1.rs:23:1 | LL | / { diff --git a/tests/ui/repeat-expr/repeat-to-run-dtor-twice.rs b/tests/ui/repeat-expr/repeat-to-run-dtor-twice.rs index 0cd8eceefc523..eab6c1df576ee 100644 --- a/tests/ui/repeat-expr/repeat-to-run-dtor-twice.rs +++ b/tests/ui/repeat-expr/repeat-to-run-dtor-twice.rs @@ -15,5 +15,5 @@ impl Drop for Foo { fn main() { let a = Foo { x: 3 }; let _ = [ a; 5 ]; - //~^ ERROR the trait bound `Foo: Copy` is not satisfied [E0277] + //~^ ERROR trait `Copy` is not implemented for `Foo` } diff --git a/tests/ui/repeat-expr/repeat-to-run-dtor-twice.stderr b/tests/ui/repeat-expr/repeat-to-run-dtor-twice.stderr index 1f7487e68be8a..4f91050ed33b0 100644 --- a/tests/ui/repeat-expr/repeat-to-run-dtor-twice.stderr +++ b/tests/ui/repeat-expr/repeat-to-run-dtor-twice.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Foo: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Foo` --> $DIR/repeat-to-run-dtor-twice.rs:17:15 | LL | let _ = [ a; 5 ]; diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-1.rs b/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-1.rs index a75c91cc90df7..828fa07726e9c 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-1.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-1.rs @@ -7,5 +7,5 @@ fn receive(_: impl std::process::Termination) {} struct Something; fn main() { - receive(Something); //~ ERROR the trait bound `Something: Termination` is not satisfied + receive(Something); //~ ERROR trait `Termination` is not implemented for `Something` } diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-1.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-1.stderr index 6c3d576cfbab4..5e86ab7ab8a3d 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-1.stderr +++ b/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Something: Termination` is not satisfied +error[E0277]: the trait `Termination` is not implemented for `Something` --> $DIR/issue-103052-1.rs:10:13 | LL | receive(Something); diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.rs b/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.rs index 1933a68c22162..9ca05ebcd67bd 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.rs +++ b/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.rs @@ -9,7 +9,7 @@ mod child { impl Main for () { fn main() -> Something { - //~^ ERROR the trait bound `Something: Termination` is not satisfied + //~^ ERROR trait `Termination` is not implemented for `Something` Something } } diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.stderr index b17700ec6325d..b8afc24feefea 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.stderr +++ b/tests/ui/rfcs/rfc-1937-termination-trait/issue-103052-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Something: Termination` is not satisfied +error[E0277]: the trait `Termination` is not implemented for `Something` --> $DIR/issue-103052-2.rs:11:22 | LL | fn main() -> Something { diff --git a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr index 4d23922892ea9..f01688bda44e7 100644 --- a/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr +++ b/tests/ui/rfcs/rfc-1937-termination-trait/termination-trait-test-wrong-type.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `f32: Termination` is not satisfied +error[E0277]: the trait `Termination` is not implemented for `f32` --> $DIR/termination-trait-test-wrong-type.rs:6:31 | LL | #[test] diff --git a/tests/ui/rfcs/rfc-2397-do-not-recommend/feature-gate-do_not_recommend.rs b/tests/ui/rfcs/rfc-2397-do-not-recommend/feature-gate-do_not_recommend.rs index 5053c115b4537..14a254ff13a6a 100644 --- a/tests/ui/rfcs/rfc-2397-do-not-recommend/feature-gate-do_not_recommend.rs +++ b/tests/ui/rfcs/rfc-2397-do-not-recommend/feature-gate-do_not_recommend.rs @@ -17,5 +17,5 @@ fn stuff(_: T) {} fn main() { stuff(1u8); - //~^ the trait bound `u8: Foo` is not satisfied + //~^ ERROR trait `Foo` is not implemented for `u8` } diff --git a/tests/ui/rfcs/rfc-2397-do-not-recommend/feature-gate-do_not_recommend.stderr b/tests/ui/rfcs/rfc-2397-do-not-recommend/feature-gate-do_not_recommend.stderr index 99d318a793364..8640538343ad1 100644 --- a/tests/ui/rfcs/rfc-2397-do-not-recommend/feature-gate-do_not_recommend.stderr +++ b/tests/ui/rfcs/rfc-2397-do-not-recommend/feature-gate-do_not_recommend.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `u8: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `u8` --> $DIR/feature-gate-do_not_recommend.rs:19:11 | LL | stuff(1u8); diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.qualified.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.qualified.stderr index 62c8a442ab9bd..fdd4c8e6b019c 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.qualified.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.qualified.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `T` --> $DIR/assoc-type-const-bound-usage-0.rs:21:6 | LL | ::Assoc::func() diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.qualified.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.qualified.stderr index 10e467da9521a..5a6de74b36a89 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.qualified.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.qualified.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `T` --> $DIR/assoc-type-const-bound-usage-1.rs:23:43 | LL | fn qualified() -> Type<{ ::Assoc::func() }> { diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.rs index 886fa6577d76c..9780c5308d002 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.rs @@ -32,7 +32,7 @@ trait Foo { } impl const Foo for NonConstAdd { - type Bar = NonConstAdd; //~ ERROR the trait bound `NonConstAdd: ~const Add` is not satisfied + type Bar = NonConstAdd; //~ ERROR trait `~const Add` is not implemented for `NonConstAdd` } #[const_trait] diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr index a9cae2a70be90..cfb53827370c2 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `NonConstAdd: ~const Add` is not satisfied +error[E0277]: the trait `~const Add` is not implemented for `NonConstAdd` --> $DIR/assoc-type.rs:35:16 | LL | type Bar = NonConstAdd; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.rs index 771c35cf6ab9d..a16ae6b49725a 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.rs @@ -23,7 +23,7 @@ pub const fn add_i32(a: i32, b: i32) -> i32 { pub const fn add_u32(a: u32, b: u32) -> u32 { a.plus(b) - //~^ ERROR the trait bound + //~^ ERROR the trait } fn main() {} diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.stderr index 93d520f29ef28..ebd297e8849ee 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-const-trait-method-fail.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `u32: ~const Plus` is not satisfied +error[E0277]: the trait `~const Plus` is not implemented for `u32` --> $DIR/call-const-trait-method-fail.rs:25:5 | LL | a.plus(b) diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs index 8d6176a5bace4..b199ddf526091 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.rs @@ -21,6 +21,6 @@ const fn equals_self(t: &T) -> bool { // it not using the impl. pub const EQ: bool = equals_self(&S); -//~^ ERROR: the trait bound `S: const Foo` is not satisfied +//~^ ERROR trait `const Foo` is not implemented for `S` fn main() {} diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr index 3581b1fcd7dfb..c71f169c78e21 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `S: const Foo` is not satisfied +error[E0277]: the trait `const Foo` is not implemented for `S` --> $DIR/call-generic-method-nonconst.rs:23:34 | LL | pub const EQ: bool = equals_self(&S); diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.rs index be668b4f13a85..318b0475002ee 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.rs @@ -22,7 +22,7 @@ impl const ConstDefaultFn for ConstImpl { const fn test() { NonConstImpl.a(); - //~^ ERROR the trait bound + //~^ ERROR the trait ConstImpl.a(); } diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.stderr index f39e6dcadbaa6..688b3297a3252 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-default-method-bodies.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `NonConstImpl: ~const ConstDefaultFn` is not satisfied +error[E0277]: the trait `~const ConstDefaultFn` is not implemented for `NonConstImpl` --> $DIR/const-default-method-bodies.rs:24:18 | LL | NonConstImpl.a(); diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.gatednc.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.gatednc.stderr index f0ac953fd5d20..9da8cee3543b7 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.gatednc.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.gatednc.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `cross_crate::NonConst: ~const cross_crate::MyTrait` is not satisfied +error[E0277]: the trait `~const cross_crate::MyTrait` is not implemented for `cross_crate::NonConst` --> $DIR/cross-crate.rs:17:14 | LL | NonConst.func(); diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs index 587dd70c18b29..eef0a4b44f12a 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/cross-crate.rs @@ -16,7 +16,7 @@ const fn const_context() { #[cfg(any(stocknc, gatednc))] NonConst.func(); //[stocknc]~^ ERROR: cannot call - //[gatednc]~^^ ERROR: the trait bound + //[gatednc]~^^ ERROR: the trait Const.func(); //[stock]~^ ERROR: cannot call //[stocknc]~^^ ERROR: cannot call diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs index b534d23b1076a..c2d82b6a7dc53 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-body-checking.rs @@ -13,7 +13,7 @@ const fn foo() where T: ~const Tr {} pub trait Foo { fn foo() { foo::<()>(); - //FIXME ~^ ERROR the trait bound `(): Tr` is not satisfied + //FIXME ~^ ERROR trait `Tr` is not implemented for `()` } } diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.rs index da27724007d27..fa4ba9e51f355 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.rs @@ -6,7 +6,7 @@ pub trait Tr { fn b(&self) { ().a() - //~^ ERROR the trait bound + //~^ ERROR the trait } } diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.stderr index 29db6109a98c4..ccc8d772b22a8 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-same-trait-ck.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): ~const Tr` is not satisfied +error[E0277]: the trait `~const Tr` is not implemented for `()` --> $DIR/default-method-body-is-const-same-trait-ck.rs:8:12 | LL | ().a() diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.stderr index eac3ee9e4e22b..1501edceebf9f 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Self: Uwu` is not satisfied +error[E0277]: the trait `Uwu` is not implemented for `Self` --> $DIR/project.rs:12:1 | LL | pub trait Uwu: Owo { @@ -9,7 +9,7 @@ help: consider further restricting `Self` LL | pub trait Uwu: Owo + Uwu { | +++++ -error[E0277]: the trait bound `Self: Uwu` is not satisfied +error[E0277]: the trait `Uwu` is not implemented for `Self` --> $DIR/project.rs:12:1 | LL | / pub trait Uwu: Owo { @@ -22,7 +22,7 @@ help: consider further restricting `Self` LL | pub trait Uwu: Owo + Uwu { | +++++ -error[E0277]: the trait bound `Self: Uwu` is not satisfied +error[E0277]: the trait `Uwu` is not implemented for `Self` --> $DIR/project.rs:12:16 | LL | pub trait Uwu: Owo { @@ -38,7 +38,7 @@ help: consider further restricting `Self` LL | pub trait Uwu: Owo + Uwu { | +++++ -error[E0277]: the trait bound `Self: Uwu` is not satisfied +error[E0277]: the trait `Uwu` is not implemented for `Self` --> $DIR/project.rs:13:5 | LL | type T; @@ -49,7 +49,7 @@ help: consider further restricting `Self` LL | pub trait Uwu: Owo + Uwu { | +++++ -error[E0277]: the trait bound `Self: Uwu` is not satisfied +error[E0277]: the trait `Uwu` is not implemented for `Self` --> $DIR/project.rs:13:5 | LL | type T; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.rs index e5394ddd688e3..f907307aa2b19 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-102985.rs @@ -4,8 +4,8 @@ struct Bug { inner: [(); match || 1 { n => n(), - //FIXME ~^ ERROR the trait bound - //FIXME ~| ERROR the trait bound + //FIXME ~^ ERROR the trait + //FIXME ~| ERROR the trait //FIXME ~| ERROR cannot call non-const closure in constants }], } diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs index 08739de831389..844280d729b48 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-88155.rs @@ -8,7 +8,7 @@ pub trait A { pub const fn foo() -> bool { T::assoc() - //FIXME ~^ ERROR the trait bound + //FIXME ~^ ERROR the trait //FIXME ~| ERROR cannot call non-const fn } diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.rs index 5218ea925661e..68fcfb003746f 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/specializing-constness-2.rs @@ -25,7 +25,7 @@ impl const A for T { const fn generic() { ::a(); - //FIXME ~^ ERROR: the trait bound `T: ~const Sup` is not satisfied + //FIXME ~^ ERROR trait `~const Sup` is not implemented for `T` } fn main() {} diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.rs index 0bbf2dabffe57..d9172d51ee8af 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/super-traits-fail.rs @@ -16,6 +16,6 @@ impl Foo for S { } impl const Bar for S {} -//FIXME ~^ ERROR the trait bound +//FIXME ~^ ERROR the trait fn main() {} diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.rs index 364ddfcc8ddd5..9a244667162ef 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.rs @@ -19,9 +19,9 @@ trait Foo { const fn test1() { T::a(); T::b(); - //FIXME ~^ ERROR the trait bound + //FIXME ~^ ERROR the trait T::c::(); - //FIXME ~^ ERROR the trait bound + //FIXME ~^ ERROR the trait } const fn test2() { diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr index 0141dcfb06f6b..292c514523c6a 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: ~const Bar` is not satisfied +error[E0277]: the trait `~const Bar` is not implemented for `T` --> $DIR/trait-where-clause-const.rs:21:5 | LL | T::b(); @@ -14,7 +14,7 @@ help: consider further restricting this bound LL | const fn test1() { | ++++++++++++ -error[E0277]: the trait bound `T: ~const Bar` is not satisfied +error[E0277]: the trait `~const Bar` is not implemented for `T` --> $DIR/trait-where-clause-const.rs:23:12 | LL | T::c::(); diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.rs index 11f353f3f8ad3..7e0adf07324d3 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.rs @@ -14,9 +14,9 @@ trait Foo { fn test1() { T::a(); T::b(); - //~^ ERROR the trait bound + //~^ ERROR the trait T::c::(); - //~^ ERROR the trait bound + //~^ ERROR the trait } fn test2() { diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.stderr index abe24b662a27f..2b63d346c2322 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause.stderr @@ -22,7 +22,7 @@ note: this function is not `const`, so it cannot have `~const` trait bounds LL | fn c(); | ^ -error[E0277]: the trait bound `T: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `T` --> $DIR/trait-where-clause.rs:16:5 | LL | T::b(); @@ -38,7 +38,7 @@ help: consider further restricting this bound LL | fn test1() { | +++++ -error[E0277]: the trait bound `T: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `T` --> $DIR/trait-where-clause.rs:18:12 | LL | T::c::(); diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.rs index 8f441410c1784..003d97db77ec9 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.rs @@ -17,7 +17,7 @@ impl Trait for Ty { } fn main() { - require::(); //~ ERROR the trait bound `Ty: const Trait` is not satisfied + require::(); //~ ERROR trait `const Trait` is not implemented for `Ty` } struct Container; diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr index 258f95b5c4a89..6752ea33da153 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/unsatisfied-const-trait-bound.stderr @@ -16,7 +16,7 @@ LL | const fn accept1(_: Container<{ T::make() }>) {} = note: expected constant `false` found constant `host` -error[E0277]: the trait bound `Ty: const Trait` is not satisfied +error[E0277]: the trait `const Trait` is not implemented for `Ty` --> $DIR/unsatisfied-const-trait-bound.rs:20:15 | LL | require::(); diff --git a/tests/ui/span/issue-29595.rs b/tests/ui/span/issue-29595.rs index 87d7c4cfdf93f..fb0f09a50346d 100644 --- a/tests/ui/span/issue-29595.rs +++ b/tests/ui/span/issue-29595.rs @@ -3,5 +3,5 @@ trait Tr { } fn main() { - let a: u8 = Tr::C; //~ ERROR the trait bound `u8: Tr` is not satisfied + let a: u8 = Tr::C; //~ ERROR trait `Tr` is not implemented for `u8` } diff --git a/tests/ui/span/issue-29595.stderr b/tests/ui/span/issue-29595.stderr index c782875469098..4b2fc9abf29af 100644 --- a/tests/ui/span/issue-29595.stderr +++ b/tests/ui/span/issue-29595.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `u8: Tr` is not satisfied +error[E0277]: the trait `Tr` is not implemented for `u8` --> $DIR/issue-29595.rs:6:17 | LL | let a: u8 = Tr::C; diff --git a/tests/ui/specialization/default-associated-type-bound-1.rs b/tests/ui/specialization/default-associated-type-bound-1.rs index c043114b565c8..a7307b8a1ef4c 100644 --- a/tests/ui/specialization/default-associated-type-bound-1.rs +++ b/tests/ui/specialization/default-associated-type-bound-1.rs @@ -16,7 +16,7 @@ trait X { // normalization. impl X for T { default type U = str; - //~^ ERROR the trait bound `str: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `str` } pub fn main() { diff --git a/tests/ui/specialization/default-associated-type-bound-1.stderr b/tests/ui/specialization/default-associated-type-bound-1.stderr index 516df555a0d5f..6ca84112b0c8c 100644 --- a/tests/ui/specialization/default-associated-type-bound-1.stderr +++ b/tests/ui/specialization/default-associated-type-bound-1.stderr @@ -8,7 +8,7 @@ LL | #![feature(specialization)] = help: consider using `min_specialization` instead, which is more stable and complete = note: `#[warn(incomplete_features)]` on by default -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/default-associated-type-bound-1.rs:18:22 | LL | default type U = str; diff --git a/tests/ui/specialization/defaultimpl/specialization-wfcheck.rs b/tests/ui/specialization/defaultimpl/specialization-wfcheck.rs index eb18d6eaac451..cd45c1a0a8cb3 100644 --- a/tests/ui/specialization/defaultimpl/specialization-wfcheck.rs +++ b/tests/ui/specialization/defaultimpl/specialization-wfcheck.rs @@ -5,6 +5,6 @@ trait Foo<'a, T: Eq + 'a> { } default impl Foo<'static, U> for () {} -//~^ ERROR the trait bound `U: Eq` is not satisfied +//~^ ERROR trait `Eq` is not implemented for `U` fn main(){} diff --git a/tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr b/tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr index 01188e293bd97..5bdffb256735c 100644 --- a/tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr +++ b/tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr @@ -8,7 +8,7 @@ LL | #![feature(specialization)] = help: consider using `min_specialization` instead, which is more stable and complete = note: `#[warn(incomplete_features)]` on by default -error[E0277]: the trait bound `U: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `U` --> $DIR/specialization-wfcheck.rs:7:17 | LL | default impl Foo<'static, U> for () {} diff --git a/tests/ui/specialization/issue-33017.rs b/tests/ui/specialization/issue-33017.rs index 8dbadf58d5c88..a11ff1bdcdb63 100644 --- a/tests/ui/specialization/issue-33017.rs +++ b/tests/ui/specialization/issue-33017.rs @@ -10,7 +10,7 @@ trait UncheckedCopy: Sized { impl UncheckedCopy for T { default type Output = Self; - //~^ ERROR: the trait bound `T: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `T` } fn unchecked_copy(other: &T::Output) -> T { diff --git a/tests/ui/specialization/issue-33017.stderr b/tests/ui/specialization/issue-33017.stderr index 2c20077078fd3..5f2499ecd7fce 100644 --- a/tests/ui/specialization/issue-33017.stderr +++ b/tests/ui/specialization/issue-33017.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/issue-33017.rs:12:27 | LL | default type Output = Self; diff --git a/tests/ui/specialization/issue-38091.rs b/tests/ui/specialization/issue-38091.rs index 5b398368a6733..f379061aae472 100644 --- a/tests/ui/specialization/issue-38091.rs +++ b/tests/ui/specialization/issue-38091.rs @@ -10,7 +10,7 @@ where T: Check, { default type Ty = (); - //~^ ERROR the trait bound `(): Valid` is not satisfied + //~^ ERROR trait `Valid` is not implemented for `()` default fn iterate(self) {} } diff --git a/tests/ui/specialization/issue-38091.stderr b/tests/ui/specialization/issue-38091.stderr index eb64383e18bbd..bc46fcf8afbf9 100644 --- a/tests/ui/specialization/issue-38091.stderr +++ b/tests/ui/specialization/issue-38091.stderr @@ -8,7 +8,7 @@ LL | #![feature(specialization)] = help: consider using `min_specialization` instead, which is more stable and complete = note: `#[warn(incomplete_features)]` on by default -error[E0277]: the trait bound `(): Valid` is not satisfied +error[E0277]: the trait `Valid` is not implemented for `()` --> $DIR/issue-38091.rs:12:23 | LL | default type Ty = (); diff --git a/tests/ui/specialization/issue-44861.rs b/tests/ui/specialization/issue-44861.rs index 79d9b9490d09d..6b04def6f3a35 100644 --- a/tests/ui/specialization/issue-44861.rs +++ b/tests/ui/specialization/issue-44861.rs @@ -19,7 +19,7 @@ impl MaybeObjectSafe for () {} impl Smartass for T { type Data = ::Data2; default type Data2 = (); - //~^ ERROR: the trait bound `(): CoerceUnsized<*const [u8]>` is not satisfied + //~^ ERROR trait `CoerceUnsized<*const [u8]>` is not implemented for `()` } impl Smartass for () { diff --git a/tests/ui/specialization/issue-44861.stderr b/tests/ui/specialization/issue-44861.stderr index d184c4468b685..73d0285e592b1 100644 --- a/tests/ui/specialization/issue-44861.stderr +++ b/tests/ui/specialization/issue-44861.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): CoerceUnsized<*const [u8]>` is not satisfied +error[E0277]: the trait `CoerceUnsized<*const [u8]>` is not implemented for `()` --> $DIR/issue-44861.rs:21:26 | LL | default type Data2 = (); diff --git a/tests/ui/specialization/issue-59435.rs b/tests/ui/specialization/issue-59435.rs index 3239002566279..171c1b2616355 100644 --- a/tests/ui/specialization/issue-59435.rs +++ b/tests/ui/specialization/issue-59435.rs @@ -9,7 +9,7 @@ trait MyTrait { impl MyTrait for i32 { default type MyType = MyStruct; - //~^ ERROR: the trait bound `MyStruct: Default` is not satisfied + //~^ ERROR trait `Default` is not implemented for `MyStruct` } fn main() { diff --git a/tests/ui/specialization/issue-59435.stderr b/tests/ui/specialization/issue-59435.stderr index 60522e0f587b6..188d184e10a05 100644 --- a/tests/ui/specialization/issue-59435.stderr +++ b/tests/ui/specialization/issue-59435.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `MyStruct: Default` is not satisfied +error[E0277]: the trait `Default` is not implemented for `MyStruct` --> $DIR/issue-59435.rs:11:27 | LL | default type MyType = MyStruct; diff --git a/tests/ui/specialization/min_specialization/issue-79224.rs b/tests/ui/specialization/min_specialization/issue-79224.rs index 6ddd3d79ccf75..21e7ef8dce736 100644 --- a/tests/ui/specialization/min_specialization/issue-79224.rs +++ b/tests/ui/specialization/min_specialization/issue-79224.rs @@ -16,11 +16,11 @@ impl ToString for Cow<'_, str> { } impl Display for Cow<'_, B> { - //~^ ERROR: the trait bound `B: Clone` is not satisfied [E0277] + //~^ ERROR trait `Clone` is not implemented for `B` fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - //~^ ERROR: the trait bound `B: Clone` is not satisfied [E0277] - //~| ERROR: the trait bound `B: Clone` is not satisfied [E0277] - //~| ERROR: the trait bound `B: Clone` is not satisfied [E0277] + //~^ ERROR trait `Clone` is not implemented for `B` + //~| ERROR trait `Clone` is not implemented for `B` + //~| ERROR trait `Clone` is not implemented for `B` write!(f, "foo") } } diff --git a/tests/ui/specialization/min_specialization/issue-79224.stderr b/tests/ui/specialization/min_specialization/issue-79224.stderr index db88be88a8128..db5bdaef15ff4 100644 --- a/tests/ui/specialization/min_specialization/issue-79224.stderr +++ b/tests/ui/specialization/min_specialization/issue-79224.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `B: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `B` --> $DIR/issue-79224.rs:18:29 | LL | impl Display for Cow<'_, B> { @@ -10,7 +10,7 @@ help: consider further restricting this bound LL | impl Display for Cow<'_, B> { | +++++++++++++++++++ -error[E0277]: the trait bound `B: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `B` --> $DIR/issue-79224.rs:20:5 | LL | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { @@ -22,7 +22,7 @@ help: consider further restricting this bound LL | impl Display for Cow<'_, B> { | +++++++++++++++++++ -error[E0277]: the trait bound `B: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `B` --> $DIR/issue-79224.rs:20:13 | LL | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { @@ -34,7 +34,7 @@ help: consider further restricting this bound LL | impl Display for Cow<'_, B> { | +++++++++++++++++++ -error[E0277]: the trait bound `B: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `B` --> $DIR/issue-79224.rs:20:62 | LL | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { diff --git a/tests/ui/structs/struct-path-alias-bounds.rs b/tests/ui/structs/struct-path-alias-bounds.rs index 1e2c4b836a132..b9821d3faa782 100644 --- a/tests/ui/structs/struct-path-alias-bounds.rs +++ b/tests/ui/structs/struct-path-alias-bounds.rs @@ -7,5 +7,5 @@ type A = S; fn main() { let s = A { a: NoClone }; - //~^ ERROR the trait bound `NoClone: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `NoClone` } diff --git a/tests/ui/structs/struct-path-alias-bounds.stderr b/tests/ui/structs/struct-path-alias-bounds.stderr index 621496bb43003..ec5316e6e5d00 100644 --- a/tests/ui/structs/struct-path-alias-bounds.stderr +++ b/tests/ui/structs/struct-path-alias-bounds.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `NoClone: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `NoClone` --> $DIR/struct-path-alias-bounds.rs:9:13 | LL | let s = A { a: NoClone }; diff --git a/tests/ui/suggestions/assoc-const-as-fn.rs b/tests/ui/suggestions/assoc-const-as-fn.rs index 4b4595dd5e6a5..284999cfa0553 100644 --- a/tests/ui/suggestions/assoc-const-as-fn.rs +++ b/tests/ui/suggestions/assoc-const-as-fn.rs @@ -12,7 +12,7 @@ impl GlUniformScalar for u32 { pub fn foo(value: T) { ::FACTORY(1, value); - //~^ ERROR the trait bound `T: GlUniformScalar` is not satisfied + //~^ ERROR trait `GlUniformScalar` is not implemented for `T` } fn main() {} diff --git a/tests/ui/suggestions/assoc-const-as-fn.stderr b/tests/ui/suggestions/assoc-const-as-fn.stderr index 69e9af726479e..b12e477df6d1d 100644 --- a/tests/ui/suggestions/assoc-const-as-fn.stderr +++ b/tests/ui/suggestions/assoc-const-as-fn.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: GlUniformScalar` is not satisfied +error[E0277]: the trait `GlUniformScalar` is not implemented for `T` --> $DIR/assoc-const-as-fn.rs:14:6 | LL | ::FACTORY(1, value); diff --git a/tests/ui/suggestions/call-on-unimplemented-ctor.rs b/tests/ui/suggestions/call-on-unimplemented-ctor.rs index 5f811044eb349..0ecf84681c39d 100644 --- a/tests/ui/suggestions/call-on-unimplemented-ctor.rs +++ b/tests/ui/suggestions/call-on-unimplemented-ctor.rs @@ -1,7 +1,7 @@ fn main() { insert_resource(Marker); insert_resource(Time); - //~^ ERROR the trait bound `fn(u32) -> Time {Time}: Resource` is not satisfied + //~^ ERROR trait `Resource` is not implemented for `fn(u32) -> Time {Time}` //~| HELP use parentheses to construct this tuple struct } diff --git a/tests/ui/suggestions/call-on-unimplemented-ctor.stderr b/tests/ui/suggestions/call-on-unimplemented-ctor.stderr index 4124a0061726f..de920caa843b1 100644 --- a/tests/ui/suggestions/call-on-unimplemented-ctor.stderr +++ b/tests/ui/suggestions/call-on-unimplemented-ctor.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `fn(u32) -> Time {Time}: Resource` is not satisfied +error[E0277]: the trait `Resource` is not implemented for `fn(u32) -> Time {Time}` --> $DIR/call-on-unimplemented-ctor.rs:3:21 | LL | insert_resource(Time); diff --git a/tests/ui/suggestions/call-on-unimplemented-fn-ptr.rs b/tests/ui/suggestions/call-on-unimplemented-fn-ptr.rs index 86490c724e018..f25e11334b9c5 100644 --- a/tests/ui/suggestions/call-on-unimplemented-fn-ptr.rs +++ b/tests/ui/suggestions/call-on-unimplemented-fn-ptr.rs @@ -8,7 +8,7 @@ fn needs_bar(_: T) {} fn blah(f: fn() -> Foo) { needs_bar(f); - //~^ ERROR the trait bound `fn() -> Foo: Bar` is not satisfied + //~^ ERROR trait `Bar` is not implemented for `fn() -> Foo` //~| HELP use parentheses to call this function pointer } diff --git a/tests/ui/suggestions/call-on-unimplemented-fn-ptr.stderr b/tests/ui/suggestions/call-on-unimplemented-fn-ptr.stderr index f20596a80a6f9..251c43d68918b 100644 --- a/tests/ui/suggestions/call-on-unimplemented-fn-ptr.stderr +++ b/tests/ui/suggestions/call-on-unimplemented-fn-ptr.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `fn() -> Foo: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `fn() -> Foo` --> $DIR/call-on-unimplemented-fn-ptr.rs:10:15 | LL | needs_bar(f); diff --git a/tests/ui/suggestions/call-on-unimplemented-with-autoderef.rs b/tests/ui/suggestions/call-on-unimplemented-with-autoderef.rs index 9021dd752e7e9..53b07f94a954f 100644 --- a/tests/ui/suggestions/call-on-unimplemented-with-autoderef.rs +++ b/tests/ui/suggestions/call-on-unimplemented-with-autoderef.rs @@ -6,7 +6,7 @@ fn needs_foo(_: impl Foo) {} fn test(x: &Box i32>) { needs_foo(x); - //~^ ERROR the trait bound + //~^ ERROR the trait //~| HELP use parentheses to call this trait object } diff --git a/tests/ui/suggestions/call-on-unimplemented-with-autoderef.stderr b/tests/ui/suggestions/call-on-unimplemented-with-autoderef.stderr index f804c66aafe22..969a800229a3b 100644 --- a/tests/ui/suggestions/call-on-unimplemented-with-autoderef.stderr +++ b/tests/ui/suggestions/call-on-unimplemented-with-autoderef.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&Box i32>: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `&Box i32>` --> $DIR/call-on-unimplemented-with-autoderef.rs:8:15 | LL | needs_foo(x); diff --git a/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.rs b/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.rs index e56c8622ece03..7ecdb1085ff2a 100644 --- a/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.rs +++ b/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.rs @@ -11,6 +11,6 @@ trait Bar {} impl Bar for &() {} fn foo() {} -//~^ ERROR the trait bound `for<'a> &'a T: Bar` is not satisfied +//~^ ERROR the trait `for<'a> Bar` is not implemented for `&'a T` fn main() {} diff --git a/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr b/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr index 2cd3fba871548..fcb9e8830bd3c 100644 --- a/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr +++ b/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'a> &'a T: Bar` is not satisfied +error[E0277]: the trait `for<'a> Bar` is not implemented for `&'a T` --> $DIR/correct-binder-for-arbitrary-bound-sugg.rs:13:11 | LL | fn foo() {} diff --git a/tests/ui/suggestions/derive-clone-for-eq.stderr b/tests/ui/suggestions/derive-clone-for-eq.stderr index 6fae6e1316df0..ceb411a9726bb 100644 --- a/tests/ui/suggestions/derive-clone-for-eq.stderr +++ b/tests/ui/suggestions/derive-clone-for-eq.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `T` --> $DIR/derive-clone-for-eq.rs:4:17 | LL | #[derive(Clone, Eq)] diff --git a/tests/ui/suggestions/derive-macro-missing-bounds.rs b/tests/ui/suggestions/derive-macro-missing-bounds.rs index 56c218f97ebf8..8644b034acaaa 100644 --- a/tests/ui/suggestions/derive-macro-missing-bounds.rs +++ b/tests/ui/suggestions/derive-macro-missing-bounds.rs @@ -38,7 +38,7 @@ mod c { } #[derive(Debug)] - struct Outer(Inner); //~ ERROR the trait bound `T: c::Trait` is not satisfied + struct Outer(Inner); //~ ERROR trait `c::Trait` is not implemented for `T` } mod d { @@ -53,7 +53,7 @@ mod d { } #[derive(Debug)] - struct Outer(Inner); //~ ERROR the trait bound `T: d::Trait` is not satisfied + struct Outer(Inner); //~ ERROR trait `d::Trait` is not implemented for `T` } mod e { @@ -68,7 +68,7 @@ mod e { } #[derive(Debug)] - struct Outer(Inner); //~ ERROR the trait bound `T: e::Trait` is not satisfied + struct Outer(Inner); //~ ERROR trait `e::Trait` is not implemented for `T` } mod f { @@ -83,7 +83,7 @@ mod f { } #[derive(Debug)] - struct Outer(Inner); //~ ERROR the trait bound `T: f::Trait` is not satisfied + struct Outer(Inner); //~ ERROR trait `f::Trait` is not implemented for `T` } fn main() {} diff --git a/tests/ui/suggestions/derive-macro-missing-bounds.stderr b/tests/ui/suggestions/derive-macro-missing-bounds.stderr index 5da85a9d0619c..f631c573110ef 100644 --- a/tests/ui/suggestions/derive-macro-missing-bounds.stderr +++ b/tests/ui/suggestions/derive-macro-missing-bounds.stderr @@ -19,7 +19,7 @@ help: consider introducing a `where` clause, but there might be an alternative b LL | struct Outer(Inner) where a::Inner: Debug; | ++++++++++++++++++++++++ -error[E0277]: the trait bound `T: c::Trait` is not satisfied +error[E0277]: the trait `c::Trait` is not implemented for `T` --> $DIR/derive-macro-missing-bounds.rs:41:21 | LL | #[derive(Debug)] @@ -43,7 +43,7 @@ help: consider restricting type parameter `T` LL | struct Outer(Inner); | ++++++++++ -error[E0277]: the trait bound `T: d::Trait` is not satisfied +error[E0277]: the trait `d::Trait` is not implemented for `T` --> $DIR/derive-macro-missing-bounds.rs:56:21 | LL | #[derive(Debug)] @@ -65,7 +65,7 @@ help: consider restricting type parameter `T` LL | struct Outer(Inner); | ++++++++++ -error[E0277]: the trait bound `T: e::Trait` is not satisfied +error[E0277]: the trait `e::Trait` is not implemented for `T` --> $DIR/derive-macro-missing-bounds.rs:71:21 | LL | #[derive(Debug)] @@ -87,7 +87,7 @@ help: consider restricting type parameter `T` LL | struct Outer(Inner); | ++++++++++ -error[E0277]: the trait bound `T: f::Trait` is not satisfied +error[E0277]: the trait `f::Trait` is not implemented for `T` --> $DIR/derive-macro-missing-bounds.rs:86:21 | LL | #[derive(Debug)] diff --git a/tests/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr b/tests/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr index 75a3ae1a83e2f..ea61f9ea23e5f 100644 --- a/tests/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr +++ b/tests/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `fn() -> impl T {foo}: T` is not satisfied +error[E0277]: the trait `T` is not implemented for `fn() -> impl T {foo}` --> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:17:9 | LL | bar(foo); @@ -16,7 +16,7 @@ help: use parentheses to call this function LL | bar(foo()); | ++ -error[E0277]: the trait bound `{closure@$DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:18:19: 18:21}: T` is not satisfied +error[E0277]: the trait `T` is not implemented for `{closure@$DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:18:19: 18:21}` --> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:19:9 | LL | bar(closure); diff --git a/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.rs b/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.rs index 319789c4ec282..f4a926128c566 100644 --- a/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.rs +++ b/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.rs @@ -14,5 +14,5 @@ where fn main() { let s = S; - foo::(s); //~ ERROR the trait bound `for<'b> &'b S: Trait` is not satisfied + foo::(s); //~ ERROR trait `for<'b> Trait` is not implemented for `&'b S` } diff --git a/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr b/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr index 2733bbff36b54..d29db9553d6dd 100644 --- a/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr +++ b/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'b> &'b S: Trait` is not satisfied +error[E0277]: the trait `for<'b> Trait` is not implemented for `&'b S` --> $DIR/imm-ref-trait-object-literal-bound-regions.rs:17:14 | LL | foo::(s); diff --git a/tests/ui/suggestions/imm-ref-trait-object-literal.rs b/tests/ui/suggestions/imm-ref-trait-object-literal.rs index 22ca6dde45eee..5764b71c2cc1b 100644 --- a/tests/ui/suggestions/imm-ref-trait-object-literal.rs +++ b/tests/ui/suggestions/imm-ref-trait-object-literal.rs @@ -9,6 +9,6 @@ fn foo(_: X) {} fn main() { let s = S; - foo(&s); //~ ERROR the trait bound `&S: Trait` is not satisfied + foo(&s); //~ ERROR the trait `Trait` is not implemented for `&S` foo(s); //~ ERROR the trait bound `S: Trait` is not satisfied } diff --git a/tests/ui/suggestions/imm-ref-trait-object-literal.stderr b/tests/ui/suggestions/imm-ref-trait-object-literal.stderr index e01102e3864ea..92515881cb951 100644 --- a/tests/ui/suggestions/imm-ref-trait-object-literal.stderr +++ b/tests/ui/suggestions/imm-ref-trait-object-literal.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&S: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `&S` --> $DIR/imm-ref-trait-object-literal.rs:12:7 | LL | foo(&s); diff --git a/tests/ui/suggestions/impl-trait-return-trailing-semicolon.rs b/tests/ui/suggestions/impl-trait-return-trailing-semicolon.rs index cd3741356f4d0..8a20e8a4d5df2 100644 --- a/tests/ui/suggestions/impl-trait-return-trailing-semicolon.rs +++ b/tests/ui/suggestions/impl-trait-return-trailing-semicolon.rs @@ -7,13 +7,13 @@ struct Qux; impl Bar for Qux {} fn foo() -> impl Bar { - //~^ ERROR the trait bound `(): Bar` is not satisfied + //~^ ERROR trait `Bar` is not implemented for `()` 5; //~^ HELP remove this semicolon } fn bar() -> impl Bar { - //~^ ERROR the trait bound `(): Bar` is not satisfied + //~^ ERROR trait `Bar` is not implemented for `()` //~| HELP the following other types implement trait `Bar`: ""; } diff --git a/tests/ui/suggestions/impl-trait-return-trailing-semicolon.stderr b/tests/ui/suggestions/impl-trait-return-trailing-semicolon.stderr index 6465eeb8bc62d..518fe4c984415 100644 --- a/tests/ui/suggestions/impl-trait-return-trailing-semicolon.stderr +++ b/tests/ui/suggestions/impl-trait-return-trailing-semicolon.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `()` --> $DIR/impl-trait-return-trailing-semicolon.rs:9:13 | LL | fn foo() -> impl Bar { @@ -9,7 +9,7 @@ LL | 5; | | | this expression has type `{integer}`, which implements `Bar` -error[E0277]: the trait bound `(): Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `()` --> $DIR/impl-trait-return-trailing-semicolon.rs:15:13 | LL | fn bar() -> impl Bar { diff --git a/tests/ui/suggestions/into-str.rs b/tests/ui/suggestions/into-str.rs index 606e44b2eb447..55697f6e17760 100644 --- a/tests/ui/suggestions/into-str.rs +++ b/tests/ui/suggestions/into-str.rs @@ -2,5 +2,5 @@ fn foo<'a, T>(_t: T) where T: Into<&'a str> {} fn main() { foo(String::new()); - //~^ ERROR the trait bound `&str: From` is not satisfied + //~^ ERROR trait `From` is not implemented for `&str` } diff --git a/tests/ui/suggestions/into-str.stderr b/tests/ui/suggestions/into-str.stderr index d10a294c7d2dd..c0660fb694e6a 100644 --- a/tests/ui/suggestions/into-str.stderr +++ b/tests/ui/suggestions/into-str.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&str: From` is not satisfied +error[E0277]: the trait `From` is not implemented for `&str` --> $DIR/into-str.rs:4:9 | LL | foo(String::new()); diff --git a/tests/ui/suggestions/issue-101623.rs b/tests/ui/suggestions/issue-101623.rs index d18a4a21f0a51..7a689c6caca26 100644 --- a/tests/ui/suggestions/issue-101623.rs +++ b/tests/ui/suggestions/issue-101623.rs @@ -19,7 +19,7 @@ impl<'a> Trait<'a> for () { fn fun2(t: &mut Stuff) -> () { let Stuff { inner, .. } = t; Trait::do_stuff({ fun(&mut *inner) }); - //~^ ERROR the trait bound `*mut (): Trait<'_>` is not satisfied + //~^ ERROR trait `Trait<'_>` is not implemented for `*mut ()` } fn main() {} diff --git a/tests/ui/suggestions/issue-101623.stderr b/tests/ui/suggestions/issue-101623.stderr index 4de91a1b99500..67e8e815a596c 100644 --- a/tests/ui/suggestions/issue-101623.stderr +++ b/tests/ui/suggestions/issue-101623.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `*mut (): Trait<'_>` is not satisfied +error[E0277]: the trait `Trait<'_>` is not implemented for `*mut ()` --> $DIR/issue-101623.rs:21:21 | LL | Trait::do_stuff({ fun(&mut *inner) }); diff --git a/tests/ui/suggestions/issue-105645.rs b/tests/ui/suggestions/issue-105645.rs index 681ce1c6e37a6..06dd7509f1142 100644 --- a/tests/ui/suggestions/issue-105645.rs +++ b/tests/ui/suggestions/issue-105645.rs @@ -2,7 +2,7 @@ fn main() { let mut buf = [0u8; 50]; let mut bref = buf.as_slice(); foo(&mut bref); - //~^ ERROR 4:9: 4:18: the trait bound `&[u8]: std::io::Write` is not satisfied [E0277] + //~^ ERROR trait `std::io::Write` is not implemented for `&[u8]` } fn foo(_: &mut impl std::io::Write) {} diff --git a/tests/ui/suggestions/issue-105645.stderr b/tests/ui/suggestions/issue-105645.stderr index f717f8f4e6570..c0571ae465e70 100644 --- a/tests/ui/suggestions/issue-105645.stderr +++ b/tests/ui/suggestions/issue-105645.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&[u8]: std::io::Write` is not satisfied +error[E0277]: the trait `std::io::Write` is not implemented for `&[u8]` --> $DIR/issue-105645.rs:4:9 | LL | foo(&mut bref); diff --git a/tests/ui/suggestions/issue-106443-sugg-clone-for-bound.rs b/tests/ui/suggestions/issue-106443-sugg-clone-for-bound.rs index 3b2e316b2961e..8a1a2852e568c 100644 --- a/tests/ui/suggestions/issue-106443-sugg-clone-for-bound.rs +++ b/tests/ui/suggestions/issue-106443-sugg-clone-for-bound.rs @@ -7,11 +7,11 @@ impl X for S {} fn foo(_: T) {} fn bar(s: &T) { - foo(s); //~ ERROR the trait bound `&T: X` is not satisfied + foo(s); //~ ERROR trait `X` is not implemented for `&T` } fn bar_with_clone(s: &T) { - foo(s); //~ ERROR the trait bound `&T: X` is not satisfied + foo(s); //~ ERROR trait `X` is not implemented for `&T` } fn main() { diff --git a/tests/ui/suggestions/issue-106443-sugg-clone-for-bound.stderr b/tests/ui/suggestions/issue-106443-sugg-clone-for-bound.stderr index 8607917ede6bf..9a2b7dcadd676 100644 --- a/tests/ui/suggestions/issue-106443-sugg-clone-for-bound.stderr +++ b/tests/ui/suggestions/issue-106443-sugg-clone-for-bound.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&T: X` is not satisfied +error[E0277]: the trait `X` is not implemented for `&T` --> $DIR/issue-106443-sugg-clone-for-bound.rs:10:9 | LL | foo(s); @@ -13,7 +13,7 @@ help: consider using clone here LL | foo(s.clone()); | ++++++++ -error[E0277]: the trait bound `&T: X` is not satisfied +error[E0277]: the trait `X` is not implemented for `&T` --> $DIR/issue-106443-sugg-clone-for-bound.rs:14:9 | LL | foo(s); diff --git a/tests/ui/suggestions/issue-71394-no-from-impl.rs b/tests/ui/suggestions/issue-71394-no-from-impl.rs index c295a72c7bddf..ef8de2b545cf4 100644 --- a/tests/ui/suggestions/issue-71394-no-from-impl.rs +++ b/tests/ui/suggestions/issue-71394-no-from-impl.rs @@ -6,5 +6,5 @@ fn main() { let data: &[u8] = &[0; 10]; let _: &[i8] = data.into(); - //~^ ERROR the trait bound `&[i8]: From<&[u8]>` is not satisfied + //~^ ERROR trait `From<&[u8]>` is not implemented for `&[i8]` } diff --git a/tests/ui/suggestions/issue-71394-no-from-impl.stderr b/tests/ui/suggestions/issue-71394-no-from-impl.stderr index 0f6bfbeec45f3..228cf314bbd94 100644 --- a/tests/ui/suggestions/issue-71394-no-from-impl.stderr +++ b/tests/ui/suggestions/issue-71394-no-from-impl.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&[i8]: From<&[u8]>` is not satisfied +error[E0277]: the trait `From<&[u8]>` is not implemented for `&[i8]` --> $DIR/issue-71394-no-from-impl.rs:8:25 | LL | let _: &[i8] = data.into(); diff --git a/tests/ui/suggestions/issue-84973-blacklist.rs b/tests/ui/suggestions/issue-84973-blacklist.rs index 6a35d779c1cda..4048174462bcc 100644 --- a/tests/ui/suggestions/issue-84973-blacklist.rs +++ b/tests/ui/suggestions/issue-84973-blacklist.rs @@ -12,8 +12,8 @@ fn f_send(t: T) {} struct S; fn main() { - f_copy("".to_string()); //~ ERROR: the trait bound `String: Copy` is not satisfied [E0277] - f_clone(S); //~ ERROR: the trait bound `S: Clone` is not satisfied [E0277] + f_copy("".to_string()); //~ ERROR trait `Copy` is not implemented for `String` + f_clone(S); //~ ERROR trait `Clone` is not implemented for `S` f_unpin(static || { yield; }); //~^ ERROR: cannot be unpinned [E0277] diff --git a/tests/ui/suggestions/issue-84973-blacklist.stderr b/tests/ui/suggestions/issue-84973-blacklist.stderr index 3333822832856..c3b695aee847c 100644 --- a/tests/ui/suggestions/issue-84973-blacklist.stderr +++ b/tests/ui/suggestions/issue-84973-blacklist.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/issue-84973-blacklist.rs:15:12 | LL | f_copy("".to_string()); @@ -17,7 +17,7 @@ LL - f_copy("".to_string()); LL + f_copy(""); | -error[E0277]: the trait bound `S: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `S` --> $DIR/issue-84973-blacklist.rs:16:13 | LL | f_clone(S); diff --git a/tests/ui/suggestions/issue-84973-negative.rs b/tests/ui/suggestions/issue-84973-negative.rs index f339251e57dab..4eefaafaf09c1 100644 --- a/tests/ui/suggestions/issue-84973-negative.rs +++ b/tests/ui/suggestions/issue-84973-negative.rs @@ -7,6 +7,6 @@ fn bar(t: T) {} fn main() { let a = 0i32; let b = 0.0f32; - bar(a); //~ ERROR: the trait bound `i32: Tr` is not satisfied [E0277] + bar(a); //~ ERROR: the trait `Tr` is not implemented for `i32` [E0277] bar(b); //~ ERROR: the trait bound `f32: Tr` is not satisfied [E0277] } diff --git a/tests/ui/suggestions/issue-84973-negative.stderr b/tests/ui/suggestions/issue-84973-negative.stderr index ce838bce09e7b..3ef7da0c14717 100644 --- a/tests/ui/suggestions/issue-84973-negative.stderr +++ b/tests/ui/suggestions/issue-84973-negative.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `i32: Tr` is not satisfied +error[E0277]: the trait `Tr` is not implemented for `i32` --> $DIR/issue-84973-negative.rs:10:9 | LL | bar(a); diff --git a/tests/ui/suggestions/issue-88696.stderr b/tests/ui/suggestions/issue-88696.stderr index a8bc970e055b8..de0059d3cf79e 100644 --- a/tests/ui/suggestions/issue-88696.stderr +++ b/tests/ui/suggestions/issue-88696.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Result: From>` is not satisfied +error[E0277]: the trait `From>` is not implemented for `Result` --> $DIR/issue-88696.rs:9:9 | LL | a().into() diff --git a/tests/ui/suggestions/issue-89333.rs b/tests/ui/suggestions/issue-89333.rs index e1c4750761bda..953785aa74aa3 100644 --- a/tests/ui/suggestions/issue-89333.rs +++ b/tests/ui/suggestions/issue-89333.rs @@ -3,7 +3,7 @@ // has late bound var fn main() { - test(&|| 0); //~ ERROR the trait bound + test(&|| 0); //~ ERROR the trait } trait Trait {} diff --git a/tests/ui/suggestions/issue-89333.stderr b/tests/ui/suggestions/issue-89333.stderr index 9df850ec9de08..dd39f4e2a1c6f 100644 --- a/tests/ui/suggestions/issue-89333.stderr +++ b/tests/ui/suggestions/issue-89333.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'a> &'a _: Trait` is not satisfied +error[E0277]: the trait `for<'a> Trait` is not implemented for `&'a _` --> $DIR/issue-89333.rs:6:5 | LL | test(&|| 0); diff --git a/tests/ui/suggestions/issue-96223.rs b/tests/ui/suggestions/issue-96223.rs index ab9acf7b4b241..e7c60db5603fb 100644 --- a/tests/ui/suggestions/issue-96223.rs +++ b/tests/ui/suggestions/issue-96223.rs @@ -46,7 +46,7 @@ fn icey_bounds>(p: &D) {} fn trigger_ice() { let p = Empty; - icey_bounds(&p); //~ERROR the trait bound + icey_bounds(&p); //~ERROR the trait } fn main() {} diff --git a/tests/ui/suggestions/issue-96223.stderr b/tests/ui/suggestions/issue-96223.stderr index 4a77b240f3e54..8132c88dc4c8c 100644 --- a/tests/ui/suggestions/issue-96223.stderr +++ b/tests/ui/suggestions/issue-96223.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'de> EmptyBis<'de>: Foo<'_>` is not satisfied +error[E0277]: the trait `for<'de> Foo<'_>` is not implemented for `EmptyBis<'de>` --> $DIR/issue-96223.rs:49:17 | LL | icey_bounds(&p); diff --git a/tests/ui/suggestions/issue-99080.rs b/tests/ui/suggestions/issue-99080.rs index ecafdd6303d5f..a75722e2c96ae 100644 --- a/tests/ui/suggestions/issue-99080.rs +++ b/tests/ui/suggestions/issue-99080.rs @@ -8,7 +8,7 @@ fn needs_meow(t: T) {} fn main() { needs_meow(1usize); - //~^ ERROR the trait bound `usize: Meow` is not satisfied + //~^ ERROR trait `Meow` is not implemented for `usize` } struct LocalMeow; diff --git a/tests/ui/suggestions/issue-99080.stderr b/tests/ui/suggestions/issue-99080.stderr index 9c385a7a408d0..685a6303b14fa 100644 --- a/tests/ui/suggestions/issue-99080.stderr +++ b/tests/ui/suggestions/issue-99080.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `usize: Meow` is not satisfied +error[E0277]: the trait `Meow` is not implemented for `usize` --> $DIR/issue-99080.rs:10:16 | LL | needs_meow(1usize); diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.fixed b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.fixed index 99433f7332042..2f83264defe51 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.fixed +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.fixed @@ -9,10 +9,10 @@ pub struct Vector2 { #[derive(Debug, Copy, Clone)] pub struct AABB { - pub loc: Vector2, //~ ERROR the trait bound `K: Copy` is not satisfied - //~^ ERROR the trait bound `K: Copy` is not satisfied - //~| ERROR the trait bound `K: Copy` is not satisfied - pub size: Vector2, //~ ERROR the trait bound `K: Copy` is not satisfied + pub loc: Vector2, //~ ERROR trait `Copy` is not implemented for `K` + //~^ ERROR trait `Copy` is not implemented for `K` + //~| ERROR trait `Copy` is not implemented for `K` + pub size: Vector2, //~ ERROR trait `Copy` is not implemented for `K` } fn main() {} diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.rs b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.rs index c0777e0817f03..51aa8cb171f8b 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.rs +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.rs @@ -9,10 +9,10 @@ pub struct Vector2 { #[derive(Debug, Copy, Clone)] pub struct AABB { - pub loc: Vector2, //~ ERROR the trait bound `K: Copy` is not satisfied - //~^ ERROR the trait bound `K: Copy` is not satisfied - //~| ERROR the trait bound `K: Copy` is not satisfied - pub size: Vector2, //~ ERROR the trait bound `K: Copy` is not satisfied + pub loc: Vector2, //~ ERROR trait `Copy` is not implemented for `K` + //~^ ERROR trait `Copy` is not implemented for `K` + //~| ERROR trait `Copy` is not implemented for `K` + pub size: Vector2, //~ ERROR trait `Copy` is not implemented for `K` } fn main() {} diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.stderr b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.stderr index a2a78ddc70590..5372f593289e1 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.stderr +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `K: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `K` --> $DIR/missing-bound-in-derive-copy-impl-2.rs:12:14 | LL | pub loc: Vector2, @@ -14,7 +14,7 @@ help: consider further restricting this bound LL | pub struct AABB { | +++++++++++++++++++ -error[E0277]: the trait bound `K: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `K` --> $DIR/missing-bound-in-derive-copy-impl-2.rs:12:5 | LL | #[derive(Debug, Copy, Clone)] @@ -37,7 +37,7 @@ help: consider further restricting this bound LL | pub struct AABB { | +++++++++++++++++++ -error[E0277]: the trait bound `K: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `K` --> $DIR/missing-bound-in-derive-copy-impl-2.rs:12:5 | LL | #[derive(Debug, Copy, Clone)] @@ -59,7 +59,7 @@ help: consider further restricting this bound LL | pub struct AABB { | +++++++++++++++++++ -error[E0277]: the trait bound `K: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `K` --> $DIR/missing-bound-in-derive-copy-impl-2.rs:15:5 | LL | #[derive(Debug, Copy, Clone)] diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl.rs b/tests/ui/suggestions/missing-bound-in-derive-copy-impl.rs index 0ffc1b8f7a25e..58248f33943f8 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl.rs +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl.rs @@ -10,13 +10,13 @@ pub struct Vector2 { pub struct AABB { pub loc: Vector2, //~^ ERROR doesn't implement `Debug` - //~| ERROR `K: Copy` is not satisfied + //~| ERROR trait `Copy` is not implemented for `K` //~| ERROR doesn't implement `Debug` - //~| ERROR `K: Copy` is not satisfied - //~| ERROR `K: Copy` is not satisfied + //~| ERROR trait `Copy` is not implemented for `K` + //~| ERROR trait `Copy` is not implemented for `K` pub size: Vector2, //~^ ERROR doesn't implement `Debug` - //~| ERROR `K: Copy` is not satisfied + //~| ERROR trait `Copy` is not implemented for `K` } fn main() {} diff --git a/tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr b/tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr index 2ae0871b815e4..7949cc63c0e94 100644 --- a/tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr +++ b/tests/ui/suggestions/missing-bound-in-derive-copy-impl.stderr @@ -34,7 +34,7 @@ help: consider restricting type parameter `K` LL | pub struct AABB { | +++++++++++++++++ -error[E0277]: the trait bound `K: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `K` --> $DIR/missing-bound-in-derive-copy-impl.rs:11:14 | LL | pub loc: Vector2, @@ -50,7 +50,7 @@ help: consider restricting type parameter `K` LL | pub struct AABB { | +++++++++++++++++++ -error[E0277]: the trait bound `K: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `K` --> $DIR/missing-bound-in-derive-copy-impl.rs:11:5 | LL | #[derive(Debug, Copy, Clone)] @@ -88,7 +88,7 @@ help: consider restricting type parameter `K` LL | pub struct AABB { | +++++++++++++++++ -error[E0277]: the trait bound `K: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `K` --> $DIR/missing-bound-in-derive-copy-impl.rs:11:5 | LL | #[derive(Debug, Copy, Clone)] @@ -125,7 +125,7 @@ help: consider restricting type parameter `K` LL | pub struct AABB { | +++++++++++++++++ -error[E0277]: the trait bound `K: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `K` --> $DIR/missing-bound-in-derive-copy-impl.rs:17:5 | LL | #[derive(Debug, Copy, Clone)] diff --git a/tests/ui/suggestions/mut-borrow-needed-by-trait.rs b/tests/ui/suggestions/mut-borrow-needed-by-trait.rs index 66e1e77c905e0..3f113a44bc968 100644 --- a/tests/ui/suggestions/mut-borrow-needed-by-trait.rs +++ b/tests/ui/suggestions/mut-borrow-needed-by-trait.rs @@ -15,8 +15,8 @@ fn main() { }; let fp = BufWriter::new(fp); - //~^ ERROR the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied - //~| ERROR the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied + //~^ ERROR trait `std::io::Write` is not implemented for `&dyn std::io::Write` + //~| ERROR trait `std::io::Write` is not implemented for `&dyn std::io::Write` writeln!(fp, "hello world").unwrap(); //~ ERROR the method } diff --git a/tests/ui/suggestions/mut-borrow-needed-by-trait.stderr b/tests/ui/suggestions/mut-borrow-needed-by-trait.stderr index 09a9b1d3b3482..99a9a55ba24c5 100644 --- a/tests/ui/suggestions/mut-borrow-needed-by-trait.stderr +++ b/tests/ui/suggestions/mut-borrow-needed-by-trait.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied +error[E0277]: the trait `std::io::Write` is not implemented for `&dyn std::io::Write` --> $DIR/mut-borrow-needed-by-trait.rs:17:29 | LL | let fp = BufWriter::new(fp); @@ -10,7 +10,7 @@ LL | let fp = BufWriter::new(fp); note: required by a bound in `BufWriter::::new` --> $SRC_DIR/std/src/io/buffered/bufwriter.rs:LL:COL -error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied +error[E0277]: the trait `std::io::Write` is not implemented for `&dyn std::io::Write` --> $DIR/mut-borrow-needed-by-trait.rs:17:14 | LL | let fp = BufWriter::new(fp); diff --git a/tests/ui/suggestions/suggest-change-mut.rs b/tests/ui/suggestions/suggest-change-mut.rs index 47dc7c343daeb..6b0c2e73628c8 100644 --- a/tests/ui/suggestions/suggest-change-mut.rs +++ b/tests/ui/suggestions/suggest-change-mut.rs @@ -10,7 +10,7 @@ fn issue_81421(mut stream: T) { //~ HELP consider introducing a loop { let mut stream_reader = BufReader::new(&stream); - //~^ ERROR the trait bound `&T: std::io::Read` is not satisfied [E0277] + //~^ ERROR trait `std::io::Read` is not implemented for `&T` //~| HELP consider removing the leading `&`-reference //~| HELP consider changing this borrow's mutability stream_reader.read_until(b'\n', &mut buffer).expect("Reading into buffer failed"); diff --git a/tests/ui/suggestions/suggest-change-mut.stderr b/tests/ui/suggestions/suggest-change-mut.stderr index 216d1e810fd72..ea7738537b9f1 100644 --- a/tests/ui/suggestions/suggest-change-mut.stderr +++ b/tests/ui/suggestions/suggest-change-mut.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&T: std::io::Read` is not satisfied +error[E0277]: the trait `std::io::Read` is not implemented for `&T` --> $DIR/suggest-change-mut.rs:12:48 | LL | let mut stream_reader = BufReader::new(&stream); diff --git a/tests/ui/test-attrs/test-function-signature.rs b/tests/ui/test-attrs/test-function-signature.rs index 0f43245be6f61..086ffdb33da7c 100644 --- a/tests/ui/test-attrs/test-function-signature.rs +++ b/tests/ui/test-attrs/test-function-signature.rs @@ -6,7 +6,7 @@ fn foo() -> Result<(), ()> { } #[test] -fn bar() -> i32 { //~ ERROR the trait bound `i32: Termination` is not satisfied +fn bar() -> i32 { //~ ERROR trait `Termination` is not implemented for `i32` 0 } diff --git a/tests/ui/test-attrs/test-function-signature.stderr b/tests/ui/test-attrs/test-function-signature.stderr index abdb30dc9312b..e11de101aeccc 100644 --- a/tests/ui/test-attrs/test-function-signature.stderr +++ b/tests/ui/test-attrs/test-function-signature.stderr @@ -22,7 +22,7 @@ error: functions used as tests can not have any arguments LL | fn foo(arg: ()) {} | ^^^^^^^^^^^^^^^^^^ -error[E0277]: the trait bound `i32: Termination` is not satisfied +error[E0277]: the trait `Termination` is not implemented for `i32` --> $DIR/test-function-signature.rs:9:13 | LL | #[test] diff --git a/tests/ui/trait-bounds/issue-119530-sugg-from-fn.rs b/tests/ui/trait-bounds/issue-119530-sugg-from-fn.rs index cfe378f55b1ee..16389b9be14a5 100644 --- a/tests/ui/trait-bounds/issue-119530-sugg-from-fn.rs +++ b/tests/ui/trait-bounds/issue-119530-sugg-from-fn.rs @@ -1,5 +1,5 @@ fn foo() -> String { String::new() } fn main() { - let string_arr = [foo(); 64]; //~ ERROR the trait bound `String: Copy` is not satisfied + let string_arr = [foo(); 64]; //~ ERROR trait `Copy` is not implemented for `String` } diff --git a/tests/ui/trait-bounds/issue-119530-sugg-from-fn.stderr b/tests/ui/trait-bounds/issue-119530-sugg-from-fn.stderr index 9217637901b85..634c272b0bf89 100644 --- a/tests/ui/trait-bounds/issue-119530-sugg-from-fn.stderr +++ b/tests/ui/trait-bounds/issue-119530-sugg-from-fn.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/issue-119530-sugg-from-fn.rs:4:23 | LL | let string_arr = [foo(); 64]; diff --git a/tests/ui/trait-bounds/issue-82038.stderr b/tests/ui/trait-bounds/issue-82038.stderr index a97daece3b345..77b4841cb70ba 100644 --- a/tests/ui/trait-bounds/issue-82038.stderr +++ b/tests/ui/trait-bounds/issue-82038.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `bool: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `bool` --> $DIR/issue-82038.rs:8:6 | LL | ::my_method(); diff --git a/tests/ui/trait-impl-bound-suggestions.fixed b/tests/ui/trait-impl-bound-suggestions.fixed index 9d3168f5acd68..836c06b3a8472 100644 --- a/tests/ui/trait-impl-bound-suggestions.fixed +++ b/tests/ui/trait-impl-bound-suggestions.fixed @@ -12,9 +12,9 @@ struct ConstrainedStruct { #[allow(dead_code)] trait InsufficientlyConstrainedGeneric where Self: Sized, X: std::marker::Copy, X: std::marker::Copy { fn return_the_constrained_type(&self, x: X) -> ConstrainedStruct { - //~^ ERROR the trait bound `X: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `X` ConstrainedStruct { x } - //~^ ERROR the trait bound `X: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `X` } } @@ -22,9 +22,9 @@ trait InsufficientlyConstrainedGeneric where Self: Sized, X: std::marker:: #[allow(dead_code)] trait InsufficientlyConstrainedGenericWithEmptyWhere where Self: Sized, X: std::marker::Copy, X: std::marker::Copy { fn return_the_constrained_type(&self, x: X) -> ConstrainedStruct { - //~^ ERROR the trait bound `X: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `X` ConstrainedStruct { x } - //~^ ERROR the trait bound `X: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `X` } } diff --git a/tests/ui/trait-impl-bound-suggestions.rs b/tests/ui/trait-impl-bound-suggestions.rs index 342fb4416adcb..5d2689fc461fa 100644 --- a/tests/ui/trait-impl-bound-suggestions.rs +++ b/tests/ui/trait-impl-bound-suggestions.rs @@ -12,9 +12,9 @@ struct ConstrainedStruct { #[allow(dead_code)] trait InsufficientlyConstrainedGeneric where Self: Sized { fn return_the_constrained_type(&self, x: X) -> ConstrainedStruct { - //~^ ERROR the trait bound `X: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `X` ConstrainedStruct { x } - //~^ ERROR the trait bound `X: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `X` } } @@ -22,9 +22,9 @@ trait InsufficientlyConstrainedGeneric where Self: Sized { #[allow(dead_code)] trait InsufficientlyConstrainedGenericWithEmptyWhere where Self: Sized { fn return_the_constrained_type(&self, x: X) -> ConstrainedStruct { - //~^ ERROR the trait bound `X: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `X` ConstrainedStruct { x } - //~^ ERROR the trait bound `X: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `X` } } diff --git a/tests/ui/trait-impl-bound-suggestions.stderr b/tests/ui/trait-impl-bound-suggestions.stderr index 6a75cbdf63974..4dbf2b7e0814a 100644 --- a/tests/ui/trait-impl-bound-suggestions.stderr +++ b/tests/ui/trait-impl-bound-suggestions.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `X: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `X` --> $DIR/trait-impl-bound-suggestions.rs:14:52 | LL | fn return_the_constrained_type(&self, x: X) -> ConstrainedStruct { @@ -14,7 +14,7 @@ help: consider further restricting type parameter `X` LL | trait InsufficientlyConstrainedGeneric where Self: Sized, X: std::marker::Copy { | ++++++++++++++++++++++ -error[E0277]: the trait bound `X: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `X` --> $DIR/trait-impl-bound-suggestions.rs:24:52 | LL | fn return_the_constrained_type(&self, x: X) -> ConstrainedStruct { @@ -30,7 +30,7 @@ help: consider further restricting type parameter `X` LL | trait InsufficientlyConstrainedGenericWithEmptyWhere where Self: Sized, X: std::marker::Copy { | ++++++++++++++++++++++ -error[E0277]: the trait bound `X: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `X` --> $DIR/trait-impl-bound-suggestions.rs:16:29 | LL | ConstrainedStruct { x } @@ -46,7 +46,7 @@ help: consider further restricting type parameter `X` LL | trait InsufficientlyConstrainedGeneric where Self: Sized, X: std::marker::Copy { | ++++++++++++++++++++++ -error[E0277]: the trait bound `X: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `X` --> $DIR/trait-impl-bound-suggestions.rs:26:29 | LL | ConstrainedStruct { x } diff --git a/tests/ui/traits/alias/wf.rs b/tests/ui/traits/alias/wf.rs index d10e2abb0e1a3..73d770f467c2f 100644 --- a/tests/ui/traits/alias/wf.rs +++ b/tests/ui/traits/alias/wf.rs @@ -2,6 +2,6 @@ trait Foo {} trait A {} -trait B = A; //~ ERROR `T: Foo` is not satisfied +trait B = A; //~ ERROR trait `Foo` is not implemented for `T` fn main() {} diff --git a/tests/ui/traits/alias/wf.stderr b/tests/ui/traits/alias/wf.stderr index 3be6e8a49d692..d89619542fc5e 100644 --- a/tests/ui/traits/alias/wf.stderr +++ b/tests/ui/traits/alias/wf.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `T` --> $DIR/wf.rs:5:14 | LL | trait B = A; diff --git a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-1.rs b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-1.rs index b1f124c7ea26a..50a6c8cc4afad 100644 --- a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-1.rs +++ b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-1.rs @@ -10,5 +10,5 @@ fn f() { fn main() { f::>(); - //~^ ERROR the trait bound `str: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `str` } diff --git a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-1.stderr b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-1.stderr index e7e55d0beeeb4..86489082392f9 100644 --- a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-1.stderr +++ b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/check-trait-object-bounds-1.rs:12:9 | LL | f::>(); diff --git a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-4.rs b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-4.rs index e9ca1563f3b67..5b12eea35aa81 100644 --- a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-4.rs +++ b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-4.rs @@ -13,5 +13,5 @@ fn f() { fn main() { f::>(); - //~^ ERROR the trait bound `str: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `str` } diff --git a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-4.stderr b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-4.stderr index 5cc38e4371d1c..cfa049b664666 100644 --- a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-4.stderr +++ b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-4.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `str: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `str` --> $DIR/check-trait-object-bounds-4.rs:15:9 | LL | f::>(); diff --git a/tests/ui/traits/bound/on-structs-and-enums-in-fns.stderr b/tests/ui/traits/bound/on-structs-and-enums-in-fns.stderr index 530264b344ab5..8f1e0184dc131 100644 --- a/tests/ui/traits/bound/on-structs-and-enums-in-fns.stderr +++ b/tests/ui/traits/bound/on-structs-and-enums-in-fns.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `u32: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `u32` --> $DIR/on-structs-and-enums-in-fns.rs:13:15 | LL | fn explode(x: Foo) {} @@ -15,7 +15,7 @@ note: required by a bound in `Foo` LL | struct Foo { | ^^^^^ required by this bound in `Foo` -error[E0277]: the trait bound `f32: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `f32` --> $DIR/on-structs-and-enums-in-fns.rs:16:14 | LL | fn kaboom(y: Bar) {} diff --git a/tests/ui/traits/bound/on-structs-and-enums-in-impls.stderr b/tests/ui/traits/bound/on-structs-and-enums-in-impls.stderr index 48c3688a0446c..65a6607a184d0 100644 --- a/tests/ui/traits/bound/on-structs-and-enums-in-impls.stderr +++ b/tests/ui/traits/bound/on-structs-and-enums-in-impls.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `u16: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `u16` --> $DIR/on-structs-and-enums-in-impls.rs:20:6 | LL | impl PolyTrait> for Struct { diff --git a/tests/ui/traits/bound/on-structs-and-enums-locals.stderr b/tests/ui/traits/bound/on-structs-and-enums-locals.stderr index 01cf76c62d540..7e86014e8db09 100644 --- a/tests/ui/traits/bound/on-structs-and-enums-locals.stderr +++ b/tests/ui/traits/bound/on-structs-and-enums-locals.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `usize: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `usize` --> $DIR/on-structs-and-enums-locals.rs:15:14 | LL | let baz: Foo = loop { }; @@ -15,7 +15,7 @@ note: required by a bound in `Foo` LL | struct Foo { | ^^^^^ required by this bound in `Foo` -error[E0277]: the trait bound `{integer}: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `{integer}` --> $DIR/on-structs-and-enums-locals.rs:11:12 | LL | x: 3 diff --git a/tests/ui/traits/bound/on-structs-and-enums-static.stderr b/tests/ui/traits/bound/on-structs-and-enums-static.stderr index 28bbe00c58218..42f0f8cc0fd66 100644 --- a/tests/ui/traits/bound/on-structs-and-enums-static.stderr +++ b/tests/ui/traits/bound/on-structs-and-enums-static.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `usize: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `usize` --> $DIR/on-structs-and-enums-static.rs:9:11 | LL | static X: Foo = Foo { @@ -15,7 +15,7 @@ note: required by a bound in `Foo` LL | struct Foo { | ^^^^^ required by this bound in `Foo` -error[E0277]: the trait bound `usize: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `usize` --> $DIR/on-structs-and-enums-static.rs:11:8 | LL | x: 1, diff --git a/tests/ui/traits/bound/on-structs-and-enums-xc.stderr b/tests/ui/traits/bound/on-structs-and-enums-xc.stderr index 5064b60bfd579..d056852499b32 100644 --- a/tests/ui/traits/bound/on-structs-and-enums-xc.stderr +++ b/tests/ui/traits/bound/on-structs-and-enums-xc.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `usize: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `usize` --> $DIR/on-structs-and-enums-xc.rs:7:15 | LL | fn explode(x: Foo) {} @@ -10,7 +10,7 @@ note: required by a bound in `Foo` LL | pub struct Foo { | ^^^^^ required by this bound in `Foo` -error[E0277]: the trait bound `f32: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `f32` --> $DIR/on-structs-and-enums-xc.rs:10:14 | LL | fn kaboom(y: Bar) {} diff --git a/tests/ui/traits/bound/on-structs-and-enums-xc1.stderr b/tests/ui/traits/bound/on-structs-and-enums-xc1.stderr index 3fb5decb723ea..7758463d46e35 100644 --- a/tests/ui/traits/bound/on-structs-and-enums-xc1.stderr +++ b/tests/ui/traits/bound/on-structs-and-enums-xc1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `f64: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `f64` --> $DIR/on-structs-and-enums-xc1.rs:12:14 | LL | let bar: Bar = return; @@ -10,7 +10,7 @@ note: required by a bound in `Bar` LL | pub enum Bar { | ^^^^^ required by this bound in `Bar` -error[E0277]: the trait bound `{integer}: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `{integer}` --> $DIR/on-structs-and-enums-xc1.rs:9:12 | LL | x: 3 diff --git a/tests/ui/traits/bound/on-structs-and-enums.rs b/tests/ui/traits/bound/on-structs-and-enums.rs index 024084fa724f1..81eb8598c02a4 100644 --- a/tests/ui/traits/bound/on-structs-and-enums.rs +++ b/tests/ui/traits/bound/on-structs-and-enums.rs @@ -11,7 +11,7 @@ enum Bar { } impl Foo { -//~^ ERROR `T: Trait` is not satisfied +//~^ ERROR trait `Trait` is not implemented for `T` fn uhoh() {} } diff --git a/tests/ui/traits/bound/on-structs-and-enums.stderr b/tests/ui/traits/bound/on-structs-and-enums.stderr index 606f764852fed..4c65026aab2b1 100644 --- a/tests/ui/traits/bound/on-structs-and-enums.stderr +++ b/tests/ui/traits/bound/on-structs-and-enums.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `T` --> $DIR/on-structs-and-enums.rs:13:9 | LL | impl Foo { @@ -14,7 +14,7 @@ help: consider restricting type parameter `T` LL | impl Foo { | +++++++ -error[E0277]: the trait bound `isize: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `isize` --> $DIR/on-structs-and-enums.rs:19:8 | LL | a: Foo, @@ -31,7 +31,7 @@ note: required by a bound in `Foo` LL | struct Foo { | ^^^^^ required by this bound in `Foo` -error[E0277]: the trait bound `usize: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `usize` --> $DIR/on-structs-and-enums.rs:23:10 | LL | Quux(Bar), @@ -48,7 +48,7 @@ note: required by a bound in `Bar` LL | enum Bar { | ^^^^^ required by this bound in `Bar` -error[E0277]: the trait bound `U: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `U` --> $DIR/on-structs-and-enums.rs:27:8 | LL | b: Foo, @@ -64,7 +64,7 @@ help: consider restricting type parameter `U` LL | struct Badness { | +++++++ -error[E0277]: the trait bound `V: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `V` --> $DIR/on-structs-and-enums.rs:31:21 | LL | EvenMoreBadness(Bar), @@ -80,7 +80,7 @@ help: consider restricting type parameter `V` LL | enum MoreBadness { | +++++++ -error[E0277]: the trait bound `i32: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `i32` --> $DIR/on-structs-and-enums.rs:35:5 | LL | Foo, @@ -97,7 +97,7 @@ note: required by a bound in `Foo` LL | struct Foo { | ^^^^^ required by this bound in `Foo` -error[E0277]: the trait bound `u8: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `u8` --> $DIR/on-structs-and-enums.rs:39:29 | LL | DictionaryLike { field: Bar }, diff --git a/tests/ui/traits/bound/same-crate-name.stderr b/tests/ui/traits/bound/same-crate-name.stderr index f66cad77fcd1e..6fe191a064d92 100644 --- a/tests/ui/traits/bound/same-crate-name.stderr +++ b/tests/ui/traits/bound/same-crate-name.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Foo: main::a::Bar` is not satisfied +error[E0277]: the trait `main::a::Bar` is not implemented for `Foo` --> $DIR/same-crate-name.rs:31:20 | LL | a::try_foo(foo); @@ -19,7 +19,7 @@ note: required by a bound in `try_foo` LL | pub fn try_foo(x: impl Bar) {} | ^^^ required by this bound in `try_foo` -error[E0277]: the trait bound `DoesNotImplementTrait: main::a::Bar` is not satisfied +error[E0277]: the trait `main::a::Bar` is not implemented for `DoesNotImplementTrait` --> $DIR/same-crate-name.rs:38:20 | LL | a::try_foo(implements_no_traits); @@ -34,7 +34,7 @@ note: required by a bound in `try_foo` LL | pub fn try_foo(x: impl Bar) {} | ^^^ required by this bound in `try_foo` -error[E0277]: the trait bound `ImplementsWrongTraitConditionally: main::a::Bar` is not satisfied +error[E0277]: the trait `main::a::Bar` is not implemented for `ImplementsWrongTraitConditionally` --> $DIR/same-crate-name.rs:45:20 | LL | a::try_foo(other_variant_implements_mismatched_trait); @@ -55,7 +55,7 @@ note: required by a bound in `try_foo` LL | pub fn try_foo(x: impl Bar) {} | ^^^ required by this bound in `try_foo` -error[E0277]: the trait bound `ImplementsTraitForUsize: main::a::Bar` is not satisfied +error[E0277]: the trait `main::a::Bar` is not implemented for `ImplementsTraitForUsize` --> $DIR/same-crate-name.rs:51:20 | LL | a::try_foo(other_variant_implements_correct_trait); diff --git a/tests/ui/traits/coercion-generic-bad.rs b/tests/ui/traits/coercion-generic-bad.rs index 2e115c732b9d7..83e570a4056ae 100644 --- a/tests/ui/traits/coercion-generic-bad.rs +++ b/tests/ui/traits/coercion-generic-bad.rs @@ -14,6 +14,6 @@ impl Trait<&'static str> for Struct { fn main() { let s: Box> = Box::new(Struct { person: "Fred" }); - //~^ ERROR `Struct: Trait` is not satisfied + //~^ ERROR trait `Trait` is not implemented for `Struct` s.f(1); } diff --git a/tests/ui/traits/coercion-generic-bad.stderr b/tests/ui/traits/coercion-generic-bad.stderr index 26136c6f72c8b..57c83d5c27ea8 100644 --- a/tests/ui/traits/coercion-generic-bad.stderr +++ b/tests/ui/traits/coercion-generic-bad.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Struct: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `Struct` --> $DIR/coercion-generic-bad.rs:16:36 | LL | let s: Box> = Box::new(Struct { person: "Fred" }); diff --git a/tests/ui/traits/copy-impl-cannot-normalize.rs b/tests/ui/traits/copy-impl-cannot-normalize.rs index a78ff046e97f9..596052f4a1f83 100644 --- a/tests/ui/traits/copy-impl-cannot-normalize.rs +++ b/tests/ui/traits/copy-impl-cannot-normalize.rs @@ -20,6 +20,6 @@ where } impl Copy for Foo {} -//~^ ERROR the trait bound `T: TraitFoo` is not satisfied +//~^ ERROR trait `TraitFoo` is not implemented for `T` fn main() {} diff --git a/tests/ui/traits/copy-impl-cannot-normalize.stderr b/tests/ui/traits/copy-impl-cannot-normalize.stderr index a98bb47f54fc1..018d2d58d790d 100644 --- a/tests/ui/traits/copy-impl-cannot-normalize.stderr +++ b/tests/ui/traits/copy-impl-cannot-normalize.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: TraitFoo` is not satisfied +error[E0277]: the trait `TraitFoo` is not implemented for `T` --> $DIR/copy-impl-cannot-normalize.rs:22:18 | LL | impl Copy for Foo {} diff --git a/tests/ui/traits/deny-builtin-object-impl.current.stderr b/tests/ui/traits/deny-builtin-object-impl.current.stderr index 0dbf8f0e668e8..f54f06759a042 100644 --- a/tests/ui/traits/deny-builtin-object-impl.current.stderr +++ b/tests/ui/traits/deny-builtin-object-impl.current.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `dyn NotObject: NotObject` is not satisfied +error[E0277]: the trait `NotObject` is not implemented for `dyn NotObject` --> $DIR/deny-builtin-object-impl.rs:18:23 | LL | test_not_object::(); diff --git a/tests/ui/traits/deny-builtin-object-impl.next.stderr b/tests/ui/traits/deny-builtin-object-impl.next.stderr index 0dbf8f0e668e8..f54f06759a042 100644 --- a/tests/ui/traits/deny-builtin-object-impl.next.stderr +++ b/tests/ui/traits/deny-builtin-object-impl.next.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `dyn NotObject: NotObject` is not satisfied +error[E0277]: the trait `NotObject` is not implemented for `dyn NotObject` --> $DIR/deny-builtin-object-impl.rs:18:23 | LL | test_not_object::(); diff --git a/tests/ui/traits/deny-builtin-object-impl.rs b/tests/ui/traits/deny-builtin-object-impl.rs index 8e4e44f6a6712..74a40a7ff0db0 100644 --- a/tests/ui/traits/deny-builtin-object-impl.rs +++ b/tests/ui/traits/deny-builtin-object-impl.rs @@ -16,5 +16,5 @@ fn test_not_object() {} fn main() { test_yes_object::(); test_not_object::(); - //~^ ERROR the trait bound `dyn NotObject: NotObject` is not satisfied + //~^ ERROR trait `NotObject` is not implemented for `dyn NotObject` } diff --git a/tests/ui/traits/dont-autoderef-ty-with-escaping-var.rs b/tests/ui/traits/dont-autoderef-ty-with-escaping-var.rs index d5ba3847ac38c..61075fde8f8e8 100644 --- a/tests/ui/traits/dont-autoderef-ty-with-escaping-var.rs +++ b/tests/ui/traits/dont-autoderef-ty-with-escaping-var.rs @@ -16,7 +16,7 @@ where fn coerce_lifetime2() { >::ref_foo(unknown); //~^ ERROR cannot find value `unknown` in this scope - //~| ERROR the trait bound `for<'a> &'a mut Vec<&'a u32>: Foo<'static, i32>` is not satisfied + //~| ERROR trait `for<'a> Foo<'static, i32>` is not implemented for `&'a mut Vec<&'a u32>` } fn main() {} diff --git a/tests/ui/traits/dont-autoderef-ty-with-escaping-var.stderr b/tests/ui/traits/dont-autoderef-ty-with-escaping-var.stderr index fecb05cade758..c230374b8a166 100644 --- a/tests/ui/traits/dont-autoderef-ty-with-escaping-var.stderr +++ b/tests/ui/traits/dont-autoderef-ty-with-escaping-var.stderr @@ -4,7 +4,7 @@ error[E0425]: cannot find value `unknown` in this scope LL | >::ref_foo(unknown); | ^^^^^^^ not found in this scope -error[E0277]: the trait bound `for<'a> &'a mut Vec<&'a u32>: Foo<'static, i32>` is not satisfied +error[E0277]: the trait `for<'a> Foo<'static, i32>` is not implemented for `&'a mut Vec<&'a u32>` --> $DIR/dont-autoderef-ty-with-escaping-var.rs:17:6 | LL | >::ref_foo(unknown); diff --git a/tests/ui/traits/fn-trait-cast-diagnostic.rs b/tests/ui/traits/fn-trait-cast-diagnostic.rs index e20aa210e58bd..aa10ce652fcc5 100644 --- a/tests/ui/traits/fn-trait-cast-diagnostic.rs +++ b/tests/ui/traits/fn-trait-cast-diagnostic.rs @@ -19,8 +19,8 @@ fn do_on_single_foo(v: impl NoOtherFoo) {} fn main() { do_on_foo(example); - //~^ ERROR the trait bound + //~^ ERROR the trait do_on_single_foo(example); - //~^ ERROR the trait bound + //~^ ERROR the trait } diff --git a/tests/ui/traits/fn-trait-cast-diagnostic.stderr b/tests/ui/traits/fn-trait-cast-diagnostic.stderr index 6851dcdd504d1..499a80b5f5121 100644 --- a/tests/ui/traits/fn-trait-cast-diagnostic.stderr +++ b/tests/ui/traits/fn-trait-cast-diagnostic.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `fn() -> bool {example}: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `fn() -> bool {example}` --> $DIR/fn-trait-cast-diagnostic.rs:21:15 | LL | do_on_foo(example); @@ -20,7 +20,7 @@ help: the trait `Foo` is implemented for fn pointer `fn() -> bool`, try casting LL | do_on_foo(example as fn() -> bool); | +++++++++++++++ -error[E0277]: the trait bound `fn() -> bool {example}: NoOtherFoo` is not satisfied +error[E0277]: the trait `NoOtherFoo` is not implemented for `fn() -> bool {example}` --> $DIR/fn-trait-cast-diagnostic.rs:24:22 | LL | do_on_single_foo(example); diff --git a/tests/ui/traits/impl-bounds-checking.rs b/tests/ui/traits/impl-bounds-checking.rs index 5e65a27bf14f5..5b9ad5d06fee4 100644 --- a/tests/ui/traits/impl-bounds-checking.rs +++ b/tests/ui/traits/impl-bounds-checking.rs @@ -7,7 +7,7 @@ trait Getter { fn get(&self) -> T; } -impl Getter for isize { //~ ERROR `isize: Clone2` is not satisfied +impl Getter for isize { //~ ERROR trait `Clone2` is not implemented for `isize` fn get(&self) -> isize { *self } } diff --git a/tests/ui/traits/impl-bounds-checking.stderr b/tests/ui/traits/impl-bounds-checking.stderr index 61302bfa08882..d922a19824a83 100644 --- a/tests/ui/traits/impl-bounds-checking.stderr +++ b/tests/ui/traits/impl-bounds-checking.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `isize: Clone2` is not satisfied +error[E0277]: the trait `Clone2` is not implemented for `isize` --> $DIR/impl-bounds-checking.rs:10:24 | LL | impl Getter for isize { diff --git a/tests/ui/traits/inductive-overflow/supertrait-auto-trait.stderr b/tests/ui/traits/inductive-overflow/supertrait-auto-trait.stderr index 629ccac49c56a..d52289cb21dde 100644 --- a/tests/ui/traits/inductive-overflow/supertrait-auto-trait.stderr +++ b/tests/ui/traits/inductive-overflow/supertrait-auto-trait.stderr @@ -6,7 +6,7 @@ LL | auto trait Magic: Copy {} | | | auto traits cannot have super traits or lifetime bounds -error[E0277]: the trait bound `NoClone: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `NoClone` --> $DIR/supertrait-auto-trait.rs:16:23 | LL | let (a, b) = copy(NoClone); diff --git a/tests/ui/traits/inheritance/repeated-supertrait-ambig.rs b/tests/ui/traits/inheritance/repeated-supertrait-ambig.rs index 727897d20cb4c..4d193039b1a73 100644 --- a/tests/ui/traits/inheritance/repeated-supertrait-ambig.rs +++ b/tests/ui/traits/inheritance/repeated-supertrait-ambig.rs @@ -23,21 +23,21 @@ impl CompareTo for i64 { impl CompareToInts for i64 { } fn with_obj(c: &dyn CompareToInts) -> bool { - c.same_as(22) //~ ERROR `dyn CompareToInts: CompareTo` is not satisfied + c.same_as(22) //~ ERROR trait `CompareTo` is not implemented for `dyn CompareToInts` } fn with_trait(c: &C) -> bool { - c.same_as(22) //~ ERROR `C: CompareTo` is not satisfied + c.same_as(22) //~ ERROR trait `CompareTo` is not implemented for `C` } fn with_ufcs1(c: &C) -> bool { - ::same_as(c, 22) //~ ERROR `dyn CompareToInts: CompareTo` is not satisfi + ::same_as(c, 22) //~ ERROR trait `CompareTo` is not implemented for `dyn CompareToInts` } fn with_ufcs2(c: &C) -> bool { - CompareTo::same_as(c, 22) //~ ERROR `C: CompareTo` is not satisfied + CompareTo::same_as(c, 22) //~ ERROR trait `CompareTo` is not implemented for `C` } fn main() { - assert_eq!(22_i64.same_as(22), true); //~ ERROR `i64: CompareTo` is not satisfied + assert_eq!(22_i64.same_as(22), true); //~ ERROR trait `CompareTo` is not implemented for `i64` } diff --git a/tests/ui/traits/inheritance/repeated-supertrait-ambig.stderr b/tests/ui/traits/inheritance/repeated-supertrait-ambig.stderr index 7027fa69e033e..77459ad033257 100644 --- a/tests/ui/traits/inheritance/repeated-supertrait-ambig.stderr +++ b/tests/ui/traits/inheritance/repeated-supertrait-ambig.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `dyn CompareToInts: CompareTo` is not satisfied +error[E0277]: the trait `CompareTo` is not implemented for `dyn CompareToInts` --> $DIR/repeated-supertrait-ambig.rs:26:15 | LL | c.same_as(22) @@ -10,7 +10,7 @@ LL | c.same_as(22) > > -error[E0277]: the trait bound `C: CompareTo` is not satisfied +error[E0277]: the trait `CompareTo` is not implemented for `C` --> $DIR/repeated-supertrait-ambig.rs:30:15 | LL | c.same_as(22) @@ -23,7 +23,7 @@ help: consider further restricting this bound LL | fn with_trait>(c: &C) -> bool { | ++++++++++++++++ -error[E0277]: the trait bound `dyn CompareToInts: CompareTo` is not satisfied +error[E0277]: the trait `CompareTo` is not implemented for `dyn CompareToInts` --> $DIR/repeated-supertrait-ambig.rs:34:6 | LL | ::same_as(c, 22) @@ -33,7 +33,7 @@ LL | ::same_as(c, 22) > > -error[E0277]: the trait bound `C: CompareTo` is not satisfied +error[E0277]: the trait `CompareTo` is not implemented for `C` --> $DIR/repeated-supertrait-ambig.rs:38:27 | LL | CompareTo::same_as(c, 22) @@ -46,7 +46,7 @@ help: consider further restricting this bound LL | fn with_ufcs2>(c: &C) -> bool { | ++++++++++++++++ -error[E0277]: the trait bound `i64: CompareTo` is not satisfied +error[E0277]: the trait `CompareTo` is not implemented for `i64` --> $DIR/repeated-supertrait-ambig.rs:42:31 | LL | assert_eq!(22_i64.same_as(22), true); diff --git a/tests/ui/traits/issue-32963.rs b/tests/ui/traits/issue-32963.rs index 56a68f3a2312c..f15efd949ccef 100644 --- a/tests/ui/traits/issue-32963.rs +++ b/tests/ui/traits/issue-32963.rs @@ -7,5 +7,5 @@ fn size_of_copy() -> usize { mem::size_of::() } fn main() { size_of_copy::(); //~^ ERROR only auto traits can be used as additional traits in a trait object - //~| ERROR the trait bound `dyn Misc: Copy` is not satisfied + //~| ERROR trait `Copy` is not implemented for `dyn Misc` } diff --git a/tests/ui/traits/issue-32963.stderr b/tests/ui/traits/issue-32963.stderr index bad45e54d6428..cab50486c293e 100644 --- a/tests/ui/traits/issue-32963.stderr +++ b/tests/ui/traits/issue-32963.stderr @@ -9,7 +9,7 @@ LL | size_of_copy::(); = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Misc + Copy {}` = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit -error[E0277]: the trait bound `dyn Misc: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `dyn Misc` --> $DIR/issue-32963.rs:8:20 | LL | size_of_copy::(); diff --git a/tests/ui/traits/issue-43784-supertrait.rs b/tests/ui/traits/issue-43784-supertrait.rs index 55c26ccd2da4a..784e604e5dbaf 100644 --- a/tests/ui/traits/issue-43784-supertrait.rs +++ b/tests/ui/traits/issue-43784-supertrait.rs @@ -5,6 +5,6 @@ pub trait Complete: Partial { } impl Partial for T where T: Complete {} -impl Complete for T {} //~ ERROR the trait bound `T: Copy` is not satisfied +impl Complete for T {} //~ ERROR trait `Copy` is not implemented for `T` fn main() {} diff --git a/tests/ui/traits/issue-43784-supertrait.stderr b/tests/ui/traits/issue-43784-supertrait.stderr index 4c565c3fa1db5..e7ec8ed7a348f 100644 --- a/tests/ui/traits/issue-43784-supertrait.stderr +++ b/tests/ui/traits/issue-43784-supertrait.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/issue-43784-supertrait.rs:8:22 | LL | impl Complete for T {} diff --git a/tests/ui/traits/issue-71036.rs b/tests/ui/traits/issue-71036.rs index 69eed0c0462fd..f5693bae66bd1 100644 --- a/tests/ui/traits/issue-71036.rs +++ b/tests/ui/traits/issue-71036.rs @@ -9,7 +9,7 @@ struct Foo<'a, T: ?Sized> { } impl<'a, T: ?Sized + Unsize, U: ?Sized> DispatchFromDyn> for Foo<'a, T> {} -//~^ ERROR the trait bound `&'a T: Unsize<&'a U>` is not satisfied +//~^ ERROR trait `Unsize<&'a U>` is not implemented for `&'a T` //~| NOTE the trait `Unsize<&'a U>` is not implemented for `&'a T` //~| NOTE all implementations of `Unsize` are provided automatically by the compiler //~| NOTE required for diff --git a/tests/ui/traits/issue-71036.stderr b/tests/ui/traits/issue-71036.stderr index 35d543eb0177a..94b375cf0a7ed 100644 --- a/tests/ui/traits/issue-71036.stderr +++ b/tests/ui/traits/issue-71036.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&'a T: Unsize<&'a U>` is not satisfied +error[E0277]: the trait `Unsize<&'a U>` is not implemented for `&'a T` --> $DIR/issue-71036.rs:11:1 | LL | impl<'a, T: ?Sized + Unsize, U: ?Sized> DispatchFromDyn> for Foo<'a, T> {} diff --git a/tests/ui/traits/issue-71136.stderr b/tests/ui/traits/issue-71136.stderr index d37ad8ae34d0d..7539815334db7 100644 --- a/tests/ui/traits/issue-71136.stderr +++ b/tests/ui/traits/issue-71136.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Foo: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `Foo` --> $DIR/issue-71136.rs:5:5 | LL | #[derive(Clone)] diff --git a/tests/ui/traits/issue-79458.rs b/tests/ui/traits/issue-79458.rs index a41add6a1ccea..b5a6ecc101e95 100644 --- a/tests/ui/traits/issue-79458.rs +++ b/tests/ui/traits/issue-79458.rs @@ -4,7 +4,7 @@ #[derive(Clone)] struct Foo<'a, T> { bar: &'a mut T - //~^ ERROR the trait bound `&mut T: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `&mut T` } fn main() {} diff --git a/tests/ui/traits/issue-79458.stderr b/tests/ui/traits/issue-79458.stderr index c80efbe928729..679e57a968b4c 100644 --- a/tests/ui/traits/issue-79458.stderr +++ b/tests/ui/traits/issue-79458.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&mut T: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `&mut T` --> $DIR/issue-79458.rs:6:5 | LL | #[derive(Clone)] diff --git a/tests/ui/traits/issue-91594.rs b/tests/ui/traits/issue-91594.rs index 930f7f0c6ad6b..9dfc74ee16791 100644 --- a/tests/ui/traits/issue-91594.rs +++ b/tests/ui/traits/issue-91594.rs @@ -8,7 +8,7 @@ trait HasComponent {} struct Foo; impl HasComponent<>::Interface> for Foo {} -//~^ ERROR the trait bound `Foo: HasComponent<()>` is not satisfied +//~^ ERROR trait `HasComponent<()>` is not implemented for `Foo` impl> Component for Foo { type Interface = u8; diff --git a/tests/ui/traits/issue-91594.stderr b/tests/ui/traits/issue-91594.stderr index 726ee5b61461b..80478b3ff9f40 100644 --- a/tests/ui/traits/issue-91594.stderr +++ b/tests/ui/traits/issue-91594.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Foo: HasComponent<()>` is not satisfied +error[E0277]: the trait `HasComponent<()>` is not implemented for `Foo` --> $DIR/issue-91594.rs:10:19 | LL | impl HasComponent<>::Interface> for Foo {} diff --git a/tests/ui/traits/issue-97576.rs b/tests/ui/traits/issue-97576.rs index fdc85e9fa8956..ec4093b2286c5 100644 --- a/tests/ui/traits/issue-97576.rs +++ b/tests/ui/traits/issue-97576.rs @@ -5,7 +5,7 @@ struct Foo { impl Foo { pub fn new(bar: impl ToString) -> Self { Self { - bar: bar.into(), //~ ERROR the trait bound `String: From` is not satisfied + bar: bar.into(), //~ ERROR trait `From` is not implemented for `String` } } } diff --git a/tests/ui/traits/issue-97576.stderr b/tests/ui/traits/issue-97576.stderr index bee254461f1bd..77d6c5b6578b0 100644 --- a/tests/ui/traits/issue-97576.stderr +++ b/tests/ui/traits/issue-97576.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `String: From` is not satisfied +error[E0277]: the trait `From` is not implemented for `String` --> $DIR/issue-97576.rs:8:22 | LL | bar: bar.into(), diff --git a/tests/ui/traits/issue-99875.rs b/tests/ui/traits/issue-99875.rs index cf73fd8d31fbb..5d6aa053992b9 100644 --- a/tests/ui/traits/issue-99875.rs +++ b/tests/ui/traits/issue-99875.rs @@ -10,7 +10,7 @@ fn takes(_: impl Trait) {} fn main() { takes(function); - //~^ ERROR the trait bound + //~^ ERROR the trait takes(|_: Argument| -> Return { todo!() }); - //~^ ERROR the trait bound + //~^ ERROR the trait } diff --git a/tests/ui/traits/issue-99875.stderr b/tests/ui/traits/issue-99875.stderr index 29e87571561d8..0c3364ae4d45b 100644 --- a/tests/ui/traits/issue-99875.stderr +++ b/tests/ui/traits/issue-99875.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `fn(Argument) -> Return {function}: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `fn(Argument) -> Return {function}` --> $DIR/issue-99875.rs:12:11 | LL | takes(function); @@ -16,7 +16,7 @@ help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return`, LL | takes(function as fn(Argument) -> Return); | +++++++++++++++++++++++++ -error[E0277]: the trait bound `{closure@$DIR/issue-99875.rs:14:11: 14:34}: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `{closure@$DIR/issue-99875.rs:14:11: 14:34}` --> $DIR/issue-99875.rs:14:11 | LL | takes(|_: Argument| -> Return { todo!() }); diff --git a/tests/ui/traits/map-types.rs b/tests/ui/traits/map-types.rs index dc33b961800ea..f539b0aa7a924 100644 --- a/tests/ui/traits/map-types.rs +++ b/tests/ui/traits/map-types.rs @@ -15,5 +15,5 @@ fn main() { let x: Box> = HashMap::new().into(); let x: Box> = x; let y: Box> = Box::new(x); - //~^ ERROR `Box>: Map` is not satisfied + //~^ ERROR trait `Map` is not implemented for `Box>` } diff --git a/tests/ui/traits/map-types.stderr b/tests/ui/traits/map-types.stderr index b19b5d2e1dd32..0fd065c23488b 100644 --- a/tests/ui/traits/map-types.stderr +++ b/tests/ui/traits/map-types.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Box>: Map` is not satisfied +error[E0277]: the trait `Map` is not implemented for `Box>` --> $DIR/map-types.rs:17:41 | LL | let y: Box> = Box::new(x); diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs index 05b167326d4c6..d0b4a4e8602a0 100644 --- a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs +++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.rs @@ -9,7 +9,7 @@ fn produce() -> impl !Trait {} fn consume(_: impl Trait) {} fn main() { - consume(produce()); //~ ERROR the trait bound `impl !Trait: Trait` is not satisfied + consume(produce()); //~ ERROR trait `Trait` is not implemented for `impl !Trait` } fn weird0() -> impl Sized + !Sized {} diff --git a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr index d803e56e8170c..329963f30e8e7 100644 --- a/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr +++ b/tests/ui/traits/negative-bounds/opaque-type-unsatisfied-bound.stderr @@ -16,7 +16,7 @@ error[E0271]: type mismatch resolving `() == impl !Sized` LL | fn weird2() -> impl !Sized {} | ^^^^^^^^^^^ types differ -error[E0277]: the trait bound `impl !Trait: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `impl !Trait` --> $DIR/opaque-type-unsatisfied-bound.rs:12:13 | LL | consume(produce()); diff --git a/tests/ui/traits/negative-bounds/simple.rs b/tests/ui/traits/negative-bounds/simple.rs index a2febf353f6d3..4984fe3947037 100644 --- a/tests/ui/traits/negative-bounds/simple.rs +++ b/tests/ui/traits/negative-bounds/simple.rs @@ -8,12 +8,12 @@ fn neg_param_env() { fn pos_param_env() { not_copy::(); - //~^ ERROR the trait bound `T: !Copy` is not satisfied + //~^ ERROR : !Copy` is not satisfied } fn unknown() { not_copy::(); - //~^ ERROR the trait bound `T: !Copy` is not satisfied + //~^ ERROR : !Copy` is not satisfied } struct NotCopyable; @@ -28,14 +28,14 @@ struct Copyable; fn pos_impl() { not_copy::(); - //~^ ERROR the trait bound `Copyable: !Copy` is not satisfied + //~^ ERROR : !Copy` is not satisfied } struct NotNecessarilyCopyable; fn unknown_impl() { not_copy::(); - //~^ ERROR the trait bound `NotNecessarilyCopyable: !Copy` is not satisfied + //~^ ERROR : !Copy` is not satisfied } fn main() {} diff --git a/tests/ui/traits/next-solver/const-param-placeholder.fail.stderr b/tests/ui/traits/next-solver/const-param-placeholder.fail.stderr index 163710706b04d..9f3e8c47923db 100644 --- a/tests/ui/traits/next-solver/const-param-placeholder.fail.stderr +++ b/tests/ui/traits/next-solver/const-param-placeholder.fail.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `[T; N]: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `[T; N]` --> $DIR/const-param-placeholder.rs:17:17 | LL | needs_foo::<[T; N]>(); diff --git a/tests/ui/traits/next-solver/const-param-placeholder.rs b/tests/ui/traits/next-solver/const-param-placeholder.rs index 3dd5cd1f5dd7c..a9d98203f148b 100644 --- a/tests/ui/traits/next-solver/const-param-placeholder.rs +++ b/tests/ui/traits/next-solver/const-param-placeholder.rs @@ -15,7 +15,7 @@ impl Foo for [T; N] {} fn test() { needs_foo::<[T; N]>(); - //[fail]~^ ERROR the trait bound `[T; N]: Foo` is not satisfied + //[fail]~^ ERROR trait `Foo` is not implemented for `[T; N]` } fn main() {} diff --git a/tests/ui/traits/next-solver/coroutine.fail.stderr b/tests/ui/traits/next-solver/coroutine.fail.stderr index 14e67727d0ba7..4e1cb8e8c0677 100644 --- a/tests/ui/traits/next-solver/coroutine.fail.stderr +++ b/tests/ui/traits/next-solver/coroutine.fail.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `{coroutine@$DIR/coroutine.rs:18:21: 18:23}: Coroutine` is not satisfied +error[E0277]: the trait `Coroutine` is not implemented for `{coroutine@$DIR/coroutine.rs:18:21: 18:23}` --> $DIR/coroutine.rs:18:21 | LL | needs_coroutine(|| { diff --git a/tests/ui/traits/next-solver/coroutine.rs b/tests/ui/traits/next-solver/coroutine.rs index 2b5bf01cefd7d..cc9e44101b56f 100644 --- a/tests/ui/traits/next-solver/coroutine.rs +++ b/tests/ui/traits/next-solver/coroutine.rs @@ -16,7 +16,7 @@ fn needs_coroutine(_: impl Coroutine) {} #[cfg(fail)] fn main() { needs_coroutine(|| { - //[fail]~^ ERROR Coroutine` is not satisfied + //[fail]~^ ERROR the trait `Coroutine` is not implemented //[fail]~| ERROR as Coroutine>::Yield == B` //[fail]~| ERROR as Coroutine>::Return == C` yield (); diff --git a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs index 7eea81ce03c66..d8c6d8be11e30 100644 --- a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs +++ b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs @@ -61,7 +61,7 @@ where // entering the cycle from `A` fails, but would work if we were to use the cache // result of `B`. impls_trait::, _, _, _>(); - //~^ ERROR the trait bound `A: Trait<_, _, _>` is not satisfied + //~^ ERROR trait `Trait<_, _, _>` is not implemented for `A` } fn main() { diff --git a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.stderr b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.stderr index d4932191791fd..b903d4fa37d13 100644 --- a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.stderr +++ b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `A: Trait<_, _, _>` is not satisfied +error[E0277]: the trait `Trait<_, _, _>` is not implemented for `A` --> $DIR/incompleteness-unstable-result.rs:63:19 | LL | impls_trait::, _, _, _>(); diff --git a/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs index b0c778e7f5742..138efbe7452b2 100644 --- a/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs +++ b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.rs @@ -44,5 +44,5 @@ fn impls_trait() {} fn main() { impls_trait::(); - //~^ ERROR the trait bound `MultipleCandidates: Trait` is not satisfied + //~^ ERROR trait `Trait` is not implemented for `MultipleCandidates` } diff --git a/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.stderr b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.stderr index acacaf6a331d9..fd4f1fdeb0feb 100644 --- a/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.stderr +++ b/tests/ui/traits/next-solver/cycles/inductive-cycle-but-err.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `MultipleCandidates: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `MultipleCandidates` --> $DIR/inductive-cycle-but-err.rs:46:19 | LL | impls_trait::(); diff --git a/tests/ui/traits/next-solver/env-shadows-impls/param-candidate-shadows-project.rs b/tests/ui/traits/next-solver/env-shadows-impls/param-candidate-shadows-project.rs index ce7a380f07a6b..c36599b1244e3 100644 --- a/tests/ui/traits/next-solver/env-shadows-impls/param-candidate-shadows-project.rs +++ b/tests/ui/traits/next-solver/env-shadows-impls/param-candidate-shadows-project.rs @@ -25,7 +25,7 @@ fn foo() { // // https://github.com/rust-lang/trait-system-refactor-initiative/issues/76 require_bar::(); - //~^ ERROR the trait bound `T: Bar` is not satisfied + //~^ ERROR trait `Bar` is not implemented for `T` } fn main() {} diff --git a/tests/ui/traits/next-solver/env-shadows-impls/param-candidate-shadows-project.stderr b/tests/ui/traits/next-solver/env-shadows-impls/param-candidate-shadows-project.stderr index 2785357e792de..dfdf9cbcdbf49 100644 --- a/tests/ui/traits/next-solver/env-shadows-impls/param-candidate-shadows-project.stderr +++ b/tests/ui/traits/next-solver/env-shadows-impls/param-candidate-shadows-project.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `T` --> $DIR/param-candidate-shadows-project.rs:27:19 | LL | require_bar::(); diff --git a/tests/ui/traits/next-solver/more-object-bound.rs b/tests/ui/traits/next-solver/more-object-bound.rs index 511111af83f3d..a7b8ef16a7117 100644 --- a/tests/ui/traits/next-solver/more-object-bound.rs +++ b/tests/ui/traits/next-solver/more-object-bound.rs @@ -10,7 +10,7 @@ trait Trait: SuperTrait::B> {} fn transmute(x: A) -> B { foo::>(x) - //~^ ERROR the trait bound `dyn Trait: Trait` is not satisfied + //~^ ERROR trait `Trait` is not implemented for `dyn Trait` } fn foo(x: T::A) -> B diff --git a/tests/ui/traits/next-solver/more-object-bound.stderr b/tests/ui/traits/next-solver/more-object-bound.stderr index 1b776d7198ea4..c37117ef1ee45 100644 --- a/tests/ui/traits/next-solver/more-object-bound.stderr +++ b/tests/ui/traits/next-solver/more-object-bound.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `dyn Trait: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `dyn Trait` --> $DIR/more-object-bound.rs:12:5 | LL | foo::>(x) diff --git a/tests/ui/traits/next-solver/object-unsafety.rs b/tests/ui/traits/next-solver/object-unsafety.rs index 4222607b5bfe4..ec18888b56935 100644 --- a/tests/ui/traits/next-solver/object-unsafety.rs +++ b/tests/ui/traits/next-solver/object-unsafety.rs @@ -11,7 +11,7 @@ fn copy(from: &U::From) -> U::From { pub fn copy_any(t: &T) -> T { copy::>(t) //~^ ERROR the type `& as Setup>::From` is not well-formed - //~| ERROR the trait bound `dyn Setup: Setup` is not satisfied + //~| ERROR trait `Setup` is not implemented for `dyn Setup` //~| ERROR mismatched types //~| ERROR the type ` as Setup>::From` is not well-formed diff --git a/tests/ui/traits/next-solver/object-unsafety.stderr b/tests/ui/traits/next-solver/object-unsafety.stderr index a9cbb721511ca..bfa3779103fee 100644 --- a/tests/ui/traits/next-solver/object-unsafety.stderr +++ b/tests/ui/traits/next-solver/object-unsafety.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `dyn Setup: Setup` is not satisfied +error[E0277]: the trait `Setup` is not implemented for `dyn Setup` --> $DIR/object-unsafety.rs:12:12 | LL | copy::>(t) diff --git a/tests/ui/traits/next-solver/projection-discr-kind.rs b/tests/ui/traits/next-solver/projection-discr-kind.rs index 8d62937e07b51..7edf80096b64c 100644 --- a/tests/ui/traits/next-solver/projection-discr-kind.rs +++ b/tests/ui/traits/next-solver/projection-discr-kind.rs @@ -12,7 +12,7 @@ fn needs_bar(_: impl Bar) {} fn foo(x: T::Assoc) { needs_bar(std::mem::discriminant(&x)); - //~^ ERROR the trait bound `Discriminant<::Assoc>: Bar` is not satisfied + //~^ ERROR trait `Bar` is not implemented for `Discriminant<::Assoc>` } fn main() {} diff --git a/tests/ui/traits/next-solver/projection-discr-kind.stderr b/tests/ui/traits/next-solver/projection-discr-kind.stderr index 69999c755228f..18e9b00b8771c 100644 --- a/tests/ui/traits/next-solver/projection-discr-kind.stderr +++ b/tests/ui/traits/next-solver/projection-discr-kind.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Discriminant<::Assoc>: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `Discriminant<::Assoc>` --> $DIR/projection-discr-kind.rs:14:15 | LL | needs_bar(std::mem::discriminant(&x)); diff --git a/tests/ui/traits/next-solver/stall-num-var-auto-trait.fallback.stderr b/tests/ui/traits/next-solver/stall-num-var-auto-trait.fallback.stderr index 2e3c22c8d384f..5d9f03e2ab108 100644 --- a/tests/ui/traits/next-solver/stall-num-var-auto-trait.fallback.stderr +++ b/tests/ui/traits/next-solver/stall-num-var-auto-trait.fallback.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `i32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `i32` --> $DIR/stall-num-var-auto-trait.rs:18:15 | LL | needs_foo(x); diff --git a/tests/ui/traits/next-solver/stall-num-var-auto-trait.rs b/tests/ui/traits/next-solver/stall-num-var-auto-trait.rs index 4ca523ebc5675..738290193e384 100644 --- a/tests/ui/traits/next-solver/stall-num-var-auto-trait.rs +++ b/tests/ui/traits/next-solver/stall-num-var-auto-trait.rs @@ -16,7 +16,7 @@ fn needs_foo(x: impl Foo) {} fn main() { let mut x = 0; needs_foo(x); - //[fallback]~^ ERROR the trait bound `i32: Foo` is not satisfied + //[fallback]~^ ERROR trait `Foo` is not implemented for `i32` #[cfg(constrain)] { diff --git a/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.fails.stderr b/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.fails.stderr index 4be90c702a035..d8cda631e3459 100644 --- a/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.fails.stderr +++ b/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.fails.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): Trait<1>` is not satisfied +error[E0277]: the trait `Trait<1>` is not implemented for `()` --> $DIR/unevaluated-const-impl-trait-ref.rs:20:13 | LL | needs::<1>(); diff --git a/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs b/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs index 8ed903f892536..c6085e75cb1b3 100644 --- a/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs +++ b/tests/ui/traits/next-solver/unevaluated-const-impl-trait-ref.rs @@ -18,5 +18,5 @@ fn main() { #[cfg(fails)] fn main() { needs::<1>(); - //[fails]~^ ERROR the trait bound `(): Trait<1>` is not satisfied + //[fails]~^ ERROR trait `Trait<1>` is not implemented for `()` } diff --git a/tests/ui/traits/non_lifetime_binders/bad-copy-cond.rs b/tests/ui/traits/non_lifetime_binders/bad-copy-cond.rs index 506cad25f630c..9ba4e89e36de0 100644 --- a/tests/ui/traits/non_lifetime_binders/bad-copy-cond.rs +++ b/tests/ui/traits/non_lifetime_binders/bad-copy-cond.rs @@ -5,5 +5,5 @@ fn foo() where for T: Copy {} fn main() { foo(); - //~^ ERROR the trait bound `T: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `T` } diff --git a/tests/ui/traits/non_lifetime_binders/bad-copy-cond.stderr b/tests/ui/traits/non_lifetime_binders/bad-copy-cond.stderr index 4694e7da500f3..c57c072d81e96 100644 --- a/tests/ui/traits/non_lifetime_binders/bad-copy-cond.stderr +++ b/tests/ui/traits/non_lifetime_binders/bad-copy-cond.stderr @@ -7,7 +7,7 @@ LL | #![feature(non_lifetime_binders)] = note: see issue #108185 for more information = note: `#[warn(incomplete_features)]` on by default -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/bad-copy-cond.rs:7:5 | LL | foo(); diff --git a/tests/ui/traits/non_lifetime_binders/fail.rs b/tests/ui/traits/non_lifetime_binders/fail.rs index 460f68907e889..d59cc7b0270e9 100644 --- a/tests/ui/traits/non_lifetime_binders/fail.rs +++ b/tests/ui/traits/non_lifetime_binders/fail.rs @@ -17,7 +17,7 @@ where fn main() { fail(); - //~^ ERROR the trait bound `T: Trait` is not satisfied + //~^ ERROR trait `Trait` is not implemented for `T` auto_trait(); //~^ ERROR `T` cannot be sent between threads safely } diff --git a/tests/ui/traits/non_lifetime_binders/fail.stderr b/tests/ui/traits/non_lifetime_binders/fail.stderr index 9a324c952931e..e927fbf1d3df3 100644 --- a/tests/ui/traits/non_lifetime_binders/fail.stderr +++ b/tests/ui/traits/non_lifetime_binders/fail.stderr @@ -7,7 +7,7 @@ LL | #![feature(non_lifetime_binders)] = note: see issue #108185 for more information = note: `#[warn(incomplete_features)]` on by default -error[E0277]: the trait bound `T: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `T` --> $DIR/fail.rs:19:5 | LL | fail(); diff --git a/tests/ui/traits/non_lifetime_binders/universe-error1.rs b/tests/ui/traits/non_lifetime_binders/universe-error1.rs index eadee6b711e52..40ec3951c0734 100644 --- a/tests/ui/traits/non_lifetime_binders/universe-error1.rs +++ b/tests/ui/traits/non_lifetime_binders/universe-error1.rs @@ -12,7 +12,7 @@ where fn bar() { foo::<_>(); - //~^ ERROR the trait bound `T: Other<_>` is not satisfied + //~^ ERROR trait `Other<_>` is not implemented for `T` } fn main() {} diff --git a/tests/ui/traits/non_lifetime_binders/universe-error1.stderr b/tests/ui/traits/non_lifetime_binders/universe-error1.stderr index ecc97e283beea..497eedd975842 100644 --- a/tests/ui/traits/non_lifetime_binders/universe-error1.stderr +++ b/tests/ui/traits/non_lifetime_binders/universe-error1.stderr @@ -7,7 +7,7 @@ LL | #![feature(non_lifetime_binders)] = note: see issue #108185 for more information = note: `#[warn(incomplete_features)]` on by default -error[E0277]: the trait bound `T: Other<_>` is not satisfied +error[E0277]: the trait `Other<_>` is not implemented for `T` --> $DIR/universe-error1.rs:14:11 | LL | foo::<_>(); diff --git a/tests/ui/traits/object-does-not-impl-trait.rs b/tests/ui/traits/object-does-not-impl-trait.rs index b3b679813c9b1..f0c4581d1870b 100644 --- a/tests/ui/traits/object-does-not-impl-trait.rs +++ b/tests/ui/traits/object-does-not-impl-trait.rs @@ -4,5 +4,5 @@ trait Foo {} fn take_foo(f: F) {} fn take_object(f: Box) { take_foo(f); } -//~^ ERROR `Box: Foo` is not satisfied +//~^ ERROR trait `Foo` is not implemented for `Box` fn main() {} diff --git a/tests/ui/traits/object-does-not-impl-trait.stderr b/tests/ui/traits/object-does-not-impl-trait.stderr index 1ae055851746d..2740398b7622c 100644 --- a/tests/ui/traits/object-does-not-impl-trait.stderr +++ b/tests/ui/traits/object-does-not-impl-trait.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Box: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `Box` --> $DIR/object-does-not-impl-trait.rs:6:44 | LL | fn take_object(f: Box) { take_foo(f); } diff --git a/tests/ui/traits/reservation-impl/no-use.next.stderr b/tests/ui/traits/reservation-impl/no-use.next.stderr index aa7b51dc5df4e..c67fddfe4da6f 100644 --- a/tests/ui/traits/reservation-impl/no-use.next.stderr +++ b/tests/ui/traits/reservation-impl/no-use.next.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): MyTrait` is not satisfied +error[E0277]: the trait `MyTrait` is not implemented for `()` --> $DIR/no-use.rs:11:6 | LL | <() as MyTrait>::foo(&()); diff --git a/tests/ui/traits/reservation-impl/no-use.old.stderr b/tests/ui/traits/reservation-impl/no-use.old.stderr index aa7b51dc5df4e..c67fddfe4da6f 100644 --- a/tests/ui/traits/reservation-impl/no-use.old.stderr +++ b/tests/ui/traits/reservation-impl/no-use.old.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): MyTrait` is not satisfied +error[E0277]: the trait `MyTrait` is not implemented for `()` --> $DIR/no-use.rs:11:6 | LL | <() as MyTrait>::foo(&()); diff --git a/tests/ui/traits/reservation-impl/no-use.rs b/tests/ui/traits/reservation-impl/no-use.rs index b470a2815c0c7..8f0d124b3094b 100644 --- a/tests/ui/traits/reservation-impl/no-use.rs +++ b/tests/ui/traits/reservation-impl/no-use.rs @@ -9,5 +9,5 @@ impl MyTrait for () { fn foo(&self) {} } fn main() { <() as MyTrait>::foo(&()); - //~^ ERROR the trait bound `(): MyTrait` is not satisfied + //~^ ERROR trait `MyTrait` is not implemented for `()` } diff --git a/tests/ui/traits/suggest-dereferences/issue-39029.fixed b/tests/ui/traits/suggest-dereferences/issue-39029.fixed index 0e37a2f73a17a..069086e37c4df 100644 --- a/tests/ui/traits/suggest-dereferences/issue-39029.fixed +++ b/tests/ui/traits/suggest-dereferences/issue-39029.fixed @@ -14,5 +14,5 @@ fn main() { let _works = TcpListener::bind("some string"); let bad = NoToSocketAddrs("bad".to_owned()); let _errors = TcpListener::bind(&*bad); - //~^ ERROR the trait bound `NoToSocketAddrs: ToSocketAddrs` is not satisfied + //~^ ERROR trait `ToSocketAddrs` is not implemented for `NoToSocketAddrs` } diff --git a/tests/ui/traits/suggest-dereferences/issue-39029.rs b/tests/ui/traits/suggest-dereferences/issue-39029.rs index 71ddad93a9334..a9867cbf400fa 100644 --- a/tests/ui/traits/suggest-dereferences/issue-39029.rs +++ b/tests/ui/traits/suggest-dereferences/issue-39029.rs @@ -14,5 +14,5 @@ fn main() { let _works = TcpListener::bind("some string"); let bad = NoToSocketAddrs("bad".to_owned()); let _errors = TcpListener::bind(&bad); - //~^ ERROR the trait bound `NoToSocketAddrs: ToSocketAddrs` is not satisfied + //~^ ERROR trait `ToSocketAddrs` is not implemented for `NoToSocketAddrs` } diff --git a/tests/ui/traits/suggest-dereferences/issue-39029.stderr b/tests/ui/traits/suggest-dereferences/issue-39029.stderr index 0eea6cbcc5a62..de3790e97d771 100644 --- a/tests/ui/traits/suggest-dereferences/issue-39029.stderr +++ b/tests/ui/traits/suggest-dereferences/issue-39029.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `NoToSocketAddrs: ToSocketAddrs` is not satisfied +error[E0277]: the trait `ToSocketAddrs` is not implemented for `NoToSocketAddrs` --> $DIR/issue-39029.rs:16:38 | LL | let _errors = TcpListener::bind(&bad); diff --git a/tests/ui/traits/suggest-dereferences/issue-62530.fixed b/tests/ui/traits/suggest-dereferences/issue-62530.fixed index 0f011638ead07..2c58f20589a47 100644 --- a/tests/ui/traits/suggest-dereferences/issue-62530.fixed +++ b/tests/ui/traits/suggest-dereferences/issue-62530.fixed @@ -11,5 +11,5 @@ fn main() { let string = String::new(); takes_str(&string); // Ok takes_type_parameter(&*string); // Error - //~^ ERROR the trait bound `&String: SomeTrait` is not satisfied + //~^ ERROR trait `SomeTrait` is not implemented for `&String` } diff --git a/tests/ui/traits/suggest-dereferences/issue-62530.rs b/tests/ui/traits/suggest-dereferences/issue-62530.rs index 4367bd1aecaf6..d825912c788e1 100644 --- a/tests/ui/traits/suggest-dereferences/issue-62530.rs +++ b/tests/ui/traits/suggest-dereferences/issue-62530.rs @@ -11,5 +11,5 @@ fn main() { let string = String::new(); takes_str(&string); // Ok takes_type_parameter(&string); // Error - //~^ ERROR the trait bound `&String: SomeTrait` is not satisfied + //~^ ERROR trait `SomeTrait` is not implemented for `&String` } diff --git a/tests/ui/traits/suggest-dereferences/issue-62530.stderr b/tests/ui/traits/suggest-dereferences/issue-62530.stderr index 22b001c800177..46d0c0c6cf17b 100644 --- a/tests/ui/traits/suggest-dereferences/issue-62530.stderr +++ b/tests/ui/traits/suggest-dereferences/issue-62530.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&String: SomeTrait` is not satisfied +error[E0277]: the trait `SomeTrait` is not implemented for `&String` --> $DIR/issue-62530.rs:13:26 | LL | takes_type_parameter(&string); // Error diff --git a/tests/ui/traits/suggest-dereferences/multiple-0.fixed b/tests/ui/traits/suggest-dereferences/multiple-0.fixed index acc55caabd6e5..3a78e00f8d3fc 100644 --- a/tests/ui/traits/suggest-dereferences/multiple-0.fixed +++ b/tests/ui/traits/suggest-dereferences/multiple-0.fixed @@ -32,5 +32,5 @@ fn foo(_: T) where T: Happy {} fn main() { let baz = Baz(Bar(Foo(LDM))); foo(&***baz); - //~^ ERROR the trait bound `&Baz: Happy` is not satisfied + //~^ ERROR trait `Happy` is not implemented for `&Baz` } diff --git a/tests/ui/traits/suggest-dereferences/multiple-0.rs b/tests/ui/traits/suggest-dereferences/multiple-0.rs index f2ea611456144..e5e00805bb42e 100644 --- a/tests/ui/traits/suggest-dereferences/multiple-0.rs +++ b/tests/ui/traits/suggest-dereferences/multiple-0.rs @@ -32,5 +32,5 @@ fn foo(_: T) where T: Happy {} fn main() { let baz = Baz(Bar(Foo(LDM))); foo(&baz); - //~^ ERROR the trait bound `&Baz: Happy` is not satisfied + //~^ ERROR trait `Happy` is not implemented for `&Baz` } diff --git a/tests/ui/traits/suggest-dereferences/multiple-0.stderr b/tests/ui/traits/suggest-dereferences/multiple-0.stderr index 691b4ddc8e1c5..8fe57eaedff46 100644 --- a/tests/ui/traits/suggest-dereferences/multiple-0.stderr +++ b/tests/ui/traits/suggest-dereferences/multiple-0.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&Baz: Happy` is not satisfied +error[E0277]: the trait `Happy` is not implemented for `&Baz` --> $DIR/multiple-0.rs:34:9 | LL | foo(&baz); diff --git a/tests/ui/traits/suggest-dereferences/multiple-1.rs b/tests/ui/traits/suggest-dereferences/multiple-1.rs index 91c6c7924a408..a28e108b5a7bd 100644 --- a/tests/ui/traits/suggest-dereferences/multiple-1.rs +++ b/tests/ui/traits/suggest-dereferences/multiple-1.rs @@ -50,5 +50,5 @@ fn main() { // generate incorrect help message. let mut baz = Baz(Bar(Foo(LDM))); foo(&mut baz); - //~^ ERROR the trait bound `&mut Baz: Happy` is not satisfied + //~^ ERROR trait `Happy` is not implemented for `&mut Baz` } diff --git a/tests/ui/traits/suggest-dereferences/multiple-1.stderr b/tests/ui/traits/suggest-dereferences/multiple-1.stderr index 2517cc6a02cb0..6c0bec70789a3 100644 --- a/tests/ui/traits/suggest-dereferences/multiple-1.stderr +++ b/tests/ui/traits/suggest-dereferences/multiple-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&mut Baz: Happy` is not satisfied +error[E0277]: the trait `Happy` is not implemented for `&mut Baz` --> $DIR/multiple-1.rs:52:9 | LL | foo(&mut baz); diff --git a/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.fixed b/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.fixed index 03cc6580d5e7b..aff2bb0c0817a 100644 --- a/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.fixed +++ b/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.fixed @@ -10,5 +10,5 @@ impl From for TargetStruct { fn main() { let a = &3; - let _b: TargetStruct = (*a).into(); //~ ERROR the trait bound `TargetStruct: From<&{integer}>` is not satisfied + let _b: TargetStruct = (*a).into(); //~ ERROR trait `From<&{integer}>` is not implemented for `TargetStruct` } diff --git a/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.rs b/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.rs index 9397f46a43456..9d07d705dd132 100644 --- a/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.rs +++ b/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.rs @@ -10,5 +10,5 @@ impl From for TargetStruct { fn main() { let a = &3; - let _b: TargetStruct = a.into(); //~ ERROR the trait bound `TargetStruct: From<&{integer}>` is not satisfied + let _b: TargetStruct = a.into(); //~ ERROR trait `From<&{integer}>` is not implemented for `TargetStruct` } diff --git a/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.stderr b/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.stderr index d1d75625abaaa..e5e307157411a 100644 --- a/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.stderr +++ b/tests/ui/traits/suggest-dereferences/suggest-dereferencing-receiver-argument.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `TargetStruct: From<&{integer}>` is not satisfied +error[E0277]: the trait `From<&{integer}>` is not implemented for `TargetStruct` --> $DIR/suggest-dereferencing-receiver-argument.rs:13:30 | LL | let _b: TargetStruct = a.into(); diff --git a/tests/ui/traits/suggest-where-clause.rs b/tests/ui/traits/suggest-where-clause.rs index 46d047a2de3d5..0dad5b195ba81 100644 --- a/tests/ui/traits/suggest-where-clause.rs +++ b/tests/ui/traits/suggest-where-clause.rs @@ -13,15 +13,15 @@ fn check() { // ... even if T occurs as a type parameter >::from; - //~^ ERROR `u64: From` is not satisfied + //~^ ERROR trait `From` is not implemented for `u64` ::Item>>::from; - //~^ ERROR `u64: From<::Item>` is not satisfied + //~^ ERROR trait `From<::Item>` is not implemented for `u64` // ... but not if there are inference variables as From>::from; - //~^ ERROR `Misc<_>: From` is not satisfied + //~^ ERROR trait `From` is not implemented for `Misc<_>` // ... and also not if the error is not related to the type diff --git a/tests/ui/traits/suggest-where-clause.stderr b/tests/ui/traits/suggest-where-clause.stderr index 08f3a8dc23dd1..444cabfec9033 100644 --- a/tests/ui/traits/suggest-where-clause.stderr +++ b/tests/ui/traits/suggest-where-clause.stderr @@ -37,7 +37,7 @@ LL - fn check() { LL + fn check() { | -error[E0277]: the trait bound `u64: From` is not satisfied +error[E0277]: the trait `From` is not implemented for `u64` --> $DIR/suggest-where-clause.rs:15:6 | LL | >::from; @@ -48,7 +48,7 @@ help: consider introducing a `where` clause, but there might be an alternative b LL | fn check() where u64: From { | ++++++++++++++++++ -error[E0277]: the trait bound `u64: From<::Item>` is not satisfied +error[E0277]: the trait `From<::Item>` is not implemented for `u64` --> $DIR/suggest-where-clause.rs:18:6 | LL | ::Item>>::from; @@ -59,7 +59,7 @@ help: consider introducing a `where` clause, but there might be an alternative b LL | fn check() where u64: From<::Item> { | ++++++++++++++++++++++++++++++++++++++ -error[E0277]: the trait bound `Misc<_>: From` is not satisfied +error[E0277]: the trait `From` is not implemented for `Misc<_>` --> $DIR/suggest-where-clause.rs:23:6 | LL | as From>::from; diff --git a/tests/ui/traits/vtable-res-trait-param.rs b/tests/ui/traits/vtable-res-trait-param.rs index 3d7c2eb084c5b..6d4fdef59f4d1 100644 --- a/tests/ui/traits/vtable-res-trait-param.rs +++ b/tests/ui/traits/vtable-res-trait-param.rs @@ -14,7 +14,7 @@ impl TraitB for isize { fn call_it(b: B) -> isize { let y = 4; - b.gimme_an_a(y) //~ ERROR `{integer}: TraitA` is not satisfied + b.gimme_an_a(y) //~ ERROR trait `TraitA` is not implemented for `{integer}` } fn main() { diff --git a/tests/ui/traits/vtable-res-trait-param.stderr b/tests/ui/traits/vtable-res-trait-param.stderr index fff602b8d2bed..00f8973be10a2 100644 --- a/tests/ui/traits/vtable-res-trait-param.stderr +++ b/tests/ui/traits/vtable-res-trait-param.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `{integer}: TraitA` is not satisfied +error[E0277]: the trait `TraitA` is not implemented for `{integer}` --> $DIR/vtable-res-trait-param.rs:17:18 | LL | b.gimme_an_a(y) diff --git a/tests/ui/trivial-bounds/trivial-bounds-leak.stderr b/tests/ui/trivial-bounds/trivial-bounds-leak.stderr index be472a5076913..288b44f933033 100644 --- a/tests/ui/trivial-bounds/trivial-bounds-leak.stderr +++ b/tests/ui/trivial-bounds/trivial-bounds-leak.stderr @@ -20,7 +20,7 @@ note: `Foo` defines an item `test`, perhaps you need to implement it LL | pub trait Foo { | ^^^^^^^^^^^^^ -error[E0277]: the trait bound `i32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `i32` --> $DIR/trivial-bounds-leak.rs:25:15 | LL | Foo::test(&4i32); @@ -34,7 +34,7 @@ help: this trait has no implementations, consider adding one LL | pub trait Foo { | ^^^^^^^^^^^^^ -error[E0277]: the trait bound `i32: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `i32` --> $DIR/trivial-bounds-leak.rs:26:22 | LL | generic_function(5i32); diff --git a/tests/ui/try-trait/try-operator-on-main.rs b/tests/ui/try-trait/try-operator-on-main.rs index 3b364f7e7d39d..96df79965c484 100644 --- a/tests/ui/try-trait/try-operator-on-main.rs +++ b/tests/ui/try-trait/try-operator-on-main.rs @@ -11,7 +11,7 @@ fn main() { //~^ ERROR the `?` operator can only be used in a function that // an unrelated use of `Try` - try_trait_generic::<()>(); //~ ERROR the trait bound + try_trait_generic::<()>(); //~ ERROR the trait } fn try_trait_generic() -> T { diff --git a/tests/ui/try-trait/try-operator-on-main.stderr b/tests/ui/try-trait/try-operator-on-main.stderr index 7cd38e0cf95ea..a09610f0b3079 100644 --- a/tests/ui/try-trait/try-operator-on-main.stderr +++ b/tests/ui/try-trait/try-operator-on-main.stderr @@ -28,7 +28,7 @@ LL | ()?; | = help: the trait `FromResidual<_>` is not implemented for `()` -error[E0277]: the trait bound `(): Try` is not satisfied +error[E0277]: the trait `Try` is not implemented for `()` --> $DIR/try-operator-on-main.rs:14:25 | LL | try_trait_generic::<()>(); diff --git a/tests/ui/type-alias-impl-trait/bounds-are-checked-2.rs b/tests/ui/type-alias-impl-trait/bounds-are-checked-2.rs index 55b4dc8dc232b..3ada28e3126c5 100644 --- a/tests/ui/type-alias-impl-trait/bounds-are-checked-2.rs +++ b/tests/ui/type-alias-impl-trait/bounds-are-checked-2.rs @@ -7,7 +7,7 @@ type X = impl Clone; fn f(t: T) -> X { t - //~^ ERROR the trait bound `T: Clone` is not satisfied + //~^ ERROR trait `Clone` is not implemented for `T` } fn g(o: Option>) -> Option> { diff --git a/tests/ui/type-alias-impl-trait/bounds-are-checked-2.stderr b/tests/ui/type-alias-impl-trait/bounds-are-checked-2.stderr index 20e478160c61b..2c20e721737c7 100644 --- a/tests/ui/type-alias-impl-trait/bounds-are-checked-2.stderr +++ b/tests/ui/type-alias-impl-trait/bounds-are-checked-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Clone` is not satisfied +error[E0277]: the trait `Clone` is not implemented for `T` --> $DIR/bounds-are-checked-2.rs:9:5 | LL | t diff --git a/tests/ui/type-alias-impl-trait/future.rs b/tests/ui/type-alias-impl-trait/future.rs index 36d1dcd00ad13..1c6ebd5cd1db7 100644 --- a/tests/ui/type-alias-impl-trait/future.rs +++ b/tests/ui/type-alias-impl-trait/future.rs @@ -13,7 +13,7 @@ type FooFuture = impl Future; fn foo(bar: B) -> FooFuture { async move { bar.bar() } - //~^ ERROR: the trait bound `B: Bar` is not satisfied + //~^ ERROR trait `Bar` is not implemented for `B` } pub fn mainish(ctx: &mut std::task::Context) { diff --git a/tests/ui/type-alias-impl-trait/future.stderr b/tests/ui/type-alias-impl-trait/future.stderr index b20073fcdfcde..8e96182558720 100644 --- a/tests/ui/type-alias-impl-trait/future.stderr +++ b/tests/ui/type-alias-impl-trait/future.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `B: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `B` --> $DIR/future.rs:15:5 | LL | async move { bar.bar() } diff --git a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use9.rs b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use9.rs index 6afcdfe4d1c3d..2d1a1dac27f14 100644 --- a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use9.rs +++ b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use9.rs @@ -13,7 +13,7 @@ trait Foo { fn two(t: T, u: U) -> Two { (t, u, T::BAR) - //~^ ERROR the trait bound `A: Foo` is not satisfied + //~^ ERROR trait `Foo` is not implemented for `A` //~| ERROR `A` doesn't implement `Debug` //~| ERROR `B` doesn't implement `Debug` } diff --git a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use9.stderr b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use9.stderr index 722693e42669c..cc3612c762f44 100644 --- a/tests/ui/type-alias-impl-trait/generic_duplicate_param_use9.stderr +++ b/tests/ui/type-alias-impl-trait/generic_duplicate_param_use9.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `A: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `A` --> $DIR/generic_duplicate_param_use9.rs:15:5 | LL | (t, u, T::BAR) diff --git a/tests/ui/type-alias-impl-trait/generic_underconstrained.rs b/tests/ui/type-alias-impl-trait/generic_underconstrained.rs index 1acacc778de6c..50d9658b46104 100644 --- a/tests/ui/type-alias-impl-trait/generic_underconstrained.rs +++ b/tests/ui/type-alias-impl-trait/generic_underconstrained.rs @@ -7,7 +7,7 @@ type Underconstrained = impl Send; // no `Trait` bound fn underconstrain(_: T) -> Underconstrained { - //~^ ERROR the trait bound `T: Trait` - //~| ERROR the trait bound `T: Trait` + //~^ ERROR trait `Trait` is not implemented for `T` + //~| ERROR trait `Trait` is not implemented for `T` unimplemented!() } diff --git a/tests/ui/type-alias-impl-trait/generic_underconstrained.stderr b/tests/ui/type-alias-impl-trait/generic_underconstrained.stderr index be9b07823ae0a..1f654c42d1d60 100644 --- a/tests/ui/type-alias-impl-trait/generic_underconstrained.stderr +++ b/tests/ui/type-alias-impl-trait/generic_underconstrained.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `T` --> $DIR/generic_underconstrained.rs:9:51 | LL | fn underconstrain(_: T) -> Underconstrained { @@ -19,7 +19,7 @@ help: consider restricting type parameter `T` LL | fn underconstrain(_: T) -> Underconstrained { | +++++++ -error[E0277]: the trait bound `T: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `T` --> $DIR/generic_underconstrained.rs:9:31 | LL | fn underconstrain(_: T) -> Underconstrained { diff --git a/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound.rs b/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound.rs index 8ec20acef4de6..e2984cc29994c 100644 --- a/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound.rs +++ b/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound.rs @@ -7,7 +7,7 @@ pub trait Yay { } impl Yay for Foo { } fn foo() { - is_yay::(); //~ ERROR: the trait bound `u32: Yay` is not satisfied + is_yay::(); //~ ERROR trait `Yay` is not implemented for `u32` is_debug::(); // OK is_yay::(); // OK is_debug::(); // OK diff --git a/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound.stderr b/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound.stderr index 9840bcef7d14b..79ad0470ec284 100644 --- a/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound.stderr +++ b/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `u32: Yay` is not satisfied +error[E0277]: the trait `Yay` is not implemented for `u32` --> $DIR/impl_trait_for_tait_bound.rs:10:14 | LL | is_yay::(); diff --git a/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound2.rs b/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound2.rs index a4b8c2d190db9..3064dcaf65cb1 100644 --- a/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound2.rs +++ b/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound2.rs @@ -8,7 +8,7 @@ pub trait Yay { } impl Yay for u32 { } fn foo() { - is_yay::(); //~ ERROR: the trait bound `Foo: Yay` is not satisfied + is_yay::(); //~ ERROR trait `Yay` is not implemented for `Foo` } fn is_yay() { } diff --git a/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound2.stderr b/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound2.stderr index 2259aa7bb1508..79925d46b3256 100644 --- a/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound2.stderr +++ b/tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Foo: Yay` is not satisfied +error[E0277]: the trait `Yay` is not implemented for `Foo` --> $DIR/impl_trait_for_tait_bound2.rs:11:14 | LL | is_yay::(); diff --git a/tests/ui/type-alias-impl-trait/issue-52843.rs b/tests/ui/type-alias-impl-trait/issue-52843.rs index 159d3ccd27e01..657c74ccb1891 100644 --- a/tests/ui/type-alias-impl-trait/issue-52843.rs +++ b/tests/ui/type-alias-impl-trait/issue-52843.rs @@ -5,7 +5,7 @@ type Foo = impl Default; #[allow(unused)] fn foo(t: T) -> Foo { t - //~^ ERROR: the trait bound `T: Default` is not satisfied + //~^ ERROR trait `Default` is not implemented for `T` } struct NotDefault; diff --git a/tests/ui/type-alias-impl-trait/issue-52843.stderr b/tests/ui/type-alias-impl-trait/issue-52843.stderr index ea4c5297ad5e3..bdb856791bb35 100644 --- a/tests/ui/type-alias-impl-trait/issue-52843.stderr +++ b/tests/ui/type-alias-impl-trait/issue-52843.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Default` is not satisfied +error[E0277]: the trait `Default` is not implemented for `T` --> $DIR/issue-52843.rs:7:5 | LL | t diff --git a/tests/ui/type-alias-impl-trait/issue-53092-2.rs b/tests/ui/type-alias-impl-trait/issue-53092-2.rs index 057930f0c1ce7..125498c6f8bf6 100644 --- a/tests/ui/type-alias-impl-trait/issue-53092-2.rs +++ b/tests/ui/type-alias-impl-trait/issue-53092-2.rs @@ -6,7 +6,7 @@ type Bug = impl Fn(T) -> U + Copy; //~ ERROR cycle detected const CONST_BUG: Bug = unsafe { std::mem::transmute(|_: u8| ()) }; fn make_bug>() -> Bug { - |x| x.into() //~ ERROR the trait bound `U: From` is not satisfied + |x| x.into() //~ ERROR trait `From` is not implemented for `U` } fn main() { diff --git a/tests/ui/type-alias-impl-trait/issue-53092-2.stderr b/tests/ui/type-alias-impl-trait/issue-53092-2.stderr index e805a71ea6f30..d2ec2b79983c3 100644 --- a/tests/ui/type-alias-impl-trait/issue-53092-2.stderr +++ b/tests/ui/type-alias-impl-trait/issue-53092-2.stderr @@ -24,7 +24,7 @@ LL | type Bug = impl Fn(T) -> U + Copy; | ^^^^^^^^^^^^^^^^^^^^^^ = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information -error[E0277]: the trait bound `U: From` is not satisfied +error[E0277]: the trait `From` is not implemented for `U` --> $DIR/issue-53092-2.rs:9:5 | LL | |x| x.into() diff --git a/tests/ui/type-alias-impl-trait/issue-53092.rs b/tests/ui/type-alias-impl-trait/issue-53092.rs index 1be5b46d6df68..97a75b2b1c9e2 100644 --- a/tests/ui/type-alias-impl-trait/issue-53092.rs +++ b/tests/ui/type-alias-impl-trait/issue-53092.rs @@ -11,7 +11,7 @@ union Moo { const CONST_BUG: Bug = unsafe { Moo { y: () }.x }; fn make_bug>() -> Bug { - |x| x.into() //~ ERROR the trait bound `U: From` is not satisfied + |x| x.into() //~ ERROR trait `From` is not implemented for `U` } fn main() { diff --git a/tests/ui/type-alias-impl-trait/issue-53092.stderr b/tests/ui/type-alias-impl-trait/issue-53092.stderr index 8605a0981933c..c5fdcef416615 100644 --- a/tests/ui/type-alias-impl-trait/issue-53092.stderr +++ b/tests/ui/type-alias-impl-trait/issue-53092.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `U: From` is not satisfied +error[E0277]: the trait `From` is not implemented for `U` --> $DIR/issue-53092.rs:14:5 | LL | |x| x.into() diff --git a/tests/ui/type-alias-impl-trait/issue-60371.rs b/tests/ui/type-alias-impl-trait/issue-60371.rs index a6173967333c0..27b72e52658a4 100644 --- a/tests/ui/type-alias-impl-trait/issue-60371.rs +++ b/tests/ui/type-alias-impl-trait/issue-60371.rs @@ -8,7 +8,7 @@ impl Bug for &() { type Item = impl Bug; //~ ERROR `impl Trait` in associated types is unstable const FUN: fn() -> Self::Item = || (); - //~^ ERROR the trait bound `(): Bug` is not satisfied + //~^ ERROR trait `Bug` is not implemented for `()` } fn main() {} diff --git a/tests/ui/type-alias-impl-trait/issue-60371.stderr b/tests/ui/type-alias-impl-trait/issue-60371.stderr index 1c83b0655f5ee..8a0fb03b3f875 100644 --- a/tests/ui/type-alias-impl-trait/issue-60371.stderr +++ b/tests/ui/type-alias-impl-trait/issue-60371.stderr @@ -8,7 +8,7 @@ LL | type Item = impl Bug; = help: add `#![feature(impl_trait_in_assoc_type)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0277]: the trait bound `(): Bug` is not satisfied +error[E0277]: the trait `Bug` is not implemented for `()` --> $DIR/issue-60371.rs:10:40 | LL | const FUN: fn() -> Self::Item = || (); diff --git a/tests/ui/type-alias-impl-trait/issue-89686.rs b/tests/ui/type-alias-impl-trait/issue-89686.rs index f734c518dd21e..b106422e18a87 100644 --- a/tests/ui/type-alias-impl-trait/issue-89686.rs +++ b/tests/ui/type-alias-impl-trait/issue-89686.rs @@ -16,7 +16,7 @@ trait Trait { Self: Sized, { async move { self.f().await } - //~^ ERROR: the trait bound `T: Trait` is not satisfied + //~^ ERROR trait `Trait` is not implemented for `T` } } diff --git a/tests/ui/type-alias-impl-trait/issue-89686.stderr b/tests/ui/type-alias-impl-trait/issue-89686.stderr index 91d71339a0848..340c642f2025b 100644 --- a/tests/ui/type-alias-impl-trait/issue-89686.stderr +++ b/tests/ui/type-alias-impl-trait/issue-89686.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `T` --> $DIR/issue-89686.rs:18:9 | LL | async move { self.f().await } diff --git a/tests/ui/type-alias-impl-trait/issue-90400-1.rs b/tests/ui/type-alias-impl-trait/issue-90400-1.rs index 50207605748c8..2122bf8304e3c 100644 --- a/tests/ui/type-alias-impl-trait/issue-90400-1.rs +++ b/tests/ui/type-alias-impl-trait/issue-90400-1.rs @@ -19,7 +19,7 @@ impl Foo for MyFoo { type FooFn = impl FnOnce(); fn foo(&self, bar: B) -> Self::FooFn { - move || bar.bar() //~ ERROR: the trait bound `B: Bar` is not satisfied + move || bar.bar() //~ ERROR trait `Bar` is not implemented for `B` } } diff --git a/tests/ui/type-alias-impl-trait/issue-90400-1.stderr b/tests/ui/type-alias-impl-trait/issue-90400-1.stderr index bc233a5321437..df89160a34189 100644 --- a/tests/ui/type-alias-impl-trait/issue-90400-1.stderr +++ b/tests/ui/type-alias-impl-trait/issue-90400-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `B: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `B` --> $DIR/issue-90400-1.rs:22:9 | LL | move || bar.bar() diff --git a/tests/ui/type-alias-impl-trait/issue-90400-2.rs b/tests/ui/type-alias-impl-trait/issue-90400-2.rs index 60ff962ea2e30..1a360cf671242 100644 --- a/tests/ui/type-alias-impl-trait/issue-90400-2.rs +++ b/tests/ui/type-alias-impl-trait/issue-90400-2.rs @@ -22,7 +22,7 @@ impl Foo for MyFoo { type FooFn = impl Baz; fn foo(&self, bar: B) -> Self::FooFn { - MyBaz(bar) //~ ERROR: the trait bound `B: Bar` is not satisfied + MyBaz(bar) //~ ERROR trait `Bar` is not implemented for `B` } } diff --git a/tests/ui/type-alias-impl-trait/issue-90400-2.stderr b/tests/ui/type-alias-impl-trait/issue-90400-2.stderr index 5e978e97d6b50..af0cfe9edd0c2 100644 --- a/tests/ui/type-alias-impl-trait/issue-90400-2.stderr +++ b/tests/ui/type-alias-impl-trait/issue-90400-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `B: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `B` --> $DIR/issue-90400-2.rs:25:9 | LL | MyBaz(bar) diff --git a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.rs b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.rs index da845e86147b7..b794992d02675 100644 --- a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.rs +++ b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.rs @@ -7,7 +7,7 @@ type X = impl Into<&'static A>; fn f(a: &'static A, b: B) -> (X, X) { - //~^ ERROR the trait bound `&'static B: From<&A>` is not satisfied + //~^ ERROR trait `From<&A>` is not implemented for `&'static B` (a, a) } diff --git a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr index a7840e0a5bf24..efa4b97d936ff 100644 --- a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr +++ b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `&'static B: From<&A>` is not satisfied +error[E0277]: the trait `From<&A>` is not implemented for `&'static B` --> $DIR/multiple-def-uses-in-one-fn.rs:9:45 | LL | fn f(a: &'static A, b: B) -> (X, X) { diff --git a/tests/ui/type-alias-impl-trait/nested-tait-inference.rs b/tests/ui/type-alias-impl-trait/nested-tait-inference.rs index 82248971692ce..7794200fbe827 100644 --- a/tests/ui/type-alias-impl-trait/nested-tait-inference.rs +++ b/tests/ui/type-alias-impl-trait/nested-tait-inference.rs @@ -10,7 +10,7 @@ trait Foo { } impl Foo<()> for () { } fn foo() -> impl Foo { - //~^ ERROR: the trait bound `(): Foo` is not satisfied + //~^ ERROR trait `Foo` is not implemented for `()` // FIXME(type-alias-impl-trait): We could probably make this work. () } diff --git a/tests/ui/type-alias-impl-trait/nested-tait-inference.stderr b/tests/ui/type-alias-impl-trait/nested-tait-inference.stderr index 172ecded7a2f9..3ddcf8f9bc778 100644 --- a/tests/ui/type-alias-impl-trait/nested-tait-inference.stderr +++ b/tests/ui/type-alias-impl-trait/nested-tait-inference.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `()` --> $DIR/nested-tait-inference.rs:12:13 | LL | fn foo() -> impl Foo { diff --git a/tests/ui/type-alias-impl-trait/nested-tait-inference2.rs b/tests/ui/type-alias-impl-trait/nested-tait-inference2.rs index 0d7f5bad25f11..ca725ca17e244 100644 --- a/tests/ui/type-alias-impl-trait/nested-tait-inference2.rs +++ b/tests/ui/type-alias-impl-trait/nested-tait-inference2.rs @@ -11,7 +11,7 @@ impl Foo<()> for () {} impl Foo for () {} fn foo() -> impl Foo { - //~^ ERROR: the trait bound `(): Foo` is not satisfied + //~^ ERROR trait `Foo` is not implemented for `()` () } diff --git a/tests/ui/type-alias-impl-trait/nested-tait-inference2.stderr b/tests/ui/type-alias-impl-trait/nested-tait-inference2.stderr index c549ca5b2ce11..6901ca9dfd77e 100644 --- a/tests/ui/type-alias-impl-trait/nested-tait-inference2.stderr +++ b/tests/ui/type-alias-impl-trait/nested-tait-inference2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `()` --> $DIR/nested-tait-inference2.rs:13:13 | LL | fn foo() -> impl Foo { diff --git a/tests/ui/type-alias-impl-trait/not_a_defining_use.rs b/tests/ui/type-alias-impl-trait/not_a_defining_use.rs index fa47d13f5164c..6135ed7b89620 100644 --- a/tests/ui/type-alias-impl-trait/not_a_defining_use.rs +++ b/tests/ui/type-alias-impl-trait/not_a_defining_use.rs @@ -23,7 +23,7 @@ impl Bar for u32 { fn four(t: T) -> Two { (t, ::FOO) - //~^ ERROR `U: Bar` is not satisfied + //~^ ERROR trait `Bar` is not implemented for `U` //~| ERROR `T` doesn't implement `Debug` } diff --git a/tests/ui/type-alias-impl-trait/not_a_defining_use.stderr b/tests/ui/type-alias-impl-trait/not_a_defining_use.stderr index b11198c584c0d..3a592b9f3ff27 100644 --- a/tests/ui/type-alias-impl-trait/not_a_defining_use.stderr +++ b/tests/ui/type-alias-impl-trait/not_a_defining_use.stderr @@ -10,7 +10,7 @@ help: consider restricting type parameter `T` LL | type Two = impl Debug; | +++++++++++++++++ -error[E0277]: the trait bound `U: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `U` --> $DIR/not_a_defining_use.rs:25:5 | LL | (t, ::FOO) diff --git a/tests/ui/type-alias-impl-trait/underconstrained_generic.rs b/tests/ui/type-alias-impl-trait/underconstrained_generic.rs index aa537dfc9176c..c76ea316ff2bb 100644 --- a/tests/ui/type-alias-impl-trait/underconstrained_generic.rs +++ b/tests/ui/type-alias-impl-trait/underconstrained_generic.rs @@ -20,7 +20,7 @@ type Converter = impl ProofForConversion; fn _defining_use() -> Converter { () - //~^ ERROR the trait bound `T: Trait` is not satisfied + //~^ ERROR trait `Trait` is not implemented for `T` } diff --git a/tests/ui/type-alias-impl-trait/underconstrained_generic.stderr b/tests/ui/type-alias-impl-trait/underconstrained_generic.stderr index 913a35eb9fb0e..14d3af5cb9db2 100644 --- a/tests/ui/type-alias-impl-trait/underconstrained_generic.stderr +++ b/tests/ui/type-alias-impl-trait/underconstrained_generic.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `T` --> $DIR/underconstrained_generic.rs:22:5 | LL | () diff --git a/tests/ui/type-alias-impl-trait/wf-check-fn-def.rs b/tests/ui/type-alias-impl-trait/wf-check-fn-def.rs index 449e9fbd0d847..9219bbdebce27 100644 --- a/tests/ui/type-alias-impl-trait/wf-check-fn-def.rs +++ b/tests/ui/type-alias-impl-trait/wf-check-fn-def.rs @@ -9,7 +9,7 @@ type FooFn = impl FnOnce(B); fn foo() -> FooFn { fn mop(bar: B) { bar.bar() } mop // NOTE: no function pointer, but function zst item - //~^ ERROR the trait bound `B: Bar` is not satisfied + //~^ ERROR trait `Bar` is not implemented for `B` } fn main() { diff --git a/tests/ui/type-alias-impl-trait/wf-check-fn-def.stderr b/tests/ui/type-alias-impl-trait/wf-check-fn-def.stderr index 47bea7bbe608c..a7837092d45a2 100644 --- a/tests/ui/type-alias-impl-trait/wf-check-fn-def.stderr +++ b/tests/ui/type-alias-impl-trait/wf-check-fn-def.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `B: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `B` --> $DIR/wf-check-fn-def.rs:11:5 | LL | mop // NOTE: no function pointer, but function zst item diff --git a/tests/ui/type-alias-impl-trait/wf_check_closures.rs b/tests/ui/type-alias-impl-trait/wf_check_closures.rs index 2c70696ffcf48..9968d6f912ff6 100644 --- a/tests/ui/type-alias-impl-trait/wf_check_closures.rs +++ b/tests/ui/type-alias-impl-trait/wf_check_closures.rs @@ -8,7 +8,7 @@ type FooFn = impl FnOnce(); fn foo(bar: B) -> FooFn { move || { bar.bar() } - //~^ ERROR the trait bound `B: Bar` is not satisfied + //~^ ERROR trait `Bar` is not implemented for `B` } fn main() { diff --git a/tests/ui/type-alias-impl-trait/wf_check_closures.stderr b/tests/ui/type-alias-impl-trait/wf_check_closures.stderr index 09a42f73490a0..9e21a9d411ae0 100644 --- a/tests/ui/type-alias-impl-trait/wf_check_closures.stderr +++ b/tests/ui/type-alias-impl-trait/wf_check_closures.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `B: Bar` is not satisfied +error[E0277]: the trait `Bar` is not implemented for `B` --> $DIR/wf_check_closures.rs:10:5 | LL | move || { bar.bar() } diff --git a/tests/ui/type/type-check-defaults.rs b/tests/ui/type/type-check-defaults.rs index 6a0a7ed338abb..5074f8b4b8b9c 100644 --- a/tests/ui/type/type-check-defaults.rs +++ b/tests/ui/type/type-check-defaults.rs @@ -9,17 +9,17 @@ struct WellFormedNoBounds>(Z); //~^ ERROR a value of type `i32` cannot be built from an iterator over elements of type `i32` struct Bounds(T); -//~^ ERROR the trait bound `String: Copy` is not satisfied [E0277] +//~^ ERROR trait `Copy` is not implemented for `String` struct WhereClause(T) where T: Copy; -//~^ ERROR the trait bound `String: Copy` is not satisfied [E0277] +//~^ ERROR trait `Copy` is not implemented for `String` trait TraitBound {} -//~^ ERROR the trait bound `String: Copy` is not satisfied [E0277] +//~^ ERROR trait `Copy` is not implemented for `String` trait Super { } trait Base: Super { } -//~^ ERROR the trait bound `T: Copy` is not satisfied [E0277] +//~^ ERROR trait `Copy` is not implemented for `T` trait ProjectionPred> where T::Item : Add {} //~^ ERROR cannot add `u8` to `i32` [E0277] diff --git a/tests/ui/type/type-check-defaults.stderr b/tests/ui/type/type-check-defaults.stderr index 10d600cbfccce..e04f26e2124db 100644 --- a/tests/ui/type/type-check-defaults.stderr +++ b/tests/ui/type/type-check-defaults.stderr @@ -24,25 +24,25 @@ note: required by a bound in `Foo` LL | struct Foo>(T, U); | ^^^^^^^^^^^^^^^ required by this bound in `Foo` -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/type-check-defaults.rs:11:17 | LL | struct Bounds(T); | ^^^^ the trait `Copy` is not implemented for `String` -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/type-check-defaults.rs:14:42 | LL | struct WhereClause(T) where T: Copy; | ^^^^ the trait `Copy` is not implemented for `String` -error[E0277]: the trait bound `String: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `String` --> $DIR/type-check-defaults.rs:17:20 | LL | trait TraitBound {} | ^^^^ the trait `Copy` is not implemented for `String` -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/type-check-defaults.rs:21:25 | LL | trait Base: Super { } diff --git a/tests/ui/type/type-params-in-different-spaces-2.stderr b/tests/ui/type/type-params-in-different-spaces-2.stderr index 220b3929c8857..5c1a1a6f8d56d 100644 --- a/tests/ui/type/type-params-in-different-spaces-2.stderr +++ b/tests/ui/type/type-params-in-different-spaces-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Self: Tr` is not satisfied +error[E0277]: the trait `Tr` is not implemented for `Self` --> $DIR/type-params-in-different-spaces-2.rs:10:16 | LL | Tr::op(u) @@ -11,7 +11,7 @@ help: consider further restricting `Self` LL | fn test(u: U) -> Self where Self: Tr { | +++++++++++++++++ -error[E0277]: the trait bound `Self: Tr` is not satisfied +error[E0277]: the trait `Tr` is not implemented for `Self` --> $DIR/type-params-in-different-spaces-2.rs:16:16 | LL | Tr::op(u) diff --git a/tests/ui/typeck/bad-index-due-to-nested.rs b/tests/ui/typeck/bad-index-due-to-nested.rs index 2564b530004e5..06e0e4b52189e 100644 --- a/tests/ui/typeck/bad-index-due-to-nested.rs +++ b/tests/ui/typeck/bad-index-due-to-nested.rs @@ -18,8 +18,8 @@ where fn index<'a, K, V>(map: &'a HashMap, k: K) -> &'a V { map[k] - //~^ ERROR the trait bound `K: Hash` is not satisfied - //~| ERROR the trait bound `V: Copy` is not satisfied + //~^ ERROR trait `Hash` is not implemented for `K` + //~| ERROR trait `Copy` is not implemented for `V` //~| ERROR mismatched types //~| ERROR mismatched types } diff --git a/tests/ui/typeck/bad-index-due-to-nested.stderr b/tests/ui/typeck/bad-index-due-to-nested.stderr index 137c7b0639667..edbdab7fbd808 100644 --- a/tests/ui/typeck/bad-index-due-to-nested.stderr +++ b/tests/ui/typeck/bad-index-due-to-nested.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `K: Hash` is not satisfied +error[E0277]: the trait `Hash` is not implemented for `K` --> $DIR/bad-index-due-to-nested.rs:20:5 | LL | map[k] @@ -17,7 +17,7 @@ help: consider restricting type parameter `K` LL | fn index<'a, K: std::hash::Hash, V>(map: &'a HashMap, k: K) -> &'a V { | +++++++++++++++++ -error[E0277]: the trait bound `V: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `V` --> $DIR/bad-index-due-to-nested.rs:20:5 | LL | map[k] diff --git a/tests/ui/typeck/escaping_bound_vars.rs b/tests/ui/typeck/escaping_bound_vars.rs index f886388bfbd7d..e6a79252df35a 100644 --- a/tests/ui/typeck/escaping_bound_vars.rs +++ b/tests/ui/typeck/escaping_bound_vars.rs @@ -11,8 +11,8 @@ where (): Test<{ 1 + (<() as Elide(&())>::call) }>, //~^ ERROR cannot capture late-bound lifetime in constant //~| ERROR associated type bindings are not allowed here - //~| ERROR the trait bound `(): Elide<(&(),)>` is not satisfied - //~| ERROR the trait bound `(): Elide<(&(),)>` is not satisfied + //~| ERROR trait `Elide<(&(),)>` is not implemented for `()` + //~| ERROR trait `Elide<(&(),)>` is not implemented for `()` //~| ERROR cannot add { } diff --git a/tests/ui/typeck/escaping_bound_vars.stderr b/tests/ui/typeck/escaping_bound_vars.stderr index 8c7dcdb7f1618..18900e7f30d31 100644 --- a/tests/ui/typeck/escaping_bound_vars.stderr +++ b/tests/ui/typeck/escaping_bound_vars.stderr @@ -12,7 +12,7 @@ error[E0229]: associated type bindings are not allowed here LL | (): Test<{ 1 + (<() as Elide(&())>::call) }>, | ^^^^^^^^^^ associated type not allowed here -error[E0277]: the trait bound `(): Elide<(&(),)>` is not satisfied +error[E0277]: the trait `Elide<(&(),)>` is not implemented for `()` --> $DIR/escaping_bound_vars.rs:11:22 | LL | (): Test<{ 1 + (<() as Elide(&())>::call) }>, @@ -42,7 +42,7 @@ LL | (): Test<{ 1 + (<() as Elide(&())>::call) }>, > and 48 others -error[E0277]: the trait bound `(): Elide<(&(),)>` is not satisfied +error[E0277]: the trait `Elide<(&(),)>` is not implemented for `()` --> $DIR/escaping_bound_vars.rs:11:18 | LL | (): Test<{ 1 + (<() as Elide(&())>::call) }>, diff --git a/tests/ui/typeck/issue-90101.stderr b/tests/ui/typeck/issue-90101.stderr index d5ba157974d93..6de48b708fd2c 100644 --- a/tests/ui/typeck/issue-90101.stderr +++ b/tests/ui/typeck/issue-90101.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `PathBuf: From>` is not satisfied +error[E0277]: the trait `From>` is not implemented for `PathBuf` --> $DIR/issue-90101.rs:6:10 | LL | func(Path::new("hello").to_path_buf().to_string_lossy(), "world") diff --git a/tests/ui/typeck/issue-90804-incorrect-reference-suggestion.stderr b/tests/ui/typeck/issue-90804-incorrect-reference-suggestion.stderr index 2d4069f502968..bdf9cfd8adf95 100644 --- a/tests/ui/typeck/issue-90804-incorrect-reference-suggestion.stderr +++ b/tests/ui/typeck/issue-90804-incorrect-reference-suggestion.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): Marker` is not satisfied +error[E0277]: the trait `Marker` is not implemented for `()` --> $DIR/issue-90804-incorrect-reference-suggestion.rs:10:13 | LL | check::<()>(()); diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-default.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-default.stderr index b5cef0b3a27bb..28d4a69839ddc 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-default.stderr +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-default.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `dyn Foo<(isize,), isize, Output = ()>: Eq>` is not satisfied +error[E0277]: the trait `Eq>` is not implemented for `dyn Foo<(isize,), isize, Output = ()>` --> $DIR/unboxed-closure-sugar-default.rs:21:10 | LL | eq::, dyn Foo(isize)>(); diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr index 923f1a345136f..7bc81416410b2 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-equiv.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `dyn Foo<(char,), Output = ()>: Eq>` is not satisfied +error[E0277]: the trait `Eq>` is not implemented for `dyn Foo<(char,), Output = ()>` --> $DIR/unboxed-closure-sugar-equiv.rs:44:11 | LL | dyn Foo(char) >(); diff --git a/tests/ui/unevaluated_fixed_size_array_len.stderr b/tests/ui/unevaluated_fixed_size_array_len.stderr index 43cc377006e0e..685b0e3348378 100644 --- a/tests/ui/unevaluated_fixed_size_array_len.stderr +++ b/tests/ui/unevaluated_fixed_size_array_len.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `[(); 0]: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `[(); 0]` --> $DIR/unevaluated_fixed_size_array_len.rs:12:6 | LL | <[(); 0] as Foo>::foo() diff --git a/tests/ui/union/issue-81199.rs b/tests/ui/union/issue-81199.rs index 2083ee15d87bd..caf5a602f3d17 100644 --- a/tests/ui/union/issue-81199.rs +++ b/tests/ui/union/issue-81199.rs @@ -3,7 +3,7 @@ union PtrRepr { const_ptr: *const T, mut_ptr: *mut T, components: PtrComponents, - //~^ ERROR the trait bound + //~^ ERROR the trait //~| ERROR field must implement `Copy` } diff --git a/tests/ui/union/issue-81199.stderr b/tests/ui/union/issue-81199.stderr index 0dd894beb2a46..43e803ebc6fee 100644 --- a/tests/ui/union/issue-81199.stderr +++ b/tests/ui/union/issue-81199.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Pointee` is not satisfied +error[E0277]: the trait `Pointee` is not implemented for `T` --> $DIR/issue-81199.rs:5:17 | LL | components: PtrComponents, diff --git a/tests/ui/union/projection-as-union-type-error-2.stderr b/tests/ui/union/projection-as-union-type-error-2.stderr index 39cdf30d8605a..75932d12722bb 100644 --- a/tests/ui/union/projection-as-union-type-error-2.stderr +++ b/tests/ui/union/projection-as-union-type-error-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `u8: NotImplemented` is not satisfied +error[E0277]: the trait `NotImplemented` is not implemented for `u8` --> $DIR/projection-as-union-type-error-2.rs:18:8 | LL | a: ::Identity, diff --git a/tests/ui/union/projection-as-union-type-error.stderr b/tests/ui/union/projection-as-union-type-error.stderr index f43fb2fe9e518..0928bb42be3ef 100644 --- a/tests/ui/union/projection-as-union-type-error.stderr +++ b/tests/ui/union/projection-as-union-type-error.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `u8: Identity` is not satisfied +error[E0277]: the trait `Identity` is not implemented for `u8` --> $DIR/projection-as-union-type-error.rs:13:9 | LL | a: ::Identity, diff --git a/tests/ui/union/union-derive-clone.rs b/tests/ui/union/union-derive-clone.rs index 7ab19edb47179..695c3f4ade499 100644 --- a/tests/ui/union/union-derive-clone.rs +++ b/tests/ui/union/union-derive-clone.rs @@ -1,6 +1,6 @@ use std::mem::ManuallyDrop; -#[derive(Clone)] //~ ERROR the trait bound `U1: Copy` is not satisfied +#[derive(Clone)] //~ ERROR trait `Copy` is not implemented for `U1` union U1 { a: u8, } diff --git a/tests/ui/union/union-derive-clone.stderr b/tests/ui/union/union-derive-clone.stderr index a2b81f0dba1c3..6856829e9e427 100644 --- a/tests/ui/union/union-derive-clone.stderr +++ b/tests/ui/union/union-derive-clone.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `U1: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `U1` --> $DIR/union-derive-clone.rs:3:10 | LL | #[derive(Clone)] diff --git a/tests/ui/union/union-derive-eq.rs b/tests/ui/union/union-derive-eq.rs index e689f8c27d772..5c2ae73ab4658 100644 --- a/tests/ui/union/union-derive-eq.rs +++ b/tests/ui/union/union-derive-eq.rs @@ -10,7 +10,7 @@ struct PartialEqNotEq; #[derive(Eq)] union U2 { - a: PartialEqNotEq, //~ ERROR the trait bound `PartialEqNotEq: Eq` is not satisfied + a: PartialEqNotEq, //~ ERROR trait `Eq` is not implemented for `PartialEqNotEq` } impl PartialEq for U2 { fn eq(&self, rhs: &Self) -> bool { true } } diff --git a/tests/ui/union/union-derive-eq.stderr b/tests/ui/union/union-derive-eq.stderr index b068edd6d69cc..d4c7884f84a06 100644 --- a/tests/ui/union/union-derive-eq.stderr +++ b/tests/ui/union/union-derive-eq.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `PartialEqNotEq: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `PartialEqNotEq` --> $DIR/union-derive-eq.rs:13:5 | LL | #[derive(Eq)] diff --git a/tests/ui/union/union-generic.rs b/tests/ui/union/union-generic.rs index ff877892579b9..f6f53383b0bc3 100644 --- a/tests/ui/union/union-generic.rs +++ b/tests/ui/union/union-generic.rs @@ -6,7 +6,7 @@ union U { fn main() { let u = U { a: Rc::new(0u32) }; - //~^ ERROR the trait bound `Rc: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `Rc` let u = U::> { a: Default::default() }; - //~^ ERROR the trait bound `Rc: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `Rc` } diff --git a/tests/ui/union/union-generic.stderr b/tests/ui/union/union-generic.stderr index b9d4aee787e93..4d1ea5fad4265 100644 --- a/tests/ui/union/union-generic.stderr +++ b/tests/ui/union/union-generic.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Rc: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Rc` --> $DIR/union-generic.rs:8:13 | LL | let u = U { a: Rc::new(0u32) }; @@ -10,7 +10,7 @@ note: required by a bound in `U` LL | union U { | ^^^^ required by this bound in `U` -error[E0277]: the trait bound `Rc: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `Rc` --> $DIR/union-generic.rs:10:17 | LL | let u = U::> { a: Default::default() }; diff --git a/tests/ui/unsized/issue-71659.current.stderr b/tests/ui/unsized/issue-71659.current.stderr index df0b998fd883e..e4c4d2bfd18d8 100644 --- a/tests/ui/unsized/issue-71659.current.stderr +++ b/tests/ui/unsized/issue-71659.current.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `dyn Foo: CastTo<[i32]>` is not satisfied +error[E0277]: the trait `CastTo<[i32]>` is not implemented for `dyn Foo` --> $DIR/issue-71659.rs:33:15 | LL | let x = x.cast::<[i32]>(); diff --git a/tests/ui/unsized/issue-71659.next.stderr b/tests/ui/unsized/issue-71659.next.stderr index df0b998fd883e..e4c4d2bfd18d8 100644 --- a/tests/ui/unsized/issue-71659.next.stderr +++ b/tests/ui/unsized/issue-71659.next.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `dyn Foo: CastTo<[i32]>` is not satisfied +error[E0277]: the trait `CastTo<[i32]>` is not implemented for `dyn Foo` --> $DIR/issue-71659.rs:33:15 | LL | let x = x.cast::<[i32]>(); diff --git a/tests/ui/unsized/issue-71659.rs b/tests/ui/unsized/issue-71659.rs index fd0b799d88933..74ba2920f4768 100644 --- a/tests/ui/unsized/issue-71659.rs +++ b/tests/ui/unsized/issue-71659.rs @@ -31,5 +31,5 @@ impl Foo for [i32; 0] {} fn main() { let x: &dyn Foo = &[]; let x = x.cast::<[i32]>(); - //~^ ERROR: the trait bound `dyn Foo: CastTo<[i32]>` is not satisfied + //~^ ERROR trait `CastTo<[i32]>` is not implemented for `dyn Foo` } diff --git a/tests/ui/unsized/issue-75707.rs b/tests/ui/unsized/issue-75707.rs index 9f04cdbb92211..e58387de3cd71 100644 --- a/tests/ui/unsized/issue-75707.rs +++ b/tests/ui/unsized/issue-75707.rs @@ -13,5 +13,5 @@ fn f() { fn main() { struct MyCall; f::>(); - //~^ ERROR: the trait bound `MyCall: Callback` is not satisfied + //~^ ERROR trait `Callback` is not implemented for `MyCall` } diff --git a/tests/ui/unsized/issue-75707.stderr b/tests/ui/unsized/issue-75707.stderr index f5f2f7192aab4..b2bdc0acee2d9 100644 --- a/tests/ui/unsized/issue-75707.stderr +++ b/tests/ui/unsized/issue-75707.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `MyCall: Callback` is not satisfied +error[E0277]: the trait `Callback` is not implemented for `MyCall` --> $DIR/issue-75707.rs:15:9 | LL | f::>(); diff --git a/tests/ui/wf/hir-wf-canonicalized.rs b/tests/ui/wf/hir-wf-canonicalized.rs index abdcd1c04ab2a..d3237e9ab2057 100644 --- a/tests/ui/wf/hir-wf-canonicalized.rs +++ b/tests/ui/wf/hir-wf-canonicalized.rs @@ -8,8 +8,8 @@ trait Callback: Fn(&Bar<'_, T>, &T::V) {} struct Bar<'a, T> { callback: Box>>>, - //~^ ERROR the trait bound `Bar<'a, T>: Foo` is not satisfied - //~| ERROR the trait bound `(dyn Callback, Output = ()> + 'static): Foo` is not satisfied + //~^ ERROR trait `Foo` is not implemented for `Bar<'a, T>` + //~| ERROR trait `Foo` is not implemented for `(dyn Callback, Output = ()> + 'static)` //~| ERROR the size for values of type `(dyn Callback, Output = ()> + 'static)` cannot be known at compilation time } diff --git a/tests/ui/wf/hir-wf-canonicalized.stderr b/tests/ui/wf/hir-wf-canonicalized.stderr index 8938801ce3d97..297be0d51aaaf 100644 --- a/tests/ui/wf/hir-wf-canonicalized.stderr +++ b/tests/ui/wf/hir-wf-canonicalized.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Bar<'a, T>: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `Bar<'a, T>` --> $DIR/hir-wf-canonicalized.rs:10:15 | LL | callback: Box>>>, @@ -10,7 +10,7 @@ help: this trait has no implementations, consider adding one LL | trait Foo { | ^^^^^^^^^ -error[E0277]: the trait bound `(dyn Callback, Output = ()> + 'static): Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `(dyn Callback, Output = ()> + 'static)` --> $DIR/hir-wf-canonicalized.rs:10:15 | LL | callback: Box>>>, diff --git a/tests/ui/wf/issue-103573.rs b/tests/ui/wf/issue-103573.rs index bcbf4f941ecd9..5100f484c65bf 100644 --- a/tests/ui/wf/issue-103573.rs +++ b/tests/ui/wf/issue-103573.rs @@ -16,7 +16,7 @@ pub trait TraitC { type TypeC<'a>: TraitB; fn g<'a>(_: &< as TraitB>::TypeB as TraitA>::TypeA); - //~^ ERROR the trait bound `<>::TypeC<'a> as TraitB>::TypeB: TraitA` is not satisfied + //~^ ERROR trait `TraitA` is not implemented for `<>::TypeC<'a> as TraitB>::TypeB` } fn main() {} diff --git a/tests/ui/wf/issue-103573.stderr b/tests/ui/wf/issue-103573.stderr index 3129f2a8c3415..bc08058465e44 100644 --- a/tests/ui/wf/issue-103573.stderr +++ b/tests/ui/wf/issue-103573.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `<>::TypeC<'a> as TraitB>::TypeB: TraitA` is not satisfied +error[E0277]: the trait `TraitA` is not implemented for `<>::TypeC<'a> as TraitB>::TypeB` --> $DIR/issue-103573.rs:18:18 | LL | fn g<'a>(_: &< as TraitB>::TypeB as TraitA>::TypeA); diff --git a/tests/ui/wf/issue-95665.rs b/tests/ui/wf/issue-95665.rs index 67923cbb2d6b5..b6c6155fc6ef5 100644 --- a/tests/ui/wf/issue-95665.rs +++ b/tests/ui/wf/issue-95665.rs @@ -12,7 +12,7 @@ pub struct Struct { extern "C" { static VAR: Struct; - //~^ 14:17: 14:27: the trait bound `u8: Trait` is not satisfied [E0277] + //~^ ERROR trait `Trait` is not implemented for `u8` } fn main() {} diff --git a/tests/ui/wf/issue-95665.stderr b/tests/ui/wf/issue-95665.stderr index 1b14045d558d0..1f27f5342792a 100644 --- a/tests/ui/wf/issue-95665.stderr +++ b/tests/ui/wf/issue-95665.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `u8: Trait` is not satisfied +error[E0277]: the trait `Trait` is not implemented for `u8` --> $DIR/issue-95665.rs:14:17 | LL | static VAR: Struct; diff --git a/tests/ui/wf/issue-96810.rs b/tests/ui/wf/issue-96810.rs index c2948086b200b..03b01a0a0e0ca 100644 --- a/tests/ui/wf/issue-96810.rs +++ b/tests/ui/wf/issue-96810.rs @@ -5,7 +5,7 @@ trait Tr { } struct Hoge { - s: S, //~ ERROR the trait bound `K: Tr` is not satisfied + s: S, //~ ERROR trait `Tr` is not implemented for `K` a: u32, } diff --git a/tests/ui/wf/issue-96810.stderr b/tests/ui/wf/issue-96810.stderr index 622d72f791e2e..c6b3ca9933e17 100644 --- a/tests/ui/wf/issue-96810.stderr +++ b/tests/ui/wf/issue-96810.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `K: Tr` is not satisfied +error[E0277]: the trait `Tr` is not implemented for `K` --> $DIR/issue-96810.rs:8:8 | LL | s: S, diff --git a/tests/ui/wf/wf-complex-assoc-type.rs b/tests/ui/wf/wf-complex-assoc-type.rs index c3811e8239429..e98713e472e7a 100644 --- a/tests/ui/wf/wf-complex-assoc-type.rs +++ b/tests/ui/wf/wf-complex-assoc-type.rs @@ -6,7 +6,7 @@ trait HelperTrait { } impl HelperTrait for () { - type MyItem = Option<((AssertMyTrait, u8))>; //~ ERROR the trait bound + type MyItem = Option<((AssertMyTrait, u8))>; //~ ERROR the trait } fn main() {} diff --git a/tests/ui/wf/wf-complex-assoc-type.stderr b/tests/ui/wf/wf-complex-assoc-type.stderr index 161ee9d7059cf..d7f3f1b3ccab4 100644 --- a/tests/ui/wf/wf-complex-assoc-type.stderr +++ b/tests/ui/wf/wf-complex-assoc-type.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `bool: MyTrait` is not satisfied +error[E0277]: the trait `MyTrait` is not implemented for `bool` --> $DIR/wf-complex-assoc-type.rs:9:28 | LL | type MyItem = Option<((AssertMyTrait, u8))>; diff --git a/tests/ui/wf/wf-const-type.stderr b/tests/ui/wf/wf-const-type.stderr index d5e0f7672a6f3..fc7c40cddca92 100644 --- a/tests/ui/wf/wf-const-type.stderr +++ b/tests/ui/wf/wf-const-type.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `NotCopy: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `NotCopy` --> $DIR/wf-const-type.rs:10:12 | LL | const FOO: IsCopy> = IsCopy { t: None }; @@ -16,7 +16,7 @@ LL + #[derive(Copy)] LL | struct NotCopy; | -error[E0277]: the trait bound `NotCopy: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `NotCopy` --> $DIR/wf-const-type.rs:10:50 | LL | const FOO: IsCopy> = IsCopy { t: None }; diff --git a/tests/ui/wf/wf-enum-bound.stderr b/tests/ui/wf/wf-enum-bound.stderr index 78b5c6ec20eb4..e0ace61c98766 100644 --- a/tests/ui/wf/wf-enum-bound.stderr +++ b/tests/ui/wf/wf-enum-bound.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `U: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `U` --> $DIR/wf-enum-bound.rs:10:14 | LL | where T: ExtraCopy diff --git a/tests/ui/wf/wf-enum-fields-struct-variant.stderr b/tests/ui/wf/wf-enum-fields-struct-variant.stderr index 2f2c1c2d2665c..2fd2bed7460a6 100644 --- a/tests/ui/wf/wf-enum-fields-struct-variant.stderr +++ b/tests/ui/wf/wf-enum-fields-struct-variant.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `A: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `A` --> $DIR/wf-enum-fields-struct-variant.rs:13:12 | LL | f: IsCopy diff --git a/tests/ui/wf/wf-enum-fields.stderr b/tests/ui/wf/wf-enum-fields.stderr index a5feaadfc7587..f6f8fce678b22 100644 --- a/tests/ui/wf/wf-enum-fields.stderr +++ b/tests/ui/wf/wf-enum-fields.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `A: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `A` --> $DIR/wf-enum-fields.rs:12:17 | LL | SomeVariant(IsCopy) diff --git a/tests/ui/wf/wf-fn-where-clause.stderr b/tests/ui/wf/wf-fn-where-clause.stderr index 40f2f45263930..c3af262ca2f18 100644 --- a/tests/ui/wf/wf-fn-where-clause.stderr +++ b/tests/ui/wf/wf-fn-where-clause.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `U: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `U` --> $DIR/wf-fn-where-clause.rs:8:24 | LL | fn foo() where T: ExtraCopy diff --git a/tests/ui/wf/wf-foreign-fn-decl-ret.rs b/tests/ui/wf/wf-foreign-fn-decl-ret.rs index b9d956c056869..9017392a39b5e 100644 --- a/tests/ui/wf/wf-foreign-fn-decl-ret.rs +++ b/tests/ui/wf/wf-foreign-fn-decl-ret.rs @@ -9,10 +9,10 @@ pub trait Foo { extern "C" { pub fn lint_me() -> <() as Foo>::Assoc; - //~^ ERROR: the trait bound `(): Foo` is not satisfied [E0277] + //~^ ERROR trait `Foo` is not implemented for `()` pub fn lint_me_aswell() -> Bar; - //~^ ERROR: the trait bound `u32: Unsatisfied` is not satisfied [E0277] + //~^ ERROR trait `Unsatisfied` is not implemented for `u32` } fn main() {} diff --git a/tests/ui/wf/wf-foreign-fn-decl-ret.stderr b/tests/ui/wf/wf-foreign-fn-decl-ret.stderr index 0e93601043a69..b0a8d6d44ca2d 100644 --- a/tests/ui/wf/wf-foreign-fn-decl-ret.stderr +++ b/tests/ui/wf/wf-foreign-fn-decl-ret.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `(): Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `()` --> $DIR/wf-foreign-fn-decl-ret.rs:11:25 | LL | pub fn lint_me() -> <() as Foo>::Assoc; @@ -10,7 +10,7 @@ help: this trait has no implementations, consider adding one LL | pub trait Foo { | ^^^^^^^^^^^^^ -error[E0277]: the trait bound `u32: Unsatisfied` is not satisfied +error[E0277]: the trait `Unsatisfied` is not implemented for `u32` --> $DIR/wf-foreign-fn-decl-ret.rs:14:32 | LL | pub fn lint_me_aswell() -> Bar; diff --git a/tests/ui/wf/wf-impl-associated-type-trait.rs b/tests/ui/wf/wf-impl-associated-type-trait.rs index 84e628e218561..138c774afdc70 100644 --- a/tests/ui/wf/wf-impl-associated-type-trait.rs +++ b/tests/ui/wf/wf-impl-associated-type-trait.rs @@ -15,7 +15,7 @@ pub trait Foo { impl Foo for T { type Bar = MySet; - //~^ ERROR the trait bound `T: MyHash` is not satisfied + //~^ ERROR trait `MyHash` is not implemented for `T` } diff --git a/tests/ui/wf/wf-impl-associated-type-trait.stderr b/tests/ui/wf/wf-impl-associated-type-trait.stderr index 09e255bead025..ea37f0b2cc45f 100644 --- a/tests/ui/wf/wf-impl-associated-type-trait.stderr +++ b/tests/ui/wf/wf-impl-associated-type-trait.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: MyHash` is not satisfied +error[E0277]: the trait `MyHash` is not implemented for `T` --> $DIR/wf-impl-associated-type-trait.rs:17:16 | LL | type Bar = MySet; diff --git a/tests/ui/wf/wf-in-fn-arg.stderr b/tests/ui/wf/wf-in-fn-arg.stderr index 8f22edd17a100..22214760c4d36 100644 --- a/tests/ui/wf/wf-in-fn-arg.stderr +++ b/tests/ui/wf/wf-in-fn-arg.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/wf-in-fn-arg.rs:10:15 | LL | fn bar(_: &MustBeCopy) diff --git a/tests/ui/wf/wf-in-fn-ret.stderr b/tests/ui/wf/wf-in-fn-ret.stderr index 1ae49a348cc69..56bbd4a8d51f4 100644 --- a/tests/ui/wf/wf-in-fn-ret.stderr +++ b/tests/ui/wf/wf-in-fn-ret.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/wf-in-fn-ret.rs:10:16 | LL | fn bar() -> MustBeCopy diff --git a/tests/ui/wf/wf-in-fn-type-arg.stderr b/tests/ui/wf/wf-in-fn-type-arg.stderr index 17594c813daa7..5e2d703807b31 100644 --- a/tests/ui/wf/wf-in-fn-type-arg.stderr +++ b/tests/ui/wf/wf-in-fn-type-arg.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/wf-in-fn-type-arg.rs:9:11 | LL | x: fn(MustBeCopy) diff --git a/tests/ui/wf/wf-in-fn-type-ret.stderr b/tests/ui/wf/wf-in-fn-type-ret.stderr index fac535a112659..0482ebfdc74ba 100644 --- a/tests/ui/wf/wf-in-fn-type-ret.stderr +++ b/tests/ui/wf/wf-in-fn-type-ret.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/wf-in-fn-type-ret.rs:9:16 | LL | x: fn() -> MustBeCopy diff --git a/tests/ui/wf/wf-in-fn-where-clause.stderr b/tests/ui/wf/wf-in-fn-where-clause.stderr index 4c556d3d77de3..ecdc43a1dd102 100644 --- a/tests/ui/wf/wf-in-fn-where-clause.stderr +++ b/tests/ui/wf/wf-in-fn-where-clause.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `U: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `U` --> $DIR/wf-in-fn-where-clause.rs:10:14 | LL | where T: MustBeCopy diff --git a/tests/ui/wf/wf-in-obj-type-trait.stderr b/tests/ui/wf/wf-in-obj-type-trait.stderr index b96f56a12a54c..30969807c4dfe 100644 --- a/tests/ui/wf/wf-in-obj-type-trait.stderr +++ b/tests/ui/wf/wf-in-obj-type-trait.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/wf-in-obj-type-trait.rs:11:19 | LL | x: dyn Object> diff --git a/tests/ui/wf/wf-inherent-impl-method-where-clause.stderr b/tests/ui/wf/wf-inherent-impl-method-where-clause.stderr index 4cfbec12b6e41..4fd6d66f010a8 100644 --- a/tests/ui/wf/wf-inherent-impl-method-where-clause.stderr +++ b/tests/ui/wf/wf-inherent-impl-method-where-clause.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `U: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `U` --> $DIR/wf-inherent-impl-method-where-clause.rs:12:27 | LL | fn foo(self) where T: ExtraCopy diff --git a/tests/ui/wf/wf-inherent-impl-where-clause.stderr b/tests/ui/wf/wf-inherent-impl-where-clause.stderr index bdc1ee3e0e21c..1369cc79f8380 100644 --- a/tests/ui/wf/wf-inherent-impl-where-clause.stderr +++ b/tests/ui/wf/wf-inherent-impl-where-clause.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `U: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `U` --> $DIR/wf-inherent-impl-where-clause.rs:11:29 | LL | impl Foo where T: ExtraCopy diff --git a/tests/ui/wf/wf-packed-on-proj-of-type-as-unimpl-trait.rs b/tests/ui/wf/wf-packed-on-proj-of-type-as-unimpl-trait.rs index d0167c8c268cf..d4e227785f7e3 100644 --- a/tests/ui/wf/wf-packed-on-proj-of-type-as-unimpl-trait.rs +++ b/tests/ui/wf/wf-packed-on-proj-of-type-as-unimpl-trait.rs @@ -26,6 +26,6 @@ pub trait Allocator { type Buffer; } #[repr(packed)] struct Foo(Matrix<::Buffer>); -//~^ ERROR the trait bound `DefaultAllocator: Allocator` is not satisfied +//~^ ERROR trait `Allocator` is not implemented for `DefaultAllocator` fn main() { } diff --git a/tests/ui/wf/wf-packed-on-proj-of-type-as-unimpl-trait.stderr b/tests/ui/wf/wf-packed-on-proj-of-type-as-unimpl-trait.stderr index 8e3088c6f4a0f..540fe34c2c7b6 100644 --- a/tests/ui/wf/wf-packed-on-proj-of-type-as-unimpl-trait.stderr +++ b/tests/ui/wf/wf-packed-on-proj-of-type-as-unimpl-trait.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `DefaultAllocator: Allocator` is not satisfied +error[E0277]: the trait `Allocator` is not implemented for `DefaultAllocator` --> $DIR/wf-packed-on-proj-of-type-as-unimpl-trait.rs:28:12 | LL | struct Foo(Matrix<::Buffer>); diff --git a/tests/ui/wf/wf-static-type.stderr b/tests/ui/wf/wf-static-type.stderr index 481173b8a269c..8438e1760e09f 100644 --- a/tests/ui/wf/wf-static-type.stderr +++ b/tests/ui/wf/wf-static-type.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `NotCopy: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `NotCopy` --> $DIR/wf-static-type.rs:10:13 | LL | static FOO: IsCopy> = IsCopy { t: None }; @@ -16,7 +16,7 @@ LL + #[derive(Copy)] LL | struct NotCopy; | -error[E0277]: the trait bound `NotCopy: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `NotCopy` --> $DIR/wf-static-type.rs:10:51 | LL | static FOO: IsCopy> = IsCopy { t: None }; diff --git a/tests/ui/wf/wf-struct-bound.stderr b/tests/ui/wf/wf-struct-bound.stderr index 4ac7f4634e462..b42fd351e6adf 100644 --- a/tests/ui/wf/wf-struct-bound.stderr +++ b/tests/ui/wf/wf-struct-bound.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `U: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `U` --> $DIR/wf-struct-bound.rs:10:14 | LL | where T: ExtraCopy diff --git a/tests/ui/wf/wf-struct-field.stderr b/tests/ui/wf/wf-struct-field.stderr index 241ced3c2dbd8..d635f490a30a7 100644 --- a/tests/ui/wf/wf-struct-field.stderr +++ b/tests/ui/wf/wf-struct-field.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `A: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `A` --> $DIR/wf-struct-field.rs:12:11 | LL | data: IsCopy diff --git a/tests/ui/wf/wf-trait-associated-type-bound.stderr b/tests/ui/wf/wf-trait-associated-type-bound.stderr index 4ea895a9b0396..1add55d863fe2 100644 --- a/tests/ui/wf/wf-trait-associated-type-bound.stderr +++ b/tests/ui/wf/wf-trait-associated-type-bound.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/wf-trait-associated-type-bound.rs:10:17 | LL | type Type1: ExtraCopy; diff --git a/tests/ui/wf/wf-trait-associated-type-trait.stderr b/tests/ui/wf/wf-trait-associated-type-trait.stderr index 1dc8e2d87a214..59cc2359984a5 100644 --- a/tests/ui/wf/wf-trait-associated-type-trait.stderr +++ b/tests/ui/wf/wf-trait-associated-type-trait.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `::Type1: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `::Type1` --> $DIR/wf-trait-associated-type-trait.rs:11:19 | LL | type Type2 = (IsCopy, bool); diff --git a/tests/ui/wf/wf-trait-bound.stderr b/tests/ui/wf/wf-trait-bound.stderr index 5845d05b38e67..0e0f9b5d35265 100644 --- a/tests/ui/wf/wf-trait-bound.stderr +++ b/tests/ui/wf/wf-trait-bound.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `U: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `U` --> $DIR/wf-trait-bound.rs:10:14 | LL | where T: ExtraCopy diff --git a/tests/ui/wf/wf-trait-default-fn-arg.stderr b/tests/ui/wf/wf-trait-default-fn-arg.stderr index a885f8988627f..34365f6394deb 100644 --- a/tests/ui/wf/wf-trait-default-fn-arg.stderr +++ b/tests/ui/wf/wf-trait-default-fn-arg.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Self: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `Self` --> $DIR/wf-trait-default-fn-arg.rs:11:23 | LL | fn bar(&self, x: &Bar) { diff --git a/tests/ui/wf/wf-trait-default-fn-ret.stderr b/tests/ui/wf/wf-trait-default-fn-ret.stderr index f749ac7b1b3e6..93b38e7161c7f 100644 --- a/tests/ui/wf/wf-trait-default-fn-ret.stderr +++ b/tests/ui/wf/wf-trait-default-fn-ret.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Self: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `Self` --> $DIR/wf-trait-default-fn-ret.rs:11:22 | LL | fn bar(&self) -> Bar { diff --git a/tests/ui/wf/wf-trait-default-fn-where-clause.stderr b/tests/ui/wf/wf-trait-default-fn-where-clause.stderr index e44a96fa5894d..086edb480e453 100644 --- a/tests/ui/wf/wf-trait-default-fn-where-clause.stderr +++ b/tests/ui/wf/wf-trait-default-fn-where-clause.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Self: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `Self` --> $DIR/wf-trait-default-fn-where-clause.rs:11:31 | LL | fn bar(&self) where A: Bar { diff --git a/tests/ui/wf/wf-trait-fn-arg.stderr b/tests/ui/wf/wf-trait-fn-arg.stderr index 8b35f36fa68a8..e9a8743fc31d2 100644 --- a/tests/ui/wf/wf-trait-fn-arg.stderr +++ b/tests/ui/wf/wf-trait-fn-arg.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Self: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `Self` --> $DIR/wf-trait-fn-arg.rs:10:23 | LL | fn bar(&self, x: &Bar); diff --git a/tests/ui/wf/wf-trait-fn-ret.stderr b/tests/ui/wf/wf-trait-fn-ret.stderr index 3d70f04def2e0..128d4786aa1a7 100644 --- a/tests/ui/wf/wf-trait-fn-ret.stderr +++ b/tests/ui/wf/wf-trait-fn-ret.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Self: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `Self` --> $DIR/wf-trait-fn-ret.rs:10:23 | LL | fn bar(&self) -> &Bar; diff --git a/tests/ui/wf/wf-trait-fn-where-clause.stderr b/tests/ui/wf/wf-trait-fn-where-clause.stderr index 0ad3b58e7c76a..9b8e3f3623824 100644 --- a/tests/ui/wf/wf-trait-fn-where-clause.stderr +++ b/tests/ui/wf/wf-trait-fn-where-clause.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Self: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `Self` --> $DIR/wf-trait-fn-where-clause.rs:10:49 | LL | fn bar(&self) where Self: Sized, Bar: Copy; diff --git a/tests/ui/wf/wf-trait-superbound.stderr b/tests/ui/wf/wf-trait-superbound.stderr index 3c05065e57f91..5243319dea645 100644 --- a/tests/ui/wf/wf-trait-superbound.stderr +++ b/tests/ui/wf/wf-trait-superbound.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/wf-trait-superbound.rs:9:21 | LL | trait SomeTrait: ExtraCopy { diff --git a/tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr b/tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr index 6de4caa76ee0e..67d7b85f38184 100644 --- a/tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr +++ b/tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `for<'b> fn(&'b ()): Foo` is not satisfied +error[E0277]: the trait `for<'b> Foo` is not implemented for `fn(&'b ())` --> $DIR/higher-ranked-fn-type.rs:20:5 | LL | called() diff --git a/tests/ui/where-clauses/higher-ranked-fn-type.rs b/tests/ui/where-clauses/higher-ranked-fn-type.rs index 7ad7a896e8d38..a90fd8a371519 100644 --- a/tests/ui/where-clauses/higher-ranked-fn-type.rs +++ b/tests/ui/where-clauses/higher-ranked-fn-type.rs @@ -18,8 +18,8 @@ where (for<'a> fn(&'a ())): Foo, { called() - //[quiet]~^ ERROR the trait bound `for<'b> fn(&'b ()): Foo` is not satisfied - //[verbose]~^^ ERROR the trait bound `for Foo` is not implemented for `fn(&'b ())` + //[verbose]~^^ ERROR the trait `for fn(&ReBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b) }) ()): Foo` is not satisfied +error[E0277]: the trait `for Foo` is not implemented for `fn(&ReBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b) }) ())` --> $DIR/higher-ranked-fn-type.rs:20:5 | LL | called() diff --git a/tests/ui/where-clauses/self-in-where-clause-allowed.rs b/tests/ui/where-clauses/self-in-where-clause-allowed.rs index fd2cfe2bf65e4..582d0d1fc9114 100644 --- a/tests/ui/where-clauses/self-in-where-clause-allowed.rs +++ b/tests/ui/where-clauses/self-in-where-clause-allowed.rs @@ -19,5 +19,5 @@ fn main() { let trait_object = &() as &dyn Trait; trait_object.static_lifetime_bound(); trait_object.arg_lifetime_bound(&()); - trait_object.autotrait_bound(); //~ ERROR: the trait bound `dyn Trait: AutoTrait` is not satisfied + trait_object.autotrait_bound(); //~ ERROR trait `AutoTrait` is not implemented for `dyn Trait` } diff --git a/tests/ui/where-clauses/self-in-where-clause-allowed.stderr b/tests/ui/where-clauses/self-in-where-clause-allowed.stderr index 7f92ac102f012..c1223a2822991 100644 --- a/tests/ui/where-clauses/self-in-where-clause-allowed.stderr +++ b/tests/ui/where-clauses/self-in-where-clause-allowed.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `dyn Trait: AutoTrait` is not satisfied +error[E0277]: the trait `AutoTrait` is not implemented for `dyn Trait` --> $DIR/self-in-where-clause-allowed.rs:22:18 | LL | trait_object.autotrait_bound(); diff --git a/tests/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.rs b/tests/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.rs index 0e8bb61a79b6b..7a76a8a449289 100644 --- a/tests/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.rs +++ b/tests/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.rs @@ -11,7 +11,7 @@ impl Foo { fn fails_copy(self) { require_copy(self.x); - //~^ ERROR the trait bound `T: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `T` } } diff --git a/tests/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr b/tests/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr index 2612cefef28c1..40806f3287030 100644 --- a/tests/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr +++ b/tests/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/where-clause-constraints-are-local-for-inherent-impl.rs:13:22 | LL | require_copy(self.x); diff --git a/tests/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.rs b/tests/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.rs index 25c46330e4d95..5613eb4dea5b5 100644 --- a/tests/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.rs +++ b/tests/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.rs @@ -16,7 +16,7 @@ impl Foo for Bar { fn fails_copy(self) { require_copy(self.x); - //~^ ERROR the trait bound `T: Copy` is not satisfied + //~^ ERROR trait `Copy` is not implemented for `T` } } diff --git a/tests/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr b/tests/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr index 090df26a39e10..3851e316c9bd6 100644 --- a/tests/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr +++ b/tests/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied +error[E0277]: the trait `Copy` is not implemented for `T` --> $DIR/where-clause-constraints-are-local-for-trait-impl.rs:18:22 | LL | require_copy(self.x); diff --git a/tests/ui/where-clauses/where-clause-method-substituion.rs b/tests/ui/where-clauses/where-clause-method-substituion.rs index 4607783c09826..23fce871a9a88 100644 --- a/tests/ui/where-clauses/where-clause-method-substituion.rs +++ b/tests/ui/where-clauses/where-clause-method-substituion.rs @@ -18,5 +18,5 @@ impl Bar for isize { fn main() { 1.method::(); - //~^ ERROR the trait bound `X: Foo` is not satisfied + //~^ ERROR trait `Foo` is not implemented for `X` } diff --git a/tests/ui/where-clauses/where-clause-method-substituion.stderr b/tests/ui/where-clauses/where-clause-method-substituion.stderr index 1a1d9c13ab899..ecf3d26dcff61 100644 --- a/tests/ui/where-clauses/where-clause-method-substituion.stderr +++ b/tests/ui/where-clauses/where-clause-method-substituion.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `X: Foo` is not satisfied +error[E0277]: the trait `Foo` is not implemented for `X` --> $DIR/where-clause-method-substituion.rs:20:16 | LL | 1.method::(); diff --git a/tests/ui/where-clauses/where-clauses-method-unsatisfied.rs b/tests/ui/where-clauses/where-clauses-method-unsatisfied.rs index a8ae02964078b..8a8f862469b81 100644 --- a/tests/ui/where-clauses/where-clauses-method-unsatisfied.rs +++ b/tests/ui/where-clauses/where-clauses-method-unsatisfied.rs @@ -16,5 +16,5 @@ impl Foo { fn main() { let x = Foo { value: Bar }; x.equals(&x); - //~^ ERROR `Bar: Eq` is not satisfied + //~^ ERROR trait `Eq` is not implemented for `Bar` } diff --git a/tests/ui/where-clauses/where-clauses-method-unsatisfied.stderr b/tests/ui/where-clauses/where-clauses-method-unsatisfied.stderr index 840df342ef9a9..08d84808e0a59 100644 --- a/tests/ui/where-clauses/where-clauses-method-unsatisfied.stderr +++ b/tests/ui/where-clauses/where-clauses-method-unsatisfied.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Bar: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `Bar` --> $DIR/where-clauses-method-unsatisfied.rs:18:7 | LL | x.equals(&x); diff --git a/tests/ui/where-clauses/where-clauses-unsatisfied.rs b/tests/ui/where-clauses/where-clauses-unsatisfied.rs index 8b067d30a2a85..4b748854c1ca2 100644 --- a/tests/ui/where-clauses/where-clauses-unsatisfied.rs +++ b/tests/ui/where-clauses/where-clauses-unsatisfied.rs @@ -4,5 +4,5 @@ struct Struct; fn main() { drop(equal(&Struct, &Struct)) - //~^ ERROR the trait bound `Struct: Eq` is not satisfied + //~^ ERROR trait `Eq` is not implemented for `Struct` } diff --git a/tests/ui/where-clauses/where-clauses-unsatisfied.stderr b/tests/ui/where-clauses/where-clauses-unsatisfied.stderr index 205b82d49bfeb..f276dad5a9d8e 100644 --- a/tests/ui/where-clauses/where-clauses-unsatisfied.stderr +++ b/tests/ui/where-clauses/where-clauses-unsatisfied.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Struct: Eq` is not satisfied +error[E0277]: the trait `Eq` is not implemented for `Struct` --> $DIR/where-clauses-unsatisfied.rs:6:10 | LL | drop(equal(&Struct, &Struct)) From 2541c5b9e44ac792670b2ff31816b0956151502e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Thu, 29 Feb 2024 16:57:45 +0000 Subject: [PATCH 3/4] Erase regions in default main E0277 message --- .../traits/error_reporting/type_err_ctxt_ext.rs | 16 +++++++++++----- .../hr-associated-type-bound-object.rs | 6 +++--- .../hr-associated-type-bound-object.stderr | 6 +++--- .../hr-associated-type-bound-param-6.rs | 4 ++-- .../hr-associated-type-bound-param-6.stderr | 4 ++-- tests/ui/associated-types/issue-43924.rs | 2 +- tests/ui/associated-types/issue-43924.stderr | 2 +- tests/ui/for/issue-20605.next.stderr | 2 +- tests/ui/for/issue-20605.rs | 2 +- .../ui/generic-associated-types/issue-101020.rs | 2 +- .../generic-associated-types/issue-101020.stderr | 2 +- .../unknown-lifetime-ice-119827.rs | 2 +- .../unknown-lifetime-ice-119827.stderr | 2 +- ...b-higher-ranker-supertraits-transitive.stderr | 2 +- .../hrtb-higher-ranker-supertraits.stderr | 4 ++-- .../normalize-under-binder/issue-85455.rs | 4 ++-- .../normalize-under-binder/issue-85455.stderr | 4 ++-- .../normalize-under-binder/issue-89118.stderr | 6 +++--- ...-implicit-hrtb-without-dyn.edition2015.stderr | 2 +- ...-implicit-hrtb-without-dyn.edition2021.stderr | 2 +- .../generic-with-implicit-hrtb-without-dyn.rs | 4 ++-- tests/ui/impl-trait/nested-rpit-hrtb.rs | 6 +++--- tests/ui/impl-trait/nested-rpit-hrtb.stderr | 6 +++--- tests/ui/issues/issue-35570.rs | 4 ++-- tests/ui/issues/issue-35570.stderr | 4 ++-- tests/ui/kindck/kindck-copy.stderr | 8 ++++---- ...regions-implied-bounds-projection-gap-hr-1.rs | 4 ++-- ...ons-implied-bounds-projection-gap-hr-1.stderr | 4 ++-- .../correct-binder-for-arbitrary-bound-sugg.rs | 2 +- ...orrect-binder-for-arbitrary-bound-sugg.stderr | 2 +- ...imm-ref-trait-object-literal-bound-regions.rs | 2 +- ...ref-trait-object-literal-bound-regions.stderr | 2 +- tests/ui/suggestions/issue-89333.stderr | 2 +- tests/ui/suggestions/issue-96223.stderr | 2 +- .../dont-autoderef-ty-with-escaping-var.rs | 2 +- .../dont-autoderef-ty-with-escaping-var.stderr | 2 +- tests/ui/traits/issue-71036.rs | 2 +- tests/ui/traits/issue-71036.stderr | 2 +- .../multiple-def-uses-in-one-fn.rs | 2 +- .../multiple-def-uses-in-one-fn.stderr | 2 +- tests/ui/wf/hir-wf-canonicalized.rs | 4 ++-- tests/ui/wf/hir-wf-canonicalized.stderr | 4 ++-- tests/ui/wf/issue-103573.rs | 2 +- tests/ui/wf/issue-103573.stderr | 2 +- .../higher-ranked-fn-type.quiet.stderr | 2 +- tests/ui/where-clauses/higher-ranked-fn-type.rs | 4 ++-- .../higher-ranked-fn-type.verbose.stderr | 2 +- 47 files changed, 83 insertions(+), 77 deletions(-) diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs index 12deaa38854ab..6e6bfccb8f3bc 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs @@ -2941,17 +2941,23 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { } }) .unwrap_or_else(|| { - if let ty::ImplPolarity::Positive = trait_predicate.polarity() { + let pred = self.tcx.erase_regions(if self.tcx.features().non_lifetime_binders { + // We can't erase the lifetime bounds on their own when this feature is enabled. + // `instantiate_bound_regions_with_erased` expects there to be no type bounds. + trait_predicate.skip_binder() + } else { + self.tcx.instantiate_bound_regions_with_erased(*trait_predicate) + }); + if let ty::ImplPolarity::Positive = pred.polarity { format!( "the trait `{}` is not implemented for `{}`{post_message}", - trait_predicate.print_modifiers_and_trait_path(), - self.tcx - .short_ty_string(trait_predicate.skip_binder().self_ty(), &mut None), + pred.print_modifiers_and_trait_path(), + self.tcx.short_ty_string(pred.self_ty(), &mut None), ) } else { // "the trait bound `!Send: T` is not satisfied" reads better than "`!Send` is // not implemented for `T`". - format!("the trait bound `{trait_predicate}` is not satisfied{post_message}") + format!("the trait bound `{pred}` is not satisfied{post_message}") } }) } diff --git a/tests/ui/associated-types/hr-associated-type-bound-object.rs b/tests/ui/associated-types/hr-associated-type-bound-object.rs index 20e566d548da4..2263ac58be4ca 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-object.rs +++ b/tests/ui/associated-types/hr-associated-type-bound-object.rs @@ -5,10 +5,10 @@ where type U: ?Sized; } fn f<'a, T: X<'a> + ?Sized>(x: &>::U) { - //~^ ERROR trait `for<'b> Clone` is not implemented for `>::U` + //~^ ERROR trait `Clone` is not implemented for `>::U` <>::U>::clone(x); - //~^ ERROR trait `for<'b> Clone` is not implemented for `>::U` - //~| ERROR trait `for<'b> Clone` is not implemented for `>::U` + //~^ ERROR trait `Clone` is not implemented for `>::U` + //~| ERROR trait `Clone` is not implemented for `>::U` //~| ERROR trait `Clone` is not implemented for `>::U` } diff --git a/tests/ui/associated-types/hr-associated-type-bound-object.stderr b/tests/ui/associated-types/hr-associated-type-bound-object.stderr index a45ecfb2fa187..4c5a041b417c0 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-object.stderr +++ b/tests/ui/associated-types/hr-associated-type-bound-object.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `for<'b> Clone` is not implemented for `>::U` +error[E0277]: the trait `Clone` is not implemented for `>::U` --> $DIR/hr-associated-type-bound-object.rs:7:13 | LL | fn f<'a, T: X<'a> + ?Sized>(x: &>::U) { @@ -17,7 +17,7 @@ help: consider further restricting the associated type LL | fn f<'a, T: X<'a> + ?Sized>(x: &>::U) where for<'b> >::U: Clone { | ++++++++++++++++++++++++++++++++++++ -error[E0277]: the trait `for<'b> Clone` is not implemented for `>::U` +error[E0277]: the trait `Clone` is not implemented for `>::U` --> $DIR/hr-associated-type-bound-object.rs:9:7 | LL | <>::U>::clone(x); @@ -47,7 +47,7 @@ help: consider further restricting the associated type LL | fn f<'a, T: X<'a> + ?Sized>(x: &>::U) where >::U: Clone { | ++++++++++++++++++++++++++++ -error[E0277]: the trait `for<'b> Clone` is not implemented for `>::U` +error[E0277]: the trait `Clone` is not implemented for `>::U` --> $DIR/hr-associated-type-bound-object.rs:9:5 | LL | <>::U>::clone(x); diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-6.rs b/tests/ui/associated-types/hr-associated-type-bound-param-6.rs index ba42310ccd40b..052307545468f 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-param-6.rs +++ b/tests/ui/associated-types/hr-associated-type-bound-param-6.rs @@ -10,12 +10,12 @@ where } impl X<'_, T> for (S,) { - //~^ ERROR trait `for<'b> X<'b, T>` is not implemented for `T` + //~^ ERROR trait `X<'_, T>` is not implemented for `T` type U = str; } pub fn main() { <(i32,) as X>::f("abc"); //~^ ERROR trait `X<'_, i32>` is not implemented for `i32` - //~| ERROR trait `for<'b> X<'b, i32>` is not implemented for `i32` + //~| ERROR trait `X<'_, i32>` is not implemented for `i32` } diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-6.stderr b/tests/ui/associated-types/hr-associated-type-bound-param-6.stderr index 5ad3d0a07d5d4..bae81b46458d7 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-param-6.stderr +++ b/tests/ui/associated-types/hr-associated-type-bound-param-6.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `for<'b> X<'b, T>` is not implemented for `T` +error[E0277]: the trait `X<'_, T>` is not implemented for `T` --> $DIR/hr-associated-type-bound-param-6.rs:12:12 | LL | impl X<'_, T> for (S,) { @@ -9,7 +9,7 @@ help: consider restricting type parameter `T` LL | impl X<'b, T>> X<'_, T> for (S,) { | ++++++++++++++++++ -error[E0277]: the trait `for<'b> X<'b, i32>` is not implemented for `i32` +error[E0277]: the trait `X<'_, i32>` is not implemented for `i32` --> $DIR/hr-associated-type-bound-param-6.rs:18:5 | LL | <(i32,) as X>::f("abc"); diff --git a/tests/ui/associated-types/issue-43924.rs b/tests/ui/associated-types/issue-43924.rs index 8f308a4600adb..fbb3389119d1c 100644 --- a/tests/ui/associated-types/issue-43924.rs +++ b/tests/ui/associated-types/issue-43924.rs @@ -5,7 +5,7 @@ trait Foo { type Out: Default + ToString + ?Sized = dyn ToString; - //~^ ERROR the trait `Default` is not implemented for `(dyn ToString + 'static)` + //~^ ERROR the trait `Default` is not implemented for `dyn ToString` } impl Foo for () {} diff --git a/tests/ui/associated-types/issue-43924.stderr b/tests/ui/associated-types/issue-43924.stderr index 4feac22bdcc7f..39ef7c7aa1b90 100644 --- a/tests/ui/associated-types/issue-43924.stderr +++ b/tests/ui/associated-types/issue-43924.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `Default` is not implemented for `(dyn ToString + 'static)` +error[E0277]: the trait `Default` is not implemented for `dyn ToString` --> $DIR/issue-43924.rs:7:45 | LL | type Out: Default + ToString + ?Sized = dyn ToString; diff --git a/tests/ui/for/issue-20605.next.stderr b/tests/ui/for/issue-20605.next.stderr index cf13a5eaca199..4095ee64989ec 100644 --- a/tests/ui/for/issue-20605.next.stderr +++ b/tests/ui/for/issue-20605.next.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `IntoIterator` is not implemented for `dyn Iterator` +error[E0277]: the trait `IntoIterator` is not implemented for `dyn Iterator` --> $DIR/issue-20605.rs:5:17 | LL | for item in *things { *item = 0 } diff --git a/tests/ui/for/issue-20605.rs b/tests/ui/for/issue-20605.rs index 7fe701ff9cede..9d8456bd0cd43 100644 --- a/tests/ui/for/issue-20605.rs +++ b/tests/ui/for/issue-20605.rs @@ -4,7 +4,7 @@ fn changer<'a>(mut things: Box>) { for item in *things { *item = 0 } //[current]~^ ERROR the size for values of type - //[next]~^^ ERROR the trait `IntoIterator` is not implemented for `dyn Iterator` + //[next]~^^ ERROR the trait `IntoIterator` is not implemented for `dyn Iterator` //[next]~| ERROR the type ` as IntoIterator>::IntoIter` is not well-formed //[next]~| ERROR the type `&mut as IntoIterator>::IntoIter` is not well-formed //[next]~| ERROR the type `Option<< as IntoIterator>::IntoIter as Iterator>::Item>` is not well-formed diff --git a/tests/ui/generic-associated-types/issue-101020.rs b/tests/ui/generic-associated-types/issue-101020.rs index 177ddcb3c2d4d..d6ea3e626a9e3 100644 --- a/tests/ui/generic-associated-types/issue-101020.rs +++ b/tests/ui/generic-associated-types/issue-101020.rs @@ -29,7 +29,7 @@ trait Foo {} fn map_test() { (&mut EmptyIter).consume(()); - //~^ ERROR trait `for<'a> Foo<&'a mut ()>` is not implemented for `&'a mut ()` + //~^ ERROR trait `Foo<&mut ()>` is not implemented for `&mut ()` } fn main() {} diff --git a/tests/ui/generic-associated-types/issue-101020.stderr b/tests/ui/generic-associated-types/issue-101020.stderr index ef65a98397902..17f2d064e1878 100644 --- a/tests/ui/generic-associated-types/issue-101020.stderr +++ b/tests/ui/generic-associated-types/issue-101020.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `for<'a> Foo<&'a mut ()>` is not implemented for `&'a mut ()` +error[E0277]: the trait `Foo<&mut ()>` is not implemented for `&mut ()` --> $DIR/issue-101020.rs:31:22 | LL | (&mut EmptyIter).consume(()); diff --git a/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.rs b/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.rs index 3f616cc3c4719..1dbf7bb97b65f 100644 --- a/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.rs +++ b/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.rs @@ -10,7 +10,7 @@ impl Foo for Box {} //~| ERROR cycle detected //~| ERROR cycle detected //~| ERROR cycle detected -//~| ERROR trait `Foo` is not implemented for `Box<(dyn Foo + 'static)>` +//~| ERROR trait `Foo` is not implemented for `Box` //~| ERROR not all trait items implemented fn main() {} diff --git a/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.stderr b/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.stderr index d4816b683f909..58ab29283e5c8 100644 --- a/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.stderr +++ b/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.stderr @@ -80,7 +80,7 @@ LL | type Context<'c> = help: consider moving `Context` to another trait = help: only type `{type error}` implements the trait, consider using it directly instead -error[E0277]: the trait `Foo` is not implemented for `Box<(dyn Foo + 'static)>` +error[E0277]: the trait `Foo` is not implemented for `Box` --> $DIR/unknown-lifetime-ice-119827.rs:7:14 | LL | impl Foo for Box {} diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr index ec5dd84f6be59..c87410440f919 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `for<'ccx> Bar<'ccx>` is not implemented for `B` +error[E0277]: the trait `Bar<'_>` is not implemented for `B` --> $DIR/hrtb-higher-ranker-supertraits-transitive.rs:47:26 | LL | want_bar_for_any_ccx(b); diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits.stderr index 580226644afd4..0187791c8af7c 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits.stderr +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `for<'tcx> Foo<'tcx>` is not implemented for `F` +error[E0277]: the trait `Foo<'_>` is not implemented for `F` --> $DIR/hrtb-higher-ranker-supertraits.rs:18:26 | LL | want_foo_for_any_tcx(f); @@ -18,7 +18,7 @@ help: consider further restricting this bound LL | where F : Foo<'x> + for<'tcx> Foo<'tcx> | +++++++++++++++++++++ -error[E0277]: the trait `for<'ccx> Bar<'ccx>` is not implemented for `B` +error[E0277]: the trait `Bar<'_>` is not implemented for `B` --> $DIR/hrtb-higher-ranker-supertraits.rs:35:26 | LL | want_bar_for_any_ccx(b); diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.rs b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.rs index 6874bc0275d05..fc27109dc8cd8 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.rs +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.rs @@ -6,8 +6,8 @@ trait SomeTrait<'a> { fn give_me_ice() { callee:: >::Associated>(); - //~^ ERROR trait `for<'a> SomeTrait<'a>` is not implemented for `T` - //~| ERROR trait `for<'a> SomeTrait<'a>` is not implemented for `T` + //~^ ERROR trait `SomeTrait<'_>` is not implemented for `T` + //~| ERROR trait `SomeTrait<'_>` is not implemented for `T` } fn callee>() { diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.stderr b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.stderr index e2a7bb70d1eb0..b64e365969606 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.stderr +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `for<'a> SomeTrait<'a>` is not implemented for `T` +error[E0277]: the trait `SomeTrait<'_>` is not implemented for `T` --> $DIR/issue-85455.rs:8:14 | LL | callee:: >::Associated>(); @@ -9,7 +9,7 @@ help: consider restricting type parameter `T` LL | fn give_me_ice SomeTrait<'a>>() { | +++++++++++++++++++++++ -error[E0277]: the trait `for<'a> SomeTrait<'a>` is not implemented for `T` +error[E0277]: the trait `SomeTrait<'_>` is not implemented for `T` --> $DIR/issue-85455.rs:8:5 | LL | callee:: >::Associated>(); diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89118.stderr b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89118.stderr index 3c77dc0ff534f..12807fb749190 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89118.stderr +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89118.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `for<'a> BufferMut` is not implemented for `&'a ()` +error[E0277]: the trait `BufferMut` is not implemented for `&()` --> $DIR/issue-89118.rs:19:8 | LL | C: StackContext, @@ -25,7 +25,7 @@ LL | where LL | Ctx<()>: for<'a> BufferUdpStateContext<&'a ()>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StackContext` -error[E0277]: the trait `for<'a> BufferMut` is not implemented for `&'a ()` +error[E0277]: the trait `BufferMut` is not implemented for `&()` --> $DIR/issue-89118.rs:29:9 | LL | impl EthernetWorker {} @@ -52,7 +52,7 @@ LL | where LL | Ctx<()>: for<'a> BufferUdpStateContext<&'a ()>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `EthernetWorker` -error[E0277]: the trait `for<'a> BufferMut` is not implemented for `&'a ()` +error[E0277]: the trait `BufferMut` is not implemented for `&()` --> $DIR/issue-89118.rs:22:20 | LL | type Handler = Ctx; diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr index 95a3baad8a25b..ab7dd648442d5 100644 --- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr +++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()` +error[E0277]: the trait `AsRef Fn(&'a ())>` is not implemented for `()` --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:13 | LL | fn ice() -> impl AsRef { diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr index d00598a528dd6..2a9d77c00f5c2 100644 --- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr +++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()` +error[E0277]: the trait `AsRef Fn(&'a ())>` is not implemented for `()` --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:13 | LL | fn ice() -> impl AsRef { diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs index 9ab220cecac7f..d92d23fb9cbac 100644 --- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs +++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs @@ -4,9 +4,9 @@ #![allow(warnings)] fn ice() -> impl AsRef { - //[edition2015]~^ ERROR trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()` + //[edition2015]~^ ERROR trait `AsRef Fn(&'a ())>` is not implemented for `()` //[edition2021]~^^ ERROR: trait objects must include the `dyn` keyword [E0782] - //[edition2021]~| ERROR trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()` + //[edition2021]~| ERROR trait `AsRef Fn(&'a ())>` is not implemented for `()` todo!() } diff --git a/tests/ui/impl-trait/nested-rpit-hrtb.rs b/tests/ui/impl-trait/nested-rpit-hrtb.rs index 1f2b5339cc9fb..14f3d5c94ad30 100644 --- a/tests/ui/impl-trait/nested-rpit-hrtb.rs +++ b/tests/ui/impl-trait/nested-rpit-hrtb.rs @@ -35,7 +35,7 @@ fn one_hrtb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'a> {} fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a>> {} //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet -//~| ERROR trait `for<'a> Qux<'_>` is not implemented for `&'a ()` +//~| ERROR trait `Qux<'_>` is not implemented for `&()` // This should resolve. fn one_hrtb_mention_fn_trait_param<'b>() -> impl for<'a> Foo<'a, Assoc = impl Qux<'b>> {} @@ -45,7 +45,7 @@ fn one_hrtb_mention_fn_outlives<'b>() -> impl for<'a> Foo<'a, Assoc = impl Sized // This should resolve. fn one_hrtb_mention_fn_trait_param_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Qux<'b>> {} -//~^ ERROR trait `for<'a> Qux<'b>` is not implemented for `&'a ()` +//~^ ERROR trait `Qux<'_>` is not implemented for `&()` // This should resolve. fn one_hrtb_mention_fn_outlives_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'b> {} @@ -60,7 +60,7 @@ fn two_htrb_outlives() -> impl for<'a> Foo<'a, Assoc = impl for<'b> Sized + 'b> // This should resolve. fn two_htrb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Qux<'b>> {} -//~^ ERROR trait `for<'a, 'b> Qux<'b>` is not implemented for `&'a ()` +//~^ ERROR trait `Qux<'_>` is not implemented for `&()` // `'b` is not in scope for the outlives bound. fn two_htrb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Sized + 'b> {} diff --git a/tests/ui/impl-trait/nested-rpit-hrtb.stderr b/tests/ui/impl-trait/nested-rpit-hrtb.stderr index f55df06d3ccca..dac3b1aaa672a 100644 --- a/tests/ui/impl-trait/nested-rpit-hrtb.stderr +++ b/tests/ui/impl-trait/nested-rpit-hrtb.stderr @@ -86,7 +86,7 @@ LL | fn one_hrtb_outlives_uses() -> impl for<'a> Bar<'a, Assoc = impl Sized + 'a = note: `()` must implement `Bar<'a>` = note: ...but it actually implements `Bar<'0>`, for some specific lifetime `'0` -error[E0277]: the trait `for<'a> Qux<'_>` is not implemented for `&'a ()` +error[E0277]: the trait `Qux<'_>` is not implemented for `&()` --> $DIR/nested-rpit-hrtb.rs:36:64 | LL | fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a>> {} @@ -95,7 +95,7 @@ LL | fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a> = help: the trait `Qux<'_>` is implemented for `()` = help: for that trait implementation, expected `()`, found `&'a ()` -error[E0277]: the trait `for<'a> Qux<'b>` is not implemented for `&'a ()` +error[E0277]: the trait `Qux<'_>` is not implemented for `&()` --> $DIR/nested-rpit-hrtb.rs:47:79 | LL | fn one_hrtb_mention_fn_trait_param_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Qux<'b>> {} @@ -113,7 +113,7 @@ LL | fn one_hrtb_mention_fn_outlives_uses<'b>() -> impl for<'a> Bar<'a, Assoc = = note: `()` must implement `Bar<'a>` = note: ...but it actually implements `Bar<'0>`, for some specific lifetime `'0` -error[E0277]: the trait `for<'a, 'b> Qux<'b>` is not implemented for `&'a ()` +error[E0277]: the trait `Qux<'_>` is not implemented for `&()` --> $DIR/nested-rpit-hrtb.rs:62:64 | LL | fn two_htrb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Qux<'b>> {} diff --git a/tests/ui/issues/issue-35570.rs b/tests/ui/issues/issue-35570.rs index 6ea1b45777a57..947584916bb06 100644 --- a/tests/ui/issues/issue-35570.rs +++ b/tests/ui/issues/issue-35570.rs @@ -6,8 +6,8 @@ trait Trait2<'a> { } fn _ice(param: Box Trait1<<() as Trait2<'a>>::Ty>>) { - //~^ ERROR trait `for<'a> Trait2<'a>` is not implemented for `()` - //~| ERROR trait `for<'a> Trait2<'a>` is not implemented for `()` + //~^ ERROR trait `Trait2<'_>` is not implemented for `()` + //~| ERROR trait `Trait2<'_>` is not implemented for `()` let _e: (usize, usize) = unsafe{mem::transmute(param)}; } diff --git a/tests/ui/issues/issue-35570.stderr b/tests/ui/issues/issue-35570.stderr index aa79cafe34ca7..520c0c336027d 100644 --- a/tests/ui/issues/issue-35570.stderr +++ b/tests/ui/issues/issue-35570.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `for<'a> Trait2<'a>` is not implemented for `()` +error[E0277]: the trait `Trait2<'_>` is not implemented for `()` --> $DIR/issue-35570.rs:8:40 | LL | fn _ice(param: Box Trait1<<() as Trait2<'a>>::Ty>>) { @@ -10,7 +10,7 @@ help: this trait has no implementations, consider adding one LL | trait Trait2<'a> { | ^^^^^^^^^^^^^^^^ -error[E0277]: the trait `for<'a> Trait2<'a>` is not implemented for `()` +error[E0277]: the trait `Trait2<'_>` is not implemented for `()` --> $DIR/issue-35570.rs:8:66 | LL | fn _ice(param: Box Trait1<<() as Trait2<'a>>::Ty>>) { diff --git a/tests/ui/kindck/kindck-copy.stderr b/tests/ui/kindck/kindck-copy.stderr index c0b4cd9553ab0..d06f2548be179 100644 --- a/tests/ui/kindck/kindck-copy.stderr +++ b/tests/ui/kindck/kindck-copy.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `Copy` is not implemented for `&'static mut isize` +error[E0277]: the trait `Copy` is not implemented for `&mut isize` --> $DIR/kindck-copy.rs:27:19 | LL | assert_copy::<&'static mut isize>(); @@ -15,7 +15,7 @@ LL - assert_copy::<&'static mut isize>(); LL + assert_copy::(); | -error[E0277]: the trait `Copy` is not implemented for `&'a mut isize` +error[E0277]: the trait `Copy` is not implemented for `&mut isize` --> $DIR/kindck-copy.rs:28:19 | LL | assert_copy::<&'a mut isize>(); @@ -68,7 +68,7 @@ note: required by a bound in `assert_copy` LL | fn assert_copy() { } | ^^^^ required by this bound in `assert_copy` -error[E0277]: the trait `Copy` is not implemented for `Box<&'a mut isize>` +error[E0277]: the trait `Copy` is not implemented for `Box<&mut isize>` --> $DIR/kindck-copy.rs:34:19 | LL | assert_copy::>(); @@ -104,7 +104,7 @@ note: required by a bound in `assert_copy` LL | fn assert_copy() { } | ^^^^ required by this bound in `assert_copy` -error[E0277]: the trait `Copy` is not implemented for `&'a mut (dyn Dummy + Send + 'a)` +error[E0277]: the trait `Copy` is not implemented for `&mut dyn Dummy + Send` --> $DIR/kindck-copy.rs:46:19 | LL | assert_copy::<&'a mut (dyn Dummy + Send)>(); diff --git a/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.rs b/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.rs index ff1a0ebec603d..615d3faf91e76 100644 --- a/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.rs +++ b/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.rs @@ -19,9 +19,9 @@ trait Trait2<'a, 'b> { // since for it to be WF, we would need to know that `'y: 'x`, but we // do not infer that. fn callee<'x, 'y, T>(t: &'x dyn for<'z> Trait1< >::Foo >) - //~^ ERROR trait `for<'z> Trait2<'y, 'z>` is not implemented for `T` + //~^ ERROR trait `Trait2<'_, '_>` is not implemented for `T` { - //~^ ERROR trait `for<'z> Trait2<'y, 'z>` is not implemented for `T` + //~^ ERROR trait `Trait2<'_, '_>` is not implemented for `T` } fn main() { } diff --git a/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr b/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr index dfd5c7b487646..ff0505bd3e246 100644 --- a/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr +++ b/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `for<'z> Trait2<'y, 'z>` is not implemented for `T` +error[E0277]: the trait `Trait2<'_, '_>` is not implemented for `T` --> $DIR/regions-implied-bounds-projection-gap-hr-1.rs:21:49 | LL | fn callee<'x, 'y, T>(t: &'x dyn for<'z> Trait1< >::Foo >) @@ -9,7 +9,7 @@ help: consider restricting type parameter `T` LL | fn callee<'x, 'y, T: for<'z> Trait2<'y, 'z>>(t: &'x dyn for<'z> Trait1< >::Foo >) | ++++++++++++++++++++++++ -error[E0277]: the trait `for<'z> Trait2<'y, 'z>` is not implemented for `T` +error[E0277]: the trait `Trait2<'_, '_>` is not implemented for `T` --> $DIR/regions-implied-bounds-projection-gap-hr-1.rs:23:1 | LL | / { diff --git a/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.rs b/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.rs index 7ecdb1085ff2a..17af6c2e5186e 100644 --- a/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.rs +++ b/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.rs @@ -11,6 +11,6 @@ trait Bar {} impl Bar for &() {} fn foo() {} -//~^ ERROR the trait `for<'a> Bar` is not implemented for `&'a T` +//~^ ERROR the trait `Bar` is not implemented for `&T` fn main() {} diff --git a/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr b/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr index fcb9e8830bd3c..279ca5efbba4b 100644 --- a/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr +++ b/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `for<'a> Bar` is not implemented for `&'a T` +error[E0277]: the trait `Bar` is not implemented for `&T` --> $DIR/correct-binder-for-arbitrary-bound-sugg.rs:13:11 | LL | fn foo() {} diff --git a/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.rs b/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.rs index f4a926128c566..aabd59d93ac1c 100644 --- a/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.rs +++ b/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.rs @@ -14,5 +14,5 @@ where fn main() { let s = S; - foo::(s); //~ ERROR trait `for<'b> Trait` is not implemented for `&'b S` + foo::(s); //~ ERROR trait `Trait` is not implemented for `&S` } diff --git a/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr b/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr index d29db9553d6dd..60c124d9a11fd 100644 --- a/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr +++ b/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `for<'b> Trait` is not implemented for `&'b S` +error[E0277]: the trait `Trait` is not implemented for `&S` --> $DIR/imm-ref-trait-object-literal-bound-regions.rs:17:14 | LL | foo::(s); diff --git a/tests/ui/suggestions/issue-89333.stderr b/tests/ui/suggestions/issue-89333.stderr index dd39f4e2a1c6f..3d2f9a943932e 100644 --- a/tests/ui/suggestions/issue-89333.stderr +++ b/tests/ui/suggestions/issue-89333.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `for<'a> Trait` is not implemented for `&'a _` +error[E0277]: the trait `Trait` is not implemented for `&_` --> $DIR/issue-89333.rs:6:5 | LL | test(&|| 0); diff --git a/tests/ui/suggestions/issue-96223.stderr b/tests/ui/suggestions/issue-96223.stderr index 8132c88dc4c8c..18ab445913d64 100644 --- a/tests/ui/suggestions/issue-96223.stderr +++ b/tests/ui/suggestions/issue-96223.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `for<'de> Foo<'_>` is not implemented for `EmptyBis<'de>` +error[E0277]: the trait `Foo<'_>` is not implemented for `EmptyBis<'_>` --> $DIR/issue-96223.rs:49:17 | LL | icey_bounds(&p); diff --git a/tests/ui/traits/dont-autoderef-ty-with-escaping-var.rs b/tests/ui/traits/dont-autoderef-ty-with-escaping-var.rs index 61075fde8f8e8..10d33aa8855ab 100644 --- a/tests/ui/traits/dont-autoderef-ty-with-escaping-var.rs +++ b/tests/ui/traits/dont-autoderef-ty-with-escaping-var.rs @@ -16,7 +16,7 @@ where fn coerce_lifetime2() { >::ref_foo(unknown); //~^ ERROR cannot find value `unknown` in this scope - //~| ERROR trait `for<'a> Foo<'static, i32>` is not implemented for `&'a mut Vec<&'a u32>` + //~| ERROR trait `Foo<'_, i32>` is not implemented for `&mut Vec<&u32>` } fn main() {} diff --git a/tests/ui/traits/dont-autoderef-ty-with-escaping-var.stderr b/tests/ui/traits/dont-autoderef-ty-with-escaping-var.stderr index c230374b8a166..d0b570660508e 100644 --- a/tests/ui/traits/dont-autoderef-ty-with-escaping-var.stderr +++ b/tests/ui/traits/dont-autoderef-ty-with-escaping-var.stderr @@ -4,7 +4,7 @@ error[E0425]: cannot find value `unknown` in this scope LL | >::ref_foo(unknown); | ^^^^^^^ not found in this scope -error[E0277]: the trait `for<'a> Foo<'static, i32>` is not implemented for `&'a mut Vec<&'a u32>` +error[E0277]: the trait `Foo<'_, i32>` is not implemented for `&mut Vec<&u32>` --> $DIR/dont-autoderef-ty-with-escaping-var.rs:17:6 | LL | >::ref_foo(unknown); diff --git a/tests/ui/traits/issue-71036.rs b/tests/ui/traits/issue-71036.rs index f5693bae66bd1..18140f0ae3b02 100644 --- a/tests/ui/traits/issue-71036.rs +++ b/tests/ui/traits/issue-71036.rs @@ -9,7 +9,7 @@ struct Foo<'a, T: ?Sized> { } impl<'a, T: ?Sized + Unsize, U: ?Sized> DispatchFromDyn> for Foo<'a, T> {} -//~^ ERROR trait `Unsize<&'a U>` is not implemented for `&'a T` +//~^ ERROR trait `Unsize<&U>` is not implemented for `&T` //~| NOTE the trait `Unsize<&'a U>` is not implemented for `&'a T` //~| NOTE all implementations of `Unsize` are provided automatically by the compiler //~| NOTE required for diff --git a/tests/ui/traits/issue-71036.stderr b/tests/ui/traits/issue-71036.stderr index 94b375cf0a7ed..470f95800e72b 100644 --- a/tests/ui/traits/issue-71036.stderr +++ b/tests/ui/traits/issue-71036.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `Unsize<&'a U>` is not implemented for `&'a T` +error[E0277]: the trait `Unsize<&U>` is not implemented for `&T` --> $DIR/issue-71036.rs:11:1 | LL | impl<'a, T: ?Sized + Unsize, U: ?Sized> DispatchFromDyn> for Foo<'a, T> {} diff --git a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.rs b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.rs index b794992d02675..fa2b32596957a 100644 --- a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.rs +++ b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.rs @@ -7,7 +7,7 @@ type X = impl Into<&'static A>; fn f(a: &'static A, b: B) -> (X, X) { - //~^ ERROR trait `From<&A>` is not implemented for `&'static B` + //~^ ERROR trait `From<&A>` is not implemented for `&B` (a, a) } diff --git a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr index efa4b97d936ff..c5e1b0bf18a37 100644 --- a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr +++ b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `From<&A>` is not implemented for `&'static B` +error[E0277]: the trait `From<&A>` is not implemented for `&B` --> $DIR/multiple-def-uses-in-one-fn.rs:9:45 | LL | fn f(a: &'static A, b: B) -> (X, X) { diff --git a/tests/ui/wf/hir-wf-canonicalized.rs b/tests/ui/wf/hir-wf-canonicalized.rs index d3237e9ab2057..6a63c7f252b8f 100644 --- a/tests/ui/wf/hir-wf-canonicalized.rs +++ b/tests/ui/wf/hir-wf-canonicalized.rs @@ -8,8 +8,8 @@ trait Callback: Fn(&Bar<'_, T>, &T::V) {} struct Bar<'a, T> { callback: Box>>>, - //~^ ERROR trait `Foo` is not implemented for `Bar<'a, T>` - //~| ERROR trait `Foo` is not implemented for `(dyn Callback, Output = ()> + 'static)` + //~^ ERROR trait `Foo` is not implemented for `Bar<'_, T>` + //~| ERROR trait `Foo` is not implemented for `dyn Callback, Output = ()>` //~| ERROR the size for values of type `(dyn Callback, Output = ()> + 'static)` cannot be known at compilation time } diff --git a/tests/ui/wf/hir-wf-canonicalized.stderr b/tests/ui/wf/hir-wf-canonicalized.stderr index 297be0d51aaaf..8039ce47a7738 100644 --- a/tests/ui/wf/hir-wf-canonicalized.stderr +++ b/tests/ui/wf/hir-wf-canonicalized.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `Foo` is not implemented for `Bar<'a, T>` +error[E0277]: the trait `Foo` is not implemented for `Bar<'_, T>` --> $DIR/hir-wf-canonicalized.rs:10:15 | LL | callback: Box>>>, @@ -10,7 +10,7 @@ help: this trait has no implementations, consider adding one LL | trait Foo { | ^^^^^^^^^ -error[E0277]: the trait `Foo` is not implemented for `(dyn Callback, Output = ()> + 'static)` +error[E0277]: the trait `Foo` is not implemented for `dyn Callback, Output = ()>` --> $DIR/hir-wf-canonicalized.rs:10:15 | LL | callback: Box>>>, diff --git a/tests/ui/wf/issue-103573.rs b/tests/ui/wf/issue-103573.rs index 5100f484c65bf..197acc568343c 100644 --- a/tests/ui/wf/issue-103573.rs +++ b/tests/ui/wf/issue-103573.rs @@ -16,7 +16,7 @@ pub trait TraitC { type TypeC<'a>: TraitB; fn g<'a>(_: &< as TraitB>::TypeB as TraitA>::TypeA); - //~^ ERROR trait `TraitA` is not implemented for `<>::TypeC<'a> as TraitB>::TypeB` + //~^ ERROR trait `TraitA` is not implemented for `<>::TypeC<'_> as TraitB>::TypeB` } fn main() {} diff --git a/tests/ui/wf/issue-103573.stderr b/tests/ui/wf/issue-103573.stderr index bc08058465e44..3bba5e7abb29a 100644 --- a/tests/ui/wf/issue-103573.stderr +++ b/tests/ui/wf/issue-103573.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `TraitA` is not implemented for `<>::TypeC<'a> as TraitB>::TypeB` +error[E0277]: the trait `TraitA` is not implemented for `<>::TypeC<'_> as TraitB>::TypeB` --> $DIR/issue-103573.rs:18:18 | LL | fn g<'a>(_: &< as TraitB>::TypeB as TraitA>::TypeA); diff --git a/tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr b/tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr index 67d7b85f38184..3541396a2e54b 100644 --- a/tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr +++ b/tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait `for<'b> Foo` is not implemented for `fn(&'b ())` +error[E0277]: the trait `Foo` is not implemented for `fn(&())` --> $DIR/higher-ranked-fn-type.rs:20:5 | LL | called() diff --git a/tests/ui/where-clauses/higher-ranked-fn-type.rs b/tests/ui/where-clauses/higher-ranked-fn-type.rs index a90fd8a371519..eb0a564009819 100644 --- a/tests/ui/where-clauses/higher-ranked-fn-type.rs +++ b/tests/ui/where-clauses/higher-ranked-fn-type.rs @@ -18,8 +18,8 @@ where (for<'a> fn(&'a ())): Foo, { called() - //[quiet]~^ ERROR trait `for<'b> Foo` is not implemented for `fn(&'b ())` - //[verbose]~^^ ERROR the trait `for Foo` is not implemented for `fn(&ReBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b) }) ())` +error[E0277]: the trait `Foo` is not implemented for `fn(&ReErased ())` --> $DIR/higher-ranked-fn-type.rs:20:5 | LL | called() From f80daf49b3fea5b2489dec0b5fa38b44e85b5143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Thu, 29 Feb 2024 17:02:43 +0000 Subject: [PATCH 4/4] Erase lifetime in E0277 default label --- .../src/traits/error_reporting/suggestions.rs | 13 ++++++++++--- .../hr-associated-type-bound-object.stderr | 6 +++--- .../hr-associated-type-bound-param-6.stderr | 4 ++-- tests/ui/associated-types/issue-43924.stderr | 2 +- tests/ui/associated-types/issue-59324.stderr | 2 +- .../ui/async-await/awaiting-unsized-param.stderr | 2 +- tests/ui/closures/capture-unsized-by-move.stderr | 2 +- tests/ui/closures/issue-111932.stderr | 2 +- tests/ui/consts/const-unsized.stderr | 8 ++++---- .../block_instead_of_closure_in_arg.stderr | 2 +- .../feature-gate-trivial_bounds.stderr | 2 +- .../feature-gate-unsized_fn_params.stderr | 6 +++--- .../feature-gate-unsized_locals.stderr | 2 +- tests/ui/for/issue-20605.next.stderr | 2 +- tests/ui/function-pointer/unsized-ret.stderr | 2 +- .../generic-associated-types/issue-101020.stderr | 2 +- ...ed-gat-bound-during-assoc-ty-selection.stderr | 2 +- .../unknown-lifetime-ice-119827.stderr | 2 +- .../trait-bounds/fn-ptr.classic.stderr | 2 +- ...b-higher-ranker-supertraits-transitive.stderr | 2 +- .../hrtb-higher-ranker-supertraits.stderr | 4 ++-- .../normalize-under-binder/issue-85455.stderr | 4 ++-- .../normalize-under-binder/issue-89118.stderr | 6 +++--- .../dyn-trait-return-should-be-impl-trait.stderr | 4 ++-- ...-implicit-hrtb-without-dyn.edition2015.stderr | 2 +- ...-implicit-hrtb-without-dyn.edition2021.stderr | 2 +- tests/ui/impl-trait/nested-rpit-hrtb.stderr | 6 +++--- tests/ui/issues/issue-23281.stderr | 2 +- tests/ui/issues/issue-24446.stderr | 6 +++--- tests/ui/issues/issue-35570.stderr | 4 ++-- tests/ui/issues/issue-42312.stderr | 2 +- tests/ui/issues/issue-5883.stderr | 2 +- tests/ui/kindck/kindck-copy.stderr | 8 ++++---- tests/ui/kindck/kindck-send-object.stderr | 2 +- tests/ui/kindck/kindck-send-object1.stderr | 4 ++-- tests/ui/kindck/kindck-send-object2.stderr | 2 +- tests/ui/kindck/kindck-send-unsafe.stderr | 2 +- .../lifetimes/issue-76168-hr-outlives-3.stderr | 6 +++--- tests/ui/methods/inherent-bound-in-probe.stderr | 2 +- .../assoc_type_bounds_implicit_sized.stderr | 2 +- .../avoid-ice-on-warning-2.new.stderr | 2 +- .../avoid-ice-on-warning-2.old.stderr | 2 +- tests/ui/offset-of/offset-of-dst-field.stderr | 2 +- ...ons-implied-bounds-projection-gap-hr-1.stderr | 4 ++-- tests/ui/resolve/issue-3907-2.stderr | 2 +- tests/ui/resolve/issue-5035-2.stderr | 2 +- .../ice-112822-expected-type-for-param.stderr | 2 +- .../default-associated-type-bound-2.stderr | 2 +- ...orrect-binder-for-arbitrary-bound-sugg.stderr | 2 +- ...ref-trait-object-literal-bound-regions.stderr | 2 +- tests/ui/suggestions/issue-89333.stderr | 2 +- tests/ui/suggestions/issue-96223.stderr | 2 +- .../traits/alias/dont-elaborate-non-self.stderr | 2 +- .../check-trait-object-bounds-2.stderr | 2 +- .../traits/bound/not-on-bare-trait-2021.stderr | 4 ++-- tests/ui/traits/bound/not-on-bare-trait.stderr | 4 ++-- .../dont-autoderef-ty-with-escaping-var.stderr | 2 +- tests/ui/traits/issue-106072.stderr | 2 +- tests/ui/traits/issue-71036.rs | 2 +- tests/ui/traits/issue-71036.stderr | 2 +- .../multiple-def-uses-in-one-fn.stderr | 2 +- .../self-referential-3.stderr | 2 +- .../self-referential-4.stderr | 6 +++--- .../self-referential.stderr | 6 +++--- .../unboxed-closures-unsafe-extern-fn.stderr | 6 +++--- .../unboxed-closures-wrong-abi.stderr | 6 +++--- ...oxed-closures-wrong-arg-type-extern-fn.stderr | 6 +++--- tests/ui/unsized/unsized-enum2.stderr | 16 ++++++++-------- tests/ui/wf/hir-wf-canonicalized.stderr | 6 +++--- tests/ui/wf/hir-wf-check-erase-regions.stderr | 6 +++--- tests/ui/wf/issue-103573.stderr | 2 +- tests/ui/wf/wf-fn-where-clause.stderr | 2 +- .../higher-ranked-fn-type.quiet.stderr | 2 +- .../higher-ranked-fn-type.verbose.stderr | 2 +- 74 files changed, 131 insertions(+), 124 deletions(-) diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index f95a5be7ff004..0c647f08514bc 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -4773,16 +4773,23 @@ pub(super) fn get_explanation_based_on_obligation<'tcx>( Some(desc) => format!(" {desc}"), None => String::new(), }; + let pred = tcx.erase_regions(if tcx.features().non_lifetime_binders { + // We can't erase the lifetime bounds on their own when this feature is enabled. + // `instantiate_bound_regions_with_erased` expects there to be no type bounds. + trait_predicate.skip_binder() + } else { + tcx.instantiate_bound_regions_with_erased(*trait_predicate) + }); if let ty::ImplPolarity::Positive = trait_predicate.polarity() { format!( "{pre_message}the trait `{}` is not implemented for{desc} `{}`{post}", - trait_predicate.print_modifiers_and_trait_path(), - tcx.short_ty_string(trait_ref.skip_binder().self_ty(), &mut None), + pred.print_modifiers_and_trait_path(), + tcx.short_ty_string(pred.self_ty(), &mut None), ) } else { // "the trait bound `!Send: T` is not satisfied" reads better than "`!Send` is // not implemented for `T`". - format!("{pre_message}the trait bound `{trait_predicate}` is not satisfied{post}") + format!("{pre_message}the trait bound `{pred}` is not satisfied{post}") } } } diff --git a/tests/ui/associated-types/hr-associated-type-bound-object.stderr b/tests/ui/associated-types/hr-associated-type-bound-object.stderr index 4c5a041b417c0..0230b49b34267 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-object.stderr +++ b/tests/ui/associated-types/hr-associated-type-bound-object.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `Clone` is not implemented for `>::U` --> $DIR/hr-associated-type-bound-object.rs:7:13 | LL | fn f<'a, T: X<'a> + ?Sized>(x: &>::U) { - | ^^^^^ the trait `for<'b> Clone` is not implemented for `>::U` + | ^^^^^ the trait `Clone` is not implemented for `>::U` | note: required by a bound in `X` --> $DIR/hr-associated-type-bound-object.rs:3:33 @@ -21,7 +21,7 @@ error[E0277]: the trait `Clone` is not implemented for `>::U` --> $DIR/hr-associated-type-bound-object.rs:9:7 | LL | <>::U>::clone(x); - | ^ the trait `for<'b> Clone` is not implemented for `>::U` + | ^ the trait `Clone` is not implemented for `>::U` | note: required by a bound in `X::U` --> $DIR/hr-associated-type-bound-object.rs:3:33 @@ -51,7 +51,7 @@ error[E0277]: the trait `Clone` is not implemented for `>::U` --> $DIR/hr-associated-type-bound-object.rs:9:5 | LL | <>::U>::clone(x); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'b> Clone` is not implemented for `>::U` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `>::U` | note: required by a bound in `X` --> $DIR/hr-associated-type-bound-object.rs:3:33 diff --git a/tests/ui/associated-types/hr-associated-type-bound-param-6.stderr b/tests/ui/associated-types/hr-associated-type-bound-param-6.stderr index bae81b46458d7..5b69b2229c11f 100644 --- a/tests/ui/associated-types/hr-associated-type-bound-param-6.stderr +++ b/tests/ui/associated-types/hr-associated-type-bound-param-6.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `X<'_, T>` is not implemented for `T` --> $DIR/hr-associated-type-bound-param-6.rs:12:12 | LL | impl X<'_, T> for (S,) { - | ^^^^^^^^ the trait `for<'b> X<'b, T>` is not implemented for `T` + | ^^^^^^^^ the trait `X<'_, T>` is not implemented for `T` | help: consider restricting type parameter `T` | @@ -13,7 +13,7 @@ error[E0277]: the trait `X<'_, i32>` is not implemented for `i32` --> $DIR/hr-associated-type-bound-param-6.rs:18:5 | LL | <(i32,) as X>::f("abc"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'b> X<'b, i32>` is not implemented for `i32` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `X<'_, i32>` is not implemented for `i32` | = help: the trait `X<'_, T>` is implemented for `(S,)` diff --git a/tests/ui/associated-types/issue-43924.stderr b/tests/ui/associated-types/issue-43924.stderr index 39ef7c7aa1b90..c4df333bbc515 100644 --- a/tests/ui/associated-types/issue-43924.stderr +++ b/tests/ui/associated-types/issue-43924.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `Default` is not implemented for `dyn ToString` --> $DIR/issue-43924.rs:7:45 | LL | type Out: Default + ToString + ?Sized = dyn ToString; - | ^^^^^^^^^^^^ the trait `Default` is not implemented for `(dyn ToString + 'static)` + | ^^^^^^^^^^^^ the trait `Default` is not implemented for `dyn ToString` | note: required by a bound in `Foo::Out` --> $DIR/issue-43924.rs:7:15 diff --git a/tests/ui/associated-types/issue-59324.stderr b/tests/ui/associated-types/issue-59324.stderr index e081f545bac7b..e6852a1d905f9 100644 --- a/tests/ui/associated-types/issue-59324.stderr +++ b/tests/ui/associated-types/issue-59324.stderr @@ -84,7 +84,7 @@ error[E0277]: the size for values of type `(dyn ThriftService<(), AssocType = _> LL | fn with_factory(factory: dyn ThriftService<()>) {} | ^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn ThriftService<(), AssocType = _> + 'static)` + = help: the trait `Sized` is not implemented for `dyn ThriftService<(), AssocType = _>` = help: unsized fn params are gated as an unstable feature help: you can use `impl Trait` as the argument type | diff --git a/tests/ui/async-await/awaiting-unsized-param.stderr b/tests/ui/async-await/awaiting-unsized-param.stderr index 0104736976d5d..2bedfd98537f1 100644 --- a/tests/ui/async-await/awaiting-unsized-param.stderr +++ b/tests/ui/async-await/awaiting-unsized-param.stderr @@ -13,7 +13,7 @@ error[E0277]: the size for values of type `(dyn Future + Unpin + 'st LL | async fn bug(mut f: dyn Future + Unpin) -> T { | ^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Future + Unpin + 'static)` + = help: the trait `Sized` is not implemented for `dyn Future + Unpin` = note: all values captured by value by a closure must have a statically known size error: aborting due to 1 previous error; 1 warning emitted diff --git a/tests/ui/closures/capture-unsized-by-move.stderr b/tests/ui/closures/capture-unsized-by-move.stderr index 686bbab883951..ac542841c7800 100644 --- a/tests/ui/closures/capture-unsized-by-move.stderr +++ b/tests/ui/closures/capture-unsized-by-move.stderr @@ -6,7 +6,7 @@ LL | let k2 = move || { LL | k.to_string(); | ^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn std::fmt::Display + 'static)` + = help: the trait `Sized` is not implemented for `dyn std::fmt::Display` = note: all values captured by value by a closure must have a statically known size error: aborting due to 1 previous error diff --git a/tests/ui/closures/issue-111932.stderr b/tests/ui/closures/issue-111932.stderr index ff46b10d005dc..afd9c88593ba5 100644 --- a/tests/ui/closures/issue-111932.stderr +++ b/tests/ui/closures/issue-111932.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known LL | foos.for_each(|foo| { | ^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Foo + 'static)` + = help: the trait `Sized` is not implemented for `dyn Foo` = note: all function arguments must have a statically known size = help: unsized fn params are gated as an unstable feature diff --git a/tests/ui/consts/const-unsized.stderr b/tests/ui/consts/const-unsized.stderr index 0b69cad96510c..ada7520b30d04 100644 --- a/tests/ui/consts/const-unsized.stderr +++ b/tests/ui/consts/const-unsized.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync)); | ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)` + = help: the trait `Sized` is not implemented for `dyn Debug + Sync` error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time --> $DIR/const-unsized.rs:3:35 @@ -12,7 +12,7 @@ error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)` + = help: the trait `Sized` is not implemented for `dyn Debug + Sync` = note: constant expressions must have a statically known size error[E0277]: the size for values of type `str` cannot be known at compilation time @@ -38,7 +38,7 @@ error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync)); | ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)` + = help: the trait `Sized` is not implemented for `dyn Debug + Sync` error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time --> $DIR/const-unsized.rs:11:37 @@ -46,7 +46,7 @@ error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)` + = help: the trait `Sized` is not implemented for `dyn Debug + Sync` = note: constant expressions must have a statically known size error[E0277]: the size for values of type `str` cannot be known at compilation time diff --git a/tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.stderr b/tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.stderr index 1264d96934252..e1820aff1d9cd 100644 --- a/tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.stderr +++ b/tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.stderr @@ -14,7 +14,7 @@ LL | || } LL | | }); | |______^ expected an `FnOnce(&bool)` closure, found `bool` | - = help: the trait `for<'a> FnOnce<(&'a bool,)>` is not implemented for `bool` + = help: the trait `FnOnce<(&bool,)>` is not implemented for `bool` note: required by a bound in `Option::::filter` --> $SRC_DIR/core/src/option.rs:LL:COL help: you might have meant to create the closure instead of a block diff --git a/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr b/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr index 67d3801de3d48..6cc00ea4699e4 100644 --- a/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr +++ b/tests/ui/feature-gates/feature-gate-trivial_bounds.stderr @@ -94,7 +94,7 @@ error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at LL | fn unsized_local() where Dst: Sized { | ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: within `Dst<(dyn A + 'static)>`, the trait `Sized` is not implemented for `(dyn A + 'static)`, which is required by `Dst<(dyn A + 'static)>: Sized` + = help: within `Dst<(dyn A + 'static)>`, the trait `Sized` is not implemented for `dyn A`, which is required by `Dst<(dyn A + 'static)>: Sized` note: required because it appears within the type `Dst<(dyn A + 'static)>` --> $DIR/feature-gate-trivial_bounds.rs:48:8 | diff --git a/tests/ui/feature-gates/feature-gate-unsized_fn_params.stderr b/tests/ui/feature-gates/feature-gate-unsized_fn_params.stderr index b11c30eaad4b7..b55409c4d5a7a 100644 --- a/tests/ui/feature-gates/feature-gate-unsized_fn_params.stderr +++ b/tests/ui/feature-gates/feature-gate-unsized_fn_params.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known LL | fn foo(x: dyn Foo) { | ^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Foo + 'static)` + = help: the trait `Sized` is not implemented for `dyn Foo` = help: unsized fn params are gated as an unstable feature help: you can use `impl Trait` as the argument type | @@ -21,7 +21,7 @@ error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known LL | fn bar(x: Foo) { | ^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Foo + 'static)` + = help: the trait `Sized` is not implemented for `dyn Foo` = help: unsized fn params are gated as an unstable feature help: you can use `impl Trait` as the argument type | @@ -51,7 +51,7 @@ error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known LL | foo(*x); | ^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Foo + 'static)` + = help: the trait `Sized` is not implemented for `dyn Foo` = note: all function arguments must have a statically known size = help: unsized fn params are gated as an unstable feature diff --git a/tests/ui/feature-gates/feature-gate-unsized_locals.stderr b/tests/ui/feature-gates/feature-gate-unsized_locals.stderr index f1595e034be55..63dbdc96afa95 100644 --- a/tests/ui/feature-gates/feature-gate-unsized_locals.stderr +++ b/tests/ui/feature-gates/feature-gate-unsized_locals.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn FnOnce() + 'static)` cannot be k LL | fn f(f: dyn FnOnce()) {} | ^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn FnOnce() + 'static)` + = help: the trait `Sized` is not implemented for `dyn FnOnce()` = help: unsized fn params are gated as an unstable feature help: you can use `impl Trait` as the argument type | diff --git a/tests/ui/for/issue-20605.next.stderr b/tests/ui/for/issue-20605.next.stderr index 4095ee64989ec..8477cb7b0304b 100644 --- a/tests/ui/for/issue-20605.next.stderr +++ b/tests/ui/for/issue-20605.next.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `IntoIterator` is not implemented for `dyn Iterator $DIR/issue-20605.rs:5:17 | LL | for item in *things { *item = 0 } - | ^^^^^^^ the trait `IntoIterator` is not implemented for `dyn Iterator` + | ^^^^^^^ the trait `IntoIterator` is not implemented for `dyn Iterator` error: the type ` as IntoIterator>::IntoIter` is not well-formed --> $DIR/issue-20605.rs:5:17 diff --git a/tests/ui/function-pointer/unsized-ret.stderr b/tests/ui/function-pointer/unsized-ret.stderr index 81d603f4b20e3..d8691fabb84f0 100644 --- a/tests/ui/function-pointer/unsized-ret.stderr +++ b/tests/ui/function-pointer/unsized-ret.stderr @@ -18,7 +18,7 @@ error[E0277]: the size for values of type `(dyn std::fmt::Display + 'a)` cannot LL | foo:: fn(&'a ()) -> (dyn std::fmt::Display + 'a), _>(None, (&(),)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: within `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a)`, the trait `for<'a> Sized` is not implemented for `(dyn std::fmt::Display + 'a)`, which is required by `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a): Fn<_>` + = help: within `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a)`, the trait `Sized` is not implemented for `dyn std::fmt::Display`, which is required by `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a): Fn<_>` = note: required because it appears within the type `for<'a> fn(&'a ()) -> (dyn std::fmt::Display + 'a)` note: required by a bound in `foo` --> $DIR/unsized-ret.rs:5:11 diff --git a/tests/ui/generic-associated-types/issue-101020.stderr b/tests/ui/generic-associated-types/issue-101020.stderr index 17f2d064e1878..d6e8aa3ea7b71 100644 --- a/tests/ui/generic-associated-types/issue-101020.stderr +++ b/tests/ui/generic-associated-types/issue-101020.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `Foo<&mut ()>` is not implemented for `&mut ()` --> $DIR/issue-101020.rs:31:22 | LL | (&mut EmptyIter).consume(()); - | ^^^^^^^ the trait `for<'a> Foo<&'a mut ()>` is not implemented for `&'a mut ()`, which is required by `for<'a> &'a mut (): FuncInput<'a, &'a mut ()>` + | ^^^^^^^ the trait `Foo<&mut ()>` is not implemented for `&mut ()`, which is required by `for<'a> &'a mut (): FuncInput<'a, &'a mut ()>` | help: this trait has no implementations, consider adding one --> $DIR/issue-101020.rs:28:1 diff --git a/tests/ui/generic-associated-types/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.stderr b/tests/ui/generic-associated-types/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.stderr index 7813370ae63f8..502f13c87a1ca 100644 --- a/tests/ui/generic-associated-types/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.stderr +++ b/tests/ui/generic-associated-types/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn Deref + 'static)` ca LL | type Pointer = dyn Deref; | ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Deref + 'static)` + = help: the trait `Sized` is not implemented for `dyn Deref` note: required by a bound in `PointerFamily::Pointer` --> $DIR/issue-119942-unsatisified-gat-bound-during-assoc-ty-selection.rs:4:5 | diff --git a/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.stderr b/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.stderr index 58ab29283e5c8..7b3c6dd005743 100644 --- a/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.stderr +++ b/tests/ui/generic-associated-types/unknown-lifetime-ice-119827.stderr @@ -84,7 +84,7 @@ error[E0277]: the trait `Foo` is not implemented for `Box` --> $DIR/unknown-lifetime-ice-119827.rs:7:14 | LL | impl Foo for Box {} - | ^^^^^^^^^^^^ the trait `Foo` is not implemented for `Box<(dyn Foo + 'static)>` + | ^^^^^^^^^^^^ the trait `Foo` is not implemented for `Box` | = help: the trait `Foo` is implemented for `Box<(dyn Foo + 'static)>` diff --git a/tests/ui/higher-ranked/trait-bounds/fn-ptr.classic.stderr b/tests/ui/higher-ranked/trait-bounds/fn-ptr.classic.stderr index b322ea41c436d..3580ba11663a6 100644 --- a/tests/ui/higher-ranked/trait-bounds/fn-ptr.classic.stderr +++ b/tests/ui/higher-ranked/trait-bounds/fn-ptr.classic.stderr @@ -4,7 +4,7 @@ error[E0277]: expected a `Fn(&'w ())` closure, found `fn(&'w ())` LL | ice(); | ^^^^^ expected an `Fn(&'w ())` closure, found `fn(&'w ())` | - = help: the trait `for<'w> Fn<(&'w (),)>` is not implemented for `fn(&'w ())` + = help: the trait `Fn<(&(),)>` is not implemented for `fn(&())` note: required by a bound in `ice` --> $DIR/fn-ptr.rs:7:25 | diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr index c87410440f919..01df1834ab0ca 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits-transitive.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `Bar<'_>` is not implemented for `B` --> $DIR/hrtb-higher-ranker-supertraits-transitive.rs:47:26 | LL | want_bar_for_any_ccx(b); - | -------------------- ^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B` + | -------------------- ^ the trait `Bar<'_>` is not implemented for `B` | | | required by a bound introduced by this call | diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits.stderr index 0187791c8af7c..c4980b856f2a4 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits.stderr +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-higher-ranker-supertraits.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `Foo<'_>` is not implemented for `F` --> $DIR/hrtb-higher-ranker-supertraits.rs:18:26 | LL | want_foo_for_any_tcx(f); - | -------------------- ^ the trait `for<'tcx> Foo<'tcx>` is not implemented for `F` + | -------------------- ^ the trait `Foo<'_>` is not implemented for `F` | | | required by a bound introduced by this call | @@ -22,7 +22,7 @@ error[E0277]: the trait `Bar<'_>` is not implemented for `B` --> $DIR/hrtb-higher-ranker-supertraits.rs:35:26 | LL | want_bar_for_any_ccx(b); - | -------------------- ^ the trait `for<'ccx> Bar<'ccx>` is not implemented for `B` + | -------------------- ^ the trait `Bar<'_>` is not implemented for `B` | | | required by a bound introduced by this call | diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.stderr b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.stderr index b64e365969606..30bb2df934a9e 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.stderr +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-85455.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `SomeTrait<'_>` is not implemented for `T` --> $DIR/issue-85455.rs:8:14 | LL | callee:: >::Associated>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> SomeTrait<'a>` is not implemented for `T` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `SomeTrait<'_>` is not implemented for `T` | help: consider restricting type parameter `T` | @@ -13,7 +13,7 @@ error[E0277]: the trait `SomeTrait<'_>` is not implemented for `T` --> $DIR/issue-85455.rs:8:5 | LL | callee:: >::Associated>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> SomeTrait<'a>` is not implemented for `T` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `SomeTrait<'_>` is not implemented for `T` | help: consider restricting type parameter `T` | diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89118.stderr b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89118.stderr index 12807fb749190..8ae983a1bec95 100644 --- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89118.stderr +++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-89118.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `BufferMut` is not implemented for `&()` --> $DIR/issue-89118.rs:19:8 | LL | C: StackContext, - | ^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>` + | ^^^^^^^^^^^^ the trait `BufferMut` is not implemented for `&()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>` | help: this trait has no implementations, consider adding one --> $DIR/issue-89118.rs:1:1 @@ -29,7 +29,7 @@ error[E0277]: the trait `BufferMut` is not implemented for `&()` --> $DIR/issue-89118.rs:29:9 | LL | impl EthernetWorker {} - | ^^^^^^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>` + | ^^^^^^^^^^^^^^^^^ the trait `BufferMut` is not implemented for `&()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>` | help: this trait has no implementations, consider adding one --> $DIR/issue-89118.rs:1:1 @@ -56,7 +56,7 @@ error[E0277]: the trait `BufferMut` is not implemented for `&()` --> $DIR/issue-89118.rs:22:20 | LL | type Handler = Ctx; - | ^^^^^^^^^^^^^^^^^^ the trait `for<'a> BufferMut` is not implemented for `&'a ()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>` + | ^^^^^^^^^^^^^^^^^^ the trait `BufferMut` is not implemented for `&()`, which is required by `for<'a> Ctx<()>: BufferUdpStateContext<&'a ()>` | help: this trait has no implementations, consider adding one --> $DIR/issue-89118.rs:1:1 diff --git a/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr b/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr index f25269ca03207..56ee90d799cb2 100644 --- a/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr +++ b/tests/ui/impl-trait/dyn-trait-return-should-be-impl-trait.stderr @@ -16,7 +16,7 @@ LL | fn fuz() -> (usize, Trait) { (42, Struct) } | | | doesn't have a size known at compile-time | - = help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`, which is required by `(usize, (dyn Trait + 'static)): Sized` + = help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `dyn Trait`, which is required by `(usize, (dyn Trait + 'static)): Sized` = note: required because it appears within the type `(usize, (dyn Trait + 'static))` = note: the return type of a function must have a statically known size @@ -38,7 +38,7 @@ LL | fn bar() -> (usize, dyn Trait) { (42, Struct) } | | | doesn't have a size known at compile-time | - = help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`, which is required by `(usize, (dyn Trait + 'static)): Sized` + = help: within `(usize, (dyn Trait + 'static))`, the trait `Sized` is not implemented for `dyn Trait`, which is required by `(usize, (dyn Trait + 'static)): Sized` = note: required because it appears within the type `(usize, (dyn Trait + 'static))` = note: the return type of a function must have a statically known size diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr index ab7dd648442d5..40b19e4dd4423 100644 --- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr +++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2015.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `AsRef Fn(&'a ())>` is not implemented for ` --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:13 | LL | fn ice() -> impl AsRef { - | ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()` + | ^^^^^^^^^^^^^^^^^^^ the trait `AsRef Fn(&'a ())>` is not implemented for `()` error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr index 2a9d77c00f5c2..6b0b9157b763e 100644 --- a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr +++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `AsRef Fn(&'a ())>` is not implemented for ` --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:13 | LL | fn ice() -> impl AsRef { - | ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()` + | ^^^^^^^^^^^^^^^^^^^ the trait `AsRef Fn(&'a ())>` is not implemented for `()` error[E0782]: trait objects must include the `dyn` keyword --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:24 diff --git a/tests/ui/impl-trait/nested-rpit-hrtb.stderr b/tests/ui/impl-trait/nested-rpit-hrtb.stderr index dac3b1aaa672a..354c8da2183a8 100644 --- a/tests/ui/impl-trait/nested-rpit-hrtb.stderr +++ b/tests/ui/impl-trait/nested-rpit-hrtb.stderr @@ -90,7 +90,7 @@ error[E0277]: the trait `Qux<'_>` is not implemented for `&()` --> $DIR/nested-rpit-hrtb.rs:36:64 | LL | fn one_hrtb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl Qux<'a>> {} - | ^^^^^^^^^^^^ the trait `for<'a> Qux<'_>` is not implemented for `&'a ()` + | ^^^^^^^^^^^^ the trait `Qux<'_>` is not implemented for `&()` | = help: the trait `Qux<'_>` is implemented for `()` = help: for that trait implementation, expected `()`, found `&'a ()` @@ -99,7 +99,7 @@ error[E0277]: the trait `Qux<'_>` is not implemented for `&()` --> $DIR/nested-rpit-hrtb.rs:47:79 | LL | fn one_hrtb_mention_fn_trait_param_uses<'b>() -> impl for<'a> Bar<'a, Assoc = impl Qux<'b>> {} - | ^^^^^^^^^^^^ the trait `for<'a> Qux<'b>` is not implemented for `&'a ()` + | ^^^^^^^^^^^^ the trait `Qux<'_>` is not implemented for `&()` | = help: the trait `Qux<'_>` is implemented for `()` = help: for that trait implementation, expected `()`, found `&'a ()` @@ -117,7 +117,7 @@ error[E0277]: the trait `Qux<'_>` is not implemented for `&()` --> $DIR/nested-rpit-hrtb.rs:62:64 | LL | fn two_htrb_trait_param_uses() -> impl for<'a> Bar<'a, Assoc = impl for<'b> Qux<'b>> {} - | ^^^^^^^^^^^^^^^^^^^^ the trait `for<'a, 'b> Qux<'b>` is not implemented for `&'a ()` + | ^^^^^^^^^^^^^^^^^^^^ the trait `Qux<'_>` is not implemented for `&()` | = help: the trait `Qux<'_>` is implemented for `()` = help: for that trait implementation, expected `()`, found `&'a ()` diff --git a/tests/ui/issues/issue-23281.stderr b/tests/ui/issues/issue-23281.stderr index ee079f2deeca3..18e27e1116f10 100644 --- a/tests/ui/issues/issue-23281.stderr +++ b/tests/ui/issues/issue-23281.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn Fn() + 'static)` cannot be known LL | pub fn function(funs: Vec ()>) {} | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Fn() + 'static)` + = help: the trait `Sized` is not implemented for `dyn Fn()` note: required by an implicit `Sized` bound in `Vec` --> $DIR/issue-23281.rs:8:12 | diff --git a/tests/ui/issues/issue-24446.stderr b/tests/ui/issues/issue-24446.stderr index 9c206e5ef3c42..12d26da7fcf7b 100644 --- a/tests/ui/issues/issue-24446.stderr +++ b/tests/ui/issues/issue-24446.stderr @@ -4,7 +4,7 @@ error[E0277]: `(dyn Fn() -> u32 + 'static)` cannot be shared between threads saf LL | static foo: dyn Fn() -> u32 = || -> u32 { | ^^^^^^^^^^^^^^^ `(dyn Fn() -> u32 + 'static)` cannot be shared between threads safely | - = help: the trait `Sync` is not implemented for `(dyn Fn() -> u32 + 'static)` + = help: the trait `Sync` is not implemented for `dyn Fn() -> u32` = note: shared static variables must have a type that implements `Sync` error[E0277]: the size for values of type `(dyn Fn() -> u32 + 'static)` cannot be known at compilation time @@ -13,7 +13,7 @@ error[E0277]: the size for values of type `(dyn Fn() -> u32 + 'static)` cannot b LL | static foo: dyn Fn() -> u32 = || -> u32 { | ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Fn() -> u32 + 'static)` + = help: the trait `Sized` is not implemented for `dyn Fn() -> u32` error[E0277]: the size for values of type `(dyn Fn() -> u32 + 'static)` cannot be known at compilation time --> $DIR/issue-24446.rs:2:35 @@ -28,7 +28,7 @@ LL | | 0 LL | | }; | |_____^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Fn() -> u32 + 'static)` + = help: the trait `Sized` is not implemented for `dyn Fn() -> u32` = note: constant expressions must have a statically known size error[E0308]: mismatched types diff --git a/tests/ui/issues/issue-35570.stderr b/tests/ui/issues/issue-35570.stderr index 520c0c336027d..c3dd152c3ac4b 100644 --- a/tests/ui/issues/issue-35570.stderr +++ b/tests/ui/issues/issue-35570.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `Trait2<'_>` is not implemented for `()` --> $DIR/issue-35570.rs:8:40 | LL | fn _ice(param: Box Trait1<<() as Trait2<'a>>::Ty>>) { - | ^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Trait2<'a>` is not implemented for `()` + | ^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait2<'_>` is not implemented for `()` | help: this trait has no implementations, consider adding one --> $DIR/issue-35570.rs:4:1 @@ -19,7 +19,7 @@ LL | | LL | | LL | | let _e: (usize, usize) = unsafe{mem::transmute(param)}; LL | | } - | |_^ the trait `for<'a> Trait2<'a>` is not implemented for `()` + | |_^ the trait `Trait2<'_>` is not implemented for `()` | help: this trait has no implementations, consider adding one --> $DIR/issue-35570.rs:4:1 diff --git a/tests/ui/issues/issue-42312.stderr b/tests/ui/issues/issue-42312.stderr index 3ca6a2957e14b..727a06b5d1120 100644 --- a/tests/ui/issues/issue-42312.stderr +++ b/tests/ui/issues/issue-42312.stderr @@ -21,7 +21,7 @@ error[E0277]: the size for values of type `(dyn ToString + 'static)` cannot be k LL | pub fn f(_: dyn ToString) {} | ^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn ToString + 'static)` + = help: the trait `Sized` is not implemented for `dyn ToString` = help: unsized fn params are gated as an unstable feature help: you can use `impl Trait` as the argument type | diff --git a/tests/ui/issues/issue-5883.stderr b/tests/ui/issues/issue-5883.stderr index 51d9708e0fa40..019d3c40371a9 100644 --- a/tests/ui/issues/issue-5883.stderr +++ b/tests/ui/issues/issue-5883.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at LL | r: dyn A + 'static | ^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn A + 'static)` + = help: the trait `Sized` is not implemented for `dyn A` = help: unsized fn params are gated as an unstable feature help: you can use `impl Trait` as the argument type | diff --git a/tests/ui/kindck/kindck-copy.stderr b/tests/ui/kindck/kindck-copy.stderr index d06f2548be179..47f137830d46b 100644 --- a/tests/ui/kindck/kindck-copy.stderr +++ b/tests/ui/kindck/kindck-copy.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `Copy` is not implemented for `&mut isize` --> $DIR/kindck-copy.rs:27:19 | LL | assert_copy::<&'static mut isize>(); - | ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `&'static mut isize` + | ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `&mut isize` | note: required by a bound in `assert_copy` --> $DIR/kindck-copy.rs:5:18 @@ -19,7 +19,7 @@ error[E0277]: the trait `Copy` is not implemented for `&mut isize` --> $DIR/kindck-copy.rs:28:19 | LL | assert_copy::<&'a mut isize>(); - | ^^^^^^^^^^^^^ the trait `Copy` is not implemented for `&'a mut isize` + | ^^^^^^^^^^^^^ the trait `Copy` is not implemented for `&mut isize` | note: required by a bound in `assert_copy` --> $DIR/kindck-copy.rs:5:18 @@ -72,7 +72,7 @@ error[E0277]: the trait `Copy` is not implemented for `Box<&mut isize>` --> $DIR/kindck-copy.rs:34:19 | LL | assert_copy::>(); - | ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Box<&'a mut isize>` + | ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Box<&mut isize>` | note: required by a bound in `assert_copy` --> $DIR/kindck-copy.rs:5:18 @@ -108,7 +108,7 @@ error[E0277]: the trait `Copy` is not implemented for `&mut dyn Dummy + Send` --> $DIR/kindck-copy.rs:46:19 | LL | assert_copy::<&'a mut (dyn Dummy + Send)>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `&'a mut (dyn Dummy + Send + 'a)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `&mut dyn Dummy + Send` | note: required by a bound in `assert_copy` --> $DIR/kindck-copy.rs:5:18 diff --git a/tests/ui/kindck/kindck-send-object.stderr b/tests/ui/kindck/kindck-send-object.stderr index 0fc9cb14c7d46..44894833db3e3 100644 --- a/tests/ui/kindck/kindck-send-object.stderr +++ b/tests/ui/kindck/kindck-send-object.stderr @@ -4,7 +4,7 @@ error[E0277]: `(dyn Dummy + 'static)` cannot be shared between threads safely LL | assert_send::<&'static (dyn Dummy + 'static)>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely | - = help: the trait `Sync` is not implemented for `(dyn Dummy + 'static)`, which is required by `&'static (dyn Dummy + 'static): Send` + = help: the trait `Sync` is not implemented for `dyn Dummy`, which is required by `&'static (dyn Dummy + 'static): Send` = note: required for `&'static (dyn Dummy + 'static)` to implement `Send` note: required by a bound in `assert_send` --> $DIR/kindck-send-object.rs:5:18 diff --git a/tests/ui/kindck/kindck-send-object1.stderr b/tests/ui/kindck/kindck-send-object1.stderr index 39343b9993b5a..740571224f48e 100644 --- a/tests/ui/kindck/kindck-send-object1.stderr +++ b/tests/ui/kindck/kindck-send-object1.stderr @@ -4,7 +4,7 @@ error[E0277]: `(dyn Dummy + 'a)` cannot be shared between threads safely LL | assert_send::<&'a dyn Dummy>(); | ^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely | - = help: the trait `Sync` is not implemented for `(dyn Dummy + 'a)`, which is required by `&'a (dyn Dummy + 'a): Send` + = help: the trait `Sync` is not implemented for `dyn Dummy`, which is required by `&'a (dyn Dummy + 'a): Send` = note: required for `&'a (dyn Dummy + 'a)` to implement `Send` note: required by a bound in `assert_send` --> $DIR/kindck-send-object1.rs:5:18 @@ -18,7 +18,7 @@ error[E0277]: `(dyn Dummy + 'a)` cannot be sent between threads safely LL | assert_send::>(); | ^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely | - = help: the trait `Send` is not implemented for `(dyn Dummy + 'a)`, which is required by `Box<(dyn Dummy + 'a)>: Send` + = help: the trait `Send` is not implemented for `dyn Dummy`, which is required by `Box<(dyn Dummy + 'a)>: Send` = note: required for `Unique<(dyn Dummy + 'a)>` to implement `Send` note: required because it appears within the type `Box<(dyn Dummy + 'a)>` --> $SRC_DIR/alloc/src/boxed.rs:LL:COL diff --git a/tests/ui/kindck/kindck-send-object2.stderr b/tests/ui/kindck/kindck-send-object2.stderr index 758a517e12885..735a354982a3b 100644 --- a/tests/ui/kindck/kindck-send-object2.stderr +++ b/tests/ui/kindck/kindck-send-object2.stderr @@ -4,7 +4,7 @@ error[E0277]: `(dyn Dummy + 'static)` cannot be shared between threads safely LL | assert_send::<&'static dyn Dummy>(); | ^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely | - = help: the trait `Sync` is not implemented for `(dyn Dummy + 'static)`, which is required by `&'static (dyn Dummy + 'static): Send` + = help: the trait `Sync` is not implemented for `dyn Dummy`, which is required by `&'static (dyn Dummy + 'static): Send` = note: required for `&'static (dyn Dummy + 'static)` to implement `Send` note: required by a bound in `assert_send` --> $DIR/kindck-send-object2.rs:3:18 diff --git a/tests/ui/kindck/kindck-send-unsafe.stderr b/tests/ui/kindck/kindck-send-unsafe.stderr index f1a5054abbc47..78cd16f63db4c 100644 --- a/tests/ui/kindck/kindck-send-unsafe.stderr +++ b/tests/ui/kindck/kindck-send-unsafe.stderr @@ -17,7 +17,7 @@ error[E0277]: `*mut &'a isize` cannot be sent between threads safely LL | assert_send::<*mut &'a isize>(); | ^^^^^^^^^^^^^^ `*mut &'a isize` cannot be sent between threads safely | - = help: the trait `Send` is not implemented for `*mut &'a isize` + = help: the trait `Send` is not implemented for `*mut &isize` note: required by a bound in `assert_send` --> $DIR/kindck-send-unsafe.rs:3:19 | diff --git a/tests/ui/lifetimes/issue-76168-hr-outlives-3.stderr b/tests/ui/lifetimes/issue-76168-hr-outlives-3.stderr index 89ebdb57f3c31..4833a0ce2a07f 100644 --- a/tests/ui/lifetimes/issue-76168-hr-outlives-3.stderr +++ b/tests/ui/lifetimes/issue-76168-hr-outlives-3.stderr @@ -9,7 +9,7 @@ LL | | F:, LL | | for<'a> >::Output: Future + 'a, | |__________________________________________________________________________^ expected an `FnOnce(&'a mut i32)` closure, found `i32` | - = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32` + = help: the trait `FnOnce<(&mut i32,)>` is not implemented for `i32` error[E0277]: expected a `FnOnce(&'a mut i32)` closure, found `i32` --> $DIR/issue-76168-hr-outlives-3.rs:6:10 @@ -17,7 +17,7 @@ error[E0277]: expected a `FnOnce(&'a mut i32)` closure, found `i32` LL | async fn wrapper(f: F) | ^^^^^^^ expected an `FnOnce(&'a mut i32)` closure, found `i32` | - = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32` + = help: the trait `FnOnce<(&mut i32,)>` is not implemented for `i32` error[E0277]: expected a `FnOnce(&'a mut i32)` closure, found `i32` --> $DIR/issue-76168-hr-outlives-3.rs:12:1 @@ -29,7 +29,7 @@ LL | | &mut i; LL | | } | |_^ expected an `FnOnce(&'a mut i32)` closure, found `i32` | - = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32` + = help: the trait `FnOnce<(&mut i32,)>` is not implemented for `i32` error: aborting due to 3 previous errors diff --git a/tests/ui/methods/inherent-bound-in-probe.stderr b/tests/ui/methods/inherent-bound-in-probe.stderr index 8d7cc462280d6..5a6ac42ad79af 100644 --- a/tests/ui/methods/inherent-bound-in-probe.stderr +++ b/tests/ui/methods/inherent-bound-in-probe.stderr @@ -4,7 +4,7 @@ error[E0277]: `Helper<'a, T>` is not an iterator LL | type IntoIter = Helper<'a, T>; | ^^^^^^^^^^^^^ `Helper<'a, T>` is not an iterator | - = help: the trait `Iterator` is not implemented for `Helper<'a, T>` + = help: the trait `Iterator` is not implemented for `Helper<'_, T>` note: required by a bound in `std::iter::IntoIterator::IntoIter` --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL diff --git a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr index 9bb770ce43199..8a90b76b901e1 100644 --- a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr +++ b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be know LL | type Item = dyn Trait; | ^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Trait + 'static)` + = help: the trait `Sized` is not implemented for `dyn Trait` note: required by a bound in `TraitWithAType::Item` --> $DIR/assoc_type_bounds_implicit_sized.rs:4:5 | diff --git a/tests/ui/object-safety/avoid-ice-on-warning-2.new.stderr b/tests/ui/object-safety/avoid-ice-on-warning-2.new.stderr index 0bc396390d7d2..2526465ec596f 100644 --- a/tests/ui/object-safety/avoid-ice-on-warning-2.new.stderr +++ b/tests/ui/object-safety/avoid-ice-on-warning-2.new.stderr @@ -24,7 +24,7 @@ error[E0277]: the size for values of type `(dyn Copy + 'static)` cannot be known LL | fn id(f: Copy) -> usize { | ^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Copy + 'static)` + = help: the trait `Sized` is not implemented for `dyn Copy` = help: unsized fn params are gated as an unstable feature help: you can use `impl Trait` as the argument type | diff --git a/tests/ui/object-safety/avoid-ice-on-warning-2.old.stderr b/tests/ui/object-safety/avoid-ice-on-warning-2.old.stderr index f1f33a6c6d671..2943607c68bc6 100644 --- a/tests/ui/object-safety/avoid-ice-on-warning-2.old.stderr +++ b/tests/ui/object-safety/avoid-ice-on-warning-2.old.stderr @@ -52,7 +52,7 @@ error[E0277]: the size for values of type `(dyn Copy + 'static)` cannot be known LL | fn id(f: Copy) -> usize { | ^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Copy + 'static)` + = help: the trait `Sized` is not implemented for `dyn Copy` = help: unsized fn params are gated as an unstable feature help: you can use `impl Trait` as the argument type | diff --git a/tests/ui/offset-of/offset-of-dst-field.stderr b/tests/ui/offset-of/offset-of-dst-field.stderr index 753ba809e7da1..c1dc4abd84675 100644 --- a/tests/ui/offset-of/offset-of-dst-field.stderr +++ b/tests/ui/offset-of/offset-of-dst-field.stderr @@ -13,7 +13,7 @@ error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be know LL | offset_of!(Beta, z); | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Trait + 'static)` + = help: the trait `Sized` is not implemented for `dyn Trait` = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the size for values of type `Extern` cannot be known at compilation time diff --git a/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr b/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr index ff0505bd3e246..bb318d7125bfb 100644 --- a/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr +++ b/tests/ui/regions/regions-implied-bounds-projection-gap-hr-1.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `Trait2<'_, '_>` is not implemented for `T` --> $DIR/regions-implied-bounds-projection-gap-hr-1.rs:21:49 | LL | fn callee<'x, 'y, T>(t: &'x dyn for<'z> Trait1< >::Foo >) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'z> Trait2<'y, 'z>` is not implemented for `T` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait2<'_, '_>` is not implemented for `T` | help: consider restricting type parameter `T` | @@ -15,7 +15,7 @@ error[E0277]: the trait `Trait2<'_, '_>` is not implemented for `T` LL | / { LL | | LL | | } - | |_^ the trait `for<'z> Trait2<'y, 'z>` is not implemented for `T` + | |_^ the trait `Trait2<'_, '_>` is not implemented for `T` | help: consider restricting type parameter `T` | diff --git a/tests/ui/resolve/issue-3907-2.stderr b/tests/ui/resolve/issue-3907-2.stderr index 364edb788c68a..6fe3100a9f118 100644 --- a/tests/ui/resolve/issue-3907-2.stderr +++ b/tests/ui/resolve/issue-3907-2.stderr @@ -16,7 +16,7 @@ error[E0277]: the size for values of type `(dyn issue_3907::Foo + 'static)` cann LL | fn bar(_x: Foo) {} | ^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn issue_3907::Foo + 'static)` + = help: the trait `Sized` is not implemented for `dyn issue_3907::Foo` = help: unsized fn params are gated as an unstable feature help: function arguments must have a statically known size, borrowed types always have a known size | diff --git a/tests/ui/resolve/issue-5035-2.stderr b/tests/ui/resolve/issue-5035-2.stderr index 30721c0a206e7..6584a7bd9d39e 100644 --- a/tests/ui/resolve/issue-5035-2.stderr +++ b/tests/ui/resolve/issue-5035-2.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn I + 'static)` cannot be known at LL | fn foo(_x: K) {} | ^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn I + 'static)` + = help: the trait `Sized` is not implemented for `dyn I` = help: unsized fn params are gated as an unstable feature help: function arguments must have a statically known size, borrowed types always have a known size | diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.stderr index 0f6240cc03b80..6516216ff0d10 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.stderr @@ -20,7 +20,7 @@ error[E0277]: can't compare `&u8` with `&u8` LL | assert_eq!(first, &b'f'); | ^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `&u8 == &u8` | - = help: the trait `~const PartialEq<&u8>` is not implemented for `&u8` + = help: the trait `~const PartialEq` is not implemented for `&u8` = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0391]: cycle detected when computing type of opaque `test::{opaque#0}` diff --git a/tests/ui/specialization/default-associated-type-bound-2.stderr b/tests/ui/specialization/default-associated-type-bound-2.stderr index e02a945d9a9ba..4c646d3de8ec4 100644 --- a/tests/ui/specialization/default-associated-type-bound-2.stderr +++ b/tests/ui/specialization/default-associated-type-bound-2.stderr @@ -14,7 +14,7 @@ error[E0277]: can't compare `&'static B` with `B` LL | default type U = &'static B; | ^^^^^^^^^^ no implementation for `&'static B == B` | - = help: the trait `PartialEq` is not implemented for `&'static B` + = help: the trait `PartialEq` is not implemented for `&B` note: required by a bound in `X::U` --> $DIR/default-associated-type-bound-2.rs:6:13 | diff --git a/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr b/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr index 279ca5efbba4b..c9cb4852b61ec 100644 --- a/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr +++ b/tests/ui/suggestions/correct-binder-for-arbitrary-bound-sugg.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `Bar` is not implemented for `&T` --> $DIR/correct-binder-for-arbitrary-bound-sugg.rs:13:11 | LL | fn foo() {} - | ^^^ the trait `for<'a> Bar` is not implemented for `&'a T` + | ^^^ the trait `Bar` is not implemented for `&T` | note: required by a bound in `Foo` --> $DIR/correct-binder-for-arbitrary-bound-sugg.rs:3:23 diff --git a/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr b/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr index 60c124d9a11fd..df63bcc0c0dcb 100644 --- a/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr +++ b/tests/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `Trait` is not implemented for `&S` --> $DIR/imm-ref-trait-object-literal-bound-regions.rs:17:14 | LL | foo::(s); - | -------- ^ the trait `for<'b> Trait` is not implemented for `&'b S` + | -------- ^ the trait `Trait` is not implemented for `&S` | | | required by a bound introduced by this call | diff --git a/tests/ui/suggestions/issue-89333.stderr b/tests/ui/suggestions/issue-89333.stderr index 3d2f9a943932e..befa8eb871507 100644 --- a/tests/ui/suggestions/issue-89333.stderr +++ b/tests/ui/suggestions/issue-89333.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `Trait` is not implemented for `&_` --> $DIR/issue-89333.rs:6:5 | LL | test(&|| 0); - | ^^^^^^^^^^^ the trait `for<'a> Trait` is not implemented for `&'a _` + | ^^^^^^^^^^^ the trait `Trait` is not implemented for `&_` | help: this trait has no implementations, consider adding one --> $DIR/issue-89333.rs:9:1 diff --git a/tests/ui/suggestions/issue-96223.stderr b/tests/ui/suggestions/issue-96223.stderr index 18ab445913d64..050396214a42a 100644 --- a/tests/ui/suggestions/issue-96223.stderr +++ b/tests/ui/suggestions/issue-96223.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `Foo<'_>` is not implemented for `EmptyBis<'_>` --> $DIR/issue-96223.rs:49:17 | LL | icey_bounds(&p); - | ----------- ^^ the trait `for<'de> Foo<'_>` is not implemented for `EmptyBis<'de>`, which is required by `Empty: Dummy` + | ----------- ^^ the trait `Foo<'_>` is not implemented for `EmptyBis<'_>`, which is required by `Empty: Dummy` | | | required by a bound introduced by this call | diff --git a/tests/ui/traits/alias/dont-elaborate-non-self.stderr b/tests/ui/traits/alias/dont-elaborate-non-self.stderr index 4e2edb474c06a..ff011fb735662 100644 --- a/tests/ui/traits/alias/dont-elaborate-non-self.stderr +++ b/tests/ui/traits/alias/dont-elaborate-non-self.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn Fn() -> Fut + 'static)` cannot b LL | fn f(a: dyn F) {} | ^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Fn() -> Fut + 'static)` + = help: the trait `Sized` is not implemented for `dyn Fn() -> Fut` = help: unsized fn params are gated as an unstable feature help: you can use `impl Trait` as the argument type | diff --git a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr index b7a7784755ec0..460932a4273b8 100644 --- a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr +++ b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr @@ -4,7 +4,7 @@ error[E0277]: expected a `FnOnce(&i32)` closure, found `i32` LL | f:: X<'x, F = i32>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an `FnOnce(&i32)` closure, found `i32` | - = help: the trait `for<'a> FnOnce<(&'a i32,)>` is not implemented for `i32` + = help: the trait `FnOnce<(&i32,)>` is not implemented for `i32` note: required by a bound in `f` --> $DIR/check-trait-object-bounds-2.rs:8:9 | diff --git a/tests/ui/traits/bound/not-on-bare-trait-2021.stderr b/tests/ui/traits/bound/not-on-bare-trait-2021.stderr index 57d3bc8f10948..13b336cf69a2e 100644 --- a/tests/ui/traits/bound/not-on-bare-trait-2021.stderr +++ b/tests/ui/traits/bound/not-on-bare-trait-2021.stderr @@ -4,7 +4,7 @@ error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be LL | fn foo(_x: Foo + Send) { | ^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Foo + Send + 'static)` + = help: the trait `Sized` is not implemented for `dyn Foo + Send` = help: unsized fn params are gated as an unstable feature help: you can use `impl Trait` as the argument type | @@ -21,7 +21,7 @@ error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known LL | fn bar(x: Foo) -> Foo { | ^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Foo + 'static)` + = help: the trait `Sized` is not implemented for `dyn Foo` = help: unsized fn params are gated as an unstable feature help: you can use `impl Trait` as the argument type | diff --git a/tests/ui/traits/bound/not-on-bare-trait.stderr b/tests/ui/traits/bound/not-on-bare-trait.stderr index f1e7a28654a74..d9069e2c709c4 100644 --- a/tests/ui/traits/bound/not-on-bare-trait.stderr +++ b/tests/ui/traits/bound/not-on-bare-trait.stderr @@ -18,7 +18,7 @@ error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be LL | fn foo(_x: Foo + Send) { | ^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Foo + Send + 'static)` + = help: the trait `Sized` is not implemented for `dyn Foo + Send` = help: unsized fn params are gated as an unstable feature help: you can use `impl Trait` as the argument type | @@ -35,7 +35,7 @@ error[E0277]: the size for values of type `(dyn Foo + Send + 'static)` cannot be LL | fn bar(_x: (dyn Foo + Send)) { | ^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Foo + Send + 'static)` + = help: the trait `Sized` is not implemented for `dyn Foo + Send` = help: unsized fn params are gated as an unstable feature help: you can use `impl Trait` as the argument type | diff --git a/tests/ui/traits/dont-autoderef-ty-with-escaping-var.stderr b/tests/ui/traits/dont-autoderef-ty-with-escaping-var.stderr index d0b570660508e..dcdc3e826f978 100644 --- a/tests/ui/traits/dont-autoderef-ty-with-escaping-var.stderr +++ b/tests/ui/traits/dont-autoderef-ty-with-escaping-var.stderr @@ -8,7 +8,7 @@ error[E0277]: the trait `Foo<'_, i32>` is not implemented for `&mut Vec<&u32>` --> $DIR/dont-autoderef-ty-with-escaping-var.rs:17:6 | LL | >::ref_foo(unknown); - | ^^^ the trait `for<'a> Foo<'static, i32>` is not implemented for `&'a mut Vec<&'a u32>`, which is required by `i32: RefFoo` + | ^^^ the trait `Foo<'_, i32>` is not implemented for `&mut Vec<&u32>`, which is required by `i32: RefFoo` | help: this trait has no implementations, consider adding one --> $DIR/dont-autoderef-ty-with-escaping-var.rs:3:1 diff --git a/tests/ui/traits/issue-106072.stderr b/tests/ui/traits/issue-106072.stderr index 6476c8b3237ac..e8c4a2f206774 100644 --- a/tests/ui/traits/issue-106072.stderr +++ b/tests/ui/traits/issue-106072.stderr @@ -14,7 +14,7 @@ error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known LL | #[derive(Clone)] | ^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Foo + 'static)` + = help: the trait `Sized` is not implemented for `dyn Foo` note: required by a bound in `Clone` --> $SRC_DIR/core/src/clone.rs:LL:COL = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/traits/issue-71036.rs b/tests/ui/traits/issue-71036.rs index 18140f0ae3b02..a1d10a5c157d6 100644 --- a/tests/ui/traits/issue-71036.rs +++ b/tests/ui/traits/issue-71036.rs @@ -10,7 +10,7 @@ struct Foo<'a, T: ?Sized> { impl<'a, T: ?Sized + Unsize, U: ?Sized> DispatchFromDyn> for Foo<'a, T> {} //~^ ERROR trait `Unsize<&U>` is not implemented for `&T` -//~| NOTE the trait `Unsize<&'a U>` is not implemented for `&'a T` +//~| NOTE the trait `Unsize<&U>` is not implemented for `&T` //~| NOTE all implementations of `Unsize` are provided automatically by the compiler //~| NOTE required for diff --git a/tests/ui/traits/issue-71036.stderr b/tests/ui/traits/issue-71036.stderr index 470f95800e72b..54f823073e194 100644 --- a/tests/ui/traits/issue-71036.stderr +++ b/tests/ui/traits/issue-71036.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `Unsize<&U>` is not implemented for `&T` --> $DIR/issue-71036.rs:11:1 | LL | impl<'a, T: ?Sized + Unsize, U: ?Sized> DispatchFromDyn> for Foo<'a, T> {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Unsize<&'a U>` is not implemented for `&'a T`, which is required by `&'a &'a T: DispatchFromDyn<&'a &'a U>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Unsize<&U>` is not implemented for `&T`, which is required by `&'a &'a T: DispatchFromDyn<&'a &'a U>` | = note: all implementations of `Unsize` are provided automatically by the compiler, see for more information = note: required for `&'a &'a T` to implement `DispatchFromDyn<&'a &'a U>` diff --git a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr index c5e1b0bf18a37..e23f05c192de7 100644 --- a/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr +++ b/tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `From<&A>` is not implemented for `&B` --> $DIR/multiple-def-uses-in-one-fn.rs:9:45 | LL | fn f(a: &'static A, b: B) -> (X, X) { - | ^^^^^^^^^^^^^^^^^^ the trait `From<&A>` is not implemented for `&'static B`, which is required by `&A: Into<&'static B>` + | ^^^^^^^^^^^^^^^^^^ the trait `From<&A>` is not implemented for `&B`, which is required by `&A: Into<&'static B>` | = note: required for `&A` to implement `Into<&'static B>` help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement diff --git a/tests/ui/type-alias-impl-trait/self-referential-3.stderr b/tests/ui/type-alias-impl-trait/self-referential-3.stderr index 32eac622e5181..0ccd14ee83ce2 100644 --- a/tests/ui/type-alias-impl-trait/self-referential-3.stderr +++ b/tests/ui/type-alias-impl-trait/self-referential-3.stderr @@ -7,7 +7,7 @@ LL | LL | i | - return type was inferred to be `&i32` here | - = help: the trait `PartialEq>` is not implemented for `&i32` + = help: the trait `PartialEq>` is not implemented for `&i32` = help: the trait `PartialEq` is implemented for `i32` error: aborting due to 1 previous error diff --git a/tests/ui/type-alias-impl-trait/self-referential-4.stderr b/tests/ui/type-alias-impl-trait/self-referential-4.stderr index e7f9e232a2747..be989496af226 100644 --- a/tests/ui/type-alias-impl-trait/self-referential-4.stderr +++ b/tests/ui/type-alias-impl-trait/self-referential-4.stderr @@ -6,7 +6,7 @@ LL | fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> { LL | i | - return type was inferred to be `&i32` here | - = help: the trait `PartialEq>` is not implemented for `&i32` + = help: the trait `PartialEq>` is not implemented for `&i32` = help: the trait `PartialEq` is implemented for `i32` error[E0277]: can't compare `&i32` with `Foo<'static, 'b>` @@ -17,7 +17,7 @@ LL | fn foo<'a, 'b>(i: &'a i32) -> Foo<'a, 'b> { LL | i | - return type was inferred to be `&i32` here | - = help: the trait `PartialEq>` is not implemented for `&i32` + = help: the trait `PartialEq>` is not implemented for `&i32` = help: the trait `PartialEq` is implemented for `i32` error[E0277]: can't compare `&i32` with `Moo<'static, 'a>` @@ -28,7 +28,7 @@ LL | fn moo<'a, 'b>(i: &'a i32) -> Moo<'a, 'b> { LL | i | - return type was inferred to be `&i32` here | - = help: the trait `PartialEq>` is not implemented for `&i32` + = help: the trait `PartialEq>` is not implemented for `&i32` = help: the trait `PartialEq` is implemented for `i32` error: aborting due to 3 previous errors diff --git a/tests/ui/type-alias-impl-trait/self-referential.stderr b/tests/ui/type-alias-impl-trait/self-referential.stderr index 27506b8d06f80..69c1e1c7cd878 100644 --- a/tests/ui/type-alias-impl-trait/self-referential.stderr +++ b/tests/ui/type-alias-impl-trait/self-referential.stderr @@ -7,7 +7,7 @@ LL | LL | i | - return type was inferred to be `&i32` here | - = help: the trait `PartialEq>` is not implemented for `&i32` + = help: the trait `PartialEq>` is not implemented for `&i32` = help: the trait `PartialEq` is implemented for `i32` error[E0277]: can't compare `&i32` with `(i32, Foo<'a, 'b>::{opaque#0})` @@ -19,7 +19,7 @@ LL | LL | (42, i) | ------- return type was inferred to be `(i32, &i32)` here | - = help: the trait `PartialEq<(i32, Foo<'a, 'b>::{opaque#0})>` is not implemented for `&i32` + = help: the trait `PartialEq<(i32, Foo<'_, '_>::{opaque#0})>` is not implemented for `&i32` = help: the trait `PartialEq` is implemented for `i32` error[E0277]: can't compare `&i32` with `(i32, Moo<'b, 'a>::{opaque#0})` @@ -31,7 +31,7 @@ LL | LL | (42, i) | ------- return type was inferred to be `(i32, &i32)` here | - = help: the trait `PartialEq<(i32, Moo<'b, 'a>::{opaque#0})>` is not implemented for `&i32` + = help: the trait `PartialEq<(i32, Moo<'_, '_>::{opaque#0})>` is not implemented for `&i32` = help: the trait `PartialEq` is implemented for `i32` error: aborting due to 3 previous errors diff --git a/tests/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr b/tests/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr index d836af2b01495..2672a1e70bb28 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr +++ b/tests/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr @@ -6,7 +6,7 @@ LL | let x = call_it(&square, 22); | | | required by a bound introduced by this call | - = help: the trait `for<'a> Fn<(&'a isize,)>` is not implemented for fn item `for<'a> unsafe fn(&'a isize) -> isize {square}` + = help: the trait `Fn<(&isize,)>` is not implemented for fn item `for<'a> unsafe fn(&'a isize) -> isize {square}` = note: unsafe function cannot be called generically without an unsafe block note: required by a bound in `call_it` --> $DIR/unboxed-closures-unsafe-extern-fn.rs:9:15 @@ -22,7 +22,7 @@ LL | let y = call_it_mut(&mut square, 22); | | | required by a bound introduced by this call | - = help: the trait `for<'a> FnMut<(&'a isize,)>` is not implemented for fn item `for<'a> unsafe fn(&'a isize) -> isize {square}` + = help: the trait `FnMut<(&isize,)>` is not implemented for fn item `for<'a> unsafe fn(&'a isize) -> isize {square}` = note: unsafe function cannot be called generically without an unsafe block note: required by a bound in `call_it_mut` --> $DIR/unboxed-closures-unsafe-extern-fn.rs:12:19 @@ -38,7 +38,7 @@ LL | let z = call_it_once(square, 22); | | | required by a bound introduced by this call | - = help: the trait `for<'a> FnOnce<(&'a isize,)>` is not implemented for fn item `for<'a> unsafe fn(&'a isize) -> isize {square}` + = help: the trait `FnOnce<(&isize,)>` is not implemented for fn item `for<'a> unsafe fn(&'a isize) -> isize {square}` = note: unsafe function cannot be called generically without an unsafe block note: required by a bound in `call_it_once` --> $DIR/unboxed-closures-unsafe-extern-fn.rs:15:20 diff --git a/tests/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr b/tests/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr index c0dcf83a5bb06..a263f22117201 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr +++ b/tests/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr @@ -6,7 +6,7 @@ LL | let x = call_it(&square, 22); | | | required by a bound introduced by this call | - = help: the trait `for<'a> Fn<(&'a isize,)>` is not implemented for fn item `for<'a> extern "C" fn(&'a isize) -> isize {square}` + = help: the trait `Fn<(&isize,)>` is not implemented for fn item `for<'a> extern "C" fn(&'a isize) -> isize {square}` note: required by a bound in `call_it` --> $DIR/unboxed-closures-wrong-abi.rs:9:15 | @@ -21,7 +21,7 @@ LL | let y = call_it_mut(&mut square, 22); | | | required by a bound introduced by this call | - = help: the trait `for<'a> FnMut<(&'a isize,)>` is not implemented for fn item `for<'a> extern "C" fn(&'a isize) -> isize {square}` + = help: the trait `FnMut<(&isize,)>` is not implemented for fn item `for<'a> extern "C" fn(&'a isize) -> isize {square}` note: required by a bound in `call_it_mut` --> $DIR/unboxed-closures-wrong-abi.rs:12:19 | @@ -36,7 +36,7 @@ LL | let z = call_it_once(square, 22); | | | required by a bound introduced by this call | - = help: the trait `for<'a> FnOnce<(&'a isize,)>` is not implemented for fn item `for<'a> extern "C" fn(&'a isize) -> isize {square}` + = help: the trait `FnOnce<(&isize,)>` is not implemented for fn item `for<'a> extern "C" fn(&'a isize) -> isize {square}` note: required by a bound in `call_it_once` --> $DIR/unboxed-closures-wrong-abi.rs:15:20 | diff --git a/tests/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr b/tests/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr index d261c38f50c29..ae1fb8aaade1e 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr +++ b/tests/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr @@ -6,7 +6,7 @@ LL | let x = call_it(&square, 22); | | | required by a bound introduced by this call | - = help: the trait `for<'a> Fn<(&'a isize,)>` is not implemented for fn item `unsafe fn(isize) -> isize {square}` + = help: the trait `Fn<(&isize,)>` is not implemented for fn item `unsafe fn(isize) -> isize {square}` = note: unsafe function cannot be called generically without an unsafe block note: required by a bound in `call_it` --> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:10:15 @@ -22,7 +22,7 @@ LL | let y = call_it_mut(&mut square, 22); | | | required by a bound introduced by this call | - = help: the trait `for<'a> FnMut<(&'a isize,)>` is not implemented for fn item `unsafe fn(isize) -> isize {square}` + = help: the trait `FnMut<(&isize,)>` is not implemented for fn item `unsafe fn(isize) -> isize {square}` = note: unsafe function cannot be called generically without an unsafe block note: required by a bound in `call_it_mut` --> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:13:19 @@ -38,7 +38,7 @@ LL | let z = call_it_once(square, 22); | | | required by a bound introduced by this call | - = help: the trait `for<'a> FnOnce<(&'a isize,)>` is not implemented for fn item `unsafe fn(isize) -> isize {square}` + = help: the trait `FnOnce<(&isize,)>` is not implemented for fn item `unsafe fn(isize) -> isize {square}` = note: unsafe function cannot be called generically without an unsafe block note: required by a bound in `call_it_once` --> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:16:20 diff --git a/tests/ui/unsized/unsized-enum2.stderr b/tests/ui/unsized/unsized-enum2.stderr index 48cca6eb4bd06..ba46c75937f35 100644 --- a/tests/ui/unsized/unsized-enum2.stderr +++ b/tests/ui/unsized/unsized-enum2.stderr @@ -176,7 +176,7 @@ error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known LL | VM(dyn Foo), | ^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Foo + 'static)` + = help: the trait `Sized` is not implemented for `dyn Foo` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -194,7 +194,7 @@ error[E0277]: the size for values of type `(dyn Bar + 'static)` cannot be known LL | VN{x: dyn Bar}, | ^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Bar + 'static)` + = help: the trait `Sized` is not implemented for `dyn Bar` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -212,7 +212,7 @@ error[E0277]: the size for values of type `(dyn FooBar + 'static)` cannot be kno LL | VO(isize, dyn FooBar), | ^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn FooBar + 'static)` + = help: the trait `Sized` is not implemented for `dyn FooBar` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -230,7 +230,7 @@ error[E0277]: the size for values of type `(dyn BarFoo + 'static)` cannot be kno LL | VP{u: isize, x: dyn BarFoo}, | ^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn BarFoo + 'static)` + = help: the trait `Sized` is not implemented for `dyn BarFoo` = note: no field of an enum variant may have a dynamically sized type = help: change the field's type to have a statically known size help: borrowed types always have a statically known size @@ -320,7 +320,7 @@ error[E0277]: the size for values of type `(dyn PathHelper1 + 'static)` cannot b LL | VI(Path1), | ^^^^^ doesn't have a size known at compile-time | - = help: within `Path1`, the trait `Sized` is not implemented for `(dyn PathHelper1 + 'static)`, which is required by `Path1: Sized` + = help: within `Path1`, the trait `Sized` is not implemented for `dyn PathHelper1`, which is required by `Path1: Sized` note: required because it appears within the type `Path1` --> $DIR/unsized-enum2.rs:16:8 | @@ -343,7 +343,7 @@ error[E0277]: the size for values of type `(dyn PathHelper2 + 'static)` cannot b LL | VJ{x: Path2}, | ^^^^^ doesn't have a size known at compile-time | - = help: within `Path2`, the trait `Sized` is not implemented for `(dyn PathHelper2 + 'static)`, which is required by `Path2: Sized` + = help: within `Path2`, the trait `Sized` is not implemented for `dyn PathHelper2`, which is required by `Path2: Sized` note: required because it appears within the type `Path2` --> $DIR/unsized-enum2.rs:17:8 | @@ -366,7 +366,7 @@ error[E0277]: the size for values of type `(dyn PathHelper3 + 'static)` cannot b LL | VK(isize, Path3), | ^^^^^ doesn't have a size known at compile-time | - = help: within `Path3`, the trait `Sized` is not implemented for `(dyn PathHelper3 + 'static)`, which is required by `Path3: Sized` + = help: within `Path3`, the trait `Sized` is not implemented for `dyn PathHelper3`, which is required by `Path3: Sized` note: required because it appears within the type `Path3` --> $DIR/unsized-enum2.rs:18:8 | @@ -389,7 +389,7 @@ error[E0277]: the size for values of type `(dyn PathHelper4 + 'static)` cannot b LL | VL{u: isize, x: Path4}, | ^^^^^ doesn't have a size known at compile-time | - = help: within `Path4`, the trait `Sized` is not implemented for `(dyn PathHelper4 + 'static)`, which is required by `Path4: Sized` + = help: within `Path4`, the trait `Sized` is not implemented for `dyn PathHelper4`, which is required by `Path4: Sized` note: required because it appears within the type `Path4` --> $DIR/unsized-enum2.rs:19:8 | diff --git a/tests/ui/wf/hir-wf-canonicalized.stderr b/tests/ui/wf/hir-wf-canonicalized.stderr index 8039ce47a7738..da5cdfada24d2 100644 --- a/tests/ui/wf/hir-wf-canonicalized.stderr +++ b/tests/ui/wf/hir-wf-canonicalized.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `Foo` is not implemented for `Bar<'_, T>` --> $DIR/hir-wf-canonicalized.rs:10:15 | LL | callback: Box>>>, - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `Bar<'a, T>` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `Bar<'_, T>` | help: this trait has no implementations, consider adding one --> $DIR/hir-wf-canonicalized.rs:3:1 @@ -14,7 +14,7 @@ error[E0277]: the trait `Foo` is not implemented for `dyn Callback, O --> $DIR/hir-wf-canonicalized.rs:10:15 | LL | callback: Box>>>, - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `(dyn Callback, Output = ()> + 'static)` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `dyn Callback, Output = ()>` | help: this trait has no implementations, consider adding one --> $DIR/hir-wf-canonicalized.rs:3:1 @@ -28,7 +28,7 @@ error[E0277]: the size for values of type `(dyn Callback, Output = () LL | callback: Box>>>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Callback, Output = ()> + 'static)` + = help: the trait `Sized` is not implemented for `dyn Callback, Output = ()>` note: required by an implicit `Sized` bound in `Bar` --> $DIR/hir-wf-canonicalized.rs:9:16 | diff --git a/tests/ui/wf/hir-wf-check-erase-regions.stderr b/tests/ui/wf/hir-wf-check-erase-regions.stderr index 93449d60e9d0d..0fcbcc265c9be 100644 --- a/tests/ui/wf/hir-wf-check-erase-regions.stderr +++ b/tests/ui/wf/hir-wf-check-erase-regions.stderr @@ -4,7 +4,7 @@ error[E0277]: `&'a T` is not an iterator LL | type IntoIter = std::iter::Flatten>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&'a T` is not an iterator | - = help: the trait `Iterator` is not implemented for `&'a T`, which is required by `Flatten>: Iterator` + = help: the trait `Iterator` is not implemented for `&T`, which is required by `Flatten>: Iterator` = help: the trait `Iterator` is implemented for `&mut I` = note: required for `Flatten>` to implement `Iterator` note: required by a bound in `std::iter::IntoIterator::IntoIter` @@ -16,7 +16,7 @@ error[E0277]: `&'a T` is not an iterator LL | type IntoIter = std::iter::Flatten>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&'a T` is not an iterator | - = help: the trait `Iterator` is not implemented for `&'a T`, which is required by `&'a T: IntoIterator` + = help: the trait `Iterator` is not implemented for `&T`, which is required by `&'a T: IntoIterator` = help: the trait `Iterator` is implemented for `&mut I` = note: required for `&'a T` to implement `IntoIterator` note: required by a bound in `Flatten` @@ -28,7 +28,7 @@ error[E0277]: `&'a T` is not an iterator LL | fn into_iter(self) -> Self::IntoIter { | ^^^^^^^^^^^^^^ `&'a T` is not an iterator | - = help: the trait `Iterator` is not implemented for `&'a T`, which is required by `&'a T: IntoIterator` + = help: the trait `Iterator` is not implemented for `&T`, which is required by `&'a T: IntoIterator` = help: the trait `Iterator` is implemented for `&mut I` = note: required for `&'a T` to implement `IntoIterator` note: required by a bound in `Flatten` diff --git a/tests/ui/wf/issue-103573.stderr b/tests/ui/wf/issue-103573.stderr index 3bba5e7abb29a..42ac786e044f2 100644 --- a/tests/ui/wf/issue-103573.stderr +++ b/tests/ui/wf/issue-103573.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `TraitA` is not implemented for `<>::T --> $DIR/issue-103573.rs:18:18 | LL | fn g<'a>(_: &< as TraitB>::TypeB as TraitA>::TypeA); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TraitA` is not implemented for `<>::TypeC<'a> as TraitB>::TypeB` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TraitA` is not implemented for `<>::TypeC<'_> as TraitB>::TypeB` | help: consider further restricting the associated type | diff --git a/tests/ui/wf/wf-fn-where-clause.stderr b/tests/ui/wf/wf-fn-where-clause.stderr index c3af262ca2f18..7dd335bb6245f 100644 --- a/tests/ui/wf/wf-fn-where-clause.stderr +++ b/tests/ui/wf/wf-fn-where-clause.stderr @@ -29,7 +29,7 @@ error[E0277]: the size for values of type `(dyn Copy + 'static)` cannot be known LL | fn bar() where Vec:, {} | ^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `Sized` is not implemented for `(dyn Copy + 'static)` + = help: the trait `Sized` is not implemented for `dyn Copy` note: required by an implicit `Sized` bound in `Vec` --> $DIR/wf-fn-where-clause.rs:16:12 | diff --git a/tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr b/tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr index 3541396a2e54b..b27b4b7ece7d1 100644 --- a/tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr +++ b/tests/ui/where-clauses/higher-ranked-fn-type.quiet.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `Foo` is not implemented for `fn(&())` --> $DIR/higher-ranked-fn-type.rs:20:5 | LL | called() - | ^^^^^^^^ the trait `for<'b> Foo` is not implemented for `fn(&'b ())` + | ^^^^^^^^ the trait `Foo` is not implemented for `fn(&())` | help: this trait has no implementations, consider adding one --> $DIR/higher-ranked-fn-type.rs:6:1 diff --git a/tests/ui/where-clauses/higher-ranked-fn-type.verbose.stderr b/tests/ui/where-clauses/higher-ranked-fn-type.verbose.stderr index 82006008691c1..2891f5c1217a9 100644 --- a/tests/ui/where-clauses/higher-ranked-fn-type.verbose.stderr +++ b/tests/ui/where-clauses/higher-ranked-fn-type.verbose.stderr @@ -2,7 +2,7 @@ error[E0277]: the trait `Foo` is not implemented for `fn(&ReErased ())` --> $DIR/higher-ranked-fn-type.rs:20:5 | LL | called() - | ^^^^^^^^ the trait `for Foo` is not implemented for `fn(&ReBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[9e51]::called::'b), 'b) }) ())` + | ^^^^^^^^ the trait `Foo` is not implemented for `fn(&ReErased ())` | help: this trait has no implementations, consider adding one --> $DIR/higher-ranked-fn-type.rs:6:1