review comment: change wording
This commit is contained in:
parent
95d9009f49
commit
8b0ab54ffe
@ -3010,7 +3010,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
||||
}
|
||||
}
|
||||
let mut a = "a";
|
||||
let mut this = "this";
|
||||
let mut this = "this bound";
|
||||
let mut note = None;
|
||||
let mut help = None;
|
||||
if let ty::PredicateKind::Clause(clause) = predicate.kind().skip_binder()
|
||||
@ -3036,7 +3036,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
||||
.any(|param| tcx.def_span(param.def_id) == span)
|
||||
{
|
||||
a = "an implicit `Sized`";
|
||||
this = "the implicit `Sized` requirement on this";
|
||||
this = "the implicit `Sized` requirement on this type parameter";
|
||||
}
|
||||
if let Some(hir::Node::TraitItem(hir::TraitItem {
|
||||
ident,
|
||||
@ -3106,7 +3106,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
||||
};
|
||||
let descr = format!("required by {a} bound in `{item_name}`");
|
||||
if span.is_visible(sm) {
|
||||
let msg = format!("required by {this} bound in `{short_item_name}`");
|
||||
let msg = format!("required by {this} in `{short_item_name}`");
|
||||
multispan.push_span_label(span, msg);
|
||||
err.span_note(multispan, descr);
|
||||
} else {
|
||||
|
@ -8,7 +8,7 @@ note: required by an implicit `Sized` bound in `From`
|
||||
--> $DIR/issue-20005.rs:1:12
|
||||
|
|
||||
LL | trait From<Src> {
|
||||
| ^^^ required by the implicit `Sized` requirement on this bound in `From`
|
||||
| ^^^ required by the implicit `Sized` requirement on this type parameter in `From`
|
||||
help: consider further restricting `Self`
|
||||
|
|
||||
LL | ) -> <Dst as From<Self>>::Result where Dst: From<Self>, Self: Sized {
|
||||
|
@ -9,7 +9,7 @@ note: required by an implicit `Sized` bound in `Foo`
|
||||
--> $DIR/dst-sized-trait-param.rs:5:11
|
||||
|
|
||||
LL | trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Foo`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Foo`
|
||||
help: consider relaxing the implicit `Sized` restriction
|
||||
|
|
||||
LL | trait Foo<T: ?Sized> : Sized { fn take(self, x: &T) { } } // Note: T is sized
|
||||
|
8
tests/ui/extern/extern-types-unsized.stderr
vendored
8
tests/ui/extern/extern-types-unsized.stderr
vendored
@ -9,7 +9,7 @@ note: required by an implicit `Sized` bound in `assert_sized`
|
||||
--> $DIR/extern-types-unsized.rs:19:17
|
||||
|
|
||||
LL | fn assert_sized<T>() {}
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `assert_sized`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `assert_sized`
|
||||
help: consider relaxing the implicit `Sized` restriction
|
||||
|
|
||||
LL | fn assert_sized<T: ?Sized>() {}
|
||||
@ -31,7 +31,7 @@ note: required by an implicit `Sized` bound in `assert_sized`
|
||||
--> $DIR/extern-types-unsized.rs:19:17
|
||||
|
|
||||
LL | fn assert_sized<T>() {}
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `assert_sized`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `assert_sized`
|
||||
help: consider relaxing the implicit `Sized` restriction
|
||||
|
|
||||
LL | fn assert_sized<T: ?Sized>() {}
|
||||
@ -53,7 +53,7 @@ note: required by an implicit `Sized` bound in `assert_sized`
|
||||
--> $DIR/extern-types-unsized.rs:19:17
|
||||
|
|
||||
LL | fn assert_sized<T>() {}
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `assert_sized`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `assert_sized`
|
||||
help: consider relaxing the implicit `Sized` restriction
|
||||
|
|
||||
LL | fn assert_sized<T: ?Sized>() {}
|
||||
@ -75,7 +75,7 @@ note: required by an implicit `Sized` bound in `assert_sized`
|
||||
--> $DIR/extern-types-unsized.rs:19:17
|
||||
|
|
||||
LL | fn assert_sized<T>() {}
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `assert_sized`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `assert_sized`
|
||||
help: consider relaxing the implicit `Sized` restriction
|
||||
|
|
||||
LL | fn assert_sized<T: ?Sized>() {}
|
||||
|
@ -11,7 +11,7 @@ note: required by an implicit `Sized` bound in `<T as SearchableResourceExt<Crit
|
||||
--> $DIR/issue-88287.rs:24:6
|
||||
|
|
||||
LL | impl<T, Criteria> SearchableResourceExt<Criteria> for T
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `<T as SearchableResourceExt<Criteria>>`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `<T as SearchableResourceExt<Criteria>>`
|
||||
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
||||
|
|
||||
LL - A: SearchableResource<B> + ?Sized + 'f,
|
||||
|
@ -19,7 +19,7 @@ note: required by an implicit `Sized` bound in `Wf`
|
||||
--> $DIR/wf-bounds.rs:7:10
|
||||
|
|
||||
LL | trait Wf<T> {
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Wf`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Wf`
|
||||
help: consider relaxing the implicit `Sized` restriction
|
||||
|
|
||||
LL | trait Wf<T: ?Sized> {
|
||||
|
@ -62,7 +62,7 @@ note: required by an implicit `Sized` bound in `Serializable`
|
||||
--> $DIR/issue-10412.rs:1:27
|
||||
|
|
||||
LL | trait Serializable<'self, T> {
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Serializable`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Serializable`
|
||||
help: consider relaxing the implicit `Sized` restriction
|
||||
|
|
||||
LL | trait Serializable<'self, T: ?Sized> {
|
||||
|
@ -9,7 +9,7 @@ note: required by an implicit `Sized` bound in `Option`
|
||||
--> $DIR/issue-18919.rs:7:13
|
||||
|
|
||||
LL | enum Option<T> {
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Option`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Option`
|
||||
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
|
||||
--> $DIR/issue-18919.rs:7:13
|
||||
|
|
||||
|
@ -9,7 +9,7 @@ note: required by an implicit `Sized` bound in `Vec`
|
||||
--> $DIR/issue-23281.rs:8:12
|
||||
|
|
||||
LL | struct Vec<T> {
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Vec`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Vec`
|
||||
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
|
||||
--> $DIR/issue-23281.rs:8:12
|
||||
|
|
||||
|
@ -27,7 +27,7 @@ note: required by an implicit `Sized` bound in `ref_arg`
|
||||
--> $DIR/issue-87199.rs:10:12
|
||||
|
|
||||
LL | fn ref_arg<T: ?Send>(_: &T) {}
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `ref_arg`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `ref_arg`
|
||||
help: consider relaxing the implicit `Sized` restriction
|
||||
|
|
||||
LL | fn ref_arg<T: ?Send + ?Sized>(_: &T) {}
|
||||
|
@ -64,7 +64,7 @@ note: required by an implicit `Sized` bound in `A`
|
||||
--> $DIR/do-not-ice-on-note_and_explain.rs:1:10
|
||||
|
|
||||
LL | struct A<B>(B);
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `A`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `A`
|
||||
help: you could relax the implicit `Sized` bound on `B` if it were used through indirection like `&B` or `Box<B>`
|
||||
--> $DIR/do-not-ice-on-note_and_explain.rs:1:10
|
||||
|
|
||||
|
@ -11,7 +11,7 @@ note: required by an implicit `Sized` bound in `Example::query`
|
||||
--> $DIR/issue-61525.rs:2:14
|
||||
|
|
||||
LL | fn query<Q>(self, q: Q);
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Example::query`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Example::query`
|
||||
help: consider relaxing the implicit `Sized` restriction
|
||||
|
|
||||
LL | fn query<Q: ?Sized>(self, q: Q);
|
||||
|
@ -26,7 +26,7 @@ note: required by an implicit `Sized` bound in `Bar`
|
||||
--> $DIR/object-safety-supertrait-mentions-Self.rs:4:11
|
||||
|
|
||||
LL | trait Bar<T> {
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Bar`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
|
||||
help: consider further restricting `Self`
|
||||
|
|
||||
LL | trait Baz : Bar<Self> + Sized {
|
||||
|
@ -9,7 +9,7 @@ note: required by an implicit `Sized` bound in `bot`
|
||||
--> $DIR/str-mut-idx.rs:1:8
|
||||
|
|
||||
LL | fn bot<T>() -> T { loop {} }
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `bot`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `bot`
|
||||
help: consider relaxing the implicit `Sized` restriction
|
||||
|
|
||||
LL | fn bot<T: ?Sized>() -> T { loop {} }
|
||||
|
@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `X`
|
||||
--> $DIR/adt-param-with-implicit-sized-bound.rs:18:10
|
||||
|
|
||||
LL | struct X<T>(T);
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `X`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `X`
|
||||
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
|
||||
--> $DIR/adt-param-with-implicit-sized-bound.rs:18:10
|
||||
|
|
||||
@ -34,7 +34,7 @@ note: required by an implicit `Sized` bound in `Struct1`
|
||||
--> $DIR/adt-param-with-implicit-sized-bound.rs:8:16
|
||||
|
|
||||
LL | struct Struct1<T>{
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Struct1`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Struct1`
|
||||
help: consider further restricting `Self`
|
||||
|
|
||||
LL | fn func1() -> Struct1<Self> where Self: Sized;
|
||||
@ -54,7 +54,7 @@ note: required by an implicit `Sized` bound in `Struct2`
|
||||
--> $DIR/adt-param-with-implicit-sized-bound.rs:11:20
|
||||
|
|
||||
LL | struct Struct2<'a, T>{
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Struct2`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Struct2`
|
||||
help: consider further restricting `Self`
|
||||
|
|
||||
LL | fn func2<'a>() -> Struct2<'a, Self> where Self: Sized;
|
||||
@ -74,7 +74,7 @@ note: required by an implicit `Sized` bound in `Struct3`
|
||||
--> $DIR/adt-param-with-implicit-sized-bound.rs:14:16
|
||||
|
|
||||
LL | struct Struct3<T>{
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Struct3`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Struct3`
|
||||
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
|
||||
--> $DIR/adt-param-with-implicit-sized-bound.rs:14:16
|
||||
|
|
||||
@ -97,7 +97,7 @@ note: required by an implicit `Sized` bound in `Struct4`
|
||||
--> $DIR/adt-param-with-implicit-sized-bound.rs:20:16
|
||||
|
|
||||
LL | struct Struct4<T>{
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Struct4`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Struct4`
|
||||
help: consider further restricting `Self`
|
||||
|
|
||||
LL | fn func4() -> Struct4<Self> where Self: Sized;
|
||||
|
@ -9,7 +9,7 @@ note: required by an implicit `Sized` bound in `A`
|
||||
--> $DIR/issue-85943-no-suggest-unsized-indirection-in-where-clause.rs:4:10
|
||||
|
|
||||
LL | struct A<T>(T) where T: Send;
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `A`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `A`
|
||||
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
|
||||
--> $DIR/issue-85943-no-suggest-unsized-indirection-in-where-clause.rs:4:10
|
||||
|
|
||||
|
@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `Wrapper`
|
||||
--> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
|
||||
|
|
||||
LL | struct Wrapper<T>(T);
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Wrapper`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Wrapper`
|
||||
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
|
||||
--> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
|
||||
|
|
||||
@ -39,7 +39,7 @@ note: required by an implicit `Sized` bound in `Wrapper`
|
||||
--> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
|
||||
|
|
||||
LL | struct Wrapper<T>(T);
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Wrapper`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Wrapper`
|
||||
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
|
||||
--> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
|
||||
|
|
||||
@ -64,7 +64,7 @@ note: required by an implicit `Sized` bound in `Wrapper`
|
||||
--> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
|
||||
|
|
||||
LL | struct Wrapper<T>(T);
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Wrapper`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Wrapper`
|
||||
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
|
||||
--> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
|
||||
|
|
||||
|
@ -11,7 +11,7 @@ note: required by an implicit `Sized` bound in `Trait`
|
||||
--> $DIR/unsized-bound.rs:1:13
|
||||
|
|
||||
LL | trait Trait<A> {}
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Trait`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait`
|
||||
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
||||
|
|
||||
LL - impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
|
||||
@ -50,7 +50,7 @@ note: required by an implicit `Sized` bound in `Trait`
|
||||
--> $DIR/unsized-bound.rs:1:13
|
||||
|
|
||||
LL | trait Trait<A> {}
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Trait`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait`
|
||||
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
||||
|
|
||||
LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
|
||||
@ -100,7 +100,7 @@ note: required by an implicit `Sized` bound in `Trait2`
|
||||
--> $DIR/unsized-bound.rs:9:14
|
||||
|
|
||||
LL | trait Trait2<A> {}
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Trait2`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait2`
|
||||
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
||||
|
|
||||
LL - impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
|
||||
@ -138,7 +138,7 @@ note: required by an implicit `Sized` bound in `Trait3`
|
||||
--> $DIR/unsized-bound.rs:13:14
|
||||
|
|
||||
LL | trait Trait3<A> {}
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Trait3`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait3`
|
||||
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
||||
|
|
||||
LL - impl<A> Trait3<A> for A where A: ?Sized {}
|
||||
@ -161,7 +161,7 @@ note: required by an implicit `Sized` bound in `Trait4`
|
||||
--> $DIR/unsized-bound.rs:16:14
|
||||
|
|
||||
LL | trait Trait4<A> {}
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Trait4`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait4`
|
||||
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
||||
|
|
||||
LL - impl<A: ?Sized> Trait4<A> for A {}
|
||||
@ -184,7 +184,7 @@ note: required by an implicit `Sized` bound in `Trait5`
|
||||
--> $DIR/unsized-bound.rs:19:14
|
||||
|
|
||||
LL | trait Trait5<A, B> {}
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Trait5`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait5`
|
||||
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
||||
|
|
||||
LL - impl<X, Y> Trait5<X, Y> for X where X: ?Sized {}
|
||||
@ -207,7 +207,7 @@ note: required by an implicit `Sized` bound in `Trait6`
|
||||
--> $DIR/unsized-bound.rs:22:14
|
||||
|
|
||||
LL | trait Trait6<A, B> {}
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Trait6`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait6`
|
||||
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
||||
|
|
||||
LL - impl<X: ?Sized, Y> Trait6<X, Y> for X {}
|
||||
@ -230,7 +230,7 @@ note: required by an implicit `Sized` bound in `Trait7`
|
||||
--> $DIR/unsized-bound.rs:25:17
|
||||
|
|
||||
LL | trait Trait7<A, B> {}
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Trait7`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait7`
|
||||
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
||||
|
|
||||
LL - impl<X, Y> Trait7<X, Y> for X where Y: ?Sized {}
|
||||
@ -253,7 +253,7 @@ note: required by an implicit `Sized` bound in `Trait8`
|
||||
--> $DIR/unsized-bound.rs:28:17
|
||||
|
|
||||
LL | trait Trait8<A, B> {}
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Trait8`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait8`
|
||||
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
||||
|
|
||||
LL - impl<X, Y: ?Sized> Trait8<X, Y> for X {}
|
||||
|
@ -29,7 +29,7 @@ note: required by an implicit `Sized` bound in `Foo`
|
||||
--> $DIR/issue-28576.rs:1:15
|
||||
|
|
||||
LL | pub trait Foo<RHS=Self> {
|
||||
| ^^^^^^^^ required by the implicit `Sized` requirement on this bound in `Foo`
|
||||
| ^^^^^^^^ required by the implicit `Sized` requirement on this type parameter in `Foo`
|
||||
help: consider further restricting `Self`
|
||||
|
|
||||
LL | pub trait Bar: Foo<Assoc=()> + Sized {
|
||||
@ -49,7 +49,7 @@ note: required by an implicit `Sized` bound in `Foo`
|
||||
--> $DIR/issue-28576.rs:1:15
|
||||
|
|
||||
LL | pub trait Foo<RHS=Self> {
|
||||
| ^^^^^^^^ required by the implicit `Sized` requirement on this bound in `Foo`
|
||||
| ^^^^^^^^ required by the implicit `Sized` requirement on this type parameter in `Foo`
|
||||
help: consider further restricting `Self`
|
||||
|
|
||||
LL | ) where Self: Sized;
|
||||
|
@ -26,11 +26,11 @@ LL | needs_bar::<T::Assoc1>();
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_self_normalization_2`)
|
||||
note: required by a bound in `needs_bar`
|
||||
note: required by an implicit `Sized` bound in `needs_bar`
|
||||
--> $DIR/recursive-self-normalization-2.rs:12:14
|
||||
|
|
||||
LL | fn needs_bar<S: Bar>() {}
|
||||
| ^ required by this bound in `needs_bar`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `needs_bar`
|
||||
help: consider relaxing the implicit `Sized` restriction
|
||||
|
|
||||
LL | fn needs_bar<S: Bar + ?Sized>() {}
|
||||
|
@ -26,11 +26,11 @@ LL | needs_bar::<T::Assoc>();
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_self_normalization`)
|
||||
note: required by a bound in `needs_bar`
|
||||
note: required by an implicit `Sized` bound in `needs_bar`
|
||||
--> $DIR/recursive-self-normalization.rs:8:14
|
||||
|
|
||||
LL | fn needs_bar<S: Bar>() {}
|
||||
| ^ required by this bound in `needs_bar`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `needs_bar`
|
||||
help: consider relaxing the implicit `Sized` restriction
|
||||
|
|
||||
LL | fn needs_bar<S: Bar + ?Sized>() {}
|
||||
|
@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `Foo`
|
||||
--> $DIR/unsized-enum.rs:4:10
|
||||
|
|
||||
LL | enum Foo<U> { FooSome(U), FooNone }
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Foo`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Foo`
|
||||
help: you could relax the implicit `Sized` bound on `U` if it were used through indirection like `&U` or `Box<U>`
|
||||
--> $DIR/unsized-enum.rs:4:10
|
||||
|
|
||||
|
@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `S5`
|
||||
--> $DIR/unsized-inherent-impl-self-type.rs:5:11
|
||||
|
|
||||
LL | struct S5<Y>(Y);
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `S5`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `S5`
|
||||
help: you could relax the implicit `Sized` bound on `Y` if it were used through indirection like `&Y` or `Box<Y>`
|
||||
--> $DIR/unsized-inherent-impl-self-type.rs:5:11
|
||||
|
|
||||
|
@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `Foo`
|
||||
--> $DIR/unsized-struct.rs:4:12
|
||||
|
|
||||
LL | struct Foo<T> { data: T }
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Foo`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Foo`
|
||||
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
|
||||
--> $DIR/unsized-struct.rs:4:12
|
||||
|
|
||||
|
@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `S5`
|
||||
--> $DIR/unsized-trait-impl-self-type.rs:8:11
|
||||
|
|
||||
LL | struct S5<Y>(Y);
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `S5`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `S5`
|
||||
help: you could relax the implicit `Sized` bound on `Y` if it were used through indirection like `&Y` or `Box<Y>`
|
||||
--> $DIR/unsized-trait-impl-self-type.rs:8:11
|
||||
|
|
||||
|
@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `T2`
|
||||
--> $DIR/unsized-trait-impl-trait-arg.rs:4:10
|
||||
|
|
||||
LL | trait T2<Z> {
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `T2`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `T2`
|
||||
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
||||
|
|
||||
LL - impl<X: ?Sized> T2<X> for S4<X> {
|
||||
|
@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `f2`
|
||||
--> $DIR/unsized3.rs:10:7
|
||||
|
|
||||
LL | fn f2<X>(x: &X) {
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `f2`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `f2`
|
||||
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
||||
|
|
||||
LL - fn f1<X: ?Sized>(x: &X) {
|
||||
@ -33,7 +33,7 @@ note: required by an implicit `Sized` bound in `f4`
|
||||
--> $DIR/unsized3.rs:21:7
|
||||
|
|
||||
LL | fn f4<X: T>(x: &X) {
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `f4`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `f4`
|
||||
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
||||
|
|
||||
LL - fn f3<X: ?Sized + T>(x: &X) {
|
||||
@ -63,7 +63,7 @@ note: required by an implicit `Sized` bound in `f5`
|
||||
--> $DIR/unsized3.rs:24:7
|
||||
|
|
||||
LL | fn f5<Y>(x: &Y) {}
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `f5`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `f5`
|
||||
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
||||
|
|
||||
LL - fn f8<X: ?Sized>(x1: &S<X>, x2: &S<X>) {
|
||||
@ -135,7 +135,7 @@ note: required by an implicit `Sized` bound in `f5`
|
||||
--> $DIR/unsized3.rs:24:7
|
||||
|
|
||||
LL | fn f5<Y>(x: &Y) {}
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `f5`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `f5`
|
||||
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
||||
|
|
||||
LL - fn f10<X: ?Sized>(x1: Box<S<X>>) {
|
||||
|
@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `T1`
|
||||
--> $DIR/unsized7.rs:7:10
|
||||
|
|
||||
LL | trait T1<Z: T> {
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `T1`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `T1`
|
||||
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
||||
|
|
||||
LL - impl<X: ?Sized + T> T1<X> for S3<X> {
|
||||
|
@ -33,7 +33,7 @@ note: required by an implicit `Sized` bound in `Bar`
|
||||
--> $DIR/hir-wf-canonicalized.rs:9:16
|
||||
|
|
||||
LL | struct Bar<'a, T> {
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Bar`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
|
||||
help: consider relaxing the implicit `Sized` restriction
|
||||
|
|
||||
LL | struct Bar<'a, T: ?Sized> {
|
||||
|
@ -34,7 +34,7 @@ note: required by an implicit `Sized` bound in `Vec`
|
||||
--> $DIR/wf-fn-where-clause.rs:16:12
|
||||
|
|
||||
LL | struct Vec<T> {
|
||||
| ^ required by the implicit `Sized` requirement on this bound in `Vec`
|
||||
| ^ required by the implicit `Sized` requirement on this type parameter in `Vec`
|
||||
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
|
||||
--> $DIR/wf-fn-where-clause.rs:16:12
|
||||
|
|
||||
|
Loading…
x
Reference in New Issue
Block a user