diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs index ca45e16d9d9..9bd49f5e053 100644 --- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs +++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs @@ -1272,7 +1272,7 @@ fn check_impl<'tcx>( wfcx.param_env, wfcx.body_id, &trait_pred, - ast_trait_ref.path.span, + ast_self_ty.span, item, ); debug!(?obligations); 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 bd6e627a3d0..a07a634b28a 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,8 +1,8 @@ error[E0277]: the trait bound `for<'b> T: X<'b, T>` is not satisfied - --> $DIR/hr-associated-type-bound-param-6.rs:12:12 + --> $DIR/hr-associated-type-bound-param-6.rs:12:25 | LL | impl<S, T> X<'_, T> for (S,) { - | ^^^^^^^^ the trait `for<'b> X<'b, T>` is not implemented for `T` + | ^^^^ the trait `for<'b> X<'b, T>` is not implemented for `T` | help: consider restricting type parameter `T` | diff --git a/tests/ui/associated-types/hr-associated-type-projection-1.stderr b/tests/ui/associated-types/hr-associated-type-projection-1.stderr index a65f84ae58e..ad83a5ca88c 100644 --- a/tests/ui/associated-types/hr-associated-type-projection-1.stderr +++ b/tests/ui/associated-types/hr-associated-type-projection-1.stderr @@ -1,8 +1,8 @@ error[E0271]: type mismatch resolving `<T as Deref>::Target == T` - --> $DIR/hr-associated-type-projection-1.rs:13:33 + --> $DIR/hr-associated-type-projection-1.rs:13:55 | LL | impl<T: Copy + std::ops::Deref> UnsafeCopy<'_, T> for T { - | - this type parameter ^^^^^^^^^^^^^^^^^ expected type parameter `T`, found associated type + | - this type parameter ^ expected type parameter `T`, found associated type | = note: expected type parameter `T` found associated type `<T as Deref>::Target` diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr b/tests/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr index 492316f0027..592aa4369ce 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr +++ b/tests/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr @@ -1,8 +1,8 @@ error[E0277]: `T` cannot be sent between threads safely - --> $DIR/builtin-superkinds-double-superkind.rs:6:24 + --> $DIR/builtin-superkinds-double-superkind.rs:6:32 | LL | impl <T: Sync+'static> Foo for (T,) { } - | ^^^ `T` cannot be sent between threads safely + | ^^^^ `T` cannot be sent between threads safely | = note: required because it appears within the type `(T,)` note: required by a bound in `Foo` @@ -16,10 +16,10 @@ LL | impl <T: Sync+'static + std::marker::Send> Foo for (T,) { } | +++++++++++++++++++ error[E0277]: `T` cannot be shared between threads safely - --> $DIR/builtin-superkinds-double-superkind.rs:9:16 + --> $DIR/builtin-superkinds-double-superkind.rs:9:24 | LL | impl <T: Send> Foo for (T,T) { } - | ^^^ `T` cannot be shared between threads safely + | ^^^^^ `T` cannot be shared between threads safely | = note: required because it appears within the type `(T, T)` note: required by a bound in `Foo` diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr index a46e4b2337c..f9d548bb8fb 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr +++ b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr @@ -1,8 +1,8 @@ error[E0277]: `T` cannot be sent between threads safely - --> $DIR/builtin-superkinds-in-metadata.rs:13:23 + --> $DIR/builtin-superkinds-in-metadata.rs:13:56 | LL | impl <T:Sync+'static> RequiresRequiresShareAndSend for X<T> { } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `T` cannot be sent between threads safely + | ^^^^ `T` cannot be sent between threads safely | note: required because it appears within the type `X<T>` --> $DIR/builtin-superkinds-in-metadata.rs:9:8 diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-self-type.stderr b/tests/ui/builtin-superkinds/builtin-superkinds-self-type.stderr index e2b177b951c..e51fab0dcea 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-self-type.stderr +++ b/tests/ui/builtin-superkinds/builtin-superkinds-self-type.stderr @@ -1,8 +1,8 @@ error[E0310]: the parameter type `T` may not live long enough - --> $DIR/builtin-superkinds-self-type.rs:10:16 + --> $DIR/builtin-superkinds-self-type.rs:10:24 | LL | impl <T: Sync> Foo for T { } - | ^^^ ...so that the type `T` will meet its required lifetime bounds... + | ^ ...so that the type `T` will meet its required lifetime bounds... | note: ...that is required by this bound --> $DIR/builtin-superkinds-self-type.rs:6:24 diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-simple.stderr b/tests/ui/builtin-superkinds/builtin-superkinds-simple.stderr index 9db9cbfdb91..8b19170b0f1 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-simple.stderr +++ b/tests/ui/builtin-superkinds/builtin-superkinds-simple.stderr @@ -1,8 +1,8 @@ error[E0277]: `Rc<i8>` cannot be sent between threads safely - --> $DIR/builtin-superkinds-simple.rs:6:6 + --> $DIR/builtin-superkinds-simple.rs:6:14 | LL | impl Foo for std::rc::Rc<i8> { } - | ^^^ `Rc<i8>` cannot be sent between threads safely + | ^^^^^^^^^^^^^^^ `Rc<i8>` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `Rc<i8>` note: required by a bound in `Foo` diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr b/tests/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr index 3ec0b907d0c..0cfea72d5f1 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr +++ b/tests/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr @@ -1,8 +1,8 @@ error[E0277]: `T` cannot be sent between threads safely - --> $DIR/builtin-superkinds-typaram-not-send.rs:5:24 + --> $DIR/builtin-superkinds-typaram-not-send.rs:5:32 | LL | impl <T: Sync+'static> Foo for T { } - | ^^^ `T` cannot be sent between threads safely + | ^ `T` cannot be sent between threads safely | note: required by a bound in `Foo` --> $DIR/builtin-superkinds-typaram-not-send.rs:3:13 diff --git a/tests/ui/chalkify/impl_wf.stderr b/tests/ui/chalkify/impl_wf.stderr index a142459bcb4..84c32fa3771 100644 --- a/tests/ui/chalkify/impl_wf.stderr +++ b/tests/ui/chalkify/impl_wf.stderr @@ -1,8 +1,8 @@ error[E0277]: the size for values of type `str` cannot be known at compilation time - --> $DIR/impl_wf.rs:11:6 + --> $DIR/impl_wf.rs:11:14 | LL | impl Foo for str { } - | ^^^ doesn't have a size known at compile-time + | ^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `str` note: required by a bound in `Foo` @@ -12,10 +12,10 @@ LL | trait Foo: Sized { } | ^^^^^ required by this bound in `Foo` error[E0277]: the trait bound `f32: Foo` is not satisfied - --> $DIR/impl_wf.rs:22:6 + --> $DIR/impl_wf.rs:22:19 | LL | impl Baz<f32> for f32 { } - | ^^^^^^^^ the trait `Foo` is not implemented for `f32` + | ^^^ the trait `Foo` is not implemented for `f32` | = help: the trait `Foo` is implemented for `i32` note: required by a bound in `Baz` diff --git a/tests/ui/coherence/coherence-overlap-trait-alias.stderr b/tests/ui/coherence/coherence-overlap-trait-alias.stderr index e324c1e799f..668b8319b38 100644 --- a/tests/ui/coherence/coherence-overlap-trait-alias.stderr +++ b/tests/ui/coherence/coherence-overlap-trait-alias.stderr @@ -1,8 +1,8 @@ error[E0283]: type annotations needed: cannot satisfy `u32: C` - --> $DIR/coherence-overlap-trait-alias.rs:15:6 + --> $DIR/coherence-overlap-trait-alias.rs:15:12 | LL | impl C for u32 {} - | ^ + | ^^^ | note: multiple `impl`s satisfying `u32: C` found --> $DIR/coherence-overlap-trait-alias.rs:14:1 diff --git a/tests/ui/const-generics/issues/issue-67185-2.stderr b/tests/ui/const-generics/issues/issue-67185-2.stderr index c7be8e14a10..7deb4b36fab 100644 --- a/tests/ui/const-generics/issues/issue-67185-2.stderr +++ b/tests/ui/const-generics/issues/issue-67185-2.stderr @@ -23,10 +23,10 @@ LL | [<u8 as Baz>::Quaks; 2]: Bar, = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable error[E0277]: the trait bound `[u16; 3]: Bar` is not satisfied - --> $DIR/issue-67185-2.rs:21:6 + --> $DIR/issue-67185-2.rs:21:14 | LL | impl Foo for FooImpl {} - | ^^^ the trait `Bar` is not implemented for `[u16; 3]` + | ^^^^^^^ the trait `Bar` is not implemented for `[u16; 3]` | = help: the following other types implement trait `Bar`: [[u16; 3]; 3] @@ -41,10 +41,10 @@ LL | <u8 as Baz>::Quaks: Bar, | ^^^ required by this bound in `Foo` error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied - --> $DIR/issue-67185-2.rs:21:6 + --> $DIR/issue-67185-2.rs:21:14 | LL | impl Foo for FooImpl {} - | ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]` + | ^^^^^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]` | = help: the following other types implement trait `Bar`: [[u16; 3]; 3] diff --git a/tests/ui/dst/dst-sized-trait-param.stderr b/tests/ui/dst/dst-sized-trait-param.stderr index 8ec94f5a3c0..5dd517d4d93 100644 --- a/tests/ui/dst/dst-sized-trait-param.stderr +++ b/tests/ui/dst/dst-sized-trait-param.stderr @@ -1,8 +1,8 @@ error[E0277]: the size for values of type `[isize]` cannot be known at compilation time - --> $DIR/dst-sized-trait-param.rs:7:6 + --> $DIR/dst-sized-trait-param.rs:7:23 | LL | impl Foo<[isize]> for usize { } - | ^^^^^^^^^^^^ doesn't have a size known at compile-time + | ^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[isize]` note: required by a bound in `Foo` @@ -16,10 +16,10 @@ LL | trait Foo<T: ?Sized> : Sized { fn take(self, x: &T) { } } // Note: T is siz | ++++++++ error[E0277]: the size for values of type `[usize]` cannot be known at compilation time - --> $DIR/dst-sized-trait-param.rs:10:6 + --> $DIR/dst-sized-trait-param.rs:10:21 | LL | impl Foo<isize> for [usize] { } - | ^^^^^^^^^^ doesn't have a size known at compile-time + | ^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[usize]` note: required by a bound in `Foo` diff --git a/tests/ui/error-codes/E0308-2.stderr b/tests/ui/error-codes/E0308-2.stderr index de54a417253..3a8a81a73a6 100644 --- a/tests/ui/error-codes/E0308-2.stderr +++ b/tests/ui/error-codes/E0308-2.stderr @@ -1,8 +1,8 @@ error[E0308]: mismatched types - --> $DIR/E0308-2.rs:9:6 + --> $DIR/E0308-2.rs:9:13 | LL | impl Eq for &dyn DynEq {} - | ^^ lifetime mismatch + | ^^^^^^^^^^ lifetime mismatch | = note: expected trait `<&dyn DynEq as PartialEq>` found trait `<&(dyn DynEq + 'static) as PartialEq>` diff --git a/tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr b/tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr index 458756a3dcd..1a50eadb5f0 100644 --- a/tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr +++ b/tests/ui/fn/implied-bounds-unnorm-associated-type-5.stderr @@ -1,8 +1,8 @@ error[E0309]: the parameter type `T` may not live long enough - --> $DIR/implied-bounds-unnorm-associated-type-5.rs:6:13 + --> $DIR/implied-bounds-unnorm-associated-type-5.rs:6:27 | LL | impl<'a, T> Trait<'a> for T { - | ^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds... + | ^ ...so that the type `T` will meet its required lifetime bounds... | note: ...that is required by this bound --> $DIR/implied-bounds-unnorm-associated-type-5.rs:1:18 diff --git a/tests/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr b/tests/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr index 6791182238c..260a0ce6142 100644 --- a/tests/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr +++ b/tests/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr @@ -1,8 +1,8 @@ error[E0277]: the size for values of type `[()]` cannot be known at compilation time - --> $DIR/issue-61631-default-type-param-can-reference-self-in-trait.rs:19:6 + --> $DIR/issue-61631-default-type-param-can-reference-self-in-trait.rs:19:17 | LL | impl Tsized for () {} - | ^^^^^^ doesn't have a size known at compile-time + | ^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `[()]` note: required by a bound in `Tsized` diff --git a/tests/ui/issues/issue-10412.stderr b/tests/ui/issues/issue-10412.stderr index 46b9fd541ad..ebaf87630fe 100644 --- a/tests/ui/issues/issue-10412.stderr +++ b/tests/ui/issues/issue-10412.stderr @@ -53,10 +53,10 @@ LL | impl<'self> Serializable<'_, str> for &'self str { | +++ error[E0277]: the size for values of type `str` cannot be known at compilation time - --> $DIR/issue-10412.rs:7:13 + --> $DIR/issue-10412.rs:7:35 | LL | impl<'self> Serializable<str> for &'self str { - | ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | ^^^^^^^^^^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `str` note: required by a bound in `Serializable` diff --git a/tests/ui/issues/issue-65230.stderr b/tests/ui/issues/issue-65230.stderr index fcabcdea74f..7ccab889483 100644 --- a/tests/ui/issues/issue-65230.stderr +++ b/tests/ui/issues/issue-65230.stderr @@ -1,8 +1,8 @@ error[E0308]: mismatched types - --> $DIR/issue-65230.rs:8:6 + --> $DIR/issue-65230.rs:8:13 | LL | impl T1 for &dyn T2 {} - | ^^ lifetime mismatch + | ^^^^^^^ lifetime mismatch | = note: expected trait `<&dyn T2 as T0>` found trait `<&(dyn T2 + 'static) as T0>` diff --git a/tests/ui/marker_trait_attr/overlap-marker-trait-with-underscore-lifetime.stderr b/tests/ui/marker_trait_attr/overlap-marker-trait-with-underscore-lifetime.stderr index 235c89e200a..3cd59d6926e 100644 --- a/tests/ui/marker_trait_attr/overlap-marker-trait-with-underscore-lifetime.stderr +++ b/tests/ui/marker_trait_attr/overlap-marker-trait-with-underscore-lifetime.stderr @@ -1,8 +1,8 @@ error[E0283]: type annotations needed: cannot satisfy `&(): Marker` - --> $DIR/overlap-marker-trait-with-underscore-lifetime.rs:6:6 + --> $DIR/overlap-marker-trait-with-underscore-lifetime.rs:6:17 | LL | impl Marker for &'_ () {} - | ^^^^^^ + | ^^^^^^ | note: multiple `impl`s satisfying `&(): Marker` found --> $DIR/overlap-marker-trait-with-underscore-lifetime.rs:6:1 @@ -13,10 +13,10 @@ LL | impl Marker for &'_ () {} | ^^^^^^^^^^^^^^^^^^^^^^ error[E0283]: type annotations needed: cannot satisfy `&(): Marker` - --> $DIR/overlap-marker-trait-with-underscore-lifetime.rs:7:6 + --> $DIR/overlap-marker-trait-with-underscore-lifetime.rs:7:17 | LL | impl Marker for &'_ () {} - | ^^^^^^ + | ^^^^^^ | note: multiple `impl`s satisfying `&(): Marker` found --> $DIR/overlap-marker-trait-with-underscore-lifetime.rs:6:1 diff --git a/tests/ui/marker_trait_attr/region-overlap.stderr b/tests/ui/marker_trait_attr/region-overlap.stderr index 6631fe987e2..c6497b4669d 100644 --- a/tests/ui/marker_trait_attr/region-overlap.stderr +++ b/tests/ui/marker_trait_attr/region-overlap.stderr @@ -1,8 +1,8 @@ error[E0283]: type annotations needed: cannot satisfy `(&'static (), &'a ()): A` - --> $DIR/region-overlap.rs:5:10 + --> $DIR/region-overlap.rs:5:16 | LL | impl<'a> A for (&'static (), &'a ()) {} - | ^ + | ^^^^^^^^^^^^^^^^^^^^^ | note: multiple `impl`s satisfying `(&'static (), &'a ()): A` found --> $DIR/region-overlap.rs:5:1 @@ -13,10 +13,10 @@ LL | impl<'a> A for (&'a (), &'static ()) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0283]: type annotations needed: cannot satisfy `(&'a (), &'static ()): A` - --> $DIR/region-overlap.rs:6:10 + --> $DIR/region-overlap.rs:6:16 | LL | impl<'a> A for (&'a (), &'static ()) {} - | ^ + | ^^^^^^^^^^^^^^^^^^^^^ | note: multiple `impl`s satisfying `(&'a (), &'static ()): A` found --> $DIR/region-overlap.rs:5:1 diff --git a/tests/ui/overloaded/overloaded-calls-nontuple.stderr b/tests/ui/overloaded/overloaded-calls-nontuple.stderr index 2e160078259..8a17446130b 100644 --- a/tests/ui/overloaded/overloaded-calls-nontuple.stderr +++ b/tests/ui/overloaded/overloaded-calls-nontuple.stderr @@ -1,17 +1,17 @@ error[E0059]: type parameter to bare `FnMut` trait must be a tuple - --> $DIR/overloaded-calls-nontuple.rs:10:6 + --> $DIR/overloaded-calls-nontuple.rs:10:23 | LL | impl FnMut<isize> for S { - | ^^^^^^^^^^^^ the trait `Tuple` is not implemented for `isize` + | ^ the trait `Tuple` is not implemented for `isize` | note: required by a bound in `FnMut` --> $SRC_DIR/core/src/ops/function.rs:LL:COL error[E0059]: type parameter to bare `FnOnce` trait must be a tuple - --> $DIR/overloaded-calls-nontuple.rs:18:6 + --> $DIR/overloaded-calls-nontuple.rs:18:24 | LL | impl FnOnce<isize> for S { - | ^^^^^^^^^^^^^ the trait `Tuple` is not implemented for `isize` + | ^ the trait `Tuple` is not implemented for `isize` | note: required by a bound in `FnOnce` --> $SRC_DIR/core/src/ops/function.rs:LL:COL diff --git a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail.stderr b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail.stderr index 1f8f312df01..bf12ef1ca77 100644 --- a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail.stderr +++ b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail.stderr @@ -1,14 +1,14 @@ error[E0277]: the trait bound `S: ~const Foo` is not satisfied - --> $DIR/super-traits-fail.rs:15:12 + --> $DIR/super-traits-fail.rs:15:20 | LL | impl const Bar for S {} - | ^^^ the trait `~const Foo` is not implemented for `S` + | ^ the trait `~const Foo` is not implemented for `S` | note: the trait `Foo` is implemented for `S`, but that implementation is not `const` - --> $DIR/super-traits-fail.rs:15:12 + --> $DIR/super-traits-fail.rs:15:20 | LL | impl const Bar for S {} - | ^^^ + | ^ note: required by a bound in `Bar` --> $DIR/super-traits-fail.rs:8:12 | diff --git a/tests/ui/span/issue-71363.stderr b/tests/ui/span/issue-71363.stderr index 6c7ea007ee0..cb5cc320276 100644 --- a/tests/ui/span/issue-71363.stderr +++ b/tests/ui/span/issue-71363.stderr @@ -1,8 +1,8 @@ error[E0277]: `MyError` doesn't implement `std::fmt::Display` - --> $DIR/issue-71363.rs:4:6 + --> $DIR/issue-71363.rs:4:28 | 4 | impl std::error::Error for MyError {} - | ^^^^^^^^^^^^^^^^^ `MyError` cannot be formatted with the default formatter + | ^^^^^^^ `MyError` cannot be formatted with the default formatter | = help: the trait `std::fmt::Display` is not implemented for `MyError` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead @@ -10,10 +10,10 @@ note: required by a bound in `std::error::Error` --> $SRC_DIR/core/src/error.rs:LL:COL error[E0277]: `MyError` doesn't implement `Debug` - --> $DIR/issue-71363.rs:4:6 + --> $DIR/issue-71363.rs:4:28 | 4 | impl std::error::Error for MyError {} - | ^^^^^^^^^^^^^^^^^ `MyError` cannot be formatted using `{:?}` + | ^^^^^^^ `MyError` cannot be formatted using `{:?}` | = help: the trait `Debug` is not implemented for `MyError` = note: add `#[derive(Debug)]` to `MyError` or manually `impl Debug for MyError` diff --git a/tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr b/tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr index e7801603493..1d9014a2643 100644 --- a/tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr +++ b/tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr @@ -9,10 +9,10 @@ LL | #![feature(specialization)] = note: `#[warn(incomplete_features)]` on by default error[E0277]: the trait bound `U: Eq` is not satisfied - --> $DIR/specialization-wfcheck.rs:7:17 + --> $DIR/specialization-wfcheck.rs:7:37 | LL | default impl<U> Foo<'static, U> for () {} - | ^^^^^^^^^^^^^^^ the trait `Eq` is not implemented for `U` + | ^^ the trait `Eq` is not implemented for `U` | note: required by a bound in `Foo` --> $DIR/specialization-wfcheck.rs:5:18 diff --git a/tests/ui/static/static-lifetime.stderr b/tests/ui/static/static-lifetime.stderr index 4af3370c799..4191ab054cb 100644 --- a/tests/ui/static/static-lifetime.stderr +++ b/tests/ui/static/static-lifetime.stderr @@ -1,8 +1,8 @@ error[E0478]: lifetime bound not satisfied - --> $DIR/static-lifetime.rs:3:20 + --> $DIR/static-lifetime.rs:3:34 | LL | impl<'a, A: Clone> Arbitrary for ::std::borrow::Cow<'a, A> {} - | ^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: lifetime parameter instantiated with the lifetime `'a` as defined here --> $DIR/static-lifetime.rs:3:6 diff --git a/tests/ui/trait-bounds/unsized-bound.stderr b/tests/ui/trait-bounds/unsized-bound.stderr index ec85ada7a8d..f3c8464abeb 100644 --- a/tests/ui/trait-bounds/unsized-bound.stderr +++ b/tests/ui/trait-bounds/unsized-bound.stderr @@ -1,8 +1,8 @@ error[E0277]: the size for values of type `B` cannot be known at compilation time - --> $DIR/unsized-bound.rs:2:12 + --> $DIR/unsized-bound.rs:2:30 | LL | impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {} - | - ^^^^^^^^^^^^^ doesn't have a size known at compile-time + | - ^^^^^^ doesn't have a size known at compile-time | | | this type parameter needs to be `std::marker::Sized` | @@ -38,10 +38,10 @@ LL + impl<A, B> Trait<(A, B)> for (A, B) where B: ?Sized, {} | error[E0277]: the size for values of type `C` cannot be known at compilation time - --> $DIR/unsized-bound.rs:5:31 + --> $DIR/unsized-bound.rs:5:52 | LL | impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {} - | - ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | - ^^^^^^^^^ doesn't have a size known at compile-time | | | this type parameter needs to be `std::marker::Sized` | @@ -92,10 +92,10 @@ LL + impl<A, B, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {} | error[E0277]: the size for values of type `B` cannot be known at compilation time - --> $DIR/unsized-bound.rs:10:28 + --> $DIR/unsized-bound.rs:10:47 | LL | impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {} - | - ^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | - ^^^^^^ doesn't have a size known at compile-time | | | this type parameter needs to be `std::marker::Sized` | @@ -131,10 +131,10 @@ LL + impl<A, B: ?Sized> Trait2<(A, B)> for (A, B) {} | error[E0277]: the size for values of type `A` cannot be known at compilation time - --> $DIR/unsized-bound.rs:14:9 + --> $DIR/unsized-bound.rs:14:23 | LL | impl<A> Trait3<A> for A where A: ?Sized {} - | - ^^^^^^^^^ doesn't have a size known at compile-time + | - ^ doesn't have a size known at compile-time | | | this type parameter needs to be `std::marker::Sized` | @@ -154,10 +154,10 @@ LL | trait Trait3<A: ?Sized> {} | ++++++++ error[E0277]: the size for values of type `A` cannot be known at compilation time - --> $DIR/unsized-bound.rs:17:17 + --> $DIR/unsized-bound.rs:17:31 | LL | impl<A: ?Sized> Trait4<A> for A {} - | - ^^^^^^^^^ doesn't have a size known at compile-time + | - ^ doesn't have a size known at compile-time | | | this type parameter needs to be `std::marker::Sized` | @@ -177,10 +177,10 @@ LL | trait Trait4<A: ?Sized> {} | ++++++++ error[E0277]: the size for values of type `X` cannot be known at compilation time - --> $DIR/unsized-bound.rs:20:12 + --> $DIR/unsized-bound.rs:20:29 | LL | impl<X, Y> Trait5<X, Y> for X where X: ?Sized {} - | - ^^^^^^^^^^^^ doesn't have a size known at compile-time + | - ^ doesn't have a size known at compile-time | | | this type parameter needs to be `std::marker::Sized` | @@ -200,10 +200,10 @@ LL | trait Trait5<A: ?Sized, B> {} | ++++++++ error[E0277]: the size for values of type `X` cannot be known at compilation time - --> $DIR/unsized-bound.rs:23:20 + --> $DIR/unsized-bound.rs:23:37 | LL | impl<X: ?Sized, Y> Trait6<X, Y> for X {} - | - ^^^^^^^^^^^^ doesn't have a size known at compile-time + | - ^ doesn't have a size known at compile-time | | | this type parameter needs to be `std::marker::Sized` | @@ -223,10 +223,10 @@ LL | trait Trait6<A: ?Sized, B> {} | ++++++++ error[E0277]: the size for values of type `Y` cannot be known at compilation time - --> $DIR/unsized-bound.rs:26:12 + --> $DIR/unsized-bound.rs:26:29 | LL | impl<X, Y> Trait7<X, Y> for X where Y: ?Sized {} - | - ^^^^^^^^^^^^ doesn't have a size known at compile-time + | - ^ doesn't have a size known at compile-time | | | this type parameter needs to be `std::marker::Sized` | @@ -246,10 +246,10 @@ LL | trait Trait7<A, B: ?Sized> {} | ++++++++ error[E0277]: the size for values of type `Y` cannot be known at compilation time - --> $DIR/unsized-bound.rs:29:20 + --> $DIR/unsized-bound.rs:29:37 | LL | impl<X, Y: ?Sized> Trait8<X, Y> for X {} - | - ^^^^^^^^^^^^ doesn't have a size known at compile-time + | - ^ doesn't have a size known at compile-time | | | this type parameter needs to be `std::marker::Sized` | 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 8a43742260b..903961b4be2 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,8 +1,8 @@ error[E0277]: the trait bound `u16: Trait` is not satisfied - --> $DIR/on-structs-and-enums-in-impls.rs:20:6 + --> $DIR/on-structs-and-enums-in-impls.rs:20:30 | LL | impl PolyTrait<Foo<u16>> for Struct { - | ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `u16` + | ^^^^^^ the trait `Trait` is not implemented for `u16` | note: required by a bound in `Foo` --> $DIR/on-structs-and-enums-in-impls.rs:3:14 diff --git a/tests/ui/traits/impl-bounds-checking.stderr b/tests/ui/traits/impl-bounds-checking.stderr index b01bacdb87d..1f969efe114 100644 --- a/tests/ui/traits/impl-bounds-checking.stderr +++ b/tests/ui/traits/impl-bounds-checking.stderr @@ -1,8 +1,8 @@ error[E0277]: the trait bound `isize: Clone2` is not satisfied - --> $DIR/impl-bounds-checking.rs:10:6 + --> $DIR/impl-bounds-checking.rs:10:24 | LL | impl Getter<isize> for isize { - | ^^^^^^^^^^^^^ the trait `Clone2` is not implemented for `isize` + | ^^^^^ the trait `Clone2` is not implemented for `isize` | note: required by a bound in `Getter` --> $DIR/impl-bounds-checking.rs:6:17 diff --git a/tests/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.stderr b/tests/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.stderr index 5572c6515ff..1bace8ab286 100644 --- a/tests/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.stderr +++ b/tests/ui/traits/impl-of-supertrait-has-wrong-lifetime-parameters.stderr @@ -1,8 +1,8 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements - --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13 + --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:28 | LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> { - | ^^^^^^^^^^ + | ^^^^^^^^^ | note: first, the lifetime cannot outlive the lifetime `'a` as defined here... --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:6 @@ -15,10 +15,10 @@ note: ...but the lifetime must also be valid for the lifetime `'b` as defined he LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> { | ^^ note: ...so that the types are compatible - --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:13 + --> $DIR/impl-of-supertrait-has-wrong-lifetime-parameters.rs:24:28 | LL | impl<'a,'b> T2<'a, 'b> for S<'a, 'b> { - | ^^^^^^^^^^ + | ^^^^^^^^^ = note: expected `T1<'a>` found `T1<'_>` diff --git a/tests/ui/traits/issue-43784-supertrait.stderr b/tests/ui/traits/issue-43784-supertrait.stderr index bb890cb99ee..4fe12731475 100644 --- a/tests/ui/traits/issue-43784-supertrait.stderr +++ b/tests/ui/traits/issue-43784-supertrait.stderr @@ -1,8 +1,8 @@ error[E0277]: the trait bound `T: Copy` is not satisfied - --> $DIR/issue-43784-supertrait.rs:8:9 + --> $DIR/issue-43784-supertrait.rs:8:22 | LL | impl<T> Complete for T {} - | ^^^^^^^^ the trait `Copy` is not implemented for `T` + | ^ the trait `Copy` is not implemented for `T` | note: required by a bound in `Complete` --> $DIR/issue-43784-supertrait.rs:4:21 diff --git a/tests/ui/unsized/unsized-trait-impl-trait-arg.stderr b/tests/ui/unsized/unsized-trait-impl-trait-arg.stderr index f81487d5231..5b24c571f6c 100644 --- a/tests/ui/unsized/unsized-trait-impl-trait-arg.stderr +++ b/tests/ui/unsized/unsized-trait-impl-trait-arg.stderr @@ -1,8 +1,8 @@ error[E0277]: the size for values of type `X` cannot be known at compilation time - --> $DIR/unsized-trait-impl-trait-arg.rs:8:17 + --> $DIR/unsized-trait-impl-trait-arg.rs:8:27 | LL | impl<X: ?Sized> T2<X> for S4<X> { - | - ^^^^^ doesn't have a size known at compile-time + | - ^^^^^ doesn't have a size known at compile-time | | | this type parameter needs to be `std::marker::Sized` | diff --git a/tests/ui/unsized/unsized7.stderr b/tests/ui/unsized/unsized7.stderr index 1555b9df4f8..1b62bb43314 100644 --- a/tests/ui/unsized/unsized7.stderr +++ b/tests/ui/unsized/unsized7.stderr @@ -1,8 +1,8 @@ error[E0277]: the size for values of type `X` cannot be known at compilation time - --> $DIR/unsized7.rs:12:21 + --> $DIR/unsized7.rs:12:31 | LL | impl<X: ?Sized + T> T1<X> for S3<X> { - | - ^^^^^ doesn't have a size known at compile-time + | - ^^^^^ doesn't have a size known at compile-time | | | this type parameter needs to be `std::marker::Sized` |