From c38b127d8463b595b5df93f3b8c4462d39d7cd0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Fri, 10 Jul 2020 18:47:53 -0700 Subject: [PATCH] Remove redundant explanatory `note` for type parameters --- .../traits/error_reporting/mod.rs | 7 ++++++- .../defaults-unsound-62211-1.stderr | 4 ---- .../defaults-unsound-62211-2.stderr | 4 ---- src/test/ui/associated-types/issue-63593.stderr | 1 - ...trait-with-supertraits-needing-sized-self.stderr | 1 - src/test/ui/async-await/issue-70818.stderr | 1 - src/test/ui/bad/bad-method-typaram-kind.stderr | 1 - src/test/ui/bound-suggestions.stderr | 6 ------ .../builtin-superkinds-double-superkind.stderr | 2 -- .../builtin-superkinds-in-metadata.stderr | 1 - .../builtin-superkinds-typaram-not-send.stderr | 1 - ...e-bounds-cant-promote-superkind-in-struct.stderr | 1 - src/test/ui/closures/closure-bounds-subtype.stderr | 1 - src/test/ui/dst/dst-object-from-unsized-type.stderr | 2 -- .../issue-68642-broken-llvm-ir.stderr | 1 - .../issue-68643-broken-mir.stderr | 1 - .../issue-68644-codegen-selection.stderr | 1 - .../issue-68645-codegen-fulfillment.stderr | 1 - src/test/ui/issues/issue-20005.stderr | 1 - src/test/ui/issues/issue-27060-2.stderr | 1 - src/test/ui/issues/issue-27078.stderr | 1 - .../ui/kindck/kindck-impl-type-params.nll.stderr | 2 -- src/test/ui/kindck/kindck-impl-type-params.stderr | 2 -- .../feature-gate-lazy_normalization_consts.stderr | 1 - src/test/ui/phantom-oibit.stderr | 2 -- .../deafult-generic-associated-type-bound.stderr | 1 - .../adt-param-with-implicit-sized-bound.stderr | 5 ----- .../ui/suggestions/restrict-type-argument.stderr | 6 ------ .../ui/traits/trait-suggest-where-clause.stderr | 3 --- .../generic_underconstrained2.stderr | 2 -- .../typeck-default-trait-impl-send-param.stderr | 1 - src/test/ui/union/union-sized-field.stderr | 3 --- src/test/ui/unsized/unsized-bare-typaram.stderr | 2 -- src/test/ui/unsized/unsized-enum.stderr | 1 - src/test/ui/unsized/unsized-enum2.stderr | 4 ---- .../unsized/unsized-inherent-impl-self-type.stderr | 1 - src/test/ui/unsized/unsized-struct.stderr | 2 -- .../ui/unsized/unsized-trait-impl-self-type.stderr | 1 - .../ui/unsized/unsized-trait-impl-trait-arg.stderr | 1 - src/test/ui/unsized3.stderr | 6 ------ src/test/ui/unsized5.stderr | 4 ---- src/test/ui/unsized6.stderr | 13 ------------- src/test/ui/unsized7.stderr | 1 - 43 files changed, 6 insertions(+), 98 deletions(-) diff --git a/src/librustc_trait_selection/traits/error_reporting/mod.rs b/src/librustc_trait_selection/traits/error_reporting/mod.rs index 6fb07f5e1954c..4ade1ce91632f 100644 --- a/src/librustc_trait_selection/traits/error_reporting/mod.rs +++ b/src/librustc_trait_selection/traits/error_reporting/mod.rs @@ -376,7 +376,12 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { // If it has a custom `#[rustc_on_unimplemented]` // error message, let's display it as the label! err.span_label(span, s.as_str()); - err.help(&explanation); + if !matches!(trait_ref.skip_binder().self_ty().kind, ty::Param(_)) { + // When the self type is a type param We don't need to "the trait + // `std::marker::Sized` is not implemented for `T`" as we will point + // at the type param with a label to suggest constraining it. + err.help(&explanation); + } } else { err.span_label(span, explanation); } diff --git a/src/test/ui/associated-types/defaults-unsound-62211-1.stderr b/src/test/ui/associated-types/defaults-unsound-62211-1.stderr index 69c310766c1cc..2ba854eac4665 100644 --- a/src/test/ui/associated-types/defaults-unsound-62211-1.stderr +++ b/src/test/ui/associated-types/defaults-unsound-62211-1.stderr @@ -21,7 +21,6 @@ LL | trait UncheckedCopy: Sized { LL | + AddAssign<&'static str> | ^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `Self += &'static str` | - = help: the trait `std::ops::AddAssign<&'static str>` is not implemented for `Self` help: consider further restricting `Self` | LL | trait UncheckedCopy: Sized + std::ops::AddAssign<&'static str> { @@ -50,7 +49,6 @@ LL | trait UncheckedCopy: Sized { LL | + Display = Self; | ^^^^^^^ `Self` cannot be formatted with the default formatter | - = help: the trait `std::fmt::Display` is not implemented for `Self` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead help: consider further restricting `Self` | @@ -69,7 +67,6 @@ LL | + Display = Self; LL | impl UncheckedCopy for T {} | ^^^^^^^^^^^^^ `T` cannot be formatted with the default formatter | - = help: the trait `std::fmt::Display` is not implemented for `T` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead help: consider restricting type parameter `T` | @@ -105,7 +102,6 @@ LL | + AddAssign<&'static str> LL | impl UncheckedCopy for T {} | ^^^^^^^^^^^^^ no implementation for `T += &'static str` | - = help: the trait `std::ops::AddAssign<&'static str>` is not implemented for `T` help: consider restricting type parameter `T` | LL | impl> UncheckedCopy for T {} diff --git a/src/test/ui/associated-types/defaults-unsound-62211-2.stderr b/src/test/ui/associated-types/defaults-unsound-62211-2.stderr index 84f0ba7529ea2..d4fd0ca98ee54 100644 --- a/src/test/ui/associated-types/defaults-unsound-62211-2.stderr +++ b/src/test/ui/associated-types/defaults-unsound-62211-2.stderr @@ -21,7 +21,6 @@ LL | trait UncheckedCopy: Sized { LL | + AddAssign<&'static str> | ^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `Self += &'static str` | - = help: the trait `std::ops::AddAssign<&'static str>` is not implemented for `Self` help: consider further restricting `Self` | LL | trait UncheckedCopy: Sized + std::ops::AddAssign<&'static str> { @@ -50,7 +49,6 @@ LL | trait UncheckedCopy: Sized { LL | + Display = Self; | ^^^^^^^ `Self` cannot be formatted with the default formatter | - = help: the trait `std::fmt::Display` is not implemented for `Self` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead help: consider further restricting `Self` | @@ -69,7 +67,6 @@ LL | + Display = Self; LL | impl UncheckedCopy for T {} | ^^^^^^^^^^^^^ `T` cannot be formatted with the default formatter | - = help: the trait `std::fmt::Display` is not implemented for `T` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead help: consider restricting type parameter `T` | @@ -105,7 +102,6 @@ LL | + AddAssign<&'static str> LL | impl UncheckedCopy for T {} | ^^^^^^^^^^^^^ no implementation for `T += &'static str` | - = help: the trait `std::ops::AddAssign<&'static str>` is not implemented for `T` help: consider restricting type parameter `T` | LL | impl> UncheckedCopy for T {} diff --git a/src/test/ui/associated-types/issue-63593.stderr b/src/test/ui/associated-types/issue-63593.stderr index c3db950c75844..be3b61665b11f 100644 --- a/src/test/ui/associated-types/issue-63593.stderr +++ b/src/test/ui/associated-types/issue-63593.stderr @@ -6,7 +6,6 @@ LL | trait MyTrait { LL | type This = Self; | ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `Self` help: consider further restricting `Self` | LL | trait MyTrait: std::marker::Sized { diff --git a/src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr b/src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr index f2ed2d32bd1e0..7813d3b6596bf 100644 --- a/src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr +++ b/src/test/ui/associated-types/trait-with-supertraits-needing-sized-self.stderr @@ -9,7 +9,6 @@ LL | trait ArithmeticOps: Add + Sub + Mul LL | pub trait Add { | --- required by this bound in `std::ops::Add` | - = help: the trait `std::marker::Sized` is not implemented for `Self` help: consider further restricting `Self` | LL | trait ArithmeticOps: Add + Sub + Mul + Div + std::marker::Sized {} diff --git a/src/test/ui/async-await/issue-70818.stderr b/src/test/ui/async-await/issue-70818.stderr index 5fb772fa10acb..2166420070a07 100644 --- a/src/test/ui/async-await/issue-70818.stderr +++ b/src/test/ui/async-await/issue-70818.stderr @@ -7,7 +7,6 @@ LL | LL | async { (ty, ty1) } | ------------------- this returned value is of type `impl std::future::Future` | - = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `U` note: captured value is not `Send` --> $DIR/issue-70818.rs:6:18 | diff --git a/src/test/ui/bad/bad-method-typaram-kind.stderr b/src/test/ui/bad/bad-method-typaram-kind.stderr index 81fc961e3dea0..fd3999ae6fbec 100644 --- a/src/test/ui/bad/bad-method-typaram-kind.stderr +++ b/src/test/ui/bad/bad-method-typaram-kind.stderr @@ -4,7 +4,6 @@ error[E0277]: `T` cannot be sent between threads safely LL | 1.bar::(); | ^^^ `T` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `T` help: consider further restricting this bound | LL | fn foo() { diff --git a/src/test/ui/bound-suggestions.stderr b/src/test/ui/bound-suggestions.stderr index b9bc503f5301a..623252a8c1139 100644 --- a/src/test/ui/bound-suggestions.stderr +++ b/src/test/ui/bound-suggestions.stderr @@ -4,7 +4,6 @@ error[E0277]: `impl Sized` doesn't implement `std::fmt::Debug` LL | println!("{:?}", t); | ^ `impl Sized` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` | - = help: the trait `std::fmt::Debug` is not implemented for `impl Sized` = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: consider further restricting this bound @@ -18,7 +17,6 @@ error[E0277]: `T` doesn't implement `std::fmt::Debug` LL | println!("{:?}", t); | ^ `T` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` | - = help: the trait `std::fmt::Debug` is not implemented for `T` = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: consider restricting type parameter `T` @@ -32,7 +30,6 @@ error[E0277]: `T` doesn't implement `std::fmt::Debug` LL | println!("{:?}", t); | ^ `T` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` | - = help: the trait `std::fmt::Debug` is not implemented for `T` = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: consider further restricting this bound @@ -46,7 +43,6 @@ error[E0277]: `Y` doesn't implement `std::fmt::Debug` LL | println!("{:?} {:?}", x, y); | ^ `Y` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` | - = help: the trait `std::fmt::Debug` is not implemented for `Y` = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: consider further restricting type parameter `Y` @@ -60,7 +56,6 @@ error[E0277]: `X` doesn't implement `std::fmt::Debug` LL | println!("{:?}", x); | ^ `X` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` | - = help: the trait `std::fmt::Debug` is not implemented for `X` = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: consider further restricting this bound @@ -74,7 +69,6 @@ error[E0277]: `X` doesn't implement `std::fmt::Debug` LL | println!("{:?}", x); | ^ `X` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` | - = help: the trait `std::fmt::Debug` is not implemented for `X` = note: required by `std::fmt::Debug::fmt` = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) help: consider further restricting type parameter `X` diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr b/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr index 4e7b513629d05..7ff986ec38109 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr @@ -7,7 +7,6 @@ LL | LL | impl Foo for (T,) { } | ^^^ `T` cannot be sent between threads safely | - = help: within `(T,)`, the trait `std::marker::Send` is not implemented for `T` = note: required because it appears within the type `(T,)` help: consider further restricting this bound | @@ -23,7 +22,6 @@ LL | trait Foo : Send+Sync { } LL | impl Foo for (T,T) { } | ^^^ `T` cannot be shared between threads safely | - = help: within `(T, T)`, the trait `std::marker::Sync` is not implemented for `T` = note: required because it appears within the type `(T, T)` help: consider further restricting this bound | diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr b/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr index 3fb1af3a67cc2..9ee045edfe546 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr @@ -9,7 +9,6 @@ LL | impl RequiresRequiresShareAndSend for X { } LL | pub trait RequiresRequiresShareAndSend : RequiresShare + Send { } | ---- required by this bound in `trait_superkinds_in_metadata::RequiresRequiresShareAndSend` | - = help: within `X`, the trait `std::marker::Send` is not implemented for `T` = note: required because it appears within the type `X` help: consider further restricting this bound | diff --git a/src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr b/src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr index 9c5073a1e49d7..ad80b3fa8d11f 100644 --- a/src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr +++ b/src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr @@ -7,7 +7,6 @@ LL | LL | impl Foo for T { } | ^^^ `T` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `T` help: consider further restricting this bound | LL | impl Foo for T { } diff --git a/src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr b/src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr index ffd70fac6b19b..273eae995538a 100644 --- a/src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr +++ b/src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr @@ -7,7 +7,6 @@ LL | struct X where F: FnOnce() + 'static + Send { LL | fn foo(blk: F) -> X where F: FnOnce() + 'static { | ^^^^ `F` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `F` help: consider further restricting this bound | LL | fn foo(blk: F) -> X where F: FnOnce() + 'static + std::marker::Send { diff --git a/src/test/ui/closures/closure-bounds-subtype.stderr b/src/test/ui/closures/closure-bounds-subtype.stderr index 691864c9e1d45..7df29d5a098a0 100644 --- a/src/test/ui/closures/closure-bounds-subtype.stderr +++ b/src/test/ui/closures/closure-bounds-subtype.stderr @@ -7,7 +7,6 @@ LL | fn take_const_owned(_: F) where F: FnOnce() + Sync + Send { LL | take_const_owned(f); | ^ `F` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `F` help: consider further restricting this bound | LL | fn give_owned(f: F) where F: FnOnce() + Send + std::marker::Sync { diff --git a/src/test/ui/dst/dst-object-from-unsized-type.stderr b/src/test/ui/dst/dst-object-from-unsized-type.stderr index d6e9aaab7cf39..da8ead885c898 100644 --- a/src/test/ui/dst/dst-object-from-unsized-type.stderr +++ b/src/test/ui/dst/dst-object-from-unsized-type.stderr @@ -6,7 +6,6 @@ LL | fn test1(t: &T) { LL | let u: &dyn Foo = t; | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `T` = note: required for the cast to the object type `dyn Foo` error[E0277]: the size for values of type `T` cannot be known at compilation time @@ -17,7 +16,6 @@ LL | fn test2(t: &T) { LL | let v: &dyn Foo = t as &dyn Foo; | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `T` = note: required for the cast to the object type `dyn Foo` error[E0277]: the size for values of type `str` cannot be known at compilation time diff --git a/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr b/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr index 89cc5dfd06018..2fab7ffb66050 100644 --- a/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr +++ b/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr @@ -16,7 +16,6 @@ LL | type F<'a>: Fn() -> u32; LL | type F<'a> = Self; | ^^^^^^^^^^^^^^^^^^ expected an `Fn<()>` closure, found `T` | - = help: the trait `std::ops::Fn<()>` is not implemented for `T` = note: wrap the `T` in a closure with no arguments: `|| { /* code */ } help: consider restricting type parameter `T` | diff --git a/src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr b/src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr index efd3287853f03..186e142138be2 100644 --- a/src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr +++ b/src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr @@ -16,7 +16,6 @@ LL | type F<'a>: Fn() -> u32; LL | type F<'a> = Self; | ^^^^^^^^^^^^^^^^^^ expected an `Fn<()>` closure, found `T` | - = help: the trait `std::ops::Fn<()>` is not implemented for `T` = note: wrap the `T` in a closure with no arguments: `|| { /* code */ } help: consider restricting type parameter `T` | diff --git a/src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr b/src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr index 5da924a512f00..d16bdcbbb6b00 100644 --- a/src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr +++ b/src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr @@ -16,7 +16,6 @@ LL | type F<'a>: Fn() -> u32; LL | type F<'a> = Self; | ^^^^^^^^^^^^^^^^^^ expected an `Fn<()>` closure, found `T` | - = help: the trait `std::ops::Fn<()>` is not implemented for `T` = note: wrap the `T` in a closure with no arguments: `|| { /* code */ } help: consider restricting type parameter `T` | diff --git a/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr b/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr index 12d84ab6a369b..72c42917c83c9 100644 --- a/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr +++ b/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr @@ -16,7 +16,6 @@ LL | type F<'a>: Fn() -> u32; LL | type F<'a> = Self; | ^^^^^^^^^^^^^^^^^^ expected an `Fn<()>` closure, found `T` | - = help: the trait `std::ops::Fn<()>` is not implemented for `T` = note: wrap the `T` in a closure with no arguments: `|| { /* code */ } help: consider restricting type parameter `T` | diff --git a/src/test/ui/issues/issue-20005.stderr b/src/test/ui/issues/issue-20005.stderr index 7bd2578344458..cbaa7507244a3 100644 --- a/src/test/ui/issues/issue-20005.stderr +++ b/src/test/ui/issues/issue-20005.stderr @@ -7,7 +7,6 @@ LL | trait From { LL | ) -> >::Result where Dst: From { | ^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `Self` help: consider further restricting `Self` | LL | ) -> >::Result where Dst: From, Self: std::marker::Sized { diff --git a/src/test/ui/issues/issue-27060-2.stderr b/src/test/ui/issues/issue-27060-2.stderr index 881fae1942335..96696fabd9338 100644 --- a/src/test/ui/issues/issue-27060-2.stderr +++ b/src/test/ui/issues/issue-27060-2.stderr @@ -6,7 +6,6 @@ LL | pub struct Bad { LL | data: T, | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `T` = note: the last field of a packed struct may only have a dynamically sized type if it does not need drop to be run = help: change the field's type to have a statically known size help: borrowed types always have a statically known size diff --git a/src/test/ui/issues/issue-27078.stderr b/src/test/ui/issues/issue-27078.stderr index 4b031d26ad53b..de1810e99aac6 100644 --- a/src/test/ui/issues/issue-27078.stderr +++ b/src/test/ui/issues/issue-27078.stderr @@ -4,7 +4,6 @@ error[E0277]: the size for values of type `Self` cannot be known at compilation LL | fn foo(self) -> &'static i32 { | ^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `Self` = help: unsized locals are gated as an unstable feature help: consider further restricting `Self` | diff --git a/src/test/ui/kindck/kindck-impl-type-params.nll.stderr b/src/test/ui/kindck/kindck-impl-type-params.nll.stderr index a2f70a8c24082..eb400cf061547 100644 --- a/src/test/ui/kindck/kindck-impl-type-params.nll.stderr +++ b/src/test/ui/kindck/kindck-impl-type-params.nll.stderr @@ -4,7 +4,6 @@ error[E0277]: `T` cannot be sent between threads safely LL | let a = &t as &dyn Gettable; | ^^ `T` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `T` = note: required because of the requirements on the impl of `Gettable` for `S` = note: required for the cast to the object type `dyn Gettable` help: consider restricting type parameter `T` @@ -31,7 +30,6 @@ error[E0277]: `T` cannot be sent between threads safely LL | let a: &dyn Gettable = &t; | ^^ `T` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `T` = note: required because of the requirements on the impl of `Gettable` for `S` = note: required for the cast to the object type `dyn Gettable` help: consider restricting type parameter `T` diff --git a/src/test/ui/kindck/kindck-impl-type-params.stderr b/src/test/ui/kindck/kindck-impl-type-params.stderr index cc98f1d9f34b8..ab9dfc9b8a779 100644 --- a/src/test/ui/kindck/kindck-impl-type-params.stderr +++ b/src/test/ui/kindck/kindck-impl-type-params.stderr @@ -4,7 +4,6 @@ error[E0277]: `T` cannot be sent between threads safely LL | let a = &t as &dyn Gettable; | ^^ `T` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `T` = note: required because of the requirements on the impl of `Gettable` for `S` = note: required for the cast to the object type `dyn Gettable` help: consider restricting type parameter `T` @@ -31,7 +30,6 @@ error[E0277]: `T` cannot be sent between threads safely LL | let a: &dyn Gettable = &t; | ^^ `T` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `T` = note: required because of the requirements on the impl of `Gettable` for `S` = note: required for the cast to the object type `dyn Gettable` help: consider restricting type parameter `T` diff --git a/src/test/ui/lazy_normalization_consts/feature-gate-lazy_normalization_consts.stderr b/src/test/ui/lazy_normalization_consts/feature-gate-lazy_normalization_consts.stderr index 97c7417839825..98bf9923823d7 100644 --- a/src/test/ui/lazy_normalization_consts/feature-gate-lazy_normalization_consts.stderr +++ b/src/test/ui/lazy_normalization_consts/feature-gate-lazy_normalization_consts.stderr @@ -9,7 +9,6 @@ LL | fn test() { LL | let _: [u8; sof::()]; | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `T` help: consider relaxing the implicit `Sized` restriction | LL | pub const fn sof() -> usize { diff --git a/src/test/ui/phantom-oibit.stderr b/src/test/ui/phantom-oibit.stderr index fd0307f15c79a..e143747d637ee 100644 --- a/src/test/ui/phantom-oibit.stderr +++ b/src/test/ui/phantom-oibit.stderr @@ -7,7 +7,6 @@ LL | fn is_zen(_: T) {} LL | is_zen(x) | ^ `T` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `T` = note: required because of the requirements on the impl of `Zen` for `&T` = note: required because it appears within the type `std::marker::PhantomData<&T>` = note: required because it appears within the type `Guard<'_, T>` @@ -25,7 +24,6 @@ LL | fn is_zen(_: T) {} LL | is_zen(x) | ^ `T` cannot be shared between threads safely | - = help: the trait `std::marker::Sync` is not implemented for `T` = note: required because of the requirements on the impl of `Zen` for `&T` = note: required because it appears within the type `std::marker::PhantomData<&T>` = note: required because it appears within the type `Guard<'_, T>` diff --git a/src/test/ui/specialization/deafult-generic-associated-type-bound.stderr b/src/test/ui/specialization/deafult-generic-associated-type-bound.stderr index 7f3c49e753fd7..3da8725d88a0c 100644 --- a/src/test/ui/specialization/deafult-generic-associated-type-bound.stderr +++ b/src/test/ui/specialization/deafult-generic-associated-type-bound.stderr @@ -24,7 +24,6 @@ LL | type U<'a>: PartialEq<&'a Self>; LL | default type U<'a> = &'a T; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `T == T` | - = help: the trait `std::cmp::PartialEq` is not implemented for `T` = note: required because of the requirements on the impl of `std::cmp::PartialEq` for `&'a T` help: consider further restricting this bound | diff --git a/src/test/ui/suggestions/adt-param-with-implicit-sized-bound.stderr b/src/test/ui/suggestions/adt-param-with-implicit-sized-bound.stderr index 0b08b4a16a692..f4c0d0f96c428 100644 --- a/src/test/ui/suggestions/adt-param-with-implicit-sized-bound.stderr +++ b/src/test/ui/suggestions/adt-param-with-implicit-sized-bound.stderr @@ -9,7 +9,6 @@ LL | struct Struct5{ LL | _t: X, | ^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `T` help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box` --> $DIR/adt-param-with-implicit-sized-bound.rs:18:10 | @@ -27,7 +26,6 @@ LL | fn func1() -> Struct1; LL | struct Struct1{ | - required by this bound in `Struct1` | - = help: the trait `std::marker::Sized` is not implemented for `Self` help: consider further restricting `Self` | LL | fn func1() -> Struct1 where Self: std::marker::Sized; @@ -46,7 +44,6 @@ LL | fn func2<'a>() -> Struct2<'a, Self>; LL | struct Struct2<'a, T>{ | - required by this bound in `Struct2` | - = help: the trait `std::marker::Sized` is not implemented for `Self` help: consider further restricting `Self` | LL | fn func2<'a>() -> Struct2<'a, Self> where Self: std::marker::Sized; @@ -65,7 +62,6 @@ LL | fn func3() -> Struct3; LL | struct Struct3{ | - required by this bound in `Struct3` | - = help: the trait `std::marker::Sized` is not implemented for `Self` help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box` --> $DIR/adt-param-with-implicit-sized-bound.rs:14:16 | @@ -87,7 +83,6 @@ LL | fn func4() -> Struct4; LL | struct Struct4{ | - required by this bound in `Struct4` | - = help: the trait `std::marker::Sized` is not implemented for `Self` help: consider further restricting `Self` | LL | fn func4() -> Struct4 where Self: std::marker::Sized; diff --git a/src/test/ui/suggestions/restrict-type-argument.stderr b/src/test/ui/suggestions/restrict-type-argument.stderr index 0c52778b0d886..33af13d943f74 100644 --- a/src/test/ui/suggestions/restrict-type-argument.stderr +++ b/src/test/ui/suggestions/restrict-type-argument.stderr @@ -7,7 +7,6 @@ LL | fn is_send(val: T) {} LL | is_send(val); | ^^^ `impl Sync` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `impl Sync` help: consider further restricting this bound | LL | fn use_impl_sync(val: impl Sync + std::marker::Send) { @@ -22,7 +21,6 @@ LL | fn is_send(val: T) {} LL | is_send(val); | ^^^ `S` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `S` help: consider further restricting this bound | LL | fn use_where(val: S) where S: Sync + std::marker::Send { @@ -37,7 +35,6 @@ LL | fn is_send(val: T) {} LL | is_send(val); | ^^^ `S` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `S` help: consider further restricting this bound | LL | fn use_bound(val: S) { @@ -52,7 +49,6 @@ LL | fn is_send(val: T) {} LL | is_send(val); | ^^^ `S` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `S` help: consider further restricting this bound | LL | Sync + std::marker::Send @@ -67,7 +63,6 @@ LL | fn is_send(val: T) {} LL | is_send(val); | ^^^ `S` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `S` help: consider further restricting this bound | LL | fn use_bound_and_where(val: S) where S: std::fmt::Debug + std::marker::Send { @@ -82,7 +77,6 @@ LL | fn is_send(val: T) {} LL | is_send(val); | ^^^ `S` cannot be sent between threads safely | - = help: the trait `std::marker::Send` is not implemented for `S` help: consider restricting type parameter `S` | LL | fn use_unbound(val: S) { diff --git a/src/test/ui/traits/trait-suggest-where-clause.stderr b/src/test/ui/traits/trait-suggest-where-clause.stderr index b8069f9ddb0f6..86a313baa5c38 100644 --- a/src/test/ui/traits/trait-suggest-where-clause.stderr +++ b/src/test/ui/traits/trait-suggest-where-clause.stderr @@ -11,8 +11,6 @@ LL | mem::size_of::(); | LL | pub const fn size_of() -> usize { | - required by this bound in `std::mem::size_of` - | - = help: the trait `std::marker::Sized` is not implemented for `U` error[E0277]: the size for values of type `U` cannot be known at compilation time --> $DIR/trait-suggest-where-clause.rs:10:5 @@ -28,7 +26,6 @@ LL | mem::size_of::>(); LL | pub const fn size_of() -> usize { | - required by this bound in `std::mem::size_of` | - = help: within `Misc`, the trait `std::marker::Sized` is not implemented for `U` = note: required because it appears within the type `Misc` error[E0277]: the trait bound `u64: std::convert::From` is not satisfied diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr index 247d68ef2a1f0..28e30cbdd9d96 100644 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr @@ -19,7 +19,6 @@ LL | type Underconstrained = impl 'static; LL | 5u32 | ---- this returned value is of type `u32` | - = help: the trait `std::fmt::Debug` is not implemented for `U` = note: the return type of a function must have a statically known size help: consider restricting type parameter `U` | @@ -35,7 +34,6 @@ LL | type Underconstrained2 = impl 'static; LL | 5u32 | ---- this returned value is of type `u32` | - = help: the trait `std::fmt::Debug` is not implemented for `V` = note: the return type of a function must have a statically known size help: consider restricting type parameter `V` | diff --git a/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr b/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr index 9cba3578449c3..7398b48a238d1 100644 --- a/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr +++ b/src/test/ui/typeck/typeck-default-trait-impl-send-param.stderr @@ -7,7 +7,6 @@ LL | is_send::() LL | fn is_send() { | ---- required by this bound in `is_send` | - = help: the trait `std::marker::Send` is not implemented for `T` help: consider restricting type parameter `T` | LL | fn foo() { diff --git a/src/test/ui/union/union-sized-field.stderr b/src/test/ui/union/union-sized-field.stderr index eb169987ccdb9..d7224e46add3d 100644 --- a/src/test/ui/union/union-sized-field.stderr +++ b/src/test/ui/union/union-sized-field.stderr @@ -6,7 +6,6 @@ LL | union Foo { LL | value: T, | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `T` = note: no field of a union 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 @@ -26,7 +25,6 @@ LL | struct Foo2 { LL | value: T, | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `T` = note: only the last field of a struct 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 @@ -46,7 +44,6 @@ LL | enum Foo3 { LL | Value(T), | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `T` = 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 diff --git a/src/test/ui/unsized/unsized-bare-typaram.stderr b/src/test/ui/unsized/unsized-bare-typaram.stderr index 998cd7a527c9b..19978ae24cacb 100644 --- a/src/test/ui/unsized/unsized-bare-typaram.stderr +++ b/src/test/ui/unsized/unsized-bare-typaram.stderr @@ -7,8 +7,6 @@ LL | fn foo() { bar::() } | - ^ doesn't have a size known at compile-time | | | this type parameter needs to be `std::marker::Sized` - | - = help: the trait `std::marker::Sized` is not implemented for `T` error: aborting due to previous error diff --git a/src/test/ui/unsized/unsized-enum.stderr b/src/test/ui/unsized/unsized-enum.stderr index cb06e707dcaa8..fdfdb9b4e2a5b 100644 --- a/src/test/ui/unsized/unsized-enum.stderr +++ b/src/test/ui/unsized/unsized-enum.stderr @@ -9,7 +9,6 @@ LL | fn foo2() { not_sized::>() } | | | this type parameter needs to be `std::marker::Sized` | - = help: the trait `std::marker::Sized` is not implemented for `T` help: you could relax the implicit `Sized` bound on `U` if it were used through indirection like `&U` or `Box` --> $DIR/unsized-enum.rs:4:10 | diff --git a/src/test/ui/unsized/unsized-enum2.stderr b/src/test/ui/unsized/unsized-enum2.stderr index 82f395740d5ad..742abc39209e6 100644 --- a/src/test/ui/unsized/unsized-enum2.stderr +++ b/src/test/ui/unsized/unsized-enum2.stderr @@ -7,7 +7,6 @@ LL | // parameter LL | VA(W), | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `W` = 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 @@ -28,7 +27,6 @@ LL | enum E { LL | VB{x: X}, | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `X` = 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 @@ -49,7 +47,6 @@ LL | enum E { LL | VC(isize, Y), | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `Y` = 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 @@ -70,7 +67,6 @@ LL | enum E { LL | VD{u: isize, x: Z}, | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `Z` = 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 diff --git a/src/test/ui/unsized/unsized-inherent-impl-self-type.stderr b/src/test/ui/unsized/unsized-inherent-impl-self-type.stderr index 0d08f70c558be..50b54593f3aa1 100644 --- a/src/test/ui/unsized/unsized-inherent-impl-self-type.stderr +++ b/src/test/ui/unsized/unsized-inherent-impl-self-type.stderr @@ -9,7 +9,6 @@ LL | impl S5 { | | | this type parameter needs to be `std::marker::Sized` | - = help: the trait `std::marker::Sized` is not implemented for `X` help: you could relax the implicit `Sized` bound on `Y` if it were used through indirection like `&Y` or `Box` --> $DIR/unsized-inherent-impl-self-type.rs:5:11 | diff --git a/src/test/ui/unsized/unsized-struct.stderr b/src/test/ui/unsized/unsized-struct.stderr index d796fcd1a6b64..0c8529bf1a9af 100644 --- a/src/test/ui/unsized/unsized-struct.stderr +++ b/src/test/ui/unsized/unsized-struct.stderr @@ -9,7 +9,6 @@ LL | fn foo2() { not_sized::>() } | | | this type parameter needs to be `std::marker::Sized` | - = help: the trait `std::marker::Sized` is not implemented for `T` help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box` --> $DIR/unsized-struct.rs:4:12 | @@ -29,7 +28,6 @@ LL | fn bar2() { is_sized::>() } | | | this type parameter needs to be `std::marker::Sized` | - = help: within `Bar`, the trait `std::marker::Sized` is not implemented for `T` = note: required because it appears within the type `Bar` error: aborting due to 2 previous errors diff --git a/src/test/ui/unsized/unsized-trait-impl-self-type.stderr b/src/test/ui/unsized/unsized-trait-impl-self-type.stderr index 623c83c4d6f07..4514208a90dc9 100644 --- a/src/test/ui/unsized/unsized-trait-impl-self-type.stderr +++ b/src/test/ui/unsized/unsized-trait-impl-self-type.stderr @@ -9,7 +9,6 @@ LL | impl T3 for S5 { | | | this type parameter needs to be `std::marker::Sized` | - = help: the trait `std::marker::Sized` is not implemented for `X` help: you could relax the implicit `Sized` bound on `Y` if it were used through indirection like `&Y` or `Box` --> $DIR/unsized-trait-impl-self-type.rs:8:11 | diff --git a/src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr b/src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr index 1dc9e313d91a6..f48d4ef9f1461 100644 --- a/src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr +++ b/src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr @@ -9,7 +9,6 @@ LL | impl T2 for S4 { | | | this type parameter needs to be `std::marker::Sized` | - = help: the trait `std::marker::Sized` is not implemented for `X` help: consider relaxing the implicit `Sized` restriction | LL | trait T2 { diff --git a/src/test/ui/unsized3.stderr b/src/test/ui/unsized3.stderr index d5c79c71a2349..ddddae4eaba57 100644 --- a/src/test/ui/unsized3.stderr +++ b/src/test/ui/unsized3.stderr @@ -9,7 +9,6 @@ LL | f2::(x); LL | fn f2(x: &X) { | - required by this bound in `f2` | - = help: the trait `std::marker::Sized` is not implemented for `X` help: consider relaxing the implicit `Sized` restriction | LL | fn f2(x: &X) { @@ -26,7 +25,6 @@ LL | f4::(x); LL | fn f4(x: &X) { | - required by this bound in `f4` | - = help: the trait `std::marker::Sized` is not implemented for `X` help: consider relaxing the implicit `Sized` restriction | LL | fn f4(x: &X) { @@ -43,7 +41,6 @@ LL | fn f8(x1: &S, x2: &S) { LL | f5(x1); | ^^ doesn't have a size known at compile-time | - = help: within `S`, the trait `std::marker::Sized` is not implemented for `X` = note: required because it appears within the type `S` help: consider relaxing the implicit `Sized` restriction | @@ -58,7 +55,6 @@ LL | fn f9(x1: Box>) { LL | f5(&(*x1, 34)); | ^^^^^^^^^^ doesn't have a size known at compile-time | - = help: within `S`, the trait `std::marker::Sized` is not implemented for `X` = note: required because it appears within the type `S` = note: only the last element of a tuple may have a dynamically sized type @@ -70,7 +66,6 @@ LL | fn f10(x1: Box>) { LL | f5(&(32, *x1)); | ^^^^^^^^^ doesn't have a size known at compile-time | - = help: within `({integer}, S)`, the trait `std::marker::Sized` is not implemented for `X` = note: required because it appears within the type `S` = note: required because it appears within the type `({integer}, S)` = note: tuples must have a statically known size to be initialized @@ -86,7 +81,6 @@ LL | fn f10(x1: Box>) { LL | f5(&(32, *x1)); | ^^^^^^^^^^ doesn't have a size known at compile-time | - = help: within `({integer}, S)`, the trait `std::marker::Sized` is not implemented for `X` = note: required because it appears within the type `S` = note: required because it appears within the type `({integer}, S)` help: consider relaxing the implicit `Sized` restriction diff --git a/src/test/ui/unsized5.stderr b/src/test/ui/unsized5.stderr index 9bdcc0399b833..80cf4baeab794 100644 --- a/src/test/ui/unsized5.stderr +++ b/src/test/ui/unsized5.stderr @@ -6,7 +6,6 @@ LL | struct S1 { LL | f1: X, | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `X` = note: only the last field of a struct 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 @@ -27,7 +26,6 @@ LL | f: isize, LL | g: X, | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `X` = note: only the last field of a struct 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 @@ -83,7 +81,6 @@ LL | enum E { LL | V1(X, isize), | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `X` = 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 @@ -103,7 +100,6 @@ LL | enum F { LL | V2{f1: X, f: isize}, | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `X` = 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 diff --git a/src/test/ui/unsized6.stderr b/src/test/ui/unsized6.stderr index 82f1e87008d30..f045bfe2444bc 100644 --- a/src/test/ui/unsized6.stderr +++ b/src/test/ui/unsized6.stderr @@ -7,7 +7,6 @@ LL | fn f1(x: &X) { LL | let y: Y; | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `Y` = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature @@ -20,7 +19,6 @@ LL | let _: W; // <-- this is OK, no bindings created, no initializer. LL | let _: (isize, (X, isize)); | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `X` = note: only the last element of a tuple may have a dynamically sized type error[E0277]: the size for values of type `Z` cannot be known at compilation time @@ -32,7 +30,6 @@ LL | fn f1(x: &X) { LL | let y: (isize, (Z, usize)); | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `Z` = note: only the last element of a tuple may have a dynamically sized type error[E0277]: the size for values of type `X` cannot be known at compilation time @@ -43,7 +40,6 @@ LL | fn f2(x: &X) { LL | let y: X; | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `X` = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature @@ -56,7 +52,6 @@ LL | fn f2(x: &X) { LL | let y: (isize, (Y, isize)); | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `Y` = note: only the last element of a tuple may have a dynamically sized type error[E0277]: the size for values of type `X` cannot be known at compilation time @@ -67,7 +62,6 @@ LL | fn f3(x1: Box, x2: Box, x3: Box) { LL | let y: X = *x1; | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `X` = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature @@ -80,7 +74,6 @@ LL | fn f3(x1: Box, x2: Box, x3: Box) { LL | let y = *x2; | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `X` = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature @@ -93,7 +86,6 @@ LL | fn f3(x1: Box, x2: Box, x3: Box) { LL | let (y, z) = (*x3, 4); | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `X` = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature @@ -105,7 +97,6 @@ LL | fn f4(x1: Box, x2: Box, x3: Box) { LL | let y: X = *x1; | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `X` = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature @@ -118,7 +109,6 @@ LL | fn f4(x1: Box, x2: Box, x3: Box) { LL | let y = *x2; | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `X` = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature @@ -131,7 +121,6 @@ LL | fn f4(x1: Box, x2: Box, x3: Box) { LL | let (y, z) = (*x3, 4); | ^ doesn't have a size known at compile-time | - = help: the trait `std::marker::Sized` is not implemented for `X` = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature @@ -143,7 +132,6 @@ LL | fn g1(x: X) {} | | | this type parameter needs to be `std::marker::Sized` | - = help: the trait `std::marker::Sized` is not implemented for `X` = help: unsized locals are gated as an unstable feature help: function arguments must have a statically known size, borrowed types always have a known size | @@ -158,7 +146,6 @@ LL | fn g2(x: X) {} | | | this type parameter needs to be `std::marker::Sized` | - = help: the trait `std::marker::Sized` is not implemented for `X` = help: unsized locals 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/src/test/ui/unsized7.stderr b/src/test/ui/unsized7.stderr index 868c9ea429e24..7dbddd4ed2443 100644 --- a/src/test/ui/unsized7.stderr +++ b/src/test/ui/unsized7.stderr @@ -9,7 +9,6 @@ LL | impl T1 for S3 { | | | this type parameter needs to be `std::marker::Sized` | - = help: the trait `std::marker::Sized` is not implemented for `X` help: consider relaxing the implicit `Sized` restriction | LL | trait T1 {