mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Point at source of trait bound obligations in more places
Be more thorough in using `ItemObligation` and `BindingObligation` when evaluating obligations so that we can point at trait bounds that introduced unfulfilled obligations. We no longer incorrectly point at unrelated trait bounds (`substs-ppaux.verbose.stderr`). In particular, we now point at trait bounds on method calls. We no longer point at "obvious" obligation sources (we no longer have a note pointing at `Trait` saying "required by a bound in `Trait`", like in `associated-types-no-suitable-supertrait*`). Address part of #89418.
This commit is contained in:
parent
93542a8240
commit
6b9d910639
@ -2113,10 +2113,19 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||
None
|
||||
},
|
||||
self.tcx.generics_of(owner.to_def_id()),
|
||||
hir.span(hir_id),
|
||||
)
|
||||
});
|
||||
|
||||
let span = match generics {
|
||||
// This is to get around the trait identity obligation, that has a `DUMMY_SP` as signal
|
||||
// for other diagnostics, so we need to recover it here.
|
||||
Some((_, _, node)) if span.is_dummy() => node,
|
||||
_ => span,
|
||||
};
|
||||
|
||||
let type_param_span = match (generics, bound_kind) {
|
||||
(Some((_, ref generics)), GenericKind::Param(ref param)) => {
|
||||
(Some((_, ref generics, _)), GenericKind::Param(ref param)) => {
|
||||
// Account for the case where `param` corresponds to `Self`,
|
||||
// which doesn't have the expected type argument.
|
||||
if !(generics.has_self && param.index == 0) {
|
||||
@ -2153,7 +2162,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||
};
|
||||
let new_lt = generics
|
||||
.as_ref()
|
||||
.and_then(|(parent_g, g)| {
|
||||
.and_then(|(parent_g, g, _)| {
|
||||
let mut possible = (b'a'..=b'z').map(|c| format!("'{}", c as char));
|
||||
let mut lts_names = g
|
||||
.params
|
||||
@ -2175,7 +2184,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||
.unwrap_or("'lt".to_string());
|
||||
let add_lt_sugg = generics
|
||||
.as_ref()
|
||||
.and_then(|(_, g)| g.params.first())
|
||||
.and_then(|(_, g, _)| g.params.first())
|
||||
.and_then(|param| param.def_id.as_local())
|
||||
.map(|def_id| {
|
||||
(
|
||||
|
@ -192,14 +192,16 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
||||
ObligationCauseCode::MatchImpl(parent, ..) => &parent.code,
|
||||
_ => &cause.code,
|
||||
};
|
||||
if let ObligationCauseCode::ItemObligation(item_def_id) = *code {
|
||||
if let (ObligationCauseCode::ItemObligation(item_def_id), None) =
|
||||
(code, override_error_code)
|
||||
{
|
||||
// Same case of `impl Foo for dyn Bar { fn qux(&self) {} }` introducing a `'static`
|
||||
// lifetime as above, but called using a fully-qualified path to the method:
|
||||
// `Foo::qux(bar)`.
|
||||
let mut v = TraitObjectVisitor(FxHashSet::default());
|
||||
v.visit_ty(param.param_ty);
|
||||
if let Some((ident, self_ty)) =
|
||||
self.get_impl_ident_and_self_ty_from_trait(item_def_id, &v.0)
|
||||
self.get_impl_ident_and_self_ty_from_trait(*item_def_id, &v.0)
|
||||
{
|
||||
if self.suggest_constrain_dyn_trait_in_impl(&mut err, &v.0, ident, self_ty) {
|
||||
override_error_code = Some(ident);
|
||||
|
@ -9,7 +9,9 @@ use rustc_middle::ty::subst::{GenericArg, Subst, SubstsRef};
|
||||
use rustc_middle::ty::{self, ToPredicate, Ty, TyCtxt, TypeFoldable, WithConstness};
|
||||
|
||||
use super::{Normalized, Obligation, ObligationCause, PredicateObligation, SelectionContext};
|
||||
pub use rustc_infer::traits::util::*;
|
||||
pub use rustc_infer::traits::{self, util::*};
|
||||
|
||||
use std::iter;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// `TraitAliasExpander` iterator
|
||||
@ -229,11 +231,16 @@ pub fn predicates_for_generics<'tcx>(
|
||||
) -> impl Iterator<Item = PredicateObligation<'tcx>> {
|
||||
debug!("predicates_for_generics(generic_bounds={:?})", generic_bounds);
|
||||
|
||||
generic_bounds.predicates.into_iter().map(move |predicate| Obligation {
|
||||
cause: cause.clone(),
|
||||
recursion_depth,
|
||||
param_env,
|
||||
predicate,
|
||||
iter::zip(generic_bounds.predicates, generic_bounds.spans).map(move |(predicate, span)| {
|
||||
let cause = match cause.code {
|
||||
traits::ItemObligation(def_id) if !span.is_dummy() => traits::ObligationCause::new(
|
||||
cause.span,
|
||||
cause.body_id,
|
||||
traits::BindingObligation(def_id, span),
|
||||
),
|
||||
_ => cause.clone(),
|
||||
};
|
||||
Obligation { cause, recursion_depth, param_env, predicate }
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -709,7 +709,12 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
|
||||
|
||||
iter::zip(iter::zip(predicates.predicates, predicates.spans), origins.into_iter().rev())
|
||||
.map(|((pred, span), origin_def_id)| {
|
||||
let cause = self.cause(traits::BindingObligation(origin_def_id, span));
|
||||
let code = if span.is_dummy() {
|
||||
traits::MiscObligation
|
||||
} else {
|
||||
traits::BindingObligation(origin_def_id, span)
|
||||
};
|
||||
let cause = self.cause(code);
|
||||
traits::Obligation::with_depth(cause, self.recursion_depth, self.param_env, pred)
|
||||
})
|
||||
.filter(|pred| !pred.has_escaping_bound_vars())
|
||||
|
@ -1385,12 +1385,13 @@ pub fn check_type_bounds<'tcx>(
|
||||
|
||||
let impl_ty_hir_id = tcx.hir().local_def_id_to_hir_id(impl_ty.def_id.expect_local());
|
||||
let normalize_cause = traits::ObligationCause::misc(impl_ty_span, impl_ty_hir_id);
|
||||
let mk_cause = |span| {
|
||||
ObligationCause::new(
|
||||
impl_ty_span,
|
||||
impl_ty_hir_id,
|
||||
ObligationCauseCode::BindingObligation(trait_ty.def_id, span),
|
||||
)
|
||||
let mk_cause = |span: Span| {
|
||||
let code = if span.is_dummy() {
|
||||
traits::MiscObligation
|
||||
} else {
|
||||
traits::BindingObligation(trait_ty.def_id, span)
|
||||
};
|
||||
ObligationCause::new(impl_ty_span, impl_ty_hir_id, code)
|
||||
};
|
||||
|
||||
let obligations = tcx
|
||||
|
@ -586,38 +586,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Given a fully substituted set of bounds (`generic_bounds`), and the values with which each
|
||||
/// type/region parameter was instantiated (`substs`), creates and registers suitable
|
||||
/// trait/region obligations.
|
||||
///
|
||||
/// For example, if there is a function:
|
||||
///
|
||||
/// ```
|
||||
/// fn foo<'a,T:'a>(...)
|
||||
/// ```
|
||||
///
|
||||
/// and a reference:
|
||||
///
|
||||
/// ```
|
||||
/// let f = foo;
|
||||
/// ```
|
||||
///
|
||||
/// Then we will create a fresh region variable `'$0` and a fresh type variable `$1` for `'a`
|
||||
/// and `T`. This routine will add a region obligation `$1:'$0` and register it locally.
|
||||
pub fn add_obligations_for_parameters(
|
||||
&self,
|
||||
cause: traits::ObligationCause<'tcx>,
|
||||
predicates: ty::InstantiatedPredicates<'tcx>,
|
||||
) {
|
||||
assert!(!predicates.has_escaping_bound_vars());
|
||||
|
||||
debug!("add_obligations_for_parameters(predicates={:?})", predicates);
|
||||
|
||||
for obligation in traits::predicates_for_generics(cause, self.param_env, predicates) {
|
||||
self.register_predicate(obligation);
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME(arielb1): use this instead of field.ty everywhere
|
||||
// Only for fields! Returns <none> for methods>
|
||||
// Indifferent to privacy flags
|
||||
@ -1522,20 +1490,14 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
|
||||
/// Add all the obligations that are required, substituting and normalized appropriately.
|
||||
#[tracing::instrument(level = "debug", skip(self, span, def_id, substs))]
|
||||
fn add_required_obligations(&self, span: Span, def_id: DefId, substs: &SubstsRef<'tcx>) {
|
||||
let (bounds, spans) = self.instantiate_bounds(span, def_id, &substs);
|
||||
crate fn add_required_obligations(&self, span: Span, def_id: DefId, substs: &SubstsRef<'tcx>) {
|
||||
let (bounds, _) = self.instantiate_bounds(span, def_id, &substs);
|
||||
|
||||
for (i, mut obligation) in traits::predicates_for_generics(
|
||||
for obligation in traits::predicates_for_generics(
|
||||
traits::ObligationCause::new(span, self.body_id, traits::ItemObligation(def_id)),
|
||||
self.param_env,
|
||||
bounds,
|
||||
)
|
||||
.enumerate()
|
||||
{
|
||||
// This makes the error point at the bound, but we want to point at the argument
|
||||
if let Some(span) = spans.get(i) {
|
||||
obligation.cause.make_mut().code = traits::BindingObligation(def_id, *span);
|
||||
}
|
||||
) {
|
||||
self.register_predicate(obligation);
|
||||
}
|
||||
}
|
||||
|
@ -509,10 +509,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||
self.write_user_type_annotation_from_substs(hir_id, did, substs, None);
|
||||
|
||||
// Check bounds on type arguments used in the path.
|
||||
let (bounds, _) = self.instantiate_bounds(path_span, did, substs);
|
||||
let cause =
|
||||
traits::ObligationCause::new(path_span, self.body_id, traits::ItemObligation(did));
|
||||
self.add_obligations_for_parameters(cause, bounds);
|
||||
self.add_required_obligations(path_span, did, substs);
|
||||
|
||||
Some((variant, ty))
|
||||
} else {
|
||||
|
@ -120,7 +120,12 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
|
||||
// We won't add these if we encountered an illegal sized bound, so that we can use
|
||||
// a custom error in that case.
|
||||
if illegal_sized_bound.is_none() {
|
||||
self.add_obligations(self.tcx.mk_fn_ptr(method_sig), all_substs, method_predicates);
|
||||
self.add_obligations(
|
||||
self.tcx.mk_fn_ptr(method_sig),
|
||||
all_substs,
|
||||
method_predicates,
|
||||
pick.item.def_id,
|
||||
);
|
||||
}
|
||||
|
||||
// Create the final `MethodCallee`.
|
||||
@ -471,16 +476,23 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
|
||||
fty: Ty<'tcx>,
|
||||
all_substs: SubstsRef<'tcx>,
|
||||
method_predicates: ty::InstantiatedPredicates<'tcx>,
|
||||
def_id: DefId,
|
||||
) {
|
||||
debug!(
|
||||
"add_obligations: fty={:?} all_substs={:?} method_predicates={:?}",
|
||||
fty, all_substs, method_predicates
|
||||
"add_obligations: fty={:?} all_substs={:?} method_predicates={:?} def_id={:?}",
|
||||
fty, all_substs, method_predicates, def_id
|
||||
);
|
||||
|
||||
self.add_obligations_for_parameters(
|
||||
traits::ObligationCause::misc(self.span, self.body_id),
|
||||
// FIXME: could replace with the following, but we already calculated `method_predicates`,
|
||||
// so we just call `predicates_for_generics` directly to avoid redoing work.
|
||||
// `self.add_required_obligations(self.span, def_id, &all_substs);`
|
||||
for obligation in traits::predicates_for_generics(
|
||||
traits::ObligationCause::new(self.span, self.body_id, traits::ItemObligation(def_id)),
|
||||
self.param_env,
|
||||
method_predicates,
|
||||
);
|
||||
) {
|
||||
self.register_predicate(obligation);
|
||||
}
|
||||
|
||||
// this is a projection from a trait reference, so we have to
|
||||
// make sure that the trait reference inputs are well-formed.
|
||||
|
@ -1990,16 +1990,12 @@ fn predicates_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::GenericPredicates<'_> {
|
||||
// prove that the trait applies to the types that were
|
||||
// used, and adding the predicate into this list ensures
|
||||
// that this is done.
|
||||
let mut span = tcx.def_span(def_id);
|
||||
if tcx.sess.source_map().is_local_span(span) {
|
||||
// `guess_head_span` reads the actual source file from
|
||||
// disk to try to determine the 'head' snippet of the span.
|
||||
// Don't do this for a span that comes from a file outside
|
||||
// of our crate, since this would make our query output
|
||||
// (and overall crate metadata) dependent on the
|
||||
// *current* state of an external file.
|
||||
span = tcx.sess.source_map().guess_head_span(span);
|
||||
}
|
||||
//
|
||||
// We use a DUMMY_SP here as a way to signal trait bounds that come
|
||||
// from the trait itself that *shouldn't* be shown as the source of
|
||||
// an obligation and instead be skipped. Otherwise we'd use
|
||||
// `tcx.def_span(def_id);`
|
||||
let span = rustc_span::DUMMY_SP;
|
||||
result.predicates =
|
||||
tcx.arena.alloc_from_iter(result.predicates.iter().copied().chain(std::iter::once((
|
||||
ty::TraitRef::identity(tcx, def_id).without_const().to_predicate(tcx),
|
||||
|
@ -5,13 +5,6 @@ LL | type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8
|
||||
| ^^^^ `<<Self as Case1>::C as Iterator>::Item` cannot be sent between threads safely
|
||||
|
|
||||
= help: the trait `Send` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
|
||||
note: required by a bound in `Send`
|
||||
--> $SRC_DIR/core/src/marker.rs:LL:COL
|
||||
|
|
||||
LL | / pub unsafe auto trait Send {
|
||||
LL | | // empty.
|
||||
LL | | }
|
||||
| |_^ required by this bound in `Send`
|
||||
help: consider further restricting the associated type
|
||||
|
|
||||
LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Send {
|
||||
@ -24,17 +17,6 @@ LL | type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `<<Self as Case1>::C as Iterator>::Item` is not an iterator
|
||||
|
|
||||
= help: the trait `Iterator` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
|
||||
note: required by a bound in `Iterator`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
LL | / pub trait Iterator {
|
||||
LL | | /// The type of the elements being iterated over.
|
||||
LL | | #[stable(feature = "rust1", since = "1.0.0")]
|
||||
LL | | type Item;
|
||||
... |
|
||||
LL | | }
|
||||
LL | | }
|
||||
| |_^ required by this bound in `Iterator`
|
||||
help: consider further restricting the associated type
|
||||
|
|
||||
LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Iterator {
|
||||
@ -47,17 +29,6 @@ LL | type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8
|
||||
| ^^^^ `<<Self as Case1>::C as Iterator>::Item` cannot be shared between threads safely
|
||||
|
|
||||
= help: the trait `Sync` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
|
||||
note: required by a bound in `Sync`
|
||||
--> $SRC_DIR/core/src/marker.rs:LL:COL
|
||||
|
|
||||
LL | / pub unsafe auto trait Sync {
|
||||
LL | | // FIXME(estebank): once support to add notes in `rustc_on_unimplemented`
|
||||
LL | | // lands in beta, and it has been extended to check whether a closure is
|
||||
LL | | // anywhere in the requirement chain, extend it as such (#48534):
|
||||
... |
|
||||
LL | | // Empty
|
||||
LL | | }
|
||||
| |_^ required by this bound in `Sync`
|
||||
help: consider further restricting the associated type
|
||||
|
|
||||
LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Sync {
|
||||
|
@ -5,17 +5,6 @@ LL | type A: Iterator<Item: Debug>;
|
||||
| ^^^^^ `<<Self as Case1>::A as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
||||
|
|
||||
= help: the trait `Debug` is not implemented for `<<Self as Case1>::A as Iterator>::Item`
|
||||
note: required by a bound in `Debug`
|
||||
--> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
|
|
||||
LL | / pub trait Debug {
|
||||
LL | | /// Formats the value using the given formatter.
|
||||
LL | | ///
|
||||
LL | | /// # Examples
|
||||
... |
|
||||
LL | | fn fmt(&self, f: &mut Formatter<'_>) -> Result;
|
||||
LL | | }
|
||||
| |_^ required by this bound in `Debug`
|
||||
help: consider further restricting the associated type
|
||||
|
|
||||
LL | trait Case1 where <<Self as Case1>::A as Iterator>::Item: Debug {
|
||||
@ -27,17 +16,6 @@ error[E0277]: the trait bound `<<Self as Foo>::Out as Baz>::Assoc: Default` is n
|
||||
LL | pub trait Foo { type Out: Baz<Assoc: Default>; }
|
||||
| ^^^^^^^ the trait `Default` is not implemented for `<<Self as Foo>::Out as Baz>::Assoc`
|
||||
|
|
||||
note: required by a bound in `Default`
|
||||
--> $SRC_DIR/core/src/default.rs:LL:COL
|
||||
|
|
||||
LL | / pub trait Default: Sized {
|
||||
LL | | /// Returns the "default value" for a type.
|
||||
LL | | ///
|
||||
LL | | /// Default values are often some kind of initial value, identity value, or anything else that
|
||||
... |
|
||||
LL | | fn default() -> Self;
|
||||
LL | | }
|
||||
| |_^ required by this bound in `Default`
|
||||
help: consider further restricting the associated type
|
||||
|
|
||||
LL | pub trait Foo where <<Self as Foo>::Out as Baz>::Assoc: Default { type Out: Baz<Assoc: Default>; }
|
||||
|
@ -4,11 +4,6 @@ error[E0277]: the trait bound `Self: Get` is not satisfied
|
||||
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `Self`
|
||||
|
|
||||
note: required by a bound in `Get`
|
||||
--> $DIR/associated-types-for-unimpl-trait.rs:4:1
|
||||
|
|
||||
LL | trait Get {
|
||||
| ^^^^^^^^^ required by this bound in `Get`
|
||||
help: consider further restricting `Self`
|
||||
|
|
||||
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
|
||||
|
@ -4,11 +4,6 @@ error[E0277]: the trait bound `T: Get` is not satisfied
|
||||
LL | fn uhoh<T>(foo: <T as Get>::Value) {}
|
||||
| ^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `T`
|
||||
|
|
||||
note: required by a bound in `Get`
|
||||
--> $DIR/associated-types-no-suitable-bound.rs:1:1
|
||||
|
|
||||
LL | trait Get {
|
||||
| ^^^^^^^^^ required by this bound in `Get`
|
||||
help: consider restricting type parameter `T`
|
||||
|
|
||||
LL | fn uhoh<T: Get>(foo: <T as Get>::Value) {}
|
||||
|
@ -4,11 +4,6 @@ error[E0277]: the trait bound `Self: Get` is not satisfied
|
||||
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `Self`
|
||||
|
|
||||
note: required by a bound in `Get`
|
||||
--> $DIR/associated-types-no-suitable-supertrait-2.rs:12:1
|
||||
|
|
||||
LL | trait Get {
|
||||
| ^^^^^^^^^ required by this bound in `Get`
|
||||
help: consider further restricting `Self`
|
||||
|
|
||||
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
|
||||
|
@ -4,11 +4,6 @@ error[E0277]: the trait bound `Self: Get` is not satisfied
|
||||
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `Self`
|
||||
|
|
||||
note: required by a bound in `Get`
|
||||
--> $DIR/associated-types-no-suitable-supertrait.rs:12:1
|
||||
|
|
||||
LL | trait Get {
|
||||
| ^^^^^^^^^ required by this bound in `Get`
|
||||
help: consider further restricting `Self`
|
||||
|
|
||||
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
|
||||
@ -19,12 +14,6 @@ error[E0277]: the trait bound `(T, U): Get` is not satisfied
|
||||
|
|
||||
LL | fn uhoh<U:Get>(&self, foo: U, bar: <(T, U) as Get>::Value) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `(T, U)`
|
||||
|
|
||||
note: required by a bound in `Get`
|
||||
--> $DIR/associated-types-no-suitable-supertrait.rs:12:1
|
||||
|
|
||||
LL | trait Get {
|
||||
| ^^^^^^^^^ required by this bound in `Get`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -4,11 +4,6 @@ error[E0277]: the trait bound `Self: Get` is not satisfied
|
||||
LL | fn okay<U:Get>(&self, foo: U, bar: <Self as Get>::Value);
|
||||
| ^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `Self`
|
||||
|
|
||||
note: required by a bound in `Get`
|
||||
--> $DIR/associated-types-projection-to-unrelated-trait-in-method-without-default.rs:5:1
|
||||
|
|
||||
LL | trait Get {
|
||||
| ^^^^^^^^^ required by this bound in `Get`
|
||||
help: consider further restricting `Self`
|
||||
|
|
||||
LL | fn okay<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get;
|
||||
|
@ -12,11 +12,11 @@ note: required because it appears within the type `Sleep`
|
||||
|
|
||||
LL | struct Sleep(std::marker::PhantomPinned);
|
||||
| ^^^^^
|
||||
note: required by `Pin::<P>::new`
|
||||
note: required by a bound in `Pin::<P>::new`
|
||||
--> $SRC_DIR/core/src/pin.rs:LL:COL
|
||||
|
|
||||
LL | pub const fn new(pointer: P) -> Pin<P> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | impl<P: Deref<Target: Unpin>> Pin<P> {
|
||||
| ^^^^^ required by this bound in `Pin::<P>::new`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -7,11 +7,11 @@ LL | let _ = Box::into_boxed_slice(boxed_slice);
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the trait `Sized` is not implemented for `[u8]`
|
||||
note: required by `Box::<T, A>::into_boxed_slice`
|
||||
note: required by a bound in `Box::<T, A>::into_boxed_slice`
|
||||
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
|
||||
|
|
||||
LL | pub fn into_boxed_slice(boxed: Self) -> Box<[T], A> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | impl<T, A: Allocator> Box<T, A> {
|
||||
| ^ required by this bound in `Box::<T, A>::into_boxed_slice`
|
||||
|
||||
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
|
||||
--> $DIR/into-boxed-slice-fail.rs:7:13
|
||||
@ -31,11 +31,11 @@ LL | let _ = Box::into_boxed_slice(boxed_trait);
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the trait `Sized` is not implemented for `dyn Debug`
|
||||
note: required by `Box::<T, A>::into_boxed_slice`
|
||||
note: required by a bound in `Box::<T, A>::into_boxed_slice`
|
||||
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
|
||||
|
|
||||
LL | pub fn into_boxed_slice(boxed: Self) -> Box<[T], A> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | impl<T, A: Allocator> Box<T, A> {
|
||||
| ^ required by this bound in `Box::<T, A>::into_boxed_slice`
|
||||
|
||||
error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time
|
||||
--> $DIR/into-boxed-slice-fail.rs:11:13
|
||||
|
@ -7,11 +7,11 @@ LL | let s = S {
|
||||
= help: the following implementations were found:
|
||||
<Option<T> as Foo>
|
||||
<i32 as Foo>
|
||||
note: required by `S`
|
||||
--> $DIR/type_wf.rs:6:1
|
||||
note: required by a bound in `S`
|
||||
--> $DIR/type_wf.rs:6:13
|
||||
|
|
||||
LL | struct S<T: Foo> {
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
| ^^^ required by this bound in `S`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -8,6 +8,11 @@ LL | let y = x.or_else(4);
|
||||
|
|
||||
= help: the trait `FnOnce<()>` is not implemented for `{integer}`
|
||||
= note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
|
||||
note: required by a bound in `Option::<T>::or_else`
|
||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||
|
|
||||
LL | pub fn or_else<F: FnOnce() -> Option<T>>(self, f: F) -> Option<T> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::or_else`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -7,6 +7,11 @@ LL | let x: Option<&[u8]> = Some("foo").map(std::mem::transmute);
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the trait `FnOnce<(&str,)>` is not implemented for `unsafe extern "rust-intrinsic" fn(_) -> _ {transmute::<_, _>}`
|
||||
note: required by a bound in `Option::<T>::map`
|
||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||
|
|
||||
LL | pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Option<U> {
|
||||
| ^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -12,11 +12,6 @@ LL | impl<T: AB> C for T {}
|
||||
LL | #[rustc_strict_coherence]
|
||||
LL | impl C for u32 {}
|
||||
| ^^^^^^^^^^^^^^
|
||||
note: required by a bound in `C`
|
||||
--> $DIR/coherence-overlap-trait-alias.rs:11:1
|
||||
|
|
||||
LL | trait C {}
|
||||
| ^^^^^^^ required by this bound in `C`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -41,11 +41,6 @@ LL | IsLessOrEqual<I, 8>: True,
|
||||
| ^^^^ cannot infer type for struct `IsLessOrEqual<I, 8_u32>`
|
||||
|
|
||||
= note: cannot satisfy `IsLessOrEqual<I, 8_u32>: True`
|
||||
note: required by a bound in `True`
|
||||
--> $DIR/issue-72787.rs:8:1
|
||||
|
|
||||
LL | pub trait True {}
|
||||
| ^^^^^^^^^^^^^^ required by this bound in `True`
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/issue-72787.rs:21:26
|
||||
@ -54,11 +49,6 @@ LL | IsLessOrEqual<I, 8>: True,
|
||||
| ^^^^ cannot infer type for struct `IsLessOrEqual<I, 8_u32>`
|
||||
|
|
||||
= note: cannot satisfy `IsLessOrEqual<I, 8_u32>: True`
|
||||
note: required by a bound in `True`
|
||||
--> $DIR/issue-72787.rs:8:1
|
||||
|
|
||||
LL | pub trait True {}
|
||||
| ^^^^^^^^^^^^^^ required by this bound in `True`
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
@ -14,6 +14,11 @@ LL | self.reference.size()
|
||||
| ^^^^
|
||||
|
|
||||
= help: try adding a `where` bound using this expression: `where [(); Self::DIM]:`
|
||||
note: required by a bound in `TensorSize::size`
|
||||
--> $DIR/issue-83765.rs:9:31
|
||||
|
|
||||
LL | fn size(&self) -> [usize; Self::DIM];
|
||||
| ^^^^^^^^^ required by this bound in `TensorSize::size`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-83765.rs:32:9
|
||||
|
@ -6,13 +6,11 @@ LL | let _ = A;
|
||||
|
|
||||
= help: the following implementations were found:
|
||||
<A<7_usize> as Bar<N>>
|
||||
note: required by `A`
|
||||
--> $DIR/unused-substs-1.rs:7:1
|
||||
note: required by a bound in `A`
|
||||
--> $DIR/unused-substs-1.rs:9:11
|
||||
|
|
||||
LL | / struct A<const N: usize>
|
||||
LL | | where
|
||||
LL | | A<N>: Bar<N>;
|
||||
| |_________________^
|
||||
LL | A<N>: Bar<N>;
|
||||
| ^^^^^^ required by this bound in `A`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -7,11 +7,11 @@ LL | #[derive(Hash)]
|
||||
LL | x: Error
|
||||
| ^^^^^^^^ the trait `Hash` is not implemented for `Error`
|
||||
|
|
||||
note: required by a bound in `std::hash::Hash::hash`
|
||||
note: required by `std::hash::Hash::hash`
|
||||
--> $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn hash<H: Hasher>(&self, state: &mut H);
|
||||
| ^ required by this bound in `std::hash::Hash::hash`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -7,11 +7,11 @@ LL | #[derive(Hash)]
|
||||
LL | Error
|
||||
| ^^^^^ the trait `Hash` is not implemented for `Error`
|
||||
|
|
||||
note: required by a bound in `std::hash::Hash::hash`
|
||||
note: required by `std::hash::Hash::hash`
|
||||
--> $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn hash<H: Hasher>(&self, state: &mut H);
|
||||
| ^ required by this bound in `std::hash::Hash::hash`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -7,11 +7,11 @@ LL | struct Struct {
|
||||
LL | x: Error
|
||||
| ^^^^^^^^ the trait `Hash` is not implemented for `Error`
|
||||
|
|
||||
note: required by a bound in `std::hash::Hash::hash`
|
||||
note: required by `std::hash::Hash::hash`
|
||||
--> $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn hash<H: Hasher>(&self, state: &mut H);
|
||||
| ^ required by this bound in `std::hash::Hash::hash`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -7,11 +7,11 @@ LL | struct Struct(
|
||||
LL | Error
|
||||
| ^^^^^ the trait `Hash` is not implemented for `Error`
|
||||
|
|
||||
note: required by a bound in `std::hash::Hash::hash`
|
||||
note: required by `std::hash::Hash::hash`
|
||||
--> $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn hash<H: Hasher>(&self, state: &mut H);
|
||||
| ^ required by this bound in `std::hash::Hash::hash`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -7,6 +7,11 @@ LL | f1.foo(1usize);
|
||||
= help: the following implementations were found:
|
||||
<Bar as Foo<i32>>
|
||||
<Bar as Foo<u8>>
|
||||
note: required by `Foo::foo`
|
||||
--> $DIR/issue-21659-show-relevant-trait-impls-1.rs:2:5
|
||||
|
|
||||
LL | fn foo(&self, a: A) -> A {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -10,6 +10,11 @@ LL | f1.foo(1usize);
|
||||
<Bar as Foo<i8>>
|
||||
<Bar as Foo<u16>>
|
||||
and 2 others
|
||||
note: required by `Foo::foo`
|
||||
--> $DIR/issue-21659-show-relevant-trait-impls-2.rs:2:5
|
||||
|
|
||||
LL | fn foo(&self, a: A) -> A {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -12,11 +12,6 @@ LL | impl<T> Foo for T where Bar<T>: Foo {}
|
||||
| ^^^ ^
|
||||
= note: 127 redundant requirements hidden
|
||||
= note: required because of the requirements on the impl of `Foo` for `Bar<T>`
|
||||
note: required by a bound in `Foo`
|
||||
--> $DIR/E0275.rs:1:1
|
||||
|
|
||||
LL | trait Foo {}
|
||||
| ^^^^^^^^^ required by this bound in `Foo`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -29,6 +29,11 @@ LL | impl Into<u32> for Impl {
|
||||
= note: and another `impl` found in the `core` crate:
|
||||
- impl<T, U> Into<U> for T
|
||||
where U: From<T>;
|
||||
note: required by `into`
|
||||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn into(self) -> T;
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -20,6 +20,11 @@ LL | | });
|
||||
| |_____^ expected an `FnOnce<({integer},)>` closure, found `Option<_>`
|
||||
|
|
||||
= help: the trait `FnOnce<({integer},)>` is not implemented for `Option<_>`
|
||||
note: required by a bound in `Option::<T>::and_then`
|
||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||
|
|
||||
LL | pub fn and_then<U, F: FnOnce(T) -> Option<U>>(self, f: F) -> Option<U> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Option::<T>::and_then`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -139,13 +139,6 @@ error[E0277]: the trait bound `<<Self as _Tr3>::A as Iterator>::Item: Copy` is n
|
||||
LL | type A: Iterator<Item: Copy>;
|
||||
| ^^^^ the trait `Copy` is not implemented for `<<Self as _Tr3>::A as Iterator>::Item`
|
||||
|
|
||||
note: required by a bound in `Copy`
|
||||
--> $SRC_DIR/core/src/marker.rs:LL:COL
|
||||
|
|
||||
LL | / pub trait Copy: Clone {
|
||||
LL | | // Empty.
|
||||
LL | | }
|
||||
| |_^ required by this bound in `Copy`
|
||||
help: consider further restricting the associated type
|
||||
|
|
||||
LL | trait _Tr3 where <<Self as _Tr3>::A as Iterator>::Item: Copy {
|
||||
|
@ -11,8 +11,9 @@ LL | | {
|
||||
... |
|
||||
LL | |
|
||||
LL | | }
|
||||
| |_^ ...so that the type `T` will meet its required lifetime bounds...
|
||||
| |_^
|
||||
|
|
||||
= note: ...so that the type `T` will meet its required lifetime bounds...
|
||||
note: ...that is required by this bound
|
||||
--> $DIR/issue-86483.rs:7:16
|
||||
|
|
||||
|
@ -2,12 +2,20 @@ error[E0271]: type mismatch resolving `for<'r> <L<[closure@$DIR/issue-62203-hrtb
|
||||
--> $DIR/issue-62203-hrtb-ice.rs:38:19
|
||||
|
|
||||
LL | let v = Unit2.m(
|
||||
| ^ expected struct `Unit4`, found associated type
|
||||
| ^ expected associated type, found struct `Unit4`
|
||||
|
|
||||
= note: expected struct `Unit4`
|
||||
found associated type `<_ as Ty<'_>>::V`
|
||||
= help: consider constraining the associated type `<_ as Ty<'_>>::V` to `Unit4`
|
||||
= note: expected associated type `<_ as Ty<'_>>::V`
|
||||
found struct `Unit4`
|
||||
= help: consider constraining the associated type `<_ as Ty<'_>>::V` to `Unit4` or calling a method that returns `<_ as Ty<'_>>::V`
|
||||
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
|
||||
note: required by a bound in `T1::m`
|
||||
--> $DIR/issue-62203-hrtb-ice.rs:27:51
|
||||
|
|
||||
LL | fn m<'a, B: Ty<'a>, F>(&self, f: F) -> Unit1
|
||||
| - required by a bound in this
|
||||
LL | where
|
||||
LL | F: for<'r> T0<'r, (<Self as Ty<'r>>::V,), O = <B as Ty<'r>>::V>,
|
||||
| ^^^^^^^^^^^^^^^^^^^^ required by this bound in `T1::m`
|
||||
|
||||
error[E0271]: type mismatch resolving `for<'r> <[closure@$DIR/issue-62203-hrtb-ice.rs:42:17: 42:39] as FnOnce<((&'r u8,),)>>::Output == Unit3`
|
||||
--> $DIR/issue-62203-hrtb-ice.rs:40:9
|
||||
@ -19,13 +27,21 @@ LL | / L {
|
||||
LL | |
|
||||
LL | | f : |x| { drop(x); Unit4 }
|
||||
LL | | });
|
||||
| |_________^ expected struct `Unit4`, found struct `Unit3`
|
||||
| |_________^ expected struct `Unit3`, found struct `Unit4`
|
||||
|
|
||||
note: required because of the requirements on the impl of `for<'r> T0<'r, (&'r u8,)>` for `L<[closure@$DIR/issue-62203-hrtb-ice.rs:42:17: 42:39]>`
|
||||
--> $DIR/issue-62203-hrtb-ice.rs:17:16
|
||||
|
|
||||
LL | impl<'a, A, T> T0<'a, A> for L<T>
|
||||
| ^^^^^^^^^ ^^^^
|
||||
note: required by a bound in `T1::m`
|
||||
--> $DIR/issue-62203-hrtb-ice.rs:27:12
|
||||
|
|
||||
LL | fn m<'a, B: Ty<'a>, F>(&self, f: F) -> Unit1
|
||||
| - required by a bound in this
|
||||
LL | where
|
||||
LL | F: for<'r> T0<'r, (<Self as Ty<'r>>::V,), O = <B as Ty<'r>>::V>,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `T1::m`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -10,6 +10,15 @@ LL | .get(&"key".into())
|
||||
- impl Borrow<str> for String;
|
||||
- impl<T> Borrow<T> for T
|
||||
where T: ?Sized;
|
||||
note: required by a bound in `HashMap::<K, V, S>::get`
|
||||
--> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
|
||||
|
|
||||
LL | K: Borrow<Q>,
|
||||
| ^^^^^^^^^ required by this bound in `HashMap::<K, V, S>::get`
|
||||
help: consider specifying the type argument in the function call
|
||||
|
|
||||
LL | .get::<Q>(&"key".into())
|
||||
| +++++
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -7,11 +7,11 @@ LL | (|| Box::new(*(&[0][..])))();
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the trait `Sized` is not implemented for `[{integer}]`
|
||||
note: required by `Box::<T>::new`
|
||||
note: required by a bound in `Box::<T>::new`
|
||||
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL
|
||||
|
|
||||
LL | pub fn new(x: T) -> Self {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | impl<T> Box<T> {
|
||||
| ^ required by this bound in `Box::<T>::new`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -12,6 +12,11 @@ LL | impl<'a, T, S> Set<&'a [T]> for S where
|
||||
| ^^^^^^^^^^^^ ^
|
||||
= note: 128 redundant requirements hidden
|
||||
= note: required because of the requirements on the impl of `Set<&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[&[_]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>` for `{integer}`
|
||||
note: required by `Set::contains`
|
||||
--> $DIR/issue-18400.rs:2:5
|
||||
|
|
||||
LL | fn contains(&self, _: T) -> bool;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -3,12 +3,6 @@ error[E0277]: the trait bound `isize: HasState` is not satisfied
|
||||
|
|
||||
LL | fn add_state(op: <isize as HasState>::State) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `HasState` is not implemented for `isize`
|
||||
|
|
||||
note: required by a bound in `HasState`
|
||||
--> $DIR/issue-18611.rs:5:1
|
||||
|
|
||||
LL | trait HasState {
|
||||
| ^^^^^^^^^^^^^^ required by this bound in `HasState`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -3,6 +3,12 @@ error[E0277]: the trait bound `X: Ord` is not satisfied
|
||||
|
|
||||
LL | b.sort();
|
||||
| ^^^^ the trait `Ord` is not implemented for `X`
|
||||
|
|
||||
note: required by a bound in `slice::<impl [T]>::sort`
|
||||
--> $SRC_DIR/alloc/src/slice.rs:LL:COL
|
||||
|
|
||||
LL | T: Ord,
|
||||
| ^^^ required by this bound in `slice::<impl [T]>::sort`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -21,11 +21,6 @@ LL | impl<T> Foo for T where NoData<T>: Foo {
|
||||
| ^^^ ^
|
||||
= note: 127 redundant requirements hidden
|
||||
= note: required because of the requirements on the impl of `Foo` for `NoData<T>`
|
||||
note: required by a bound in `Foo`
|
||||
--> $DIR/issue-20413.rs:1:1
|
||||
|
|
||||
LL | trait Foo {
|
||||
| ^^^^^^^^^ required by this bound in `Foo`
|
||||
|
||||
error[E0275]: overflow evaluating the requirement `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Foo`
|
||||
--> $DIR/issue-20413.rs:8:36
|
||||
@ -41,11 +36,6 @@ LL | impl<T> Foo for T where NoData<T>: Foo {
|
||||
| ^^^ ^
|
||||
= note: 127 redundant requirements hidden
|
||||
= note: required because of the requirements on the impl of `Foo` for `NoData<T>`
|
||||
note: required by a bound in `Foo`
|
||||
--> $DIR/issue-20413.rs:1:1
|
||||
|
|
||||
LL | trait Foo {
|
||||
| ^^^^^^^^^ required by this bound in `Foo`
|
||||
|
||||
error[E0275]: overflow evaluating the requirement `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Baz`
|
||||
--> $DIR/issue-20413.rs:28:42
|
||||
@ -66,11 +56,6 @@ LL | impl<T> Baz for T where AlmostNoData<T>: Bar {
|
||||
| ^^^ ^
|
||||
= note: 126 redundant requirements hidden
|
||||
= note: required because of the requirements on the impl of `Baz` for `EvenLessData<T>`
|
||||
note: required by a bound in `Baz`
|
||||
--> $DIR/issue-20413.rs:20:1
|
||||
|
|
||||
LL | trait Baz {
|
||||
| ^^^^^^^^^ required by this bound in `Baz`
|
||||
|
||||
error[E0275]: overflow evaluating the requirement `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Baz`
|
||||
--> $DIR/issue-20413.rs:28:42
|
||||
@ -91,11 +76,6 @@ LL | impl<T> Baz for T where AlmostNoData<T>: Bar {
|
||||
| ^^^ ^
|
||||
= note: 126 redundant requirements hidden
|
||||
= note: required because of the requirements on the impl of `Baz` for `EvenLessData<T>`
|
||||
note: required by a bound in `Baz`
|
||||
--> $DIR/issue-20413.rs:20:1
|
||||
|
|
||||
LL | trait Baz {
|
||||
| ^^^^^^^^^ required by this bound in `Baz`
|
||||
|
||||
error[E0275]: overflow evaluating the requirement `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Bar`
|
||||
--> $DIR/issue-20413.rs:36:42
|
||||
@ -116,11 +96,6 @@ LL | impl<T> Bar for T where EvenLessData<T>: Baz {
|
||||
| ^^^ ^
|
||||
= note: 126 redundant requirements hidden
|
||||
= note: required because of the requirements on the impl of `Bar` for `AlmostNoData<T>`
|
||||
note: required by a bound in `Bar`
|
||||
--> $DIR/issue-20413.rs:16:1
|
||||
|
|
||||
LL | trait Bar {
|
||||
| ^^^^^^^^^ required by this bound in `Bar`
|
||||
|
||||
error[E0275]: overflow evaluating the requirement `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>: Bar`
|
||||
--> $DIR/issue-20413.rs:36:42
|
||||
@ -141,11 +116,6 @@ LL | impl<T> Bar for T where EvenLessData<T>: Baz {
|
||||
| ^^^ ^
|
||||
= note: 126 redundant requirements hidden
|
||||
= note: required because of the requirements on the impl of `Bar` for `AlmostNoData<T>`
|
||||
note: required by a bound in `Bar`
|
||||
--> $DIR/issue-20413.rs:16:1
|
||||
|
|
||||
LL | trait Bar {
|
||||
| ^^^^^^^^^ required by this bound in `Bar`
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
|
||||
|
@ -6,11 +6,11 @@ LL | #[derive(Hash)]
|
||||
LL | struct Foo(Bar);
|
||||
| ^^^ the trait `Hash` is not implemented for `Bar`
|
||||
|
|
||||
note: required by a bound in `std::hash::Hash::hash`
|
||||
note: required by `std::hash::Hash::hash`
|
||||
--> $SRC_DIR/core/src/hash/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn hash<H: Hasher>(&self, state: &mut H);
|
||||
| ^ required by this bound in `std::hash::Hash::hash`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
@ -5,11 +5,6 @@ LL | where &'a T : Foo,
|
||||
| ^^^ cannot infer type for reference `&'a T`
|
||||
|
|
||||
= note: cannot satisfy `&'a T: Foo`
|
||||
note: required by a bound in `Foo`
|
||||
--> $DIR/issue-21974.rs:6:1
|
||||
|
|
||||
LL | trait Foo {
|
||||
| ^^^^^^^^^ required by this bound in `Foo`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -7,6 +7,11 @@ LL | "".chars().fold(|_, _| (), ());
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the trait `FnMut<(_, char)>` is not implemented for `()`
|
||||
note: required by a bound in `fold`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
LL | F: FnMut(B, Self::Item) -> B,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `fold`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -5,11 +5,6 @@ LL | impl <'l0, 'l1, T0> Trait1<'l0, T0> for bool where T0 : Trait0<'l0>, T0 : T
|
||||
| ^^^^^^^^^^^ cannot infer type for type parameter `T0`
|
||||
|
|
||||
= note: cannot satisfy `T0: Trait0<'l0>`
|
||||
note: required by a bound in `Trait0`
|
||||
--> $DIR/issue-24424.rs:2:1
|
||||
|
|
||||
LL | trait Trait0<'l0> {}
|
||||
| ^^^^^^^^^^^^^^^^^ required by this bound in `Trait0`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -9,8 +9,6 @@ pub fn get_tok(it: &mut IntoIter<u8>) {
|
||||
})
|
||||
.cloned()
|
||||
//~^ ERROR type mismatch resolving
|
||||
//~| expected type `u8`
|
||||
//~| found reference `&_`
|
||||
.collect(); //~ ERROR the method
|
||||
}
|
||||
|
||||
|
@ -2,13 +2,18 @@ error[E0271]: type mismatch resolving `<TakeWhile<&mut std::vec::IntoIter<u8>, [
|
||||
--> $DIR/issue-31173.rs:10:10
|
||||
|
|
||||
LL | .cloned()
|
||||
| ^^^^^^ expected `u8`, found reference
|
||||
| ^^^^^^ expected reference, found `u8`
|
||||
|
|
||||
= note: expected type `u8`
|
||||
found reference `&_`
|
||||
= note: expected reference `&_`
|
||||
found type `u8`
|
||||
note: required by a bound in `cloned`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
LL | Self: Sized + Iterator<Item = &'a T>,
|
||||
| ^^^^^^^^^^^^ required by this bound in `cloned`
|
||||
|
||||
error[E0599]: the method `collect` exists for struct `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]>>`, but its trait bounds were not satisfied
|
||||
--> $DIR/issue-31173.rs:14:10
|
||||
--> $DIR/issue-31173.rs:12:10
|
||||
|
|
||||
LL | .collect();
|
||||
| ^^^^^^^ method cannot be called on `Cloned<TakeWhile<&mut std::vec::IntoIter<u8>, [closure@$DIR/issue-31173.rs:6:39: 9:6]>>` due to unsatisfied trait bounds
|
||||
|
@ -2,10 +2,15 @@ error[E0271]: type mismatch resolving `<std::collections::hash_map::Iter<'_, _,
|
||||
--> $DIR/issue-33941.rs:4:36
|
||||
|
|
||||
LL | for _ in HashMap::new().iter().cloned() {}
|
||||
| ^^^^^^ expected tuple, found reference
|
||||
| ^^^^^^ expected reference, found tuple
|
||||
|
|
||||
= note: expected tuple `(&_, &_)`
|
||||
found reference `&_`
|
||||
= note: expected reference `&_`
|
||||
found tuple `(&_, &_)`
|
||||
note: required by a bound in `cloned`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
LL | Self: Sized + Iterator<Item = &'a T>,
|
||||
| ^^^^^^^^^^^^ required by this bound in `cloned`
|
||||
|
||||
error[E0271]: type mismatch resolving `<std::collections::hash_map::Iter<'_, _, _> as Iterator>::Item == &_`
|
||||
--> $DIR/issue-33941.rs:4:14
|
||||
|
@ -14,6 +14,11 @@ LL | let sr2: Vec<(u32, _, _)> = sr.iter().map(|(faction, th_sender, th_rece
|
||||
| ^^^^^^^ value of type `Vec<(u32, _, _)>` cannot be built from `std::iter::Iterator<Item=()>`
|
||||
|
|
||||
= help: the trait `FromIterator<()>` is not implemented for `Vec<(u32, _, _)>`
|
||||
note: required by a bound in `collect`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
LL | fn collect<B: FromIterator<Self::Item>>(self) -> B
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `collect`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -7,6 +7,12 @@ LL | None::<()>.map(Self::f);
|
||||
| --- ^^^^^^^ expected function that takes a single 0-tuple as argument
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `Option::<T>::map`
|
||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||
|
|
||||
LL | pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Option<U> {
|
||||
| ^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -8,6 +8,12 @@ LL | self.foo.map(Foo::new)
|
||||
| --- ^^^^^^^^ expected function that takes 1 argument
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `Option::<T>::map`
|
||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||
|
|
||||
LL | pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Option<U> {
|
||||
| ^^^^^^^^^^^^^^ required by this bound in `Option::<T>::map`
|
||||
|
||||
error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
|
||||
--> $DIR/issue-47706.rs:27:9
|
||||
|
@ -11,11 +11,11 @@ LL | const ARR_LEN: usize = Tt::const_val::<[i8; 123]>();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
|
||||
|
|
||||
= note: cannot satisfy `_: Tt`
|
||||
note: required by a bound in `Tt::const_val`
|
||||
--> $DIR/issue-54954.rs:5:24
|
||||
note: required by `Tt::const_val`
|
||||
--> $DIR/issue-54954.rs:5:5
|
||||
|
|
||||
LL | const fn const_val<T: Sized>() -> usize {
|
||||
| ^ required by this bound in `Tt::const_val`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -5,6 +5,11 @@ LL | let x2: Vec<f64> = x1.into_iter().collect();
|
||||
| ^^^^^^^ value of type `Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
|
||||
|
|
||||
= help: the trait `FromIterator<&f64>` is not implemented for `Vec<f64>`
|
||||
note: required by a bound in `collect`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
LL | fn collect<B: FromIterator<Self::Item>>(self) -> B
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `collect`
|
||||
|
||||
error[E0277]: a value of type `Vec<f64>` cannot be built from an iterator over elements of type `&f64`
|
||||
--> $DIR/issue-66923-show-error-for-correct-call.rs:12:29
|
||||
@ -13,6 +18,11 @@ LL | let x3 = x1.into_iter().collect::<Vec<f64>>();
|
||||
| ^^^^^^^ value of type `Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
|
||||
|
|
||||
= help: the trait `FromIterator<&f64>` is not implemented for `Vec<f64>`
|
||||
note: required by a bound in `collect`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
LL | fn collect<B: FromIterator<Self::Item>>(self) -> B
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `collect`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -18,6 +18,11 @@ LL | impl Test<u32> for u64 {
|
||||
...
|
||||
LL | impl Test<u64> for u64 {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by `Test::test`
|
||||
--> $DIR/issue-69455.rs:8:5
|
||||
|
|
||||
LL | fn test(self, rhs: Rhs) -> Self::Output;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
help: consider specifying the type argument in the method call
|
||||
|
|
||||
LL | println!("{}", 23u64.test(xs.iter().sum::<S>()));
|
||||
|
@ -18,6 +18,14 @@ LL | impl<T> Element<()> for T {
|
||||
...
|
||||
LL | impl<T: Element<S>, S> Element<[S; 3]> for T {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by a bound in `Foo::foo`
|
||||
--> $DIR/issue-69683.rs:15:9
|
||||
|
|
||||
LL | u8: Element<I>,
|
||||
| ^^^^^^^^^^ required by this bound in `Foo::foo`
|
||||
LL | {
|
||||
LL | fn foo(self, x: <u8 as Element<I>>::Array);
|
||||
| --- required by a bound in this
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -27,6 +27,11 @@ LL | String::from("x".as_ref());
|
||||
- impl AsRef<Path> for str;
|
||||
- impl AsRef<[u8]> for str;
|
||||
- impl AsRef<str> for str;
|
||||
note: required by `as_ref`
|
||||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn as_ref(&self) -> &T;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> $DIR/issue-72690.rs:12:6
|
||||
@ -63,6 +68,11 @@ LL | |x| String::from("x".as_ref());
|
||||
- impl AsRef<Path> for str;
|
||||
- impl AsRef<[u8]> for str;
|
||||
- impl AsRef<str> for str;
|
||||
note: required by `as_ref`
|
||||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn as_ref(&self) -> &T;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0283]: type annotations needed for `&T`
|
||||
--> $DIR/issue-72690.rs:18:17
|
||||
@ -77,6 +87,11 @@ LL | let _ = "x".as_ref();
|
||||
- impl AsRef<Path> for str;
|
||||
- impl AsRef<[u8]> for str;
|
||||
- impl AsRef<str> for str;
|
||||
note: required by `as_ref`
|
||||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn as_ref(&self) -> &T;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/issue-72690.rs:22:5
|
||||
@ -107,6 +122,11 @@ LL | String::from("x".as_ref());
|
||||
- impl AsRef<Path> for str;
|
||||
- impl AsRef<[u8]> for str;
|
||||
- impl AsRef<str> for str;
|
||||
note: required by `as_ref`
|
||||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn as_ref(&self) -> &T;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/issue-72690.rs:29:5
|
||||
@ -137,6 +157,11 @@ LL | String::from("x".as_ref());
|
||||
- impl AsRef<Path> for str;
|
||||
- impl AsRef<[u8]> for str;
|
||||
- impl AsRef<str> for str;
|
||||
note: required by `as_ref`
|
||||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn as_ref(&self) -> &T;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/issue-72690.rs:38:5
|
||||
@ -167,6 +192,11 @@ LL | String::from("x".as_ref());
|
||||
- impl AsRef<Path> for str;
|
||||
- impl AsRef<[u8]> for str;
|
||||
- impl AsRef<str> for str;
|
||||
note: required by `as_ref`
|
||||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn as_ref(&self) -> &T;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/issue-72690.rs:47:5
|
||||
@ -197,6 +227,11 @@ LL | String::from("x".as_ref());
|
||||
- impl AsRef<Path> for str;
|
||||
- impl AsRef<[u8]> for str;
|
||||
- impl AsRef<str> for str;
|
||||
note: required by `as_ref`
|
||||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn as_ref(&self) -> &T;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/issue-72690.rs:54:5
|
||||
@ -227,6 +262,11 @@ LL | String::from("x".as_ref());
|
||||
- impl AsRef<Path> for str;
|
||||
- impl AsRef<[u8]> for str;
|
||||
- impl AsRef<str> for str;
|
||||
note: required by `as_ref`
|
||||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn as_ref(&self) -> &T;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/issue-72690.rs:63:5
|
||||
@ -257,6 +297,11 @@ LL | String::from("x".as_ref());
|
||||
- impl AsRef<Path> for str;
|
||||
- impl AsRef<[u8]> for str;
|
||||
- impl AsRef<str> for str;
|
||||
note: required by `as_ref`
|
||||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn as_ref(&self) -> &T;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 18 previous errors
|
||||
|
||||
|
@ -5,11 +5,6 @@ LL | &'a (): Foo,
|
||||
| ^^^ cannot infer type for reference `&'a ()`
|
||||
|
|
||||
= note: cannot satisfy `&'a (): Foo`
|
||||
note: required by a bound in `Foo`
|
||||
--> $DIR/issue-34979.rs:1:1
|
||||
|
|
||||
LL | trait Foo {}
|
||||
| ^^^^^^^^^ required by this bound in `Foo`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -11,11 +11,6 @@ LL | impl<'a> A for (&'static (), &'a ()) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | impl<'a> A for (&'a (), &'static ()) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by a bound in `A`
|
||||
--> $DIR/region-overlap.rs:4:1
|
||||
|
|
||||
LL | trait A {}
|
||||
| ^^^^^^^ required by this bound in `A`
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/region-overlap.rs:6:10
|
||||
@ -30,11 +25,6 @@ LL | impl<'a> A for (&'static (), &'a ()) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | impl<'a> A for (&'a (), &'static ()) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by a bound in `A`
|
||||
--> $DIR/region-overlap.rs:4:1
|
||||
|
|
||||
LL | trait A {}
|
||||
| ^^^^^^^ required by this bound in `A`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -20,6 +20,11 @@ LL | impl Foo for Vec<usize> {
|
||||
...
|
||||
LL | impl Foo for Vec<isize> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by `Foo::foo`
|
||||
--> $DIR/method-ambig-one-trait-unknown-int-type.rs:6:5
|
||||
|
|
||||
LL | fn foo(&self) -> isize;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/method-ambig-one-trait-unknown-int-type.rs:33:20
|
||||
|
@ -125,6 +125,12 @@ LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(foo);
|
||||
...
|
||||
LL | fn foo() {}
|
||||
| -------- takes 0 arguments
|
||||
|
|
||||
note: required by a bound in `map`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
LL | F: FnMut(Self::Item) -> B,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
|
||||
|
||||
error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 3 distinct arguments
|
||||
--> $DIR/closure-arg-count.rs:27:57
|
||||
@ -135,6 +141,12 @@ LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(bar);
|
||||
| --- ^^^ expected closure that takes a single 2-tuple as argument
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `map`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
LL | F: FnMut(Self::Item) -> B,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
|
||||
|
||||
error[E0593]: function is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
|
||||
--> $DIR/closure-arg-count.rs:29:57
|
||||
@ -146,6 +158,12 @@ LL | let _it = vec![1, 2, 3].into_iter().enumerate().map(qux);
|
||||
...
|
||||
LL | fn qux(x: usize, y: usize) {}
|
||||
| -------------------------- takes 2 distinct arguments
|
||||
|
|
||||
note: required by a bound in `map`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
LL | F: FnMut(Self::Item) -> B,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
|
||||
|
||||
error[E0593]: function is expected to take 1 argument, but it takes 2 arguments
|
||||
--> $DIR/closure-arg-count.rs:32:45
|
||||
@ -154,6 +172,12 @@ LL | let _it = vec![1, 2, 3].into_iter().map(usize::checked_add);
|
||||
| --- ^^^^^^^^^^^^^^^^^^ expected function that takes 1 argument
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `map`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
LL | F: FnMut(Self::Item) -> B,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
|
||||
|
||||
error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
|
||||
--> $DIR/closure-arg-count.rs:35:10
|
||||
|
@ -5,6 +5,12 @@ LL | a.iter().map(|_: (u32, u32)| 45);
|
||||
| ^^^ ------------------ found signature of `fn((u32, u32)) -> _`
|
||||
| |
|
||||
| expected signature of `fn(&(u32, u32)) -> _`
|
||||
|
|
||||
note: required by a bound in `map`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
LL | F: FnMut(Self::Item) -> B,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
|
||||
|
||||
error[E0631]: type mismatch in closure arguments
|
||||
--> $DIR/closure-arg-type-mismatch.rs:4:14
|
||||
@ -13,6 +19,12 @@ LL | a.iter().map(|_: &(u16, u16)| 45);
|
||||
| ^^^ ------------------- found signature of `for<'r> fn(&'r (u16, u16)) -> _`
|
||||
| |
|
||||
| expected signature of `fn(&(u32, u32)) -> _`
|
||||
|
|
||||
note: required by a bound in `map`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
LL | F: FnMut(Self::Item) -> B,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
|
||||
|
||||
error[E0631]: type mismatch in closure arguments
|
||||
--> $DIR/closure-arg-type-mismatch.rs:5:14
|
||||
@ -21,6 +33,12 @@ LL | a.iter().map(|_: (u16, u16)| 45);
|
||||
| ^^^ ------------------ found signature of `fn((u16, u16)) -> _`
|
||||
| |
|
||||
| expected signature of `fn(&(u32, u32)) -> _`
|
||||
|
|
||||
note: required by a bound in `map`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
LL | F: FnMut(Self::Item) -> B,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `map`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/closure-arg-type-mismatch.rs:10:5
|
||||
|
@ -5,6 +5,12 @@ LL | once::<&str>("str").fuse().filter(|a: &str| true).count();
|
||||
| ^^^^^^ -------------- found signature of `for<'r> fn(&'r str) -> _`
|
||||
| |
|
||||
| expected signature of `for<'r> fn(&'r &str) -> _`
|
||||
|
|
||||
note: required by a bound in `filter`
|
||||
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
|
||||
|
|
||||
LL | P: FnMut(&Self::Item) -> bool,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `filter`
|
||||
|
||||
error[E0599]: the method `count` exists for struct `Filter<Fuse<std::iter::Once<&str>>, [closure@$DIR/issue-36053-2.rs:7:39: 7:53]>`, but its trait bounds were not satisfied
|
||||
--> $DIR/issue-36053-2.rs:7:55
|
||||
|
@ -11,6 +11,11 @@ LL | let hello = hello.clone();
|
||||
| ^^^^^ within `[closure@$DIR/not-clone-closure.rs:7:17: 9:6]`, the trait `Clone` is not implemented for `S`
|
||||
|
|
||||
= note: required because it appears within the type `[closure@$DIR/not-clone-closure.rs:7:17: 9:6]`
|
||||
note: required by `clone`
|
||||
--> $SRC_DIR/core/src/clone.rs:LL:COL
|
||||
|
|
||||
LL | fn clone(&self) -> Self;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -4,7 +4,11 @@ error[E0477]: the type `&'a isize` does not fulfill the required lifetime
|
||||
LL | Foo.some_method::<&'a isize>();
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
= note: type must satisfy the static lifetime
|
||||
note: type must satisfy the static lifetime as required by this binding
|
||||
--> $DIR/regions-bounded-method-type-parameters.rs:8:22
|
||||
|
|
||||
LL | fn some_method<A:'static>(self) { }
|
||||
| ^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -29,7 +29,13 @@ LL | fn f<'a, T, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
|
||||
| - help: consider adding an explicit lifetime bound...: `T: 'static`
|
||||
LL | // oh dear!
|
||||
LL | Box::new(B(&*v)) as Box<dyn X>
|
||||
| ^ ...so that the type `T` will meet its required lifetime bounds
|
||||
| ^ ...so that the type `T` will meet its required lifetime bounds...
|
||||
|
|
||||
note: ...that is required by this bound
|
||||
--> $DIR/regions-close-object-into-object-5.rs:9:17
|
||||
|
|
||||
LL | struct B<'a, T: 'a>(&'a (A<T> + 'a));
|
||||
| ^^
|
||||
|
||||
error[E0310]: the parameter type `T` may not live long enough
|
||||
--> $DIR/regions-close-object-into-object-5.rs:17:14
|
||||
|
@ -31,17 +31,6 @@ note: multiple `impl`s satisfying `i32: Add` found
|
||||
LL | impl const std::ops::Add for i32 {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: and another `impl` found in the `core` crate: `impl Add for i32;`
|
||||
note: required by a bound in `Add`
|
||||
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
||||
|
|
||||
LL | / pub trait Add<Rhs = Self> {
|
||||
LL | | /// The resulting type after applying the `+` operator.
|
||||
LL | | #[stable(feature = "rust1", since = "1.0.0")]
|
||||
LL | | type Output;
|
||||
... |
|
||||
LL | | fn add(self, rhs: Rhs) -> Self::Output;
|
||||
LL | | }
|
||||
| |_^ required by this bound in `Add`
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/const-and-non-const-impl.rs:14:6
|
||||
@ -57,17 +46,6 @@ LL | impl std::ops::Add for Int {
|
||||
...
|
||||
LL | impl const std::ops::Add for Int {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by a bound in `Add`
|
||||
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
||||
|
|
||||
LL | / pub trait Add<Rhs = Self> {
|
||||
LL | | /// The resulting type after applying the `+` operator.
|
||||
LL | | #[stable(feature = "rust1", since = "1.0.0")]
|
||||
LL | | type Output;
|
||||
... |
|
||||
LL | | fn add(self, rhs: Rhs) -> Self::Output;
|
||||
LL | | }
|
||||
| |_^ required by this bound in `Add`
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/const-and-non-const-impl.rs:22:12
|
||||
@ -83,17 +61,6 @@ LL | impl std::ops::Add for Int {
|
||||
...
|
||||
LL | impl const std::ops::Add for Int {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by a bound in `Add`
|
||||
--> $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
||||
|
|
||||
LL | / pub trait Add<Rhs = Self> {
|
||||
LL | | /// The resulting type after applying the `+` operator.
|
||||
LL | | #[stable(feature = "rust1", since = "1.0.0")]
|
||||
LL | | type Output;
|
||||
... |
|
||||
LL | | fn add(self, rhs: Rhs) -> Self::Output;
|
||||
LL | | }
|
||||
| |_^ required by this bound in `Add`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
@ -42,11 +42,11 @@ error[E0277]: the trait bound `NonTrivialDrop: A` is not satisfied
|
||||
LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `A` is not implemented for `NonTrivialDrop`
|
||||
|
|
||||
note: required by `ConstDropImplWithBounds`
|
||||
--> $DIR/const-drop-fail.rs:27:1
|
||||
note: required by a bound in `ConstDropImplWithBounds`
|
||||
--> $DIR/const-drop-fail.rs:27:35
|
||||
|
|
||||
LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
|
||||
|
||||
error[E0277]: the trait bound `NonTrivialDrop: A` is not satisfied
|
||||
--> $DIR/const-drop-fail.rs:49:5
|
||||
|
@ -42,11 +42,11 @@ error[E0277]: the trait bound `NonTrivialDrop: A` is not satisfied
|
||||
LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `A` is not implemented for `NonTrivialDrop`
|
||||
|
|
||||
note: required by `ConstDropImplWithBounds`
|
||||
--> $DIR/const-drop-fail.rs:27:1
|
||||
note: required by a bound in `ConstDropImplWithBounds`
|
||||
--> $DIR/const-drop-fail.rs:27:35
|
||||
|
|
||||
LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
|
||||
|
||||
error[E0277]: the trait bound `NonTrivialDrop: A` is not satisfied
|
||||
--> $DIR/const-drop-fail.rs:49:5
|
||||
|
@ -4,11 +4,11 @@ error[E0277]: the trait bound `T: Bar` is not satisfied
|
||||
LL | T::b();
|
||||
| ^^^^ the trait `Bar` is not implemented for `T`
|
||||
|
|
||||
note: required by `Foo::b`
|
||||
--> $DIR/trait-where-clause.rs:8:5
|
||||
note: required by a bound in `Foo::b`
|
||||
--> $DIR/trait-where-clause.rs:8:24
|
||||
|
|
||||
LL | fn b() where Self: ~const Bar;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^ required by this bound in `Foo::b`
|
||||
help: consider further restricting this bound
|
||||
|
|
||||
LL | const fn test1<T: ~const Foo + Bar + Bar>() {
|
||||
@ -20,11 +20,11 @@ error[E0277]: the trait bound `T: Bar` is not satisfied
|
||||
LL | T::c::<T>();
|
||||
| ^^^^^^^^^ the trait `Bar` is not implemented for `T`
|
||||
|
|
||||
note: required by `Foo::c`
|
||||
--> $DIR/trait-where-clause.rs:9:5
|
||||
note: required by a bound in `Foo::c`
|
||||
--> $DIR/trait-where-clause.rs:9:13
|
||||
|
|
||||
LL | fn c<T: ~const Bar>();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^ required by this bound in `Foo::c`
|
||||
help: consider further restricting this bound
|
||||
|
|
||||
LL | const fn test1<T: ~const Foo + Bar + Bar>() {
|
||||
@ -36,11 +36,11 @@ error[E0277]: the trait bound `T: Bar` is not satisfied
|
||||
LL | T::b();
|
||||
| ^^^^ the trait `Bar` is not implemented for `T`
|
||||
|
|
||||
note: required by `Foo::b`
|
||||
--> $DIR/trait-where-clause.rs:8:5
|
||||
note: required by a bound in `Foo::b`
|
||||
--> $DIR/trait-where-clause.rs:8:24
|
||||
|
|
||||
LL | fn b() where Self: ~const Bar;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^ required by this bound in `Foo::b`
|
||||
help: consider further restricting this bound
|
||||
|
|
||||
LL | fn test3<T: Foo + Bar>() {
|
||||
@ -52,11 +52,11 @@ error[E0277]: the trait bound `T: Bar` is not satisfied
|
||||
LL | T::c::<T>();
|
||||
| ^^^^^^^^^ the trait `Bar` is not implemented for `T`
|
||||
|
|
||||
note: required by `Foo::c`
|
||||
--> $DIR/trait-where-clause.rs:9:5
|
||||
note: required by a bound in `Foo::c`
|
||||
--> $DIR/trait-where-clause.rs:9:13
|
||||
|
|
||||
LL | fn c<T: ~const Bar>();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^^ required by this bound in `Foo::c`
|
||||
help: consider further restricting this bound
|
||||
|
|
||||
LL | fn test3<T: Foo + Bar>() {
|
||||
|
@ -24,6 +24,11 @@ note: required because of the requirements on the impl of `ToA<T>` for `U`
|
||||
|
|
||||
LL | impl<T, U> ToA<U> for T
|
||||
| ^^^^^^ ^
|
||||
note: required by `ToA::to`
|
||||
--> $DIR/issue-39448.rs:31:5
|
||||
|
|
||||
LL | fn to(self) -> T;
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
|
||||
|
@ -20,6 +20,11 @@ LL | let _ = s.get(4);
|
||||
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
|
||||
= note: you can use `.chars().nth()` or `.bytes().nth()`
|
||||
for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
|
||||
note: required by a bound in `core::str::<impl str>::get`
|
||||
--> $SRC_DIR/core/src/str/mod.rs:LL:COL
|
||||
|
|
||||
LL | pub fn get<I: SliceIndex<str>>(&self, i: I) -> Option<&I::Output> {
|
||||
| ^^^^^^^^^^^^^^^ required by this bound in `core::str::<impl str>::get`
|
||||
|
||||
error[E0277]: the type `str` cannot be indexed by `{integer}`
|
||||
--> $DIR/str-idx.rs:5:29
|
||||
@ -32,6 +37,11 @@ LL | let _ = s.get_unchecked(4);
|
||||
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
|
||||
= note: you can use `.chars().nth()` or `.bytes().nth()`
|
||||
for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
|
||||
note: required by a bound in `core::str::<impl str>::get_unchecked`
|
||||
--> $SRC_DIR/core/src/str/mod.rs:LL:COL
|
||||
|
|
||||
LL | pub unsafe fn get_unchecked<I: SliceIndex<str>>(&self, i: I) -> &I::Output {
|
||||
| ^^^^^^^^^^^^^^^ required by this bound in `core::str::<impl str>::get_unchecked`
|
||||
|
||||
error[E0277]: the type `str` cannot be indexed by `char`
|
||||
--> $DIR/str-idx.rs:6:17
|
||||
|
@ -44,6 +44,11 @@ LL | s.get_mut(1);
|
||||
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
|
||||
= note: you can use `.chars().nth()` or `.bytes().nth()`
|
||||
for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
|
||||
note: required by a bound in `core::str::<impl str>::get_mut`
|
||||
--> $SRC_DIR/core/src/str/mod.rs:LL:COL
|
||||
|
|
||||
LL | pub fn get_mut<I: SliceIndex<str>>(&mut self, i: I) -> Option<&mut I::Output> {
|
||||
| ^^^^^^^^^^^^^^^ required by this bound in `core::str::<impl str>::get_mut`
|
||||
|
||||
error[E0277]: the type `str` cannot be indexed by `{integer}`
|
||||
--> $DIR/str-mut-idx.rs:11:25
|
||||
@ -56,6 +61,11 @@ LL | s.get_unchecked_mut(1);
|
||||
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
|
||||
= note: you can use `.chars().nth()` or `.bytes().nth()`
|
||||
for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
|
||||
note: required by a bound in `core::str::<impl str>::get_unchecked_mut`
|
||||
--> $SRC_DIR/core/src/str/mod.rs:LL:COL
|
||||
|
|
||||
LL | pub unsafe fn get_unchecked_mut<I: SliceIndex<str>>(&mut self, i: I) -> &mut I::Output {
|
||||
| ^^^^^^^^^^^^^^^ required by this bound in `core::str::<impl str>::get_unchecked_mut`
|
||||
|
||||
error[E0277]: the type `str` cannot be indexed by `char`
|
||||
--> $DIR/str-mut-idx.rs:13:5
|
||||
|
@ -4,11 +4,11 @@ error[E0277]: the trait bound `NoClone: Clone` is not satisfied
|
||||
LL | let s = A { a: NoClone };
|
||||
| ^ the trait `Clone` is not implemented for `NoClone`
|
||||
|
|
||||
note: required by `S`
|
||||
--> $DIR/struct-path-alias-bounds.rs:3:1
|
||||
note: required by a bound in `S`
|
||||
--> $DIR/struct-path-alias-bounds.rs:3:13
|
||||
|
|
||||
LL | struct S<T: Clone> { a: T }
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^ required by this bound in `S`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -82,11 +82,11 @@ note: required because of the requirements on the impl of `Foo<'_, '_, u8>` for
|
||||
|
|
||||
LL | impl<'a,'b,T,S> Foo<'a, 'b, S> for T {}
|
||||
| ^^^^^^^^^^^^^^ ^
|
||||
note: required by a bound in `Foo::bar`
|
||||
--> $DIR/substs-ppaux.rs:7:30
|
||||
note: required by `Foo::bar`
|
||||
--> $DIR/substs-ppaux.rs:7:5
|
||||
|
|
||||
LL | fn bar<'a, T>() where T: 'a {}
|
||||
| ^^ required by this bound in `Foo::bar`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
@ -82,11 +82,11 @@ note: required because of the requirements on the impl of `Foo<'_#0r, '_#1r, u8>
|
||||
|
|
||||
LL | impl<'a,'b,T,S> Foo<'a, 'b, S> for T {}
|
||||
| ^^^^^^^^^^^^^^ ^
|
||||
note: required by a bound in `Foo::bar`
|
||||
--> $DIR/substs-ppaux.rs:7:30
|
||||
note: required by `Foo::bar`
|
||||
--> $DIR/substs-ppaux.rs:7:5
|
||||
|
|
||||
LL | fn bar<'a, T>() where T: 'a {}
|
||||
| ^^ required by this bound in `Foo::bar`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
@ -46,11 +46,11 @@ LL | Pin::new(x)
|
||||
| ^^^^^^^^ the trait `Unpin` is not implemented for `dyn Future<Output = i32> + Send`
|
||||
|
|
||||
= note: consider using `Box::pin`
|
||||
note: required by `Pin::<P>::new`
|
||||
note: required by a bound in `Pin::<P>::new`
|
||||
--> $SRC_DIR/core/src/pin.rs:LL:COL
|
||||
|
|
||||
LL | pub const fn new(pointer: P) -> Pin<P> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | impl<P: Deref<Target: Unpin>> Pin<P> {
|
||||
| ^^^^^ required by this bound in `Pin::<P>::new`
|
||||
|
||||
error[E0277]: `dyn Future<Output = i32> + Send` cannot be unpinned
|
||||
--> $DIR/expected-boxed-future-isnt-pinned.rs:24:5
|
||||
@ -59,11 +59,11 @@ LL | Pin::new(Box::new(x))
|
||||
| ^^^^^^^^ the trait `Unpin` is not implemented for `dyn Future<Output = i32> + Send`
|
||||
|
|
||||
= note: consider using `Box::pin`
|
||||
note: required by `Pin::<P>::new`
|
||||
note: required by a bound in `Pin::<P>::new`
|
||||
--> $SRC_DIR/core/src/pin.rs:LL:COL
|
||||
|
|
||||
LL | pub const fn new(pointer: P) -> Pin<P> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | impl<P: Deref<Target: Unpin>> Pin<P> {
|
||||
| ^^^^^ required by this bound in `Pin::<P>::new`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/expected-boxed-future-isnt-pinned.rs:28:5
|
||||
|
@ -8,6 +8,11 @@ LL | println!("{:?}", line.find(pattern));
|
||||
|
|
||||
= note: the trait bound `String: Pattern<'_>` is not satisfied
|
||||
= note: required because of the requirements on the impl of `Pattern<'_>` for `String`
|
||||
note: required by a bound in `core::str::<impl str>::find`
|
||||
--> $SRC_DIR/core/src/str/mod.rs:LL:COL
|
||||
|
|
||||
LL | pub fn find<'a, P: Pattern<'a>>(&'a self, pat: P) -> Option<usize> {
|
||||
| ^^^^^^^^^^^ required by this bound in `core::str::<impl str>::find`
|
||||
help: consider borrowing here
|
||||
|
|
||||
LL | println!("{:?}", line.find(&pattern));
|
||||
|
@ -8,6 +8,11 @@ LL | let _: &[i8] = data.into();
|
||||
<[T; LANES] as From<Simd<T, LANES>>>
|
||||
<[bool; LANES] as From<Mask<T, LANES>>>
|
||||
= note: required because of the requirements on the impl of `Into<&[i8]>` for `&[u8]`
|
||||
note: required by `into`
|
||||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn into(self) -> T;
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -6,11 +6,14 @@ LL | let o = Other::new(f);
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by `Other::<'a, G>::new`
|
||||
--> $DIR/issue-84973.rs:27:5
|
||||
note: required by a bound in `Other::<'a, G>::new`
|
||||
--> $DIR/issue-84973.rs:25:8
|
||||
|
|
||||
LL | G: SomeTrait,
|
||||
| ^^^^^^^^^ required by this bound in `Other::<'a, G>::new`
|
||||
LL | {
|
||||
LL | pub fn new(g: G) -> Self {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| --- required by a bound in this
|
||||
help: consider borrowing here
|
||||
|
|
||||
LL | let o = Other::new(&f);
|
||||
|
@ -11,11 +11,16 @@ note: the parameter type `T` must be valid for the anonymous lifetime defined he
|
||||
|
|
||||
LL | fn func<T: Test>(foo: &Foo, t: T) {
|
||||
| ^^^
|
||||
note: ...so that the type `[closure@$DIR/missing-lifetimes-in-signature-2.rs:20:13: 23:6]` will meet its required lifetime bounds
|
||||
note: ...so that the type `[closure@$DIR/missing-lifetimes-in-signature-2.rs:20:13: 23:6]` will meet its required lifetime bounds...
|
||||
--> $DIR/missing-lifetimes-in-signature-2.rs:20:9
|
||||
|
|
||||
LL | foo.bar(move |_| {
|
||||
| ^^^
|
||||
note: ...that is required by this bound
|
||||
--> $DIR/missing-lifetimes-in-signature-2.rs:11:12
|
||||
|
|
||||
LL | F: 'a,
|
||||
| ^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -7,11 +7,11 @@ LL | let fp = BufWriter::new(fp);
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= note: `std::io::Write` is implemented for `&mut dyn std::io::Write`, but not for `&dyn std::io::Write`
|
||||
note: required by `BufWriter::<W>::new`
|
||||
note: required by a bound in `BufWriter::<W>::new`
|
||||
--> $SRC_DIR/std/src/io/buffered/bufwriter.rs:LL:COL
|
||||
|
|
||||
LL | pub fn new(inner: W) -> BufWriter<W> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | impl<W: Write> BufWriter<W> {
|
||||
| ^^^^^ required by this bound in `BufWriter::<W>::new`
|
||||
|
||||
error[E0277]: the trait bound `&dyn std::io::Write: std::io::Write` is not satisfied
|
||||
--> $DIR/mut-borrow-needed-by-trait.rs:17:14
|
||||
|
@ -6,11 +6,11 @@ LL | let mut stream_reader = BufReader::new(&stream);
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by `BufReader::<R>::new`
|
||||
note: required by a bound in `BufReader::<R>::new`
|
||||
--> $SRC_DIR/std/src/io/buffered/bufreader.rs:LL:COL
|
||||
|
|
||||
LL | pub fn new(inner: R) -> BufReader<R> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | impl<R: Read> BufReader<R> {
|
||||
| ^^^^ required by this bound in `BufReader::<R>::new`
|
||||
help: consider removing the leading `&`-reference
|
||||
|
|
||||
LL - let mut stream_reader = BufReader::new(&stream);
|
||||
|
@ -4,6 +4,11 @@ error[E0277]: `T` cannot be sent between threads safely
|
||||
LL | 1.bar::<T>();
|
||||
| ^^^ `T` cannot be sent between threads safely
|
||||
|
|
||||
note: required by a bound in `Bar::bar`
|
||||
--> $DIR/bad-method-typaram-kind.rs:6:14
|
||||
|
|
||||
LL | fn bar<T:Send>(&self);
|
||||
| ^^^^ required by this bound in `Bar::bar`
|
||||
help: consider further restricting this bound
|
||||
|
|
||||
LL | fn foo<T:'static + std::marker::Send>() {
|
||||
|
@ -29,11 +29,11 @@ LL | let x: Vec<dyn Trait + Sized> = Vec::new();
|
||||
| ^^^^^^^^ doesn't have a size known at compile-time
|
||||
|
|
||||
= help: the trait `Sized` is not implemented for `dyn Trait`
|
||||
note: required by `Vec::<T>::new`
|
||||
note: required by a bound in `Vec::<T>::new`
|
||||
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
|
||||
|
|
||||
LL | pub const fn new() -> Self {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | impl<T> Vec<T> {
|
||||
| ^ required by this bound in `Vec::<T>::new`
|
||||
|
||||
error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
|
||||
--> $DIR/bad-sized.rs:4:37
|
||||
|
@ -16,11 +16,11 @@ error[E0277]: the trait bound `{integer}: Trait` is not satisfied
|
||||
LL | let foo = Foo {
|
||||
| ^^^ the trait `Trait` is not implemented for `{integer}`
|
||||
|
|
||||
note: required by `Foo`
|
||||
--> $DIR/on-structs-and-enums-locals.rs:5:1
|
||||
note: required by a bound in `Foo`
|
||||
--> $DIR/on-structs-and-enums-locals.rs:5:14
|
||||
|
|
||||
LL | struct Foo<T:Trait> {
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^ required by this bound in `Foo`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -16,11 +16,11 @@ error[E0277]: the trait bound `{integer}: Trait` is not satisfied
|
||||
LL | let foo = Foo {
|
||||
| ^^^ the trait `Trait` is not implemented for `{integer}`
|
||||
|
|
||||
note: required by `Foo`
|
||||
--> $DIR/auxiliary/on_structs_and_enums_xc.rs:5:1
|
||||
note: required by a bound in `Foo`
|
||||
--> $DIR/auxiliary/on_structs_and_enums_xc.rs:5:18
|
||||
|
|
||||
LL | pub struct Foo<T:Trait> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^ required by this bound in `Foo`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -3,6 +3,12 @@ error[E0277]: the trait bound `dyn CompareToInts: CompareTo<i32>` is not satisfi
|
||||
|
|
||||
LL | c.same_as(22)
|
||||
| ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `dyn CompareToInts`
|
||||
|
|
||||
note: required by `CompareTo::same_as`
|
||||
--> $DIR/repeated-supertrait-ambig.rs:9:5
|
||||
|
|
||||
LL | fn same_as(&self, t: T) -> bool;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
|
||||
--> $DIR/repeated-supertrait-ambig.rs:30:7
|
||||
@ -10,6 +16,11 @@ error[E0277]: the trait bound `C: CompareTo<i32>` is not satisfied
|
||||
LL | c.same_as(22)
|
||||
| ^^^^^^^ the trait `CompareTo<i32>` is not implemented for `C`
|
||||
|
|
||||
note: required by `CompareTo::same_as`
|
||||
--> $DIR/repeated-supertrait-ambig.rs:9:5
|
||||
|
|
||||
LL | fn same_as(&self, t: T) -> bool;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
help: consider further restricting this bound
|
||||
|
|
||||
LL | fn with_trait<C:CompareToInts + CompareTo<i32>>(c: &C) -> bool {
|
||||
@ -52,6 +63,11 @@ LL | assert_eq!(22_i64.same_as(22), true);
|
||||
= help: the following implementations were found:
|
||||
<i64 as CompareTo<i64>>
|
||||
<i64 as CompareTo<u64>>
|
||||
note: required by `CompareTo::same_as`
|
||||
--> $DIR/repeated-supertrait-ambig.rs:9:5
|
||||
|
|
||||
LL | fn same_as(&self, t: T) -> bool;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
@ -10,6 +10,15 @@ LL | opts.get(opt.as_ref());
|
||||
- impl Borrow<str> for String;
|
||||
- impl<T> Borrow<T> for T
|
||||
where T: ?Sized;
|
||||
note: required by a bound in `HashMap::<K, V, S>::get`
|
||||
--> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
|
||||
|
|
||||
LL | K: Borrow<Q>,
|
||||
| ^^^^^^^^^ required by this bound in `HashMap::<K, V, S>::get`
|
||||
help: consider specifying the type argument in the function call
|
||||
|
|
||||
LL | opts.get::<Q>(opt.as_ref());
|
||||
| +++++
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/issue-77982.rs:8:18
|
||||
@ -25,6 +34,11 @@ LL | opts.get(opt.as_ref());
|
||||
- impl AsRef<Path> for String;
|
||||
- impl AsRef<[u8]> for String;
|
||||
- impl AsRef<str> for String;
|
||||
note: required by `as_ref`
|
||||
--> $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
|
|
||||
LL | fn as_ref(&self) -> &T;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
help: use the fully qualified path for the potential candidates
|
||||
|
|
||||
LL | opts.get(<String as AsRef<OsStr>>::as_ref(opt));
|
||||
@ -71,6 +85,11 @@ LL | impl Foo<'static, u32> for () {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | impl<'a> Foo<'a, i16> for () {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by `Foo::foo`
|
||||
--> $DIR/issue-77982.rs:18:5
|
||||
|
|
||||
LL | fn foo(&self) -> Box<T> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0283]: type annotations needed for `Box<T>`
|
||||
--> $DIR/issue-77982.rs:40:19
|
||||
@ -87,6 +106,11 @@ LL | impl<'a> Bar<'static, u32> for &'a () {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | impl<'a> Bar<'a, i16> for &'a () {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by `Bar::bar`
|
||||
--> $DIR/issue-77982.rs:24:5
|
||||
|
|
||||
LL | fn bar(&self) -> Box<T> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
@ -5,15 +5,6 @@ LL | T: FnMut(&'a ()),
|
||||
| ^^^^^^^^^^^^^ cannot infer type for type parameter `T`
|
||||
|
|
||||
= note: cannot satisfy `T: FnMut<(&'a (),)>`
|
||||
note: required by a bound in `FnMut`
|
||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||
|
|
||||
LL | / pub trait FnMut<Args>: FnOnce<Args> {
|
||||
LL | | /// Performs the call operation.
|
||||
LL | | #[unstable(feature = "fn_traits", issue = "29625")]
|
||||
LL | | extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output;
|
||||
LL | | }
|
||||
| |_^ required by this bound in `FnMut`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -7,11 +7,11 @@ LL | Outer(TestType);
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the trait `Send` is not implemented for `dummy::TestType`
|
||||
note: required by `Outer`
|
||||
--> $DIR/negated-auto-traits-error.rs:10:1
|
||||
note: required by a bound in `Outer`
|
||||
--> $DIR/negated-auto-traits-error.rs:10:17
|
||||
|
|
||||
LL | struct Outer<T: Send>(T);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^ required by this bound in `Outer`
|
||||
|
||||
error[E0277]: `dummy::TestType` cannot be sent between threads safely
|
||||
--> $DIR/negated-auto-traits-error.rs:23:5
|
||||
|
@ -92,6 +92,11 @@ LL | impl bar for i32 { fn dup(&self) -> i32 { *self } fn blah<X>(&self) {} }
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
LL | impl bar for u32 { fn dup(&self) -> u32 { *self } fn blah<X>(&self) {} }
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
note: required by `bar::dup`
|
||||
--> $DIR/test-2.rs:4:13
|
||||
|
|
||||
LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/test-2.rs:11:8
|
||||
@ -106,6 +111,11 @@ LL | impl bar for i32 { fn dup(&self) -> i32 { *self } fn blah<X>(&self) {} }
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
LL | impl bar for u32 { fn dup(&self) -> u32 { *self } fn blah<X>(&self) {} }
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
note: required by `bar::blah`
|
||||
--> $DIR/test-2.rs:4:36
|
||||
|
|
||||
LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
|
||||
|
@ -5,6 +5,12 @@ LL | b.gimme_an_a(y)
|
||||
| ---------- ^ the trait `TraitA` is not implemented for `{integer}`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `TraitB::gimme_an_a`
|
||||
--> $DIR/vtable-res-trait-param.rs:6:21
|
||||
|
|
||||
LL | fn gimme_an_a<A:TraitA>(&self, a: A) -> isize;
|
||||
| ^^^^^^ required by this bound in `TraitB::gimme_an_a`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -5,11 +5,6 @@ LL | where &'a T : Foo,
|
||||
| ^^^ cannot infer type for reference `&'a T`
|
||||
|
|
||||
= note: cannot satisfy `&'a T: Foo`
|
||||
note: required by a bound in `Foo`
|
||||
--> $DIR/issue-40294.rs:1:1
|
||||
|
|
||||
LL | trait Foo: Sized {
|
||||
| ^^^^^^^^^^^^^^^^ required by this bound in `Foo`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -4,11 +4,11 @@ error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
|
||||
LL | let u = U { a: Rc::new(0u32) };
|
||||
| ^ the trait `Copy` is not implemented for `Rc<u32>`
|
||||
|
|
||||
note: required by `U`
|
||||
--> $DIR/union-generic.rs:6:1
|
||||
note: required by a bound in `U`
|
||||
--> $DIR/union-generic.rs:6:12
|
||||
|
|
||||
LL | union U<T: Copy> {
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
| ^^^^ required by this bound in `U`
|
||||
|
||||
error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
|
||||
--> $DIR/union-generic.rs:13:13
|
||||
@ -16,11 +16,11 @@ error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
|
||||
LL | let u = U::<Rc<u32>> { a: Default::default() };
|
||||
| ^^^^^^^^^^^^ the trait `Copy` is not implemented for `Rc<u32>`
|
||||
|
|
||||
note: required by `U`
|
||||
--> $DIR/union-generic.rs:6:1
|
||||
note: required by a bound in `U`
|
||||
--> $DIR/union-generic.rs:6:12
|
||||
|
|
||||
LL | union U<T: Copy> {
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
| ^^^^ required by this bound in `U`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -4,11 +4,11 @@ error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
|
||||
LL | let u = U { a: Rc::new(0u32) };
|
||||
| ^ the trait `Copy` is not implemented for `Rc<u32>`
|
||||
|
|
||||
note: required by `U`
|
||||
--> $DIR/union-generic.rs:6:1
|
||||
note: required by a bound in `U`
|
||||
--> $DIR/union-generic.rs:6:12
|
||||
|
|
||||
LL | union U<T: Copy> {
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
| ^^^^ required by this bound in `U`
|
||||
|
||||
error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
|
||||
--> $DIR/union-generic.rs:13:13
|
||||
@ -16,11 +16,11 @@ error[E0277]: the trait bound `Rc<u32>: Copy` is not satisfied
|
||||
LL | let u = U::<Rc<u32>> { a: Default::default() };
|
||||
| ^^^^^^^^^^^^ the trait `Copy` is not implemented for `Rc<u32>`
|
||||
|
|
||||
note: required by `U`
|
||||
--> $DIR/union-generic.rs:6:1
|
||||
note: required by a bound in `U`
|
||||
--> $DIR/union-generic.rs:6:12
|
||||
|
|
||||
LL | union U<T: Copy> {
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
| ^^^^ required by this bound in `U`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
@ -3,6 +3,15 @@ error[E0277]: the trait bound `dyn Foo: CastTo<[i32]>` is not satisfied
|
||||
|
|
||||
LL | let x = x.cast::<[i32]>();
|
||||
| ^^^^ the trait `CastTo<[i32]>` is not implemented for `dyn Foo`
|
||||
|
|
||||
note: required by a bound in `Cast::cast`
|
||||
--> $DIR/issue-71659.rs:19:15
|
||||
|
|
||||
LL | fn cast<T: ?Sized>(&self) -> &T
|
||||
| ---- required by a bound in this
|
||||
LL | where
|
||||
LL | Self: CastTo<T>,
|
||||
| ^^^^^^^^^ required by this bound in `Cast::cast`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -3,12 +3,6 @@ error[E0277]: the trait bound `(): Foo` is not satisfied
|
||||
|
|
||||
LL | pub fn lint_me() -> <() as Foo>::Assoc;
|
||||
| ^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `()`
|
||||
|
|
||||
note: required by a bound in `Foo`
|
||||
--> $DIR/wf-foreign-fn-decl-ret.rs:6:1
|
||||
|
|
||||
LL | pub trait Foo {
|
||||
| ^^^^^^^^^^^^^ required by this bound in `Foo`
|
||||
|
||||
error[E0277]: the trait bound `u32: Unsatisfied` is not satisfied
|
||||
--> $DIR/wf-foreign-fn-decl-ret.rs:14:32
|
||||
|
@ -3,6 +3,12 @@ error[E0277]: the trait bound `X: Foo<X>` is not satisfied
|
||||
|
|
||||
LL | 1.method::<X>();
|
||||
| ^^^^^^ the trait `Foo<X>` is not implemented for `X`
|
||||
|
|
||||
note: required by a bound in `Bar::method`
|
||||
--> $DIR/where-clause-method-substituion.rs:6:34
|
||||
|
|
||||
LL | fn method<B>(&self) where A: Foo<B>;
|
||||
| ^^^^^^ required by this bound in `Bar::method`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user