reword trait bound suggestion message to include the bounds
This commit is contained in:
parent
68253e14ee
commit
d13c34828e
155 changed files with 331 additions and 314 deletions
|
@ -171,7 +171,7 @@ enum SuggestChangingConstraintsMessage<'a> {
|
||||||
|
|
||||||
fn suggest_changing_unsized_bound(
|
fn suggest_changing_unsized_bound(
|
||||||
generics: &hir::Generics<'_>,
|
generics: &hir::Generics<'_>,
|
||||||
suggestions: &mut Vec<(Span, String, SuggestChangingConstraintsMessage<'_>)>,
|
suggestions: &mut Vec<(Span, String, String, SuggestChangingConstraintsMessage<'_>)>,
|
||||||
param: &hir::GenericParam<'_>,
|
param: &hir::GenericParam<'_>,
|
||||||
def_id: Option<DefId>,
|
def_id: Option<DefId>,
|
||||||
) {
|
) {
|
||||||
|
@ -206,7 +206,8 @@ fn suggest_changing_unsized_bound(
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut push_suggestion = |sp, msg| suggestions.push((sp, String::new(), msg));
|
let mut push_suggestion =
|
||||||
|
|sp, msg| suggestions.push((sp, "Sized".to_string(), String::new(), msg));
|
||||||
|
|
||||||
if predicate.bounds.len() == unsized_bounds.len() {
|
if predicate.bounds.len() == unsized_bounds.len() {
|
||||||
// All the bounds are unsized bounds, e.g.
|
// All the bounds are unsized bounds, e.g.
|
||||||
|
@ -348,10 +349,20 @@ pub fn suggest_constraining_type_params<'a>(
|
||||||
use SuggestChangingConstraintsMessage::RestrictBoundFurther;
|
use SuggestChangingConstraintsMessage::RestrictBoundFurther;
|
||||||
|
|
||||||
if let Some(open_paren_sp) = open_paren_sp {
|
if let Some(open_paren_sp) = open_paren_sp {
|
||||||
suggestions.push((open_paren_sp, "(".to_string(), RestrictBoundFurther));
|
suggestions.push((
|
||||||
suggestions.push((span, format!("){suggestion}"), RestrictBoundFurther));
|
open_paren_sp,
|
||||||
|
constraint.clone(),
|
||||||
|
"(".to_string(),
|
||||||
|
RestrictBoundFurther,
|
||||||
|
));
|
||||||
|
suggestions.push((
|
||||||
|
span,
|
||||||
|
constraint.clone(),
|
||||||
|
format!("){suggestion}"),
|
||||||
|
RestrictBoundFurther,
|
||||||
|
));
|
||||||
} else {
|
} else {
|
||||||
suggestions.push((span, suggestion, RestrictBoundFurther));
|
suggestions.push((span, constraint.clone(), suggestion, RestrictBoundFurther));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -409,6 +420,7 @@ pub fn suggest_constraining_type_params<'a>(
|
||||||
// - insert: `, X: Bar`
|
// - insert: `, X: Bar`
|
||||||
suggestions.push((
|
suggestions.push((
|
||||||
generics.tail_span_for_predicate_suggestion(),
|
generics.tail_span_for_predicate_suggestion(),
|
||||||
|
constraint.clone(),
|
||||||
constraints.iter().fold(String::new(), |mut string, &(constraint, _)| {
|
constraints.iter().fold(String::new(), |mut string, &(constraint, _)| {
|
||||||
write!(string, ", {param_name}: {constraint}").unwrap();
|
write!(string, ", {param_name}: {constraint}").unwrap();
|
||||||
string
|
string
|
||||||
|
@ -438,6 +450,7 @@ pub fn suggest_constraining_type_params<'a>(
|
||||||
// default (`<T=Foo>`), so we suggest adding `where T: Bar`.
|
// default (`<T=Foo>`), so we suggest adding `where T: Bar`.
|
||||||
suggestions.push((
|
suggestions.push((
|
||||||
generics.tail_span_for_predicate_suggestion(),
|
generics.tail_span_for_predicate_suggestion(),
|
||||||
|
constraint.clone(),
|
||||||
format!("{where_prefix} {param_name}: {constraint}"),
|
format!("{where_prefix} {param_name}: {constraint}"),
|
||||||
SuggestChangingConstraintsMessage::RestrictTypeFurther { ty: param_name },
|
SuggestChangingConstraintsMessage::RestrictTypeFurther { ty: param_name },
|
||||||
));
|
));
|
||||||
|
@ -451,6 +464,7 @@ pub fn suggest_constraining_type_params<'a>(
|
||||||
if let Some(colon_span) = param.colon_span {
|
if let Some(colon_span) = param.colon_span {
|
||||||
suggestions.push((
|
suggestions.push((
|
||||||
colon_span.shrink_to_hi(),
|
colon_span.shrink_to_hi(),
|
||||||
|
constraint.clone(),
|
||||||
format!(" {constraint}"),
|
format!(" {constraint}"),
|
||||||
SuggestChangingConstraintsMessage::RestrictType { ty: param_name },
|
SuggestChangingConstraintsMessage::RestrictType { ty: param_name },
|
||||||
));
|
));
|
||||||
|
@ -463,6 +477,7 @@ pub fn suggest_constraining_type_params<'a>(
|
||||||
// - help: consider restricting this type parameter with `T: Foo`
|
// - help: consider restricting this type parameter with `T: Foo`
|
||||||
suggestions.push((
|
suggestions.push((
|
||||||
param.span.shrink_to_hi(),
|
param.span.shrink_to_hi(),
|
||||||
|
constraint.clone(),
|
||||||
format!(": {constraint}"),
|
format!(": {constraint}"),
|
||||||
SuggestChangingConstraintsMessage::RestrictType { ty: param_name },
|
SuggestChangingConstraintsMessage::RestrictType { ty: param_name },
|
||||||
));
|
));
|
||||||
|
@ -471,12 +486,16 @@ pub fn suggest_constraining_type_params<'a>(
|
||||||
// FIXME: remove the suggestions that are from derive, as the span is not correct
|
// FIXME: remove the suggestions that are from derive, as the span is not correct
|
||||||
suggestions = suggestions
|
suggestions = suggestions
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter(|(span, _, _)| !span.in_derive_expansion())
|
.filter(|(span, _, _, _)| !span.in_derive_expansion())
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
if suggestions.len() == 1 {
|
if suggestions.len() == 1 {
|
||||||
let (span, suggestion, msg) = suggestions.pop().unwrap();
|
let (span, constraint, suggestion, msg) = suggestions.pop().unwrap();
|
||||||
let post = if unstable_suggestion { " but it is an `unstable` trait" } else { "" };
|
let post = format!(
|
||||||
|
" with {}trait{} `{constraint}`",
|
||||||
|
if unstable_suggestion { "unstable " } else { "" },
|
||||||
|
if constraint.contains('+') { "s" } else { "" },
|
||||||
|
);
|
||||||
let msg = match msg {
|
let msg = match msg {
|
||||||
SuggestChangingConstraintsMessage::RestrictBoundFurther => {
|
SuggestChangingConstraintsMessage::RestrictBoundFurther => {
|
||||||
format!("consider further restricting this bound{post}")
|
format!("consider further restricting this bound{post}")
|
||||||
|
@ -488,21 +507,19 @@ pub fn suggest_constraining_type_params<'a>(
|
||||||
format!("consider further restricting type parameter `{ty}`{post}")
|
format!("consider further restricting type parameter `{ty}`{post}")
|
||||||
}
|
}
|
||||||
SuggestChangingConstraintsMessage::RemoveMaybeUnsized => {
|
SuggestChangingConstraintsMessage::RemoveMaybeUnsized => {
|
||||||
format!(
|
format!("consider removing the `?Sized` bound to make the type parameter `Sized`")
|
||||||
"consider removing the `?Sized` bound to make the type parameter `Sized`{post}"
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
SuggestChangingConstraintsMessage::ReplaceMaybeUnsizedWithSized => {
|
SuggestChangingConstraintsMessage::ReplaceMaybeUnsizedWithSized => {
|
||||||
format!("consider replacing `?Sized` with `Sized`{post}")
|
format!("consider replacing `?Sized` with `Sized`")
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
err.span_suggestion_verbose(span, msg, suggestion, applicability);
|
err.span_suggestion_verbose(span, msg, suggestion, applicability);
|
||||||
} else if suggestions.len() > 1 {
|
} else if suggestions.len() > 1 {
|
||||||
let post = if unstable_suggestion { " but some of them are `unstable` traits" } else { "" };
|
let post = if unstable_suggestion { " (some of them are unstable traits)" } else { "" };
|
||||||
err.multipart_suggestion_verbose(
|
err.multipart_suggestion_verbose(
|
||||||
format!("consider restricting type parameters{post}"),
|
format!("consider restricting type parameters{post}"),
|
||||||
suggestions.into_iter().map(|(span, suggestion, _)| (span, suggestion)).collect(),
|
suggestions.into_iter().map(|(span, _, suggestion, _)| (span, suggestion)).collect(),
|
||||||
applicability,
|
applicability,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ error[E0220]: associated type `Assoc` not found for `V`
|
||||||
LL | pub type Foo<V> = impl Trait<V::Assoc>;
|
LL | pub type Foo<V> = impl Trait<V::Assoc>;
|
||||||
| ^^^^^ there is an associated type `Assoc` in the trait `TraitWithAssoc`
|
| ^^^^^ there is an associated type `Assoc` in the trait `TraitWithAssoc`
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `V`
|
help: consider restricting type parameter `V` with trait `TraitWithAssoc`
|
||||||
|
|
|
|
||||||
LL | pub type Foo<V: TraitWithAssoc> = impl Trait<V::Assoc>;
|
LL | pub type Foo<V: TraitWithAssoc> = impl Trait<V::Assoc>;
|
||||||
| ++++++++++++++++
|
| ++++++++++++++++
|
||||||
|
@ -16,7 +16,7 @@ LL | pub type Foo<V> = impl Trait<V::Assoc>;
|
||||||
| ^^^^^ there is an associated type `Assoc` in the trait `TraitWithAssoc`
|
| ^^^^^ there is an associated type `Assoc` in the trait `TraitWithAssoc`
|
||||||
|
|
|
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: consider restricting type parameter `V`
|
help: consider restricting type parameter `V` with trait `TraitWithAssoc`
|
||||||
|
|
|
|
||||||
LL | pub type Foo<V: TraitWithAssoc> = impl Trait<V::Assoc>;
|
LL | pub type Foo<V: TraitWithAssoc> = impl Trait<V::Assoc>;
|
||||||
| ++++++++++++++++
|
| ++++++++++++++++
|
||||||
|
|
|
@ -4,7 +4,7 @@ error[E0277]: the trait bound `C: Bar<5>` is not satisfied
|
||||||
LL | pub struct Structure<C: Tec> {
|
LL | pub struct Structure<C: Tec> {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar<5>` is not implemented for `C`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar<5>` is not implemented for `C`
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Bar<5>`
|
||||||
|
|
|
|
||||||
LL | pub struct Structure<C: Tec + Bar<5>> {
|
LL | pub struct Structure<C: Tec + Bar<5>> {
|
||||||
| ++++++++
|
| ++++++++
|
||||||
|
@ -15,7 +15,7 @@ error[E0277]: the trait bound `C: Bar<5>` is not satisfied
|
||||||
LL | _field: C::BarType,
|
LL | _field: C::BarType,
|
||||||
| ^^^^^^^^^^ the trait `Bar<5>` is not implemented for `C`
|
| ^^^^^^^^^^ the trait `Bar<5>` is not implemented for `C`
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Bar<5>`
|
||||||
|
|
|
|
||||||
LL | pub struct Structure<C: Tec + Bar<5>> {
|
LL | pub struct Structure<C: Tec + Bar<5>> {
|
||||||
| ++++++++
|
| ++++++++
|
||||||
|
|
|
@ -4,7 +4,7 @@ error[E0277]: the trait bound `T: Get` is not satisfied
|
||||||
LL | fn uhoh<T>(foo: <T as Get>::Value) {}
|
LL | fn uhoh<T>(foo: <T as Get>::Value) {}
|
||||||
| ^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `T`
|
| ^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `T`
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Get`
|
||||||
|
|
|
|
||||||
LL | fn uhoh<T: Get>(foo: <T as Get>::Value) {}
|
LL | fn uhoh<T: Get>(foo: <T as Get>::Value) {}
|
||||||
| +++++
|
| +++++
|
||||||
|
@ -15,7 +15,7 @@ error[E0277]: the trait bound `T: Get` is not satisfied
|
||||||
LL | fn uhoh<T>(foo: <T as Get>::Value) {}
|
LL | fn uhoh<T>(foo: <T as Get>::Value) {}
|
||||||
| ^^ the trait `Get` is not implemented for `T`
|
| ^^ the trait `Get` is not implemented for `T`
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Get`
|
||||||
|
|
|
|
||||||
LL | fn uhoh<T: Get>(foo: <T as Get>::Value) {}
|
LL | fn uhoh<T: Get>(foo: <T as Get>::Value) {}
|
||||||
| +++++
|
| +++++
|
||||||
|
|
|
@ -47,7 +47,7 @@ note: required by a bound in `Foo::Bar`
|
||||||
|
|
|
|
||||||
LL | type Bar: Clone = Vec<T>;
|
LL | type Bar: Clone = Vec<T>;
|
||||||
| ^^^^^ required by this bound in `Foo::Bar`
|
| ^^^^^ required by this bound in `Foo::Bar`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::clone::Clone`
|
||||||
|
|
|
|
||||||
LL | trait Foo<T: std::clone::Clone> {
|
LL | trait Foo<T: std::clone::Clone> {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -132,7 +132,7 @@ LL | Self::Baz: Clone,
|
||||||
...
|
...
|
||||||
LL | type Baz = T;
|
LL | type Baz = T;
|
||||||
| --- required by a bound in this associated type
|
| --- required by a bound in this associated type
|
||||||
help: consider further restricting type parameter `T`
|
help: consider further restricting type parameter `T` with trait `std::clone::Clone`
|
||||||
|
|
|
|
||||||
LL | Self::Baz: Clone, T: std::clone::Clone
|
LL | Self::Baz: Clone, T: std::clone::Clone
|
||||||
| ~~~~~~~~~~~~~~~~~~~~~~
|
| ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
|
@ -47,7 +47,7 @@ note: required by a bound in `Foo::Bar`
|
||||||
|
|
|
|
||||||
LL | type Bar: Clone = Vec<T>;
|
LL | type Bar: Clone = Vec<T>;
|
||||||
| ^^^^^ required by this bound in `Foo::Bar`
|
| ^^^^^ required by this bound in `Foo::Bar`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::clone::Clone`
|
||||||
|
|
|
|
||||||
LL | trait Foo<T: std::clone::Clone> {
|
LL | trait Foo<T: std::clone::Clone> {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -132,7 +132,7 @@ LL | Self::Baz: Clone,
|
||||||
...
|
...
|
||||||
LL | type Baz = T;
|
LL | type Baz = T;
|
||||||
| --- required by a bound in this associated type
|
| --- required by a bound in this associated type
|
||||||
help: consider further restricting type parameter `T`
|
help: consider further restricting type parameter `T` with trait `std::clone::Clone`
|
||||||
|
|
|
|
||||||
LL | Self::Baz: Clone, T: std::clone::Clone
|
LL | Self::Baz: Clone, T: std::clone::Clone
|
||||||
| ~~~~~~~~~~~~~~~~~~~~~~
|
| ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
|
@ -4,7 +4,7 @@ error[E0277]: the trait bound `for<'b> T: X<'b, T>` is not satisfied
|
||||||
LL | impl<S, T> X<'_, T> for (S,) {
|
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`
|
help: consider restricting type parameter `T` with trait `for<'b> X<'b, T>`
|
||||||
|
|
|
|
||||||
LL | impl<S, T: for<'b> X<'b, T>> X<'_, T> for (S,) {
|
LL | impl<S, T: for<'b> X<'b, T>> X<'_, T> for (S,) {
|
||||||
| ++++++++++++++++++
|
| ++++++++++++++++++
|
||||||
|
|
|
@ -16,7 +16,7 @@ LL | trait UnsafeCopy<'a, T: Copy>
|
||||||
LL | where
|
LL | where
|
||||||
LL | for<'b> <Self as UnsafeCopy<'b, T>>::Item: std::ops::Deref<Target = T>,
|
LL | for<'b> <Self as UnsafeCopy<'b, T>>::Item: std::ops::Deref<Target = T>,
|
||||||
| ^^^^^^^^^^ required by this bound in `UnsafeCopy`
|
| ^^^^^^^^^^ required by this bound in `UnsafeCopy`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `<Target = T>`
|
||||||
|
|
|
|
||||||
LL | impl<T: Copy + std::ops::Deref<Target = T>> UnsafeCopy<'_, T> for T {
|
LL | impl<T: Copy + std::ops::Deref<Target = T>> UnsafeCopy<'_, T> for T {
|
||||||
| ++++++++++++
|
| ++++++++++++
|
||||||
|
|
|
@ -9,7 +9,7 @@ note: required by a bound in `copy`
|
||||||
|
|
|
|
||||||
LL | fn copy<U: Setup + ?Sized>(from: &U::From) -> U::From {
|
LL | fn copy<U: Setup + ?Sized>(from: &U::From) -> U::From {
|
||||||
| ^^^^^ required by this bound in `copy`
|
| ^^^^^ required by this bound in `copy`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | pub fn copy_any<T: std::marker::Copy>(t: &T) -> T {
|
LL | pub fn copy_any<T: std::marker::Copy>(t: &T) -> T {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -14,7 +14,7 @@ note: required by a bound in `Complete::Assoc`
|
||||||
|
|
|
|
||||||
LL | type Assoc: Partial<Self>;
|
LL | type Assoc: Partial<Self>;
|
||||||
| ^^^^^^^^^^^^^ required by this bound in `Complete::Assoc`
|
| ^^^^^^^^^^^^^ required by this bound in `Complete::Assoc`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | impl<T: std::marker::Copy> Complete for T {
|
LL | impl<T: std::marker::Copy> Complete for T {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -7,7 +7,7 @@ LL | |
|
||||||
LL | | Service<AssocType = <Bug as Foo>::OnlyFoo>
|
LL | | Service<AssocType = <Bug as Foo>::OnlyFoo>
|
||||||
| |______________________________________________^ the trait `Foo` is not implemented for `Bug`
|
| |______________________________________________^ the trait `Foo` is not implemented for `Bug`
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Foo`
|
||||||
|
|
|
|
||||||
LL | pub trait ThriftService<Bug: NotFoo + Foo>:
|
LL | pub trait ThriftService<Bug: NotFoo + Foo>:
|
||||||
| +++++
|
| +++++
|
||||||
|
@ -24,7 +24,7 @@ LL | |
|
||||||
LL | | }
|
LL | | }
|
||||||
| |_^ the trait `Foo` is not implemented for `Bug`
|
| |_^ the trait `Foo` is not implemented for `Bug`
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Foo`
|
||||||
|
|
|
|
||||||
LL | pub trait ThriftService<Bug: NotFoo + Foo>:
|
LL | pub trait ThriftService<Bug: NotFoo + Foo>:
|
||||||
| +++++
|
| +++++
|
||||||
|
@ -38,7 +38,7 @@ LL | | &self,
|
||||||
LL | | ) -> Self::AssocType;
|
LL | | ) -> Self::AssocType;
|
||||||
| |_________________________^ the trait `Foo` is not implemented for `Bug`
|
| |_________________________^ the trait `Foo` is not implemented for `Bug`
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Foo`
|
||||||
|
|
|
|
||||||
LL | pub trait ThriftService<Bug: NotFoo + Foo>:
|
LL | pub trait ThriftService<Bug: NotFoo + Foo>:
|
||||||
| +++++
|
| +++++
|
||||||
|
@ -61,7 +61,7 @@ error[E0277]: the trait bound `Bug: Foo` is not satisfied
|
||||||
LL | ) -> Self::AssocType;
|
LL | ) -> Self::AssocType;
|
||||||
| ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `Bug`
|
| ^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `Bug`
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Foo`
|
||||||
|
|
|
|
||||||
LL | pub trait ThriftService<Bug: NotFoo + Foo>:
|
LL | pub trait ThriftService<Bug: NotFoo + Foo>:
|
||||||
| +++++
|
| +++++
|
||||||
|
|
|
@ -9,7 +9,7 @@ note: captured value is not `Send`
|
||||||
|
|
|
|
||||||
LL | async { (ty, ty1) }
|
LL | async { (ty, ty1) }
|
||||||
| ^^^ has type `U` which is not `Send`
|
| ^^^ has type `U` which is not `Send`
|
||||||
help: consider restricting type parameter `U`
|
help: consider restricting type parameter `U` with trait `std::marker::Send`
|
||||||
|
|
|
|
||||||
LL | fn foo<T: Send, U: std::marker::Send>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
|
LL | fn foo<T: Send, U: std::marker::Send>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -14,7 +14,7 @@ note: captured value is not `Send` because `&` references cannot be sent unless
|
||||||
LL | let x = x;
|
LL | let x = x;
|
||||||
| ^ has type `&T` which is not `Send`, because `T` is not `Sync`
|
| ^ has type `&T` which is not `Send`, because `T` is not `Sync`
|
||||||
= note: required for the cast from `Pin<Box<{async block@$DIR/issue-86507.rs:18:17: 18:27}>>` to `Pin<Box<(dyn Future<Output = ()> + Send + 'async_trait)>>`
|
= note: required for the cast from `Pin<Box<{async block@$DIR/issue-86507.rs:18:17: 18:27}>>` to `Pin<Box<(dyn Future<Output = ()> + Send + 'async_trait)>>`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Sync`
|
||||||
|
|
|
|
||||||
LL | fn bar<'me, 'async_trait, T: Send + std::marker::Sync>(x: &'me T)
|
LL | fn bar<'me, 'async_trait, T: Send + std::marker::Sync>(x: &'me T)
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -30,7 +30,7 @@ LL | fn copy<T: Magic>(x: T) -> (T, T) { (x, x) }
|
||||||
| ^ - you could clone this value
|
| ^ - you could clone this value
|
||||||
| |
|
| |
|
||||||
| consider constraining this type parameter with `Clone`
|
| consider constraining this type parameter with `Clone`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn copy<T: Magic + Copy>(x: T) -> (T, T) { (x, x) }
|
LL | fn copy<T: Magic + Copy>(x: T) -> (T, T) { (x, x) }
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
|
@ -17,7 +17,7 @@ LL | lhs + rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
note: calling this operator moves the left-hand side
|
note: calling this operator moves the left-hand side
|
||||||
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn add<A: Add<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
LL | fn add<A: Add<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -40,7 +40,7 @@ LL | fn add<A: Add<B, Output=()>, B>(lhs: A, rhs: B) {
|
||||||
| ^ consider constraining this type parameter with `Clone`
|
| ^ consider constraining this type parameter with `Clone`
|
||||||
LL | lhs + rhs;
|
LL | lhs + rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
help: consider restricting type parameter `B`
|
help: consider restricting type parameter `B` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn add<A: Add<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
LL | fn add<A: Add<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -64,7 +64,7 @@ LL | lhs - rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
note: calling this operator moves the left-hand side
|
note: calling this operator moves the left-hand side
|
||||||
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn sub<A: Sub<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
LL | fn sub<A: Sub<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -87,7 +87,7 @@ LL | fn sub<A: Sub<B, Output=()>, B>(lhs: A, rhs: B) {
|
||||||
| ^ consider constraining this type parameter with `Clone`
|
| ^ consider constraining this type parameter with `Clone`
|
||||||
LL | lhs - rhs;
|
LL | lhs - rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
help: consider restricting type parameter `B`
|
help: consider restricting type parameter `B` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn sub<A: Sub<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
LL | fn sub<A: Sub<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -111,7 +111,7 @@ LL | lhs * rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
note: calling this operator moves the left-hand side
|
note: calling this operator moves the left-hand side
|
||||||
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn mul<A: Mul<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
LL | fn mul<A: Mul<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -134,7 +134,7 @@ LL | fn mul<A: Mul<B, Output=()>, B>(lhs: A, rhs: B) {
|
||||||
| ^ consider constraining this type parameter with `Clone`
|
| ^ consider constraining this type parameter with `Clone`
|
||||||
LL | lhs * rhs;
|
LL | lhs * rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
help: consider restricting type parameter `B`
|
help: consider restricting type parameter `B` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn mul<A: Mul<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
LL | fn mul<A: Mul<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -158,7 +158,7 @@ LL | lhs / rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
note: calling this operator moves the left-hand side
|
note: calling this operator moves the left-hand side
|
||||||
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn div<A: Div<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
LL | fn div<A: Div<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -181,7 +181,7 @@ LL | fn div<A: Div<B, Output=()>, B>(lhs: A, rhs: B) {
|
||||||
| ^ consider constraining this type parameter with `Clone`
|
| ^ consider constraining this type parameter with `Clone`
|
||||||
LL | lhs / rhs;
|
LL | lhs / rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
help: consider restricting type parameter `B`
|
help: consider restricting type parameter `B` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn div<A: Div<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
LL | fn div<A: Div<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -205,7 +205,7 @@ LL | lhs % rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
note: calling this operator moves the left-hand side
|
note: calling this operator moves the left-hand side
|
||||||
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn rem<A: Rem<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
LL | fn rem<A: Rem<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -228,7 +228,7 @@ LL | fn rem<A: Rem<B, Output=()>, B>(lhs: A, rhs: B) {
|
||||||
| ^ consider constraining this type parameter with `Clone`
|
| ^ consider constraining this type parameter with `Clone`
|
||||||
LL | lhs % rhs;
|
LL | lhs % rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
help: consider restricting type parameter `B`
|
help: consider restricting type parameter `B` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn rem<A: Rem<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
LL | fn rem<A: Rem<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -252,7 +252,7 @@ LL | lhs & rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
note: calling this operator moves the left-hand side
|
note: calling this operator moves the left-hand side
|
||||||
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn bitand<A: BitAnd<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
LL | fn bitand<A: BitAnd<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -275,7 +275,7 @@ LL | fn bitand<A: BitAnd<B, Output=()>, B>(lhs: A, rhs: B) {
|
||||||
| ^ consider constraining this type parameter with `Clone`
|
| ^ consider constraining this type parameter with `Clone`
|
||||||
LL | lhs & rhs;
|
LL | lhs & rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
help: consider restricting type parameter `B`
|
help: consider restricting type parameter `B` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn bitand<A: BitAnd<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
LL | fn bitand<A: BitAnd<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -299,7 +299,7 @@ LL | lhs | rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
note: calling this operator moves the left-hand side
|
note: calling this operator moves the left-hand side
|
||||||
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn bitor<A: BitOr<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
LL | fn bitor<A: BitOr<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -322,7 +322,7 @@ LL | fn bitor<A: BitOr<B, Output=()>, B>(lhs: A, rhs: B) {
|
||||||
| ^ consider constraining this type parameter with `Clone`
|
| ^ consider constraining this type parameter with `Clone`
|
||||||
LL | lhs | rhs;
|
LL | lhs | rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
help: consider restricting type parameter `B`
|
help: consider restricting type parameter `B` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn bitor<A: BitOr<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
LL | fn bitor<A: BitOr<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -346,7 +346,7 @@ LL | lhs ^ rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
note: calling this operator moves the left-hand side
|
note: calling this operator moves the left-hand side
|
||||||
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn bitxor<A: BitXor<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
LL | fn bitxor<A: BitXor<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -369,7 +369,7 @@ LL | fn bitxor<A: BitXor<B, Output=()>, B>(lhs: A, rhs: B) {
|
||||||
| ^ consider constraining this type parameter with `Clone`
|
| ^ consider constraining this type parameter with `Clone`
|
||||||
LL | lhs ^ rhs;
|
LL | lhs ^ rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
help: consider restricting type parameter `B`
|
help: consider restricting type parameter `B` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn bitxor<A: BitXor<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
LL | fn bitxor<A: BitXor<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -393,7 +393,7 @@ LL | lhs << rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
note: calling this operator moves the left-hand side
|
note: calling this operator moves the left-hand side
|
||||||
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn shl<A: Shl<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
LL | fn shl<A: Shl<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -416,7 +416,7 @@ LL | fn shl<A: Shl<B, Output=()>, B>(lhs: A, rhs: B) {
|
||||||
| ^ consider constraining this type parameter with `Clone`
|
| ^ consider constraining this type parameter with `Clone`
|
||||||
LL | lhs << rhs;
|
LL | lhs << rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
help: consider restricting type parameter `B`
|
help: consider restricting type parameter `B` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn shl<A: Shl<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
LL | fn shl<A: Shl<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -440,7 +440,7 @@ LL | lhs >> rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
note: calling this operator moves the left-hand side
|
note: calling this operator moves the left-hand side
|
||||||
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn shr<A: Shr<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
LL | fn shr<A: Shr<B, Output=()> + Copy, B>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -463,7 +463,7 @@ LL | fn shr<A: Shr<B, Output=()>, B>(lhs: A, rhs: B) {
|
||||||
| ^ consider constraining this type parameter with `Clone`
|
| ^ consider constraining this type parameter with `Clone`
|
||||||
LL | lhs >> rhs;
|
LL | lhs >> rhs;
|
||||||
| --- you could clone this value
|
| --- you could clone this value
|
||||||
help: consider restricting type parameter `B`
|
help: consider restricting type parameter `B` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn shr<A: Shr<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
LL | fn shr<A: Shr<B, Output=()>, B: Copy>(lhs: A, rhs: B) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
|
@ -20,7 +20,7 @@ LL | x
|
||||||
| - you could clone this value
|
| - you could clone this value
|
||||||
note: calling this operator moves the left-hand side
|
note: calling this operator moves the left-hand side
|
||||||
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn double_move<T: Add<Output=()> + Copy>(x: T) {
|
LL | fn double_move<T: Add<Output=()> + Copy>(x: T) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -40,7 +40,7 @@ help: consider cloning the value if the performance cost is acceptable
|
||||||
|
|
|
|
||||||
LL | x.clone()
|
LL | x.clone()
|
||||||
| ++++++++
|
| ++++++++
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn move_then_borrow<T: Add<Output=()> + Clone + Copy>(x: T) {
|
LL | fn move_then_borrow<T: Add<Output=()> + Clone + Copy>(x: T) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
|
@ -6,7 +6,7 @@ LL | val == val
|
||||||
| |
|
| |
|
||||||
| MyType<T>
|
| MyType<T>
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::cmp::Eq`
|
||||||
|
|
|
|
||||||
LL | fn cond<T: PartialEq + std::cmp::Eq>(val: MyType<T>) -> bool {
|
LL | fn cond<T: PartialEq + std::cmp::Eq>(val: MyType<T>) -> bool {
|
||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
|
@ -12,7 +12,7 @@ LL |
|
||||||
LL | drop(cloned_items);
|
LL | drop(cloned_items);
|
||||||
| ------------ immutable borrow later used here
|
| ------------ immutable borrow later used here
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Clone`
|
||||||
|
|
|
|
||||||
LL | fn foo<T: Default + Clone>(list: &mut Vec<T>) {
|
LL | fn foo<T: Default + Clone>(list: &mut Vec<T>) {
|
||||||
| +++++++
|
| +++++++
|
||||||
|
@ -39,7 +39,7 @@ LL | fn bar<T: std::fmt::Display>(x: T) {
|
||||||
| ^ consider constraining this type parameter with `Clone`
|
| ^ consider constraining this type parameter with `Clone`
|
||||||
LL | let a = &x;
|
LL | let a = &x;
|
||||||
| - you could clone this value
|
| - you could clone this value
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Clone`
|
||||||
|
|
|
|
||||||
LL | fn bar<T: std::fmt::Display + Clone>(x: T) {
|
LL | fn bar<T: std::fmt::Display + Clone>(x: T) {
|
||||||
| +++++++
|
| +++++++
|
||||||
|
|
|
@ -15,7 +15,7 @@ LL | fn test<T, U>(a: i64, b: i64, c: i64, d: i64, e: i64, f: T, g: U) -> i64 {
|
||||||
...
|
...
|
||||||
LL | 6, a as f64, b, b as f64, f, c as f64, d, d as f64, e, e as f64, f, g,
|
LL | 6, a as f64, b, b as f64, f, c as f64, d, d as f64, e, e as f64, f, g,
|
||||||
| - you could clone this value
|
| - you could clone this value
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn test<T: Copy, U>(a: i64, b: i64, c: i64, d: i64, e: i64, f: T, g: U) -> i64 {
|
LL | fn test<T: Copy, U>(a: i64, b: i64, c: i64, d: i64, e: i64, f: T, g: U) -> i64 {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
|
@ -10,7 +10,7 @@ note: required by a bound in `Foo`
|
||||||
|
|
|
|
||||||
LL | trait Foo : Send+Sync { }
|
LL | trait Foo : Send+Sync { }
|
||||||
| ^^^^ required by this bound in `Foo`
|
| ^^^^ required by this bound in `Foo`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Send`
|
||||||
|
|
|
|
||||||
LL | impl <T: Sync+'static + std::marker::Send> Foo for (T,) { }
|
LL | impl <T: Sync+'static + std::marker::Send> Foo for (T,) { }
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -27,7 +27,7 @@ note: required by a bound in `Foo`
|
||||||
|
|
|
|
||||||
LL | trait Foo : Send+Sync { }
|
LL | trait Foo : Send+Sync { }
|
||||||
| ^^^^ required by this bound in `Foo`
|
| ^^^^ required by this bound in `Foo`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Sync`
|
||||||
|
|
|
|
||||||
LL | impl <T: Send + std::marker::Sync> Foo for (T,T) { }
|
LL | impl <T: Send + std::marker::Sync> Foo for (T,T) { }
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -14,7 +14,7 @@ note: required by a bound in `RequiresRequiresShareAndSend`
|
||||||
|
|
|
|
||||||
LL | pub trait RequiresRequiresShareAndSend : RequiresShare + Send { }
|
LL | pub trait RequiresRequiresShareAndSend : RequiresShare + Send { }
|
||||||
| ^^^^ required by this bound in `RequiresRequiresShareAndSend`
|
| ^^^^ required by this bound in `RequiresRequiresShareAndSend`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Send`
|
||||||
|
|
|
|
||||||
LL | impl <T:Sync+'static + std::marker::Send> RequiresRequiresShareAndSend for X<T> { }
|
LL | impl <T:Sync+'static + std::marker::Send> RequiresRequiresShareAndSend for X<T> { }
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -9,7 +9,7 @@ note: required by a bound in `Foo`
|
||||||
|
|
|
|
||||||
LL | trait Foo : Send { }
|
LL | trait Foo : Send { }
|
||||||
| ^^^^ required by this bound in `Foo`
|
| ^^^^ required by this bound in `Foo`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Send`
|
||||||
|
|
|
|
||||||
LL | impl <T: Sync+'static + std::marker::Send> Foo for T { }
|
LL | impl <T: Sync+'static + std::marker::Send> Foo for T { }
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -9,7 +9,7 @@ note: required by a bound in `X`
|
||||||
|
|
|
|
||||||
LL | struct X<F> where F: FnOnce() + 'static + Send {
|
LL | struct X<F> where F: FnOnce() + 'static + Send {
|
||||||
| ^^^^ required by this bound in `X`
|
| ^^^^ required by this bound in `X`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Send`
|
||||||
|
|
|
|
||||||
LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static + std::marker::Send {
|
LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static + std::marker::Send {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -25,7 +25,7 @@ note: required by a bound in `X`
|
||||||
|
|
|
|
||||||
LL | struct X<F> where F: FnOnce() + 'static + Send {
|
LL | struct X<F> where F: FnOnce() + 'static + Send {
|
||||||
| ^^^^ required by this bound in `X`
|
| ^^^^ required by this bound in `X`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Send`
|
||||||
|
|
|
|
||||||
LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static + std::marker::Send {
|
LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static + std::marker::Send {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -15,7 +15,7 @@ help: use parentheses to call this type parameter
|
||||||
|
|
|
|
||||||
LL | take_const_owned(f());
|
LL | take_const_owned(f());
|
||||||
| ++
|
| ++
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Sync`
|
||||||
|
|
|
|
||||||
LL | fn give_owned<F>(f: F) where F: FnOnce() + Send + std::marker::Sync {
|
LL | fn give_owned<F>(f: F) where F: FnOnce() + Send + std::marker::Sync {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -7,7 +7,7 @@ LL | || { t; t; };
|
||||||
| value moved here
|
| value moved here
|
||||||
|
|
|
|
||||||
= note: move occurs because `t` has type `T`, which does not implement the `Copy` trait
|
= note: move occurs because `t` has type `T`, which does not implement the `Copy` trait
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn foo<T: Copy>(t: T) {
|
LL | fn foo<T: Copy>(t: T) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
|
@ -41,7 +41,7 @@ note: required by a bound in `W`
|
||||||
|
|
|
|
||||||
LL | struct W<T: Trait>(*mut T);
|
LL | struct W<T: Trait>(*mut T);
|
||||||
| ^^^^^ required by this bound in `W`
|
| ^^^^^ required by this bound in `W`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Trait`
|
||||||
|
|
|
|
||||||
LL | impl<T: Trait> Trait for W<W<W<T>>> {}
|
LL | impl<T: Trait> Trait for W<W<W<T>>> {}
|
||||||
| +++++++
|
| +++++++
|
||||||
|
|
|
@ -7,7 +7,7 @@ LL | [x; { N }]
|
||||||
= note: the `Copy` trait is required because this value will be copied for each element of the array
|
= note: the `Copy` trait is required because this value will be copied for each element of the array
|
||||||
= help: consider using `core::array::from_fn` to initialize the array
|
= help: consider using `core::array::from_fn` to initialize the array
|
||||||
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
|
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
|
LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -7,7 +7,7 @@ LL | [x; N]
|
||||||
= note: the `Copy` trait is required because this value will be copied for each element of the array
|
= note: the `Copy` trait is required because this value will be copied for each element of the array
|
||||||
= help: consider using `core::array::from_fn` to initialize the array
|
= help: consider using `core::array::from_fn` to initialize the array
|
||||||
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
|
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
|
LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -12,7 +12,7 @@ LL | fn unsatisfied(self)
|
||||||
LL | where
|
LL | where
|
||||||
LL | T: Bar<N>,
|
LL | T: Bar<N>,
|
||||||
| ^^^^^^ required by this bound in `Foo::<T, N>::unsatisfied`
|
| ^^^^^^ required by this bound in `Foo::<T, N>::unsatisfied`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Bar<N>`
|
||||||
|
|
|
|
||||||
LL | impl<T: Bar<N>, const N: usize> Foo<T, N> {
|
LL | impl<T: Bar<N>, const N: usize> Foo<T, N> {
|
||||||
| ++++++++
|
| ++++++++
|
||||||
|
|
|
@ -212,7 +212,7 @@ LL | f()
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
|
||||||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `~const Fn()`
|
||||||
|
|
|
|
||||||
LL | T: ~const Fn<()> + ~const Destruct + ~const Fn(),
|
LL | T: ~const Fn<()> + ~const Destruct + ~const Fn(),
|
||||||
| +++++++++++++
|
| +++++++++++++
|
||||||
|
@ -224,7 +224,7 @@ LL | f()
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
|
||||||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `~const FnMut()`
|
||||||
|
|
|
|
||||||
LL | T: ~const FnMut<()> + ~const Destruct + ~const FnMut(),
|
LL | T: ~const FnMut<()> + ~const Destruct + ~const FnMut(),
|
||||||
| ++++++++++++++++
|
| ++++++++++++++++
|
||||||
|
@ -236,7 +236,7 @@ LL | f()
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
|
||||||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `~const FnOnce()`
|
||||||
|
|
|
|
||||||
LL | T: ~const FnOnce<()> + ~const FnOnce(),
|
LL | T: ~const FnOnce<()> + ~const FnOnce(),
|
||||||
| +++++++++++++++++
|
| +++++++++++++++++
|
||||||
|
|
|
@ -19,7 +19,7 @@ LL | Opt::None => f(),
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
|
||||||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `~const FnOnce()`
|
||||||
|
|
|
|
||||||
LL | const fn unwrap_or_else<F: ~const FnOnce() -> T + ~const FnOnce()>(self, f: F) -> T {
|
LL | const fn unwrap_or_else<F: ~const FnOnce() -> T + ~const FnOnce()>(self, f: F) -> T {
|
||||||
| +++++++++++++++++
|
| +++++++++++++++++
|
||||||
|
|
|
@ -9,7 +9,7 @@ note: required by a bound in `DropMe`
|
||||||
|
|
|
|
||||||
LL | struct DropMe<T: Copy>(T);
|
LL | struct DropMe<T: Copy>(T);
|
||||||
| ^^^^ required by this bound in `DropMe`
|
| ^^^^ required by this bound in `DropMe`
|
||||||
help: consider further restricting type parameter `T`
|
help: consider further restricting type parameter `T` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply `T: Copy`
|
LL | [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply `T: Copy`
|
||||||
| ~~~~~~~~~~~~~~~~~~~~~~
|
| ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -25,7 +25,7 @@ note: required by a bound in `DropMe`
|
||||||
|
|
|
|
||||||
LL | struct DropMe<T: Copy>(T);
|
LL | struct DropMe<T: Copy>(T);
|
||||||
| ^^^^ required by this bound in `DropMe`
|
| ^^^^ required by this bound in `DropMe`
|
||||||
help: consider further restricting type parameter `T`
|
help: consider further restricting type parameter `T` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply `T: Copy`
|
LL | [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply `T: Copy`
|
||||||
| ~~~~~~~~~~~~~~~~~~~~~~
|
| ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
|
@ -9,7 +9,7 @@ note: required by a bound in `DropMe`
|
||||||
|
|
|
|
||||||
LL | struct DropMe<T: Copy>(T);
|
LL | struct DropMe<T: Copy>(T);
|
||||||
| ^^^^ required by this bound in `DropMe`
|
| ^^^^ required by this bound in `DropMe`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | impl<T: std::marker::Copy> Drop for DropMe<T>
|
LL | impl<T: std::marker::Copy> Drop for DropMe<T>
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -25,7 +25,7 @@ note: required by a bound in `DropMe`
|
||||||
|
|
|
|
||||||
LL | struct DropMe<T: Copy>(T);
|
LL | struct DropMe<T: Copy>(T);
|
||||||
| ^^^^ required by this bound in `DropMe`
|
| ^^^^ required by this bound in `DropMe`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | impl<T: std::marker::Copy> Drop for DropMe<T>
|
LL | impl<T: std::marker::Copy> Drop for DropMe<T>
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -42,7 +42,7 @@ error[E0277]: the trait bound `I: Foo` is not satisfied
|
||||||
LL | fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
|
LL | fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `I`
|
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `I`
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `I`
|
help: consider restricting type parameter `I` with trait `Foo`
|
||||||
|
|
|
|
||||||
LL | fn baz<I: Foo>(x: &<I as Foo<A = Bar>>::A) {}
|
LL | fn baz<I: Foo>(x: &<I as Foo<A = Bar>>::A) {}
|
||||||
| +++++
|
| +++++
|
||||||
|
@ -53,7 +53,7 @@ error[E0277]: the trait bound `I: Foo` is not satisfied
|
||||||
LL | fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
|
LL | fn baz<I>(x: &<I as Foo<A = Bar>>::A) {}
|
||||||
| ^^ the trait `Foo` is not implemented for `I`
|
| ^^ the trait `Foo` is not implemented for `I`
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `I`
|
help: consider restricting type parameter `I` with trait `Foo`
|
||||||
|
|
|
|
||||||
LL | fn baz<I: Foo>(x: &<I as Foo<A = Bar>>::A) {}
|
LL | fn baz<I: Foo>(x: &<I as Foo<A = Bar>>::A) {}
|
||||||
| +++++
|
| +++++
|
||||||
|
|
|
@ -25,7 +25,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -73,7 +73,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `std::iter::Iterator`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: std::iter::Iterator>(q: Q) {
|
LL | fn example<Q: std::iter::Iterator>(q: Q) {
|
||||||
| +++++++++++++++++++++
|
| +++++++++++++++++++++
|
||||||
|
@ -100,7 +100,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `std::iter::Iterator`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: std::iter::Iterator>(q: Q) {
|
LL | fn example<Q: std::iter::Iterator>(q: Q) {
|
||||||
| +++++++++++++++++++++
|
| +++++++++++++++++++++
|
||||||
|
@ -125,7 +125,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -150,7 +150,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -175,7 +175,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -200,7 +200,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -225,7 +225,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -248,7 +248,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -273,7 +273,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -296,7 +296,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -319,7 +319,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -342,7 +342,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -367,7 +367,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -392,7 +392,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
|
|
@ -23,7 +23,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -53,7 +53,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -85,7 +85,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -117,7 +117,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -147,7 +147,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -172,7 +172,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T2`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T2>(q: Q) {
|
LL | fn example<Q: T2>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -204,7 +204,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -236,7 +236,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -261,7 +261,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T1`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T1>(q: Q) {
|
LL | fn example<Q: T1>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -286,7 +286,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T1`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T1>(q: Q) {
|
LL | fn example<Q: T1>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -318,7 +318,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -343,7 +343,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T1`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T1>(q: Q) {
|
LL | fn example<Q: T1>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -370,7 +370,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T1`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T1>(q: Q) {
|
LL | fn example<Q: T1>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -402,7 +402,7 @@ note: required by a bound in `want`
|
||||||
|
|
|
|
||||||
LL | fn want<V: T1>(_x: V) {}
|
LL | fn want<V: T1>(_x: V) {}
|
||||||
| ^^ required by this bound in `want`
|
| ^^ required by this bound in `want`
|
||||||
help: consider restricting type parameter `Q`
|
help: consider restricting type parameter `Q` with trait `T3`
|
||||||
|
|
|
|
||||||
LL | fn example<Q: T3>(q: Q) {
|
LL | fn example<Q: T3>(q: Q) {
|
||||||
| ++++
|
| ++++
|
||||||
|
|
|
@ -5,7 +5,7 @@ LL | type Assoc2<T> = Vec<T>;
|
||||||
| ^^^^^^ `T` cannot be formatted with the default formatter
|
| ^^^^^^ `T` cannot be formatted with the default formatter
|
||||||
|
|
|
|
||||||
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
|
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::fmt::Display`
|
||||||
|
|
|
|
||||||
LL | type Assoc2<T: std::fmt::Display> = Vec<T>;
|
LL | type Assoc2<T: std::fmt::Display> = Vec<T>;
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -41,7 +41,7 @@ LL | trait Foo {
|
||||||
LL | type C where Self: Clone;
|
LL | type C where Self: Clone;
|
||||||
| ^ this trait's associated type doesn't have the requirement `Fooy<T>: Copy`
|
| ^ this trait's associated type doesn't have the requirement `Fooy<T>: Copy`
|
||||||
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | impl<T: std::marker::Copy> Foo for Fooy<T> {
|
LL | impl<T: std::marker::Copy> Foo for Fooy<T> {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -66,7 +66,7 @@ LL | trait Foo {
|
||||||
LL | fn d() where Self: Clone;
|
LL | fn d() where Self: Clone;
|
||||||
| ^ this trait's method doesn't have the requirement `Fooy<T>: Copy`
|
| ^ this trait's method doesn't have the requirement `Fooy<T>: Copy`
|
||||||
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | impl<T: std::marker::Copy> Foo for Fooy<T> {
|
LL | impl<T: std::marker::Copy> Foo for Fooy<T> {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -9,7 +9,7 @@ note: required by a bound in `UnsafeCopy::Item`
|
||||||
|
|
|
|
||||||
LL | type Item<'a>: Copy;
|
LL | type Item<'a>: Copy;
|
||||||
| ^^^^ required by this bound in `UnsafeCopy::Item`
|
| ^^^^ required by this bound in `UnsafeCopy::Item`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | impl<T: std::marker::Copy> UnsafeCopy for T {
|
LL | impl<T: std::marker::Copy> UnsafeCopy for T {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -10,7 +10,7 @@ note: required by a bound in `Fun::F`
|
||||||
|
|
|
|
||||||
LL | type F<'a>: Fn() -> u32;
|
LL | type F<'a>: Fn() -> u32;
|
||||||
| ^^^^^^^^^^^ required by this bound in `Fun::F`
|
| ^^^^^^^^^^^ required by this bound in `Fun::F`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Fn()`
|
||||||
|
|
|
|
||||||
LL | impl<T: Fn()> Fun for T {
|
LL | impl<T: Fn()> Fun for T {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
|
@ -10,7 +10,7 @@ note: required by a bound in `Fun::F`
|
||||||
|
|
|
|
||||||
LL | type F<'a>: Fn() -> u32;
|
LL | type F<'a>: Fn() -> u32;
|
||||||
| ^^^^^^^^^^^ required by this bound in `Fun::F`
|
| ^^^^^^^^^^^ required by this bound in `Fun::F`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Fn()`
|
||||||
|
|
|
|
||||||
LL | impl<T: Fn()> Fun for T {
|
LL | impl<T: Fn()> Fun for T {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
|
@ -10,7 +10,7 @@ note: required by a bound in `Fun::F`
|
||||||
|
|
|
|
||||||
LL | type F<'a>: Fn() -> u32;
|
LL | type F<'a>: Fn() -> u32;
|
||||||
| ^^^^^^^^^^^ required by this bound in `Fun::F`
|
| ^^^^^^^^^^^ required by this bound in `Fun::F`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Fn()`
|
||||||
|
|
|
|
||||||
LL | impl<T: Fn()> Fun for T {
|
LL | impl<T: Fn()> Fun for T {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
|
@ -10,7 +10,7 @@ note: required by a bound in `Fun::F`
|
||||||
|
|
|
|
||||||
LL | type F<'a>: Fn() -> u32;
|
LL | type F<'a>: Fn() -> u32;
|
||||||
| ^^^^^^^^^^^ required by this bound in `Fun::F`
|
| ^^^^^^^^^^^ required by this bound in `Fun::F`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Fn()`
|
||||||
|
|
|
|
||||||
LL | impl<T: Fn()> Fun for T {
|
LL | impl<T: Fn()> Fun for T {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
|
@ -13,7 +13,7 @@ note: required by a bound in `UnsafeCopy::Item`
|
||||||
|
|
|
|
||||||
LL | type Item<'a>: std::ops::Deref<Target = T>;
|
LL | type Item<'a>: std::ops::Deref<Target = T>;
|
||||||
| ^^^^^^^^^^ required by this bound in `UnsafeCopy::Item`
|
| ^^^^^^^^^^ required by this bound in `UnsafeCopy::Item`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `<Target = T>`
|
||||||
|
|
|
|
||||||
LL | impl<T: Copy + std::ops::Deref<Target = T>> UnsafeCopy<T> for T {
|
LL | impl<T: Copy + std::ops::Deref<Target = T>> UnsafeCopy<T> for T {
|
||||||
| ++++++++++++
|
| ++++++++++++
|
||||||
|
|
|
@ -23,7 +23,7 @@ note: required by a bound in `UnsafeCopy::Copy`
|
||||||
|
|
|
|
||||||
LL | type Copy<T>: Copy = Box<T>;
|
LL | type Copy<T>: Copy = Box<T>;
|
||||||
| ^^^^ required by this bound in `UnsafeCopy::Copy`
|
| ^^^^ required by this bound in `UnsafeCopy::Copy`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::clone::Clone`
|
||||||
|
|
|
|
||||||
LL | type Copy<T: std::clone::Clone>: Copy = Box<T>;
|
LL | type Copy<T: std::clone::Clone>: Copy = Box<T>;
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -23,7 +23,7 @@ note: required by a bound in `UnsafeCopy::Copy`
|
||||||
|
|
|
|
||||||
LL | type Copy<T>: Copy = Box<T>;
|
LL | type Copy<T>: Copy = Box<T>;
|
||||||
| ^^^^ required by this bound in `UnsafeCopy::Copy`
|
| ^^^^ required by this bound in `UnsafeCopy::Copy`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::clone::Clone`
|
||||||
|
|
|
|
||||||
LL | type Copy<T: std::clone::Clone>: Copy = Box<T>;
|
LL | type Copy<T: std::clone::Clone>: Copy = Box<T>;
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -35,7 +35,7 @@ note: tuple struct defined here
|
||||||
|
|
|
|
||||||
LL | struct A<B>(B);
|
LL | struct A<B>(B);
|
||||||
| ^
|
| ^
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `<Output = B>`
|
||||||
|
|
|
|
||||||
LL | impl<B> Add for A<B> where B: Add<Output = B> {
|
LL | impl<B> Add for A<B> where B: Add<Output = B> {
|
||||||
| ++++++++++++
|
| ++++++++++++
|
||||||
|
@ -58,7 +58,7 @@ note: tuple struct defined here
|
||||||
|
|
|
|
||||||
LL | struct C<B>(B);
|
LL | struct C<B>(B);
|
||||||
| ^
|
| ^
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `<Output = B>`
|
||||||
|
|
|
|
||||||
LL | impl<B: Add<Output = B>> Add for C<B> {
|
LL | impl<B: Add<Output = B>> Add for C<B> {
|
||||||
| ++++++++++++
|
| ++++++++++++
|
||||||
|
@ -71,7 +71,7 @@ LL | Self(self.0 + rhs.0)
|
||||||
| |
|
| |
|
||||||
| B
|
| B
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `B`
|
help: consider restricting type parameter `B` with trait `std::ops::Add<Output = B>`
|
||||||
|
|
|
|
||||||
LL | impl<B: std::ops::Add<Output = B>> Add for D<B> {
|
LL | impl<B: std::ops::Add<Output = B>> Add for D<B> {
|
||||||
| +++++++++++++++++++++++++++
|
| +++++++++++++++++++++++++++
|
||||||
|
@ -94,7 +94,7 @@ note: tuple struct defined here
|
||||||
|
|
|
|
||||||
LL | struct E<B>(B);
|
LL | struct E<B>(B);
|
||||||
| ^
|
| ^
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `<Output = B>`
|
||||||
|
|
|
|
||||||
LL | impl<B: Add<Output = B>> Add for E<B> where <B as Add>::Output = B {
|
LL | impl<B: Add<Output = B>> Add for E<B> where <B as Add>::Output = B {
|
||||||
| ++++++++++++
|
| ++++++++++++
|
||||||
|
|
|
@ -5,7 +5,7 @@ error[E0277]: the trait bound `for<'a> T: ToUnit<'a>` is not satisfied
|
||||||
LL | impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
|
LL | impl<T> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
|
||||||
| ^^^^^^^^^^^^ the trait `for<'a> ToUnit<'a>` is not implemented for `T`
|
| ^^^^^^^^^^^^ the trait `for<'a> ToUnit<'a>` is not implemented for `T`
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `for<'a> ToUnit<'a>`
|
||||||
|
|
|
|
||||||
LL | impl<T: for<'a> ToUnit<'a>> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
|
LL | impl<T: for<'a> ToUnit<'a>> Overlap<for<'a> fn(&'a (), Assoc<'a, T>)> for T {}
|
||||||
| ++++++++++++++++++++
|
| ++++++++++++++++++++
|
||||||
|
|
|
@ -13,7 +13,7 @@ LL | fn want_bar_for_any_ccx<B>(b: &B)
|
||||||
| -------------------- required by a bound in this function
|
| -------------------- required by a bound in this function
|
||||||
LL | where B : for<'ccx> Bar<'ccx>
|
LL | where B : for<'ccx> Bar<'ccx>
|
||||||
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `want_bar_for_any_ccx`
|
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `want_bar_for_any_ccx`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `for<'ccx> Bar<'ccx>`
|
||||||
|
|
|
|
||||||
LL | where B : Qux + for<'ccx> Bar<'ccx>
|
LL | where B : Qux + for<'ccx> Bar<'ccx>
|
||||||
| +++++++++++++++++++++
|
| +++++++++++++++++++++
|
||||||
|
|
|
@ -4,7 +4,7 @@ error[E0277]: the trait bound `for<'a> T: SomeTrait<'a>` is not satisfied
|
||||||
LL | callee::<fn(&()) -> <T as SomeTrait<'_>>::Associated>();
|
LL | callee::<fn(&()) -> <T as SomeTrait<'_>>::Associated>();
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> SomeTrait<'a>` is not implemented for `T`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> SomeTrait<'a>` is not implemented for `T`
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `for<'a> SomeTrait<'a>`
|
||||||
|
|
|
|
||||||
LL | fn give_me_ice<T: for<'a> SomeTrait<'a>>() {
|
LL | fn give_me_ice<T: for<'a> SomeTrait<'a>>() {
|
||||||
| +++++++++++++++++++++++
|
| +++++++++++++++++++++++
|
||||||
|
@ -15,7 +15,7 @@ error[E0277]: the trait bound `for<'a> T: SomeTrait<'a>` is not satisfied
|
||||||
LL | callee::<fn(&()) -> <T as SomeTrait<'_>>::Associated>();
|
LL | callee::<fn(&()) -> <T as SomeTrait<'_>>::Associated>();
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> SomeTrait<'a>` is not implemented for `T`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> SomeTrait<'a>` is not implemented for `T`
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `for<'a> SomeTrait<'a>`
|
||||||
|
|
|
|
||||||
LL | fn give_me_ice<T: for<'a> SomeTrait<'a>>() {
|
LL | fn give_me_ice<T: for<'a> SomeTrait<'a>>() {
|
||||||
| +++++++++++++++++++++++
|
| +++++++++++++++++++++++
|
||||||
|
|
|
@ -17,7 +17,7 @@ LL | impl<A, F: MyFn<A>> Callback<A> for F {
|
||||||
| ------- ^^^^^^^^^^^ ^
|
| ------- ^^^^^^^^^^^ ^
|
||||||
| |
|
| |
|
||||||
| unsatisfied trait bound introduced here
|
| unsatisfied trait bound introduced here
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `MyFn<i32>`
|
||||||
|
|
|
|
||||||
LL | F: Callback<Self::CallbackArg> + MyFn<i32>,
|
LL | F: Callback<Self::CallbackArg> + MyFn<i32>,
|
||||||
| +++++++++++
|
| +++++++++++
|
||||||
|
@ -43,7 +43,7 @@ LL | fn autobatch<F>(self) -> impl Trait
|
||||||
...
|
...
|
||||||
LL | F: Callback<Self::CallbackArg>,
|
LL | F: Callback<Self::CallbackArg>,
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `<Sender as ChannelSender>::autobatch`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `<Sender as ChannelSender>::autobatch`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `MyFn<i32>`
|
||||||
|
|
|
|
||||||
LL | F: Callback<Self::CallbackArg> + MyFn<i32>,
|
LL | F: Callback<Self::CallbackArg> + MyFn<i32>,
|
||||||
| +++++++++++
|
| +++++++++++
|
||||||
|
@ -68,7 +68,7 @@ LL | impl<A, F: MyFn<A>> Callback<A> for F {
|
||||||
| |
|
| |
|
||||||
| unsatisfied trait bound introduced here
|
| unsatisfied trait bound introduced here
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `MyFn<i32>`
|
||||||
|
|
|
|
||||||
LL | F: Callback<Self::CallbackArg> + MyFn<i32>,
|
LL | F: Callback<Self::CallbackArg> + MyFn<i32>,
|
||||||
| +++++++++++
|
| +++++++++++
|
||||||
|
@ -121,7 +121,7 @@ LL | impl<A, F: MyFn<A>> Callback<A> for F {
|
||||||
| |
|
| |
|
||||||
| unsatisfied trait bound introduced here
|
| unsatisfied trait bound introduced here
|
||||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `MyFn<i32>`
|
||||||
|
|
|
|
||||||
LL | F: Callback<Self::CallbackArg> + MyFn<i32>,
|
LL | F: Callback<Self::CallbackArg> + MyFn<i32>,
|
||||||
| +++++++++++
|
| +++++++++++
|
||||||
|
@ -137,7 +137,7 @@ note: required by a bound in `Callback`
|
||||||
|
|
|
|
||||||
LL | trait Callback<A>: MyFn<A, Output = Self::Ret> {
|
LL | trait Callback<A>: MyFn<A, Output = Self::Ret> {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Callback`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Callback`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `MyFn<i32>`
|
||||||
|
|
|
|
||||||
LL | F: Callback<Self::CallbackArg> + MyFn<i32>,
|
LL | F: Callback<Self::CallbackArg> + MyFn<i32>,
|
||||||
| +++++++++++
|
| +++++++++++
|
||||||
|
|
|
@ -17,7 +17,7 @@ LL | (S::default(), T::default())
|
||||||
| ---------------------------- return type was inferred to be `(S, T)` here
|
| ---------------------------- return type was inferred to be `(S, T)` here
|
||||||
|
|
|
|
||||||
= note: required because it appears within the type `(S, T)`
|
= note: required because it appears within the type `(S, T)`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | impl<S: Default + std::marker::Copy> Bar for S {
|
LL | impl<S: Default + std::marker::Copy> Bar for S {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -32,7 +32,7 @@ LL | (S::default(), T::default())
|
||||||
| ---------------------------- return type was inferred to be `(S, T)` here
|
| ---------------------------- return type was inferred to be `(S, T)` here
|
||||||
|
|
|
|
||||||
= note: required because it appears within the type `(S, T)`
|
= note: required because it appears within the type `(S, T)`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | fn foo<T: Default + std::marker::Copy>() -> Self::E {
|
LL | fn foo<T: Default + std::marker::Copy>() -> Self::E {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -33,7 +33,7 @@ LL | fun(filter_positive());
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `~const Fn(&foo::Alias<'_>)`
|
||||||
|
|
|
|
||||||
LL | const fn with_positive<F: for<'a> ~const Fn(&'a Alias<'a>) + ~const Destruct + ~const Fn(&foo::Alias<'_>)>(fun: F) {
|
LL | const fn with_positive<F: for<'a> ~const Fn(&'a Alias<'a>) + ~const Destruct + ~const Fn(&foo::Alias<'_>)>(fun: F) {
|
||||||
| ++++++++++++++++++++++++++++
|
| ++++++++++++++++++++++++++++
|
||||||
|
|
|
@ -6,7 +6,7 @@ LL | self.x += v.x;
|
||||||
| |
|
| |
|
||||||
| cannot use `+=` on type `T`
|
| cannot use `+=` on type `T`
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::ops::AddAssign`
|
||||||
|
|
|
|
||||||
LL | impl<T: std::ops::AddAssign> Foo<T> {
|
LL | impl<T: std::ops::AddAssign> Foo<T> {
|
||||||
| +++++++++++++++++++++
|
| +++++++++++++++++++++
|
||||||
|
|
|
@ -12,7 +12,7 @@ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
|
||||||
| |
|
| |
|
||||||
| unsatisfied trait bound introduced here
|
| unsatisfied trait bound introduced here
|
||||||
= note: required for the cast from `&S<T>` to `&dyn Gettable<T>`
|
= note: required for the cast from `&S<T>` to `&dyn Gettable<T>`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::marker::Send`
|
||||||
|
|
|
|
||||||
LL | fn f<T: std::marker::Send>(val: T) {
|
LL | fn f<T: std::marker::Send>(val: T) {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -31,7 +31,7 @@ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
|
||||||
| |
|
| |
|
||||||
| unsatisfied trait bound introduced here
|
| unsatisfied trait bound introduced here
|
||||||
= note: required for the cast from `&S<T>` to `&dyn Gettable<T>`
|
= note: required for the cast from `&S<T>` to `&dyn Gettable<T>`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | fn f<T: std::marker::Copy>(val: T) {
|
LL | fn f<T: std::marker::Copy>(val: T) {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -50,7 +50,7 @@ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
|
||||||
| |
|
| |
|
||||||
| unsatisfied trait bound introduced here
|
| unsatisfied trait bound introduced here
|
||||||
= note: required for the cast from `&S<T>` to `&dyn Gettable<T>`
|
= note: required for the cast from `&S<T>` to `&dyn Gettable<T>`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::marker::Send`
|
||||||
|
|
|
|
||||||
LL | fn g<T: std::marker::Send>(val: T) {
|
LL | fn g<T: std::marker::Send>(val: T) {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -69,7 +69,7 @@ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
|
||||||
| |
|
| |
|
||||||
| unsatisfied trait bound introduced here
|
| unsatisfied trait bound introduced here
|
||||||
= note: required for the cast from `&S<T>` to `&dyn Gettable<T>`
|
= note: required for the cast from `&S<T>` to `&dyn Gettable<T>`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | fn g<T: std::marker::Copy>(val: T) {
|
LL | fn g<T: std::marker::Copy>(val: T) {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -6,7 +6,7 @@ LL | impl<A, B> FnOnce<A> for CachedFun<A, B>
|
||||||
|
|
|
|
||||||
note: required by a bound in `FnOnce`
|
note: required by a bound in `FnOnce`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
help: consider further restricting this bound but it is an `unstable` trait
|
help: consider further restricting this bound with unstable trait `std::marker::Tuple`
|
||||||
|
|
|
|
||||||
LL | A: Eq + Hash + Clone + std::marker::Tuple,
|
LL | A: Eq + Hash + Clone + std::marker::Tuple,
|
||||||
| ++++++++++++++++++++
|
| ++++++++++++++++++++
|
||||||
|
@ -19,7 +19,7 @@ LL | impl<A, B> FnMut<A> for CachedFun<A, B>
|
||||||
|
|
|
|
||||||
note: required by a bound in `FnMut`
|
note: required by a bound in `FnMut`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
help: consider further restricting this bound but it is an `unstable` trait
|
help: consider further restricting this bound with unstable trait `std::marker::Tuple`
|
||||||
|
|
|
|
||||||
LL | A: Eq + Hash + Clone + std::marker::Tuple,
|
LL | A: Eq + Hash + Clone + std::marker::Tuple,
|
||||||
| ++++++++++++++++++++
|
| ++++++++++++++++++++
|
||||||
|
@ -30,7 +30,7 @@ error[E0277]: functions with the "rust-call" ABI must take a single non-self tup
|
||||||
LL | extern "rust-call" fn call_once(mut self, a: A) -> Self::Output {
|
LL | extern "rust-call" fn call_once(mut self, a: A) -> Self::Output {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Tuple` is not implemented for `A`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Tuple` is not implemented for `A`
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound but it is an `unstable` trait
|
help: consider further restricting this bound with unstable trait `std::marker::Tuple`
|
||||||
|
|
|
|
||||||
LL | A: Eq + Hash + Clone + std::marker::Tuple,
|
LL | A: Eq + Hash + Clone + std::marker::Tuple,
|
||||||
| ++++++++++++++++++++
|
| ++++++++++++++++++++
|
||||||
|
@ -41,7 +41,7 @@ error[E0277]: functions with the "rust-call" ABI must take a single non-self tup
|
||||||
LL | extern "rust-call" fn call_mut(&mut self, a: A) -> Self::Output {
|
LL | extern "rust-call" fn call_mut(&mut self, a: A) -> Self::Output {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Tuple` is not implemented for `A`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Tuple` is not implemented for `A`
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound but it is an `unstable` trait
|
help: consider further restricting this bound with unstable trait `std::marker::Tuple`
|
||||||
|
|
|
|
||||||
LL | A: Eq + Hash + Clone + std::marker::Tuple,
|
LL | A: Eq + Hash + Clone + std::marker::Tuple,
|
||||||
| ++++++++++++++++++++
|
| ++++++++++++++++++++
|
||||||
|
@ -56,7 +56,7 @@ LL | self.call_mut(a)
|
||||||
|
|
|
|
||||||
note: required by a bound in `call_mut`
|
note: required by a bound in `call_mut`
|
||||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||||
help: consider further restricting this bound but it is an `unstable` trait
|
help: consider further restricting this bound with unstable trait `std::marker::Tuple`
|
||||||
|
|
|
|
||||||
LL | A: Eq + Hash + Clone + std::marker::Tuple,
|
LL | A: Eq + Hash + Clone + std::marker::Tuple,
|
||||||
| ++++++++++++++++++++
|
| ++++++++++++++++++++
|
||||||
|
|
|
@ -4,7 +4,7 @@ error[E0277]: cannot multiply `T` by `T`
|
||||||
LL | type Alias<T> = <T as std::ops::Mul>::Output;
|
LL | type Alias<T> = <T as std::ops::Mul>::Output;
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `T * T`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `T * T`
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::ops::Mul`
|
||||||
|
|
|
|
||||||
LL | type Alias<T: std::ops::Mul> = <T as std::ops::Mul>::Output;
|
LL | type Alias<T: std::ops::Mul> = <T as std::ops::Mul>::Output;
|
||||||
| +++++++++++++++
|
| +++++++++++++++
|
||||||
|
|
|
@ -8,7 +8,7 @@ LL | | where
|
||||||
LL | | F: for<'a> FnOnce(<F as Output<'a>>::Type),
|
LL | | F: for<'a> FnOnce(<F as Output<'a>>::Type),
|
||||||
| |___________________________________________________^ the trait `for<'a> Output<'a>` is not implemented for `F`
|
| |___________________________________________________^ the trait `for<'a> Output<'a>` is not implemented for `F`
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `for<'a> Output<'a>`
|
||||||
|
|
|
|
||||||
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + for<'a> Output<'a>,
|
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + for<'a> Output<'a>,
|
||||||
| ++++++++++++++++++++
|
| ++++++++++++++++++++
|
||||||
|
@ -19,7 +19,7 @@ error[E0277]: the trait bound `for<'a> F: Output<'a>` is not satisfied
|
||||||
LL | fn do_something_wrapper<O, F>(self, _: F)
|
LL | fn do_something_wrapper<O, F>(self, _: F)
|
||||||
| ^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Output<'a>` is not implemented for `F`
|
| ^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Output<'a>` is not implemented for `F`
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `for<'a> Output<'a>`
|
||||||
|
|
|
|
||||||
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + for<'a> Output<'a>,
|
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + for<'a> Output<'a>,
|
||||||
| ++++++++++++++++++++
|
| ++++++++++++++++++++
|
||||||
|
@ -30,7 +30,7 @@ error[E0277]: the trait bound `F: Output<'_>` is not satisfied
|
||||||
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type),
|
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type),
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Output<'_>` is not implemented for `F`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Output<'_>` is not implemented for `F`
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Output<'_>`
|
||||||
|
|
|
|
||||||
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + Output<'_>,
|
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + Output<'_>,
|
||||||
| ++++++++++++
|
| ++++++++++++
|
||||||
|
@ -41,7 +41,7 @@ error[E0277]: the trait bound `F: Output<'_>` is not satisfied
|
||||||
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type),
|
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type),
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Output<'_>` is not implemented for `F`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Output<'_>` is not implemented for `F`
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Output<'_>`
|
||||||
|
|
|
|
||||||
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + Output<'_>,
|
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + Output<'_>,
|
||||||
| ++++++++++++
|
| ++++++++++++
|
||||||
|
|
|
@ -10,7 +10,7 @@ note: required by a bound in `CastTo`
|
||||||
|
|
|
|
||||||
LL | pub trait CastTo<U: ?Sized>: Unsize<U> {}
|
LL | pub trait CastTo<U: ?Sized>: Unsize<U> {}
|
||||||
| ^^^^^^^^^ required by this bound in `CastTo`
|
| ^^^^^^^^^ required by this bound in `CastTo`
|
||||||
help: consider further restricting this bound but it is an `unstable` trait
|
help: consider further restricting this bound with unstable trait `std::marker::Unsize<U>`
|
||||||
|
|
|
|
||||||
LL | impl<T: ?Sized + std::marker::Unsize<U>, U: ?Sized> CastTo<U> for T {}
|
LL | impl<T: ?Sized + std::marker::Unsize<U>, U: ?Sized> CastTo<U> for T {}
|
||||||
| ++++++++++++++++++++++++
|
| ++++++++++++++++++++++++
|
||||||
|
|
|
@ -6,7 +6,7 @@ LL | let _ = s == t;
|
||||||
| |
|
| |
|
||||||
| &[T]
|
| &[T]
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::cmp::PartialEq`
|
||||||
|
|
|
|
||||||
LL | pub fn foo<T: std::cmp::PartialEq>(s: &[T], t: &[T]) {
|
LL | pub fn foo<T: std::cmp::PartialEq>(s: &[T], t: &[T]) {
|
||||||
| +++++++++++++++++++++
|
| +++++++++++++++++++++
|
||||||
|
|
|
@ -18,7 +18,7 @@ note: `Foo::zero` takes ownership of the receiver `self`, which moves `x`
|
||||||
|
|
|
|
||||||
LL | fn zero(self) -> Self;
|
LL | fn zero(self) -> Self;
|
||||||
| ^^^^
|
| ^^^^
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | pub fn baz<T: Foo + Copy>(x: T) -> T {
|
LL | pub fn baz<T: Foo + Copy>(x: T) -> T {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
|
@ -17,7 +17,7 @@ LL | fn duplicate_t<T>(t: T) -> (T, T) {
|
||||||
...
|
...
|
||||||
LL | (t, t)
|
LL | (t, t)
|
||||||
| - you could clone this value
|
| - you could clone this value
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn duplicate_t<T: Copy>(t: T) -> (T, T) {
|
LL | fn duplicate_t<T: Copy>(t: T) -> (T, T) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -33,7 +33,7 @@ LL | (t, t)
|
||||||
| |
|
| |
|
||||||
| value moved here
|
| value moved here
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn duplicate_opt<T: Copy>(t: Option<T>) -> (Option<T>, Option<T>) {
|
LL | fn duplicate_opt<T: Copy>(t: Option<T>) -> (Option<T>, Option<T>) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -49,7 +49,7 @@ LL | (t, t)
|
||||||
| |
|
| |
|
||||||
| value moved here
|
| value moved here
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn duplicate_tup1<T: Copy>(t: (T,)) -> ((T,), (T,)) {
|
LL | fn duplicate_tup1<T: Copy>(t: (T,)) -> ((T,), (T,)) {
|
||||||
| ++++++
|
| ++++++
|
||||||
|
@ -81,7 +81,7 @@ LL | (t, t)
|
||||||
| |
|
| |
|
||||||
| value moved here
|
| value moved here
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with traits `Copy + Trait`
|
||||||
|
|
|
|
||||||
LL | fn duplicate_custom<T: Copy + Trait>(t: S<T>) -> (S<T>, S<T>) {
|
LL | fn duplicate_custom<T: Copy + Trait>(t: S<T>) -> (S<T>, S<T>) {
|
||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
@ -97,7 +97,7 @@ LL | (t, t)
|
||||||
| |
|
| |
|
||||||
| value moved here
|
| value moved here
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with traits `Copy + Trait`
|
||||||
|
|
|
|
||||||
LL | fn duplicate_custom_1<T: Copy + Trait>(t: S<T>) -> (S<T>, S<T>) where {
|
LL | fn duplicate_custom_1<T: Copy + Trait>(t: S<T>) -> (S<T>, S<T>) where {
|
||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
@ -113,7 +113,7 @@ LL | (t, t)
|
||||||
| |
|
| |
|
||||||
| value moved here
|
| value moved here
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with traits `Copy + Trait`
|
||||||
|
|
|
|
||||||
LL | T: A + Copy + Trait,
|
LL | T: A + Copy + Trait,
|
||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
@ -129,7 +129,7 @@ LL | (t, t)
|
||||||
| |
|
| |
|
||||||
| value moved here
|
| value moved here
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with traits `Copy + Trait`
|
||||||
|
|
|
|
||||||
LL | T: A + Copy + Trait,
|
LL | T: A + Copy + Trait,
|
||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
@ -145,7 +145,7 @@ LL | (t, t)
|
||||||
| |
|
| |
|
||||||
| value moved here
|
| value moved here
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with traits `Copy + Trait`
|
||||||
|
|
|
|
||||||
LL | fn duplicate_custom_4<T: A + Copy + Trait>(t: S<T>) -> (S<T>, S<T>)
|
LL | fn duplicate_custom_4<T: A + Copy + Trait>(t: S<T>) -> (S<T>, S<T>)
|
||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
@ -169,7 +169,7 @@ LL | fn existing_colon<T:>(t: T) {
|
||||||
...
|
...
|
||||||
LL | [t, t];
|
LL | [t, t];
|
||||||
| - you could clone this value
|
| - you could clone this value
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | fn existing_colon<T: Copy>(t: T) {
|
LL | fn existing_colon<T: Copy>(t: T) {
|
||||||
| ++++
|
| ++++
|
||||||
|
@ -193,7 +193,7 @@ LL | fn existing_colon_in_where<T>(t: T)
|
||||||
...
|
...
|
||||||
LL | [t, t];
|
LL | [t, t];
|
||||||
| - you could clone this value
|
| - you could clone this value
|
||||||
help: consider further restricting type parameter `T`
|
help: consider further restricting type parameter `T` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | T:, T: Copy
|
LL | T:, T: Copy
|
||||||
| ~~~~~~~~~
|
| ~~~~~~~~~
|
||||||
|
|
|
@ -23,7 +23,7 @@ note: required by a bound in `is_zen`
|
||||||
|
|
|
|
||||||
LL | fn is_zen<T: Zen>(_: T) {}
|
LL | fn is_zen<T: Zen>(_: T) {}
|
||||||
| ^^^ required by this bound in `is_zen`
|
| ^^^ required by this bound in `is_zen`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::marker::Sync`
|
||||||
|
|
|
|
||||||
LL | fn not_sync<T: std::marker::Sync>(x: Guard<T>) {
|
LL | fn not_sync<T: std::marker::Sync>(x: Guard<T>) {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -58,7 +58,7 @@ note: required by a bound in `is_zen`
|
||||||
|
|
|
|
||||||
LL | fn is_zen<T: Zen>(_: T) {}
|
LL | fn is_zen<T: Zen>(_: T) {}
|
||||||
| ^^^ required by this bound in `is_zen`
|
| ^^^ required by this bound in `is_zen`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::marker::Sync`
|
||||||
|
|
|
|
||||||
LL | fn nested_not_sync<T: std::marker::Sync>(x: Nested<Guard<T>>) {
|
LL | fn nested_not_sync<T: std::marker::Sync>(x: Nested<Guard<T>>) {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -4,7 +4,7 @@ error[E0277]: the trait bound `for<'z> T: Trait2<'y, 'z>` is not satisfied
|
||||||
LL | fn callee<'x, 'y, T>(t: &'x dyn for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
|
LL | fn callee<'x, 'y, T>(t: &'x dyn for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'z> Trait2<'y, 'z>` is not implemented for `T`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'z> Trait2<'y, 'z>` is not implemented for `T`
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `for<'z> Trait2<'y, 'z>`
|
||||||
|
|
|
|
||||||
LL | fn callee<'x, 'y, T: for<'z> Trait2<'y, 'z>>(t: &'x dyn for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
|
LL | fn callee<'x, 'y, T: for<'z> Trait2<'y, 'z>>(t: &'x dyn for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
|
||||||
| ++++++++++++++++++++++++
|
| ++++++++++++++++++++++++
|
||||||
|
@ -17,7 +17,7 @@ LL | |
|
||||||
LL | | }
|
LL | | }
|
||||||
| |_^ the trait `for<'z> Trait2<'y, 'z>` is not implemented for `T`
|
| |_^ the trait `for<'z> Trait2<'y, 'z>` is not implemented for `T`
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `for<'z> Trait2<'y, 'z>`
|
||||||
|
|
|
|
||||||
LL | fn callee<'x, 'y, T: for<'z> Trait2<'y, 'z>>(t: &'x dyn for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
|
LL | fn callee<'x, 'y, T: for<'z> Trait2<'y, 'z>>(t: &'x dyn for<'z> Trait1< <T as Trait2<'y, 'z>>::Foo >)
|
||||||
| ++++++++++++++++++++++++
|
| ++++++++++++++++++++++++
|
||||||
|
|
|
@ -15,7 +15,7 @@ error[E0220]: associated type `Baa` not found for `T`
|
||||||
LL | T::Baa: std::fmt::Debug,
|
LL | T::Baa: std::fmt::Debug,
|
||||||
| ^^^ there is a similarly named associated type `Bar` in the trait `Foo`
|
| ^^^ there is a similarly named associated type `Bar` in the trait `Foo`
|
||||||
|
|
|
|
||||||
help: consider further restricting type parameter `T`
|
help: consider further restricting type parameter `T` with trait `Foo`
|
||||||
|
|
|
|
||||||
LL | T::Baa: std::fmt::Debug, T: Foo
|
LL | T::Baa: std::fmt::Debug, T: Foo
|
||||||
| ~~~~~~~~
|
| ~~~~~~~~
|
||||||
|
|
|
@ -20,7 +20,7 @@ note: required by a bound in `X::U`
|
||||||
|
|
|
|
||||||
LL | type U<'a>: PartialEq<&'a Self> where Self: 'a;
|
LL | type U<'a>: PartialEq<&'a Self> where Self: 'a;
|
||||||
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `X::U`
|
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `X::U`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::cmp::PartialEq`
|
||||||
|
|
|
|
||||||
LL | impl<T: 'static + std::cmp::PartialEq> X for T {
|
LL | impl<T: 'static + std::cmp::PartialEq> X for T {
|
||||||
| +++++++++++++++++++++
|
| +++++++++++++++++++++
|
||||||
|
|
|
@ -19,7 +19,7 @@ note: required by a bound in `Foo`
|
||||||
|
|
|
|
||||||
LL | trait Foo<'a, T: Eq + 'a> { }
|
LL | trait Foo<'a, T: Eq + 'a> { }
|
||||||
| ^^ required by this bound in `Foo`
|
| ^^ required by this bound in `Foo`
|
||||||
help: consider restricting type parameter `U`
|
help: consider restricting type parameter `U` with trait `std::cmp::Eq`
|
||||||
|
|
|
|
||||||
LL | default impl<U: std::cmp::Eq> Foo<'static, U> for () {}
|
LL | default impl<U: std::cmp::Eq> Foo<'static, U> for () {}
|
||||||
| ++++++++++++++
|
| ++++++++++++++
|
||||||
|
|
|
@ -9,7 +9,7 @@ note: required by a bound in `UncheckedCopy::Output`
|
||||||
|
|
|
|
||||||
LL | type Output: From<Self> + Copy + Into<Self>;
|
LL | type Output: From<Self> + Copy + Into<Self>;
|
||||||
| ^^^^ required by this bound in `UncheckedCopy::Output`
|
| ^^^^ required by this bound in `UncheckedCopy::Output`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | impl<T: std::marker::Copy> UncheckedCopy for T {
|
LL | impl<T: std::marker::Copy> UncheckedCopy for T {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -5,7 +5,7 @@ LL | impl<B: ?Sized> Display for Cow<'_, B> {
|
||||||
| ^^^^^^^^^^ the trait `Clone` is not implemented for `B`
|
| ^^^^^^^^^^ the trait `Clone` is not implemented for `B`
|
||||||
|
|
|
|
||||||
= note: required for `B` to implement `ToOwned`
|
= note: required for `B` to implement `ToOwned`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::clone::Clone`
|
||||||
|
|
|
|
||||||
LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> {
|
LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -17,7 +17,7 @@ LL | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `B`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `B`
|
||||||
|
|
|
|
||||||
= note: required for `B` to implement `ToOwned`
|
= note: required for `B` to implement `ToOwned`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::clone::Clone`
|
||||||
|
|
|
|
||||||
LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> {
|
LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -29,7 +29,7 @@ LL | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
| ^^^^ the trait `Clone` is not implemented for `B`
|
| ^^^^ the trait `Clone` is not implemented for `B`
|
||||||
|
|
|
|
||||||
= note: required for `B` to implement `ToOwned`
|
= note: required for `B` to implement `ToOwned`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::clone::Clone`
|
||||||
|
|
|
|
||||||
LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> {
|
LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -47,7 +47,7 @@ LL | | }
|
||||||
| |_____^ the trait `Clone` is not implemented for `B`
|
| |_____^ the trait `Clone` is not implemented for `B`
|
||||||
|
|
|
|
||||||
= note: required for `B` to implement `ToOwned`
|
= note: required for `B` to implement `ToOwned`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::clone::Clone`
|
||||||
|
|
|
|
||||||
LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> {
|
LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -4,7 +4,7 @@ error[E0277]: the trait bound `T: GlUniformScalar` is not satisfied
|
||||||
LL | <T as GlUniformScalar>::FACTORY(1, value);
|
LL | <T as GlUniformScalar>::FACTORY(1, value);
|
||||||
| ^ the trait `GlUniformScalar` is not implemented for `T`
|
| ^ the trait `GlUniformScalar` is not implemented for `T`
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `GlUniformScalar`
|
||||||
|
|
|
|
||||||
LL | pub fn foo<T: UniformScalar + GlUniformScalar>(value: T) {
|
LL | pub fn foo<T: UniformScalar + GlUniformScalar>(value: T) {
|
||||||
| +++++++++++++++++
|
| +++++++++++++++++
|
||||||
|
|
|
@ -5,7 +5,7 @@ LL | println!("{:?}", t);
|
||||||
| ^ `impl Sized` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
| ^ `impl Sized` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
||||||
|
|
|
|
||||||
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::fmt::Debug`
|
||||||
|
|
|
|
||||||
LL | fn test_impl(t: impl Sized + std::fmt::Debug) {
|
LL | fn test_impl(t: impl Sized + std::fmt::Debug) {
|
||||||
| +++++++++++++++++
|
| +++++++++++++++++
|
||||||
|
@ -17,7 +17,7 @@ LL | println!("{:?}", t);
|
||||||
| ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
| ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
||||||
|
|
|
|
||||||
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::fmt::Debug`
|
||||||
|
|
|
|
||||||
LL | fn test_no_bounds<T: std::fmt::Debug>(t: T) {
|
LL | fn test_no_bounds<T: std::fmt::Debug>(t: T) {
|
||||||
| +++++++++++++++++
|
| +++++++++++++++++
|
||||||
|
@ -29,7 +29,7 @@ LL | println!("{:?}", t);
|
||||||
| ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
| ^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
||||||
|
|
|
|
||||||
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::fmt::Debug`
|
||||||
|
|
|
|
||||||
LL | fn test_one_bound<T: Sized + std::fmt::Debug>(t: T) {
|
LL | fn test_one_bound<T: Sized + std::fmt::Debug>(t: T) {
|
||||||
| +++++++++++++++++
|
| +++++++++++++++++
|
||||||
|
@ -41,7 +41,7 @@ LL | println!("{:?} {:?}", x, y);
|
||||||
| ^ `Y` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
| ^ `Y` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
||||||
|
|
|
|
||||||
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider further restricting type parameter `Y`
|
help: consider further restricting type parameter `Y` with trait `std::fmt::Debug`
|
||||||
|
|
|
|
||||||
LL | fn test_no_bounds_where<X, Y>(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug {
|
LL | fn test_no_bounds_where<X, Y>(x: X, y: Y) where X: std::fmt::Debug, Y: std::fmt::Debug {
|
||||||
| ~~~~~~~~~~~~~~~~~~~~
|
| ~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -53,7 +53,7 @@ LL | println!("{:?}", x);
|
||||||
| ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
| ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
||||||
|
|
|
|
||||||
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::fmt::Debug`
|
||||||
|
|
|
|
||||||
LL | fn test_one_bound_where<X>(x: X) where X: Sized + std::fmt::Debug {
|
LL | fn test_one_bound_where<X>(x: X) where X: Sized + std::fmt::Debug {
|
||||||
| +++++++++++++++++
|
| +++++++++++++++++
|
||||||
|
@ -65,7 +65,7 @@ LL | println!("{:?}", x);
|
||||||
| ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
| ^ `X` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
||||||
|
|
|
|
||||||
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::fmt::Debug`
|
||||||
|
|
|
|
||||||
LL | fn test_many_bounds_where<X>(x: X) where X: Sized + std::fmt::Debug, X: Sized {
|
LL | fn test_many_bounds_where<X>(x: X) where X: Sized + std::fmt::Debug, X: Sized {
|
||||||
| +++++++++++++++++
|
| +++++++++++++++++
|
||||||
|
|
|
@ -9,7 +9,7 @@ note: this `clone()` copies the reference, which does not do anything, because `
|
||||||
|
|
|
|
||||||
LL | drops_impl_owned(thing.clone());
|
LL | drops_impl_owned(thing.clone());
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Clone`
|
||||||
|
|
|
|
||||||
LL | fn clones_impl_ref_inline(thing: &impl DoesAThing + Clone) {
|
LL | fn clones_impl_ref_inline(thing: &impl DoesAThing + Clone) {
|
||||||
| +++++++
|
| +++++++
|
||||||
|
|
|
@ -15,7 +15,7 @@ note: `T` does not implement `Clone`, so `&T` was cloned instead
|
||||||
|
|
|
|
||||||
LL | t.clone()
|
LL | t.clone()
|
||||||
| ^
|
| ^
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Clone`
|
||||||
|
|
|
|
||||||
LL | fn wat<T: Clone>(t: &T) -> T {
|
LL | fn wat<T: Clone>(t: &T) -> T {
|
||||||
| +++++++
|
| +++++++
|
||||||
|
|
|
@ -14,7 +14,7 @@ LL | impl<T: Clone, U> PartialEq<U> for Struct<T>
|
||||||
note: required by a bound in `Eq`
|
note: required by a bound in `Eq`
|
||||||
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
||||||
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `std::clone::Clone`
|
||||||
|
|
|
|
||||||
LL | pub struct Struct<T: std::clone::Clone>(T);
|
LL | pub struct Struct<T: std::clone::Clone>(T);
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -38,7 +38,7 @@ LL | impl<T: Debug + Trait> Debug for Inner<T> {
|
||||||
= note: required for `&c::Inner<T>` to implement `Debug`
|
= note: required for `&c::Inner<T>` to implement `Debug`
|
||||||
= note: required for the cast from `&&c::Inner<T>` to `&dyn Debug`
|
= note: required for the cast from `&&c::Inner<T>` to `&dyn Debug`
|
||||||
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `c::Trait`
|
||||||
|
|
|
|
||||||
LL | struct Outer<T: c::Trait>(Inner<T>);
|
LL | struct Outer<T: c::Trait>(Inner<T>);
|
||||||
| ++++++++++
|
| ++++++++++
|
||||||
|
@ -60,7 +60,7 @@ LL | impl<T> Debug for Inner<T> where T: Debug, T: Trait {
|
||||||
= note: required for `&d::Inner<T>` to implement `Debug`
|
= note: required for `&d::Inner<T>` to implement `Debug`
|
||||||
= note: required for the cast from `&&d::Inner<T>` to `&dyn Debug`
|
= note: required for the cast from `&&d::Inner<T>` to `&dyn Debug`
|
||||||
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `d::Trait`
|
||||||
|
|
|
|
||||||
LL | struct Outer<T: d::Trait>(Inner<T>);
|
LL | struct Outer<T: d::Trait>(Inner<T>);
|
||||||
| ++++++++++
|
| ++++++++++
|
||||||
|
@ -82,7 +82,7 @@ LL | impl<T> Debug for Inner<T> where T: Debug + Trait {
|
||||||
= note: required for `&e::Inner<T>` to implement `Debug`
|
= note: required for `&e::Inner<T>` to implement `Debug`
|
||||||
= note: required for the cast from `&&e::Inner<T>` to `&dyn Debug`
|
= note: required for the cast from `&&e::Inner<T>` to `&dyn Debug`
|
||||||
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `e::Trait`
|
||||||
|
|
|
|
||||||
LL | struct Outer<T: e::Trait>(Inner<T>);
|
LL | struct Outer<T: e::Trait>(Inner<T>);
|
||||||
| ++++++++++
|
| ++++++++++
|
||||||
|
@ -104,7 +104,7 @@ LL | impl<T: Debug> Debug for Inner<T> where T: Trait {
|
||||||
= note: required for `&f::Inner<T>` to implement `Debug`
|
= note: required for `&f::Inner<T>` to implement `Debug`
|
||||||
= note: required for the cast from `&&f::Inner<T>` to `&dyn Debug`
|
= note: required for the cast from `&&f::Inner<T>` to `&dyn Debug`
|
||||||
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `f::Trait`
|
||||||
|
|
|
|
||||||
LL | struct Outer<T: f::Trait>(Inner<T>);
|
LL | struct Outer<T: f::Trait>(Inner<T>);
|
||||||
| ++++++++++
|
| ++++++++++
|
||||||
|
|
|
@ -4,7 +4,7 @@ error[E0277]: the trait bound `&T: X` is not satisfied
|
||||||
LL | foo(s);
|
LL | foo(s);
|
||||||
| ^ the trait `X` is not implemented for `&T`
|
| ^ the trait `X` is not implemented for `&T`
|
||||||
|
|
|
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Clone`
|
||||||
|
|
|
|
||||||
LL | fn bar<T: X + Clone>(s: &T) {
|
LL | fn bar<T: X + Clone>(s: &T) {
|
||||||
| +++++++
|
| +++++++
|
||||||
|
|
|
@ -6,7 +6,7 @@ LL | n + 10
|
||||||
| |
|
| |
|
||||||
| N
|
| N
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `N`
|
help: consider restricting type parameter `N` with trait `std::ops::Add<i32, Output = N>`
|
||||||
|
|
|
|
||||||
LL | fn add_ten<N: std::ops::Add<i32, Output = N>>(n: N) -> N {
|
LL | fn add_ten<N: std::ops::Add<i32, Output = N>>(n: N) -> N {
|
||||||
| ++++++++++++++++++++++++++++++++
|
| ++++++++++++++++++++++++++++++++
|
||||||
|
|
|
@ -9,7 +9,7 @@ note: required by a bound in `Vector2`
|
||||||
|
|
|
|
||||||
LL | pub struct Vector2<T: Debug + Copy + Clone> {
|
LL | pub struct Vector2<T: Debug + Copy + Clone> {
|
||||||
| ^^^^ required by this bound in `Vector2`
|
| ^^^^ required by this bound in `Vector2`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | pub struct AABB<K: Debug + std::marker::Copy> {
|
LL | pub struct AABB<K: Debug + std::marker::Copy> {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -32,7 +32,7 @@ LL | pub struct Vector2<T: Debug + Copy + Clone> {
|
||||||
| ---- unsatisfied trait bound introduced in this `derive` macro
|
| ---- unsatisfied trait bound introduced in this `derive` macro
|
||||||
= note: required for the cast from `&Vector2<K>` to `&dyn Debug`
|
= note: required for the cast from `&Vector2<K>` to `&dyn Debug`
|
||||||
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | pub struct AABB<K: Debug + std::marker::Copy> {
|
LL | pub struct AABB<K: Debug + std::marker::Copy> {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -52,7 +52,7 @@ note: required by a bound in `Vector2`
|
||||||
LL | pub struct Vector2<T: Debug + Copy + Clone> {
|
LL | pub struct Vector2<T: Debug + Copy + Clone> {
|
||||||
| ^^^^ required by this bound in `Vector2`
|
| ^^^^ required by this bound in `Vector2`
|
||||||
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | pub struct AABB<K: Debug + std::marker::Copy> {
|
LL | pub struct AABB<K: Debug + std::marker::Copy> {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -74,7 +74,7 @@ LL | #[derive(Debug, Copy, Clone)]
|
||||||
LL | pub struct Vector2<T: Debug + Copy + Clone> {
|
LL | pub struct Vector2<T: Debug + Copy + Clone> {
|
||||||
| ---- unsatisfied trait bound introduced in this `derive` macro
|
| ---- unsatisfied trait bound introduced in this `derive` macro
|
||||||
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | pub struct AABB<K: Debug + std::marker::Copy> {
|
LL | pub struct AABB<K: Debug + std::marker::Copy> {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -13,7 +13,7 @@ note: the `Copy` impl for `Vector2<K>` requires that `K: Debug`
|
||||||
LL | pub loc: Vector2<K>,
|
LL | pub loc: Vector2<K>,
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Debug`
|
||||||
|
|
|
|
||||||
LL | pub struct AABB<K: Copy + Debug>{
|
LL | pub struct AABB<K: Copy + Debug>{
|
||||||
| +++++++
|
| +++++++
|
||||||
|
@ -29,7 +29,7 @@ note: required by a bound in `Vector2`
|
||||||
|
|
|
|
||||||
LL | pub struct Vector2<T: Debug + Copy + Clone>{
|
LL | pub struct Vector2<T: Debug + Copy + Clone>{
|
||||||
| ^^^^^ required by this bound in `Vector2`
|
| ^^^^^ required by this bound in `Vector2`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::fmt::Debug`
|
||||||
|
|
|
|
||||||
LL | pub struct AABB<K: Copy + std::fmt::Debug>{
|
LL | pub struct AABB<K: Copy + std::fmt::Debug>{
|
||||||
| +++++++++++++++++
|
| +++++++++++++++++
|
||||||
|
@ -44,7 +44,7 @@ LL | pub loc: Vector2<K>,
|
||||||
| ^^^^^^^^^^^^^^^^^^^ `K` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
| ^^^^^^^^^^^^^^^^^^^ `K` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
||||||
|
|
|
|
||||||
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::fmt::Debug`
|
||||||
|
|
|
|
||||||
LL | pub struct AABB<K: Copy + std::fmt::Debug>{
|
LL | pub struct AABB<K: Copy + std::fmt::Debug>{
|
||||||
| +++++++++++++++++
|
| +++++++++++++++++
|
||||||
|
@ -59,7 +59,7 @@ LL | pub size: Vector2<K>
|
||||||
| ^^^^^^^^^^^^^^^^^^^^ `K` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
| ^^^^^^^^^^^^^^^^^^^^ `K` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
||||||
|
|
|
|
||||||
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::fmt::Debug`
|
||||||
|
|
|
|
||||||
LL | pub struct AABB<K: Copy + std::fmt::Debug>{
|
LL | pub struct AABB<K: Copy + std::fmt::Debug>{
|
||||||
| +++++++++++++++++
|
| +++++++++++++++++
|
||||||
|
|
|
@ -13,7 +13,7 @@ note: the `Copy` impl for `Vector2<K>` requires that `K: Debug`
|
||||||
LL | pub loc: Vector2<K>,
|
LL | pub loc: Vector2<K>,
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider restricting type parameter `K`
|
help: consider restricting type parameter `K` with trait `Debug`
|
||||||
|
|
|
|
||||||
LL | pub struct AABB<K: Debug> {
|
LL | pub struct AABB<K: Debug> {
|
||||||
| +++++++
|
| +++++++
|
||||||
|
@ -29,7 +29,7 @@ note: required by a bound in `Vector2`
|
||||||
|
|
|
|
||||||
LL | pub struct Vector2<T: Debug + Copy + Clone> {
|
LL | pub struct Vector2<T: Debug + Copy + Clone> {
|
||||||
| ^^^^^ required by this bound in `Vector2`
|
| ^^^^^ required by this bound in `Vector2`
|
||||||
help: consider restricting type parameter `K`
|
help: consider restricting type parameter `K` with trait `std::fmt::Debug`
|
||||||
|
|
|
|
||||||
LL | pub struct AABB<K: std::fmt::Debug> {
|
LL | pub struct AABB<K: std::fmt::Debug> {
|
||||||
| +++++++++++++++++
|
| +++++++++++++++++
|
||||||
|
@ -45,7 +45,7 @@ note: required by a bound in `Vector2`
|
||||||
|
|
|
|
||||||
LL | pub struct Vector2<T: Debug + Copy + Clone> {
|
LL | pub struct Vector2<T: Debug + Copy + Clone> {
|
||||||
| ^^^^ required by this bound in `Vector2`
|
| ^^^^ required by this bound in `Vector2`
|
||||||
help: consider restricting type parameter `K`
|
help: consider restricting type parameter `K` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | pub struct AABB<K: std::marker::Copy> {
|
LL | pub struct AABB<K: std::marker::Copy> {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -68,7 +68,7 @@ LL | pub struct Vector2<T: Debug + Copy + Clone> {
|
||||||
| ---- unsatisfied trait bound introduced in this `derive` macro
|
| ---- unsatisfied trait bound introduced in this `derive` macro
|
||||||
= note: required for the cast from `&Vector2<K>` to `&dyn Debug`
|
= note: required for the cast from `&Vector2<K>` to `&dyn Debug`
|
||||||
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider restricting type parameter `K`
|
help: consider restricting type parameter `K` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | pub struct AABB<K: std::marker::Copy> {
|
LL | pub struct AABB<K: std::marker::Copy> {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -83,7 +83,7 @@ LL | pub loc: Vector2<K>,
|
||||||
| ^^^^^^^^^^^^^^^^^^^ `K` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
| ^^^^^^^^^^^^^^^^^^^ `K` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
||||||
|
|
|
|
||||||
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider restricting type parameter `K`
|
help: consider restricting type parameter `K` with trait `std::fmt::Debug`
|
||||||
|
|
|
|
||||||
LL | pub struct AABB<K: std::fmt::Debug> {
|
LL | pub struct AABB<K: std::fmt::Debug> {
|
||||||
| +++++++++++++++++
|
| +++++++++++++++++
|
||||||
|
@ -103,7 +103,7 @@ note: required by a bound in `Vector2`
|
||||||
LL | pub struct Vector2<T: Debug + Copy + Clone> {
|
LL | pub struct Vector2<T: Debug + Copy + Clone> {
|
||||||
| ^^^^ required by this bound in `Vector2`
|
| ^^^^ required by this bound in `Vector2`
|
||||||
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider restricting type parameter `K`
|
help: consider restricting type parameter `K` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | pub struct AABB<K: std::marker::Copy> {
|
LL | pub struct AABB<K: std::marker::Copy> {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -118,7 +118,7 @@ LL | pub size: Vector2<K>,
|
||||||
| ^^^^^^^^^^^^^^^^^^^^ `K` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
| ^^^^^^^^^^^^^^^^^^^^ `K` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
||||||
|
|
|
|
||||||
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider restricting type parameter `K`
|
help: consider restricting type parameter `K` with trait `std::fmt::Debug`
|
||||||
|
|
|
|
||||||
LL | pub struct AABB<K: std::fmt::Debug> {
|
LL | pub struct AABB<K: std::fmt::Debug> {
|
||||||
| +++++++++++++++++
|
| +++++++++++++++++
|
||||||
|
@ -140,7 +140,7 @@ LL | #[derive(Debug, Copy, Clone)]
|
||||||
LL | pub struct Vector2<T: Debug + Copy + Clone> {
|
LL | pub struct Vector2<T: Debug + Copy + Clone> {
|
||||||
| ---- unsatisfied trait bound introduced in this `derive` macro
|
| ---- unsatisfied trait bound introduced in this `derive` macro
|
||||||
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider restricting type parameter `K`
|
help: consider restricting type parameter `K` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | pub struct AABB<K: std::marker::Copy> {
|
LL | pub struct AABB<K: std::marker::Copy> {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -12,7 +12,7 @@ note: the `Copy` impl for `OnlyCopyIfDisplay<S>` requires that `S: std::fmt::Dis
|
||||||
|
|
|
|
||||||
LL | struct Wrapper<T>(T);
|
LL | struct Wrapper<T>(T);
|
||||||
| ^
|
| ^
|
||||||
help: consider restricting type parameter `S`
|
help: consider restricting type parameter `S` with trait `std::fmt::Display`
|
||||||
|
|
|
|
||||||
LL | impl<S: std::fmt::Display> Copy for Wrapper<OnlyCopyIfDisplay<S>> {}
|
LL | impl<S: std::fmt::Display> Copy for Wrapper<OnlyCopyIfDisplay<S>> {}
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -7,7 +7,7 @@ LL |
|
||||||
LL | impl<S> Copy for Wrapper<S> {}
|
LL | impl<S> Copy for Wrapper<S> {}
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
|
|
||||||
help: consider restricting type parameter `S`
|
help: consider restricting type parameter `S` with trait `Copy`
|
||||||
|
|
|
|
||||||
LL | impl<S: Copy> Copy for Wrapper<S> {}
|
LL | impl<S: Copy> Copy for Wrapper<S> {}
|
||||||
| ++++++
|
| ++++++
|
||||||
|
|
|
@ -20,7 +20,7 @@ LL | Ok(self)
|
||||||
| this argument influences the type of `Ok`
|
| this argument influences the type of `Ok`
|
||||||
note: tuple variant defined here
|
note: tuple variant defined here
|
||||||
--> $SRC_DIR/core/src/result.rs:LL:COL
|
--> $SRC_DIR/core/src/result.rs:LL:COL
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `<Output = T>`
|
||||||
|
|
|
|
||||||
LL | impl<T: TryAdd<Output = T>> TryAdd for Option<T> {
|
LL | impl<T: TryAdd<Output = T>> TryAdd for Option<T> {
|
||||||
| ++++++++++++
|
| ++++++++++++
|
||||||
|
@ -47,7 +47,7 @@ LL | Ok(self)
|
||||||
| this argument influences the type of `Ok`
|
| this argument influences the type of `Ok`
|
||||||
note: tuple variant defined here
|
note: tuple variant defined here
|
||||||
--> $SRC_DIR/core/src/result.rs:LL:COL
|
--> $SRC_DIR/core/src/result.rs:LL:COL
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `, Output = T`
|
||||||
|
|
|
|
||||||
LL | impl<T: TryAdd<Error = X, Output = T>> TryAdd for Other<T> {
|
LL | impl<T: TryAdd<Error = X, Output = T>> TryAdd for Other<T> {
|
||||||
| ++++++++++++
|
| ++++++++++++
|
||||||
|
|
|
@ -11,7 +11,7 @@ note: required by a bound in `is_send`
|
||||||
|
|
|
|
||||||
LL | fn is_send<T: Send>(val: T) {}
|
LL | fn is_send<T: Send>(val: T) {}
|
||||||
| ^^^^ required by this bound in `is_send`
|
| ^^^^ required by this bound in `is_send`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Send`
|
||||||
|
|
|
|
||||||
LL | fn use_impl_sync(val: impl Sync + std::marker::Send) {
|
LL | fn use_impl_sync(val: impl Sync + std::marker::Send) {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -29,7 +29,7 @@ note: required by a bound in `is_send`
|
||||||
|
|
|
|
||||||
LL | fn is_send<T: Send>(val: T) {}
|
LL | fn is_send<T: Send>(val: T) {}
|
||||||
| ^^^^ required by this bound in `is_send`
|
| ^^^^ required by this bound in `is_send`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Send`
|
||||||
|
|
|
|
||||||
LL | fn use_where<S>(val: S) where S: Sync + std::marker::Send {
|
LL | fn use_where<S>(val: S) where S: Sync + std::marker::Send {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -47,7 +47,7 @@ note: required by a bound in `is_send`
|
||||||
|
|
|
|
||||||
LL | fn is_send<T: Send>(val: T) {}
|
LL | fn is_send<T: Send>(val: T) {}
|
||||||
| ^^^^ required by this bound in `is_send`
|
| ^^^^ required by this bound in `is_send`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Send`
|
||||||
|
|
|
|
||||||
LL | fn use_bound<S: Sync + std::marker::Send>(val: S) {
|
LL | fn use_bound<S: Sync + std::marker::Send>(val: S) {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -65,7 +65,7 @@ note: required by a bound in `is_send`
|
||||||
|
|
|
|
||||||
LL | fn is_send<T: Send>(val: T) {}
|
LL | fn is_send<T: Send>(val: T) {}
|
||||||
| ^^^^ required by this bound in `is_send`
|
| ^^^^ required by this bound in `is_send`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Send`
|
||||||
|
|
|
|
||||||
LL | Sync + std::marker::Send
|
LL | Sync + std::marker::Send
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -83,7 +83,7 @@ note: required by a bound in `is_send`
|
||||||
|
|
|
|
||||||
LL | fn is_send<T: Send>(val: T) {}
|
LL | fn is_send<T: Send>(val: T) {}
|
||||||
| ^^^^ required by this bound in `is_send`
|
| ^^^^ required by this bound in `is_send`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Send`
|
||||||
|
|
|
|
||||||
LL | fn use_bound_and_where<S: Sync + std::marker::Send>(val: S) where S: std::fmt::Debug {
|
LL | fn use_bound_and_where<S: Sync + std::marker::Send>(val: S) where S: std::fmt::Debug {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
@ -101,7 +101,7 @@ note: required by a bound in `is_send`
|
||||||
|
|
|
|
||||||
LL | fn is_send<T: Send>(val: T) {}
|
LL | fn is_send<T: Send>(val: T) {}
|
||||||
| ^^^^ required by this bound in `is_send`
|
| ^^^^ required by this bound in `is_send`
|
||||||
help: consider restricting type parameter `S`
|
help: consider restricting type parameter `S` with trait `std::marker::Send`
|
||||||
|
|
|
|
||||||
LL | fn use_unbound<S: std::marker::Send>(val: S) {
|
LL | fn use_unbound<S: std::marker::Send>(val: S) {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -9,7 +9,7 @@ note: required by a bound in `ConstrainedStruct`
|
||||||
|
|
|
|
||||||
LL | struct ConstrainedStruct<X: Copy> {
|
LL | struct ConstrainedStruct<X: Copy> {
|
||||||
| ^^^^ required by this bound in `ConstrainedStruct`
|
| ^^^^ required by this bound in `ConstrainedStruct`
|
||||||
help: consider further restricting type parameter `X`
|
help: consider further restricting type parameter `X` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | trait InsufficientlyConstrainedGeneric<X=()> where Self: Sized, X: std::marker::Copy {
|
LL | trait InsufficientlyConstrainedGeneric<X=()> where Self: Sized, X: std::marker::Copy {
|
||||||
| ++++++++++++++++++++++
|
| ++++++++++++++++++++++
|
||||||
|
@ -25,7 +25,7 @@ note: required by a bound in `ConstrainedStruct`
|
||||||
|
|
|
|
||||||
LL | struct ConstrainedStruct<X: Copy> {
|
LL | struct ConstrainedStruct<X: Copy> {
|
||||||
| ^^^^ required by this bound in `ConstrainedStruct`
|
| ^^^^ required by this bound in `ConstrainedStruct`
|
||||||
help: consider further restricting type parameter `X`
|
help: consider further restricting type parameter `X` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | trait InsufficientlyConstrainedGenericWithEmptyWhere<X=()> where Self: Sized, X: std::marker::Copy {
|
LL | trait InsufficientlyConstrainedGenericWithEmptyWhere<X=()> where Self: Sized, X: std::marker::Copy {
|
||||||
| ++++++++++++++++++++++
|
| ++++++++++++++++++++++
|
||||||
|
@ -41,7 +41,7 @@ note: required by a bound in `ConstrainedStruct`
|
||||||
|
|
|
|
||||||
LL | struct ConstrainedStruct<X: Copy> {
|
LL | struct ConstrainedStruct<X: Copy> {
|
||||||
| ^^^^ required by this bound in `ConstrainedStruct`
|
| ^^^^ required by this bound in `ConstrainedStruct`
|
||||||
help: consider further restricting type parameter `X`
|
help: consider further restricting type parameter `X` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | trait InsufficientlyConstrainedGeneric<X=()> where Self: Sized, X: std::marker::Copy {
|
LL | trait InsufficientlyConstrainedGeneric<X=()> where Self: Sized, X: std::marker::Copy {
|
||||||
| ++++++++++++++++++++++
|
| ++++++++++++++++++++++
|
||||||
|
@ -57,7 +57,7 @@ note: required by a bound in `ConstrainedStruct`
|
||||||
|
|
|
|
||||||
LL | struct ConstrainedStruct<X: Copy> {
|
LL | struct ConstrainedStruct<X: Copy> {
|
||||||
| ^^^^ required by this bound in `ConstrainedStruct`
|
| ^^^^ required by this bound in `ConstrainedStruct`
|
||||||
help: consider further restricting type parameter `X`
|
help: consider further restricting type parameter `X` with trait `std::marker::Copy`
|
||||||
|
|
|
|
||||||
LL | trait InsufficientlyConstrainedGenericWithEmptyWhere<X=()> where Self: Sized, X: std::marker::Copy {
|
LL | trait InsufficientlyConstrainedGenericWithEmptyWhere<X=()> where Self: Sized, X: std::marker::Copy {
|
||||||
| ++++++++++++++++++++++
|
| ++++++++++++++++++++++
|
||||||
|
|
|
@ -11,7 +11,7 @@ LL | return a.bar();
|
||||||
= note: expected type parameter `B`
|
= note: expected type parameter `B`
|
||||||
found associated type `<A as MyTrait>::T`
|
found associated type `<A as MyTrait>::T`
|
||||||
= note: the caller chooses a type for `B` which can be different from `<A as MyTrait>::T`
|
= note: the caller chooses a type for `B` which can be different from `<A as MyTrait>::T`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `<T = B>`
|
||||||
|
|
|
|
||||||
LL | pub fn foo<A: MyTrait<T = B>, B>(a: A) -> B {
|
LL | pub fn foo<A: MyTrait<T = B>, B>(a: A) -> B {
|
||||||
| +++++++
|
| +++++++
|
||||||
|
|
|
@ -9,7 +9,7 @@ pub trait Unstable {}
|
||||||
fn foo<T: Unstable>(_: T) {}
|
fn foo<T: Unstable>(_: T) {}
|
||||||
|
|
||||||
#[stable(feature = "unit_test", since = "1.0.0")]
|
#[stable(feature = "unit_test", since = "1.0.0")]
|
||||||
pub fn demo<T>(t: T) { //~ HELP consider restricting type parameter `T` but it is an `unstable` trait
|
pub fn demo<T>(t: T) { //~ HELP consider restricting type parameter `T` with unstable trait `Unstable`
|
||||||
foo(t) //~ ERROR E0277
|
foo(t) //~ ERROR E0277
|
||||||
}
|
}
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -11,7 +11,7 @@ note: required by a bound in `foo`
|
||||||
|
|
|
|
||||||
LL | fn foo<T: Unstable>(_: T) {}
|
LL | fn foo<T: Unstable>(_: T) {}
|
||||||
| ^^^^^^^^ required by this bound in `foo`
|
| ^^^^^^^^ required by this bound in `foo`
|
||||||
help: consider restricting type parameter `T` but it is an `unstable` trait
|
help: consider restricting type parameter `T` with unstable trait `Unstable`
|
||||||
|
|
|
|
||||||
LL | pub fn demo<T: Unstable>(t: T) {
|
LL | pub fn demo<T: Unstable>(t: T) {
|
||||||
| ++++++++++
|
| ++++++++++
|
||||||
|
|
|
@ -9,7 +9,7 @@ note: required by a bound in `A`
|
||||||
|
|
|
|
||||||
LL | trait A<T: Foo> {}
|
LL | trait A<T: Foo> {}
|
||||||
| ^^^ required by this bound in `A`
|
| ^^^ required by this bound in `A`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Foo`
|
||||||
|
|
|
|
||||||
LL | trait B<T: Foo> = A<T>;
|
LL | trait B<T: Foo> = A<T>;
|
||||||
| +++++
|
| +++++
|
||||||
|
|
|
@ -11,7 +11,7 @@ note: required by a bound in `Bar::bar`
|
||||||
|
|
|
|
||||||
LL | fn bar<T:Send>(&self);
|
LL | fn bar<T:Send>(&self);
|
||||||
| ^^^^ required by this bound in `Bar::bar`
|
| ^^^^ required by this bound in `Bar::bar`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `std::marker::Send`
|
||||||
|
|
|
|
||||||
LL | fn foo<T:'static + std::marker::Send>() {
|
LL | fn foo<T:'static + std::marker::Send>() {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -9,7 +9,7 @@ note: required by a bound in `Foo`
|
||||||
|
|
|
|
||||||
LL | struct Foo<T:Trait> {
|
LL | struct Foo<T:Trait> {
|
||||||
| ^^^^^ required by this bound in `Foo`
|
| ^^^^^ required by this bound in `Foo`
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `Trait`
|
||||||
|
|
|
|
||||||
LL | impl<T: Trait> Foo<T> {
|
LL | impl<T: Trait> Foo<T> {
|
||||||
| +++++++
|
| +++++++
|
||||||
|
@ -59,7 +59,7 @@ note: required by a bound in `Foo`
|
||||||
|
|
|
|
||||||
LL | struct Foo<T:Trait> {
|
LL | struct Foo<T:Trait> {
|
||||||
| ^^^^^ required by this bound in `Foo`
|
| ^^^^^ required by this bound in `Foo`
|
||||||
help: consider restricting type parameter `U`
|
help: consider restricting type parameter `U` with trait `Trait`
|
||||||
|
|
|
|
||||||
LL | struct Badness<U: Trait> {
|
LL | struct Badness<U: Trait> {
|
||||||
| +++++++
|
| +++++++
|
||||||
|
@ -75,7 +75,7 @@ note: required by a bound in `Bar`
|
||||||
|
|
|
|
||||||
LL | enum Bar<T:Trait> {
|
LL | enum Bar<T:Trait> {
|
||||||
| ^^^^^ required by this bound in `Bar`
|
| ^^^^^ required by this bound in `Bar`
|
||||||
help: consider restricting type parameter `V`
|
help: consider restricting type parameter `V` with trait `Trait`
|
||||||
|
|
|
|
||||||
LL | enum MoreBadness<V: Trait> {
|
LL | enum MoreBadness<V: Trait> {
|
||||||
| +++++++
|
| +++++++
|
||||||
|
|
|
@ -42,7 +42,7 @@ LL | *t == *t
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `~const std::cmp::PartialEq`
|
||||||
|
|
|
|
||||||
LL | const fn equals_self<T: ~const PartialEq + ~const std::cmp::PartialEq>(t: &T) -> bool {
|
LL | const fn equals_self<T: ~const PartialEq + ~const std::cmp::PartialEq>(t: &T) -> bool {
|
||||||
| ++++++++++++++++++++++++++++
|
| ++++++++++++++++++++++++++++
|
||||||
|
|
|
@ -42,7 +42,7 @@ LL | *t == *t
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `~const std::cmp::PartialEq`
|
||||||
|
|
|
|
||||||
LL | const fn equals_self<T: PartialEq + ~const PartialEq + ~const std::cmp::PartialEq>(t: &T) -> bool {
|
LL | const fn equals_self<T: PartialEq + ~const PartialEq + ~const std::cmp::PartialEq>(t: &T) -> bool {
|
||||||
| ++++++++++++++++++++++++++++
|
| ++++++++++++++++++++++++++++
|
||||||
|
@ -62,7 +62,7 @@ LL | *t == *t
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `~const std::cmp::PartialEq`
|
||||||
|
|
|
|
||||||
LL | const fn equals_self2<T: A + ~const PartialEq + ~const std::cmp::PartialEq>(t: &T) -> bool {
|
LL | const fn equals_self2<T: A + ~const PartialEq + ~const std::cmp::PartialEq>(t: &T) -> bool {
|
||||||
| ++++++++++++++++++++++++++++
|
| ++++++++++++++++++++++++++++
|
||||||
|
|
|
@ -5,7 +5,7 @@ LL | *t == *t
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `~const std::cmp::PartialEq`
|
||||||
|
|
|
|
||||||
LL | pub const fn equals_self<T: PartialEq + ~const std::cmp::PartialEq>(t: &T) -> bool {
|
LL | pub const fn equals_self<T: PartialEq + ~const std::cmp::PartialEq>(t: &T) -> bool {
|
||||||
| ++++++++++++++++++++++++++++
|
| ++++++++++++++++++++++++++++
|
||||||
|
|
|
@ -28,7 +28,7 @@ LL | *t == *t
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `~const std::cmp::PartialEq`
|
||||||
|
|
|
|
||||||
LL | const fn equals_self<T: ~const PartialEq + ~const std::cmp::PartialEq>(t: &T) -> bool {
|
LL | const fn equals_self<T: ~const PartialEq + ~const std::cmp::PartialEq>(t: &T) -> bool {
|
||||||
| ++++++++++++++++++++++++++++
|
| ++++++++++++++++++++++++++++
|
||||||
|
|
|
@ -19,7 +19,7 @@ LL | x(())
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
|
|
||||||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `~const FnOnce(())`
|
||||||
|
|
|
|
||||||
LL | const fn need_const_closure<T: ~const FnOnce(()) -> i32 + ~const FnOnce(())>(x: T) -> i32 {
|
LL | const fn need_const_closure<T: ~const FnOnce(()) -> i32 + ~const FnOnce(())>(x: T) -> i32 {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -19,7 +19,7 @@ LL | x(())
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
|
|
||||||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `~const FnOnce(())`
|
||||||
|
|
|
|
||||||
LL | const fn need_const_closure<T: ~const FnOnce(()) -> i32 + ~const FnOnce(())>(x: T) -> i32 {
|
LL | const fn need_const_closure<T: ~const FnOnce(()) -> i32 + ~const FnOnce(())>(x: T) -> i32 {
|
||||||
| +++++++++++++++++++
|
| +++++++++++++++++++
|
||||||
|
|
|
@ -61,7 +61,7 @@ LL | f() + f()
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
|
||||||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `~const Fn()`
|
||||||
|
|
|
|
||||||
LL | const fn answer<F: ~const Fn() -> u8 + ~const Fn()>(f: &F) -> u8 {
|
LL | const fn answer<F: ~const Fn() -> u8 + ~const Fn()>(f: &F) -> u8 {
|
||||||
| +++++++++++++
|
| +++++++++++++
|
||||||
|
@ -73,7 +73,7 @@ LL | f() + f()
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
|
||||||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `~const Fn()`
|
||||||
|
|
|
|
||||||
LL | const fn answer<F: ~const Fn() -> u8 + ~const Fn()>(f: &F) -> u8 {
|
LL | const fn answer<F: ~const Fn() -> u8 + ~const Fn()>(f: &F) -> u8 {
|
||||||
| +++++++++++++
|
| +++++++++++++
|
||||||
|
@ -85,7 +85,7 @@ LL | f() * 7
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
|
||||||
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `~const Fn()`
|
||||||
|
|
|
|
||||||
LL | F: ~const FnOnce() -> u8 + ~const Fn(),
|
LL | F: ~const FnOnce() -> u8 + ~const Fn(),
|
||||||
| +++++++++++++
|
| +++++++++++++
|
||||||
|
|
|
@ -33,7 +33,7 @@ note: required by a bound in `Foo::b`
|
||||||
|
|
|
|
||||||
LL | fn b() where Self: ~const Bar;
|
LL | fn b() where Self: ~const Bar;
|
||||||
| ^^^^^^^^^^ required by this bound in `Foo::b`
|
| ^^^^^^^^^^ required by this bound in `Foo::b`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Bar`
|
||||||
|
|
|
|
||||||
LL | fn test1<T: Foo + Bar>() {
|
LL | fn test1<T: Foo + Bar>() {
|
||||||
| +++++
|
| +++++
|
||||||
|
@ -49,7 +49,7 @@ note: required by a bound in `Foo::c`
|
||||||
|
|
|
|
||||||
LL | fn c<T: ~const Bar>();
|
LL | fn c<T: ~const Bar>();
|
||||||
| ^^^^^^^^^^ required by this bound in `Foo::c`
|
| ^^^^^^^^^^ required by this bound in `Foo::c`
|
||||||
help: consider further restricting this bound
|
help: consider further restricting this bound with trait `Bar`
|
||||||
|
|
|
|
||||||
LL | fn test1<T: Foo + Bar>() {
|
LL | fn test1<T: Foo + Bar>() {
|
||||||
| +++++
|
| +++++
|
||||||
|
|
|
@ -14,7 +14,7 @@ LL | T: TraitFoo,
|
||||||
| -------- unsatisfied trait bound introduced here
|
| -------- unsatisfied trait bound introduced here
|
||||||
note: required by a bound in `Copy`
|
note: required by a bound in `Copy`
|
||||||
--> $SRC_DIR/core/src/marker.rs:LL:COL
|
--> $SRC_DIR/core/src/marker.rs:LL:COL
|
||||||
help: consider restricting type parameter `T`
|
help: consider restricting type parameter `T` with trait `TraitFoo`
|
||||||
|
|
|
|
||||||
LL | impl<T: TraitFoo> Copy for Foo<T> {}
|
LL | impl<T: TraitFoo> Copy for Foo<T> {}
|
||||||
| ++++++++++
|
| ++++++++++
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue