mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-05 13:13:40 +00:00
Rollup merge of #63620 - estebank:assoc-type-span, r=Centril
Use constraint span when lowering associated types Fix #63594. r? @Centril
This commit is contained in:
commit
a2080a60ac
@ -72,7 +72,7 @@ use syntax::symbol::{kw, sym, Symbol};
|
||||
use syntax::tokenstream::{TokenStream, TokenTree};
|
||||
use syntax::parse::token::{self, Token};
|
||||
use syntax::visit::{self, Visitor};
|
||||
use syntax_pos::{DUMMY_SP, Span};
|
||||
use syntax_pos::Span;
|
||||
|
||||
const HIR_ID_COUNTER_LOCKED: u32 = 0xFFFFFFFF;
|
||||
|
||||
@ -1039,13 +1039,14 @@ impl<'a> LoweringContext<'a> {
|
||||
/// ```
|
||||
///
|
||||
/// returns a `hir::TypeBinding` representing `Item`.
|
||||
fn lower_assoc_ty_constraint(&mut self,
|
||||
c: &AssocTyConstraint,
|
||||
itctx: ImplTraitContext<'_>)
|
||||
-> hir::TypeBinding {
|
||||
debug!("lower_assoc_ty_constraint(constraint={:?}, itctx={:?})", c, itctx);
|
||||
fn lower_assoc_ty_constraint(
|
||||
&mut self,
|
||||
constraint: &AssocTyConstraint,
|
||||
itctx: ImplTraitContext<'_>,
|
||||
) -> hir::TypeBinding {
|
||||
debug!("lower_assoc_ty_constraint(constraint={:?}, itctx={:?})", constraint, itctx);
|
||||
|
||||
let kind = match c.kind {
|
||||
let kind = match constraint.kind {
|
||||
AssocTyConstraintKind::Equality { ref ty } => hir::TypeBindingKind::Equality {
|
||||
ty: self.lower_ty(ty, itctx)
|
||||
},
|
||||
@ -1100,7 +1101,7 @@ impl<'a> LoweringContext<'a> {
|
||||
impl_trait_node_id,
|
||||
DefPathData::ImplTrait,
|
||||
ExpnId::root(),
|
||||
DUMMY_SP
|
||||
constraint.span,
|
||||
);
|
||||
|
||||
self.with_dyn_type_scope(false, |this| {
|
||||
@ -1108,7 +1109,7 @@ impl<'a> LoweringContext<'a> {
|
||||
&Ty {
|
||||
id: this.sess.next_node_id(),
|
||||
node: TyKind::ImplTrait(impl_trait_node_id, bounds.clone()),
|
||||
span: DUMMY_SP,
|
||||
span: constraint.span,
|
||||
},
|
||||
itctx,
|
||||
);
|
||||
@ -1130,10 +1131,10 @@ impl<'a> LoweringContext<'a> {
|
||||
};
|
||||
|
||||
hir::TypeBinding {
|
||||
hir_id: self.lower_node_id(c.id),
|
||||
ident: c.ident,
|
||||
hir_id: self.lower_node_id(constraint.id),
|
||||
ident: constraint.ident,
|
||||
kind,
|
||||
span: c.span,
|
||||
span: constraint.span,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -127,8 +127,8 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||
) -> InferOk<'tcx, (T, OpaqueTypeMap<'tcx>)> {
|
||||
debug!(
|
||||
"instantiate_opaque_types(value={:?}, parent_def_id={:?}, body_id={:?}, \
|
||||
param_env={:?})",
|
||||
value, parent_def_id, body_id, param_env,
|
||||
param_env={:?}, value_span={:?})",
|
||||
value, parent_def_id, body_id, param_env, value_span,
|
||||
);
|
||||
let mut instantiator = Instantiator {
|
||||
infcx: self,
|
||||
@ -1112,6 +1112,7 @@ impl<'a, 'tcx> Instantiator<'a, 'tcx> {
|
||||
return opaque_defn.concrete_ty;
|
||||
}
|
||||
let span = tcx.def_span(def_id);
|
||||
debug!("fold_opaque_ty {:?} {:?}", self.value_span, span);
|
||||
let ty_var = infcx
|
||||
.next_ty_var(TypeVariableOrigin { kind: TypeVariableOriginKind::TypeInference, span });
|
||||
|
||||
|
@ -248,10 +248,10 @@ impl<'a, 'b, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'b, 'tcx> {
|
||||
/// This is always inlined, despite its size, because it has a single
|
||||
/// callsite and it is called *very* frequently.
|
||||
#[inline(always)]
|
||||
fn process_obligation(&mut self,
|
||||
pending_obligation: &mut Self::Obligation)
|
||||
-> ProcessResult<Self::Obligation, Self::Error>
|
||||
{
|
||||
fn process_obligation(
|
||||
&mut self,
|
||||
pending_obligation: &mut Self::Obligation,
|
||||
) -> ProcessResult<Self::Obligation, Self::Error> {
|
||||
// if we were stalled on some unresolved variables, first check
|
||||
// whether any of them have been resolved; if not, don't bother
|
||||
// doing more work yet
|
||||
@ -277,7 +277,7 @@ impl<'a, 'b, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'b, 'tcx> {
|
||||
self.selcx.infcx().resolve_vars_if_possible(&obligation.predicate);
|
||||
}
|
||||
|
||||
debug!("process_obligation: obligation = {:?}", obligation);
|
||||
debug!("process_obligation: obligation = {:?} cause = {:?}", obligation, obligation.cause);
|
||||
|
||||
match obligation.predicate {
|
||||
ty::Predicate::Trait(ref data) => {
|
||||
@ -425,10 +425,13 @@ impl<'a, 'b, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'b, 'tcx> {
|
||||
}
|
||||
|
||||
ty::Predicate::WellFormed(ty) => {
|
||||
match ty::wf::obligations(self.selcx.infcx(),
|
||||
obligation.param_env,
|
||||
obligation.cause.body_id,
|
||||
ty, obligation.cause.span) {
|
||||
match ty::wf::obligations(
|
||||
self.selcx.infcx(),
|
||||
obligation.param_env,
|
||||
obligation.cause.body_id,
|
||||
ty,
|
||||
obligation.cause.span,
|
||||
) {
|
||||
None => {
|
||||
pending_obligation.stalled_on = vec![ty];
|
||||
ProcessResult::Unchanged
|
||||
|
@ -0,0 +1,32 @@
|
||||
// This test documents that `type Out = Box<dyn Bar<Assoc: Copy>>;`
|
||||
// is allowed and will correctly reject an opaque `type Out` which
|
||||
// does not satisfy the bound `<TheType as Bar>::Assoc: Copy`.
|
||||
//
|
||||
// FIXME(rust-lang/lang): I think this behavior is logical if we want to allow
|
||||
// `dyn Trait<Assoc: Bound>` but we should decide if we want that. // Centril
|
||||
//
|
||||
// Additionally, as reported in https://github.com/rust-lang/rust/issues/63594,
|
||||
// we check that the spans for the error message are sane here.
|
||||
|
||||
#![feature(associated_type_bounds)]
|
||||
|
||||
fn main() {}
|
||||
|
||||
trait Bar { type Assoc; }
|
||||
|
||||
trait Thing {
|
||||
type Out;
|
||||
fn func() -> Self::Out;
|
||||
}
|
||||
|
||||
struct AssocNoCopy;
|
||||
impl Bar for AssocNoCopy { type Assoc = String; }
|
||||
|
||||
impl Thing for AssocNoCopy {
|
||||
type Out = Box<dyn Bar<Assoc: Copy>>;
|
||||
//~^ ERROR the trait bound `std::string::String: std::marker::Copy` is not satisfied
|
||||
|
||||
fn func() -> Self::Out {
|
||||
Box::new(AssocNoCopy)
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
error[E0277]: the trait bound `std::string::String: std::marker::Copy` is not satisfied
|
||||
--> $DIR/assoc-type-eq-with-dyn-atb-fail.rs:26:28
|
||||
|
|
||||
LL | type Out = Box<dyn Bar<Assoc: Copy>>;
|
||||
| ^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `std::string::String`
|
||||
|
|
||||
= note: the return type of a function must have a statically known size
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
@ -1,161 +1,184 @@
|
||||
// compile-fail
|
||||
// ignore-tidy-linelength
|
||||
// error-pattern:could not find defining uses
|
||||
|
||||
#![feature(associated_type_bounds)]
|
||||
#![feature(type_alias_impl_trait)]
|
||||
#![feature(impl_trait_in_bindings)]
|
||||
#![feature(impl_trait_in_bindings)] //~ WARN the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash [incomplete_features]
|
||||
#![feature(untagged_unions)]
|
||||
|
||||
use std::iter;
|
||||
|
||||
struct SI1<T: Iterator<Item: Copy, Item: Send>> { f: T }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
struct SI2<T: Iterator<Item: Copy, Item: Copy>> { f: T }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
struct SI3<T: Iterator<Item: 'static, Item: 'static>> { f: T }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
struct SW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
struct SW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
struct SW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
|
||||
enum EI1<T: Iterator<Item: Copy, Item: Send>> { V(T) }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
enum EI2<T: Iterator<Item: Copy, Item: Copy>> { V(T) }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
enum EI3<T: Iterator<Item: 'static, Item: 'static>> { V(T) }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
enum EW1<T> where T: Iterator<Item: Copy, Item: Send> { V(T) }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
enum EW2<T> where T: Iterator<Item: Copy, Item: Copy> { V(T) }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
enum EW3<T> where T: Iterator<Item: 'static, Item: 'static> { V(T) }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
|
||||
union UI1<T: Iterator<Item: Copy, Item: Send>> { f: T }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
union UI2<T: Iterator<Item: Copy, Item: Copy>> { f: T }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
union UI3<T: Iterator<Item: 'static, Item: 'static>> { f: T }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
union UW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
union UW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
union UW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
|
||||
fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
fn FW1<T>() where T: Iterator<Item: Copy, Item: Send> {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
fn FW2<T>() where T: Iterator<Item: Copy, Item: Copy> {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
fn FW3<T>() where T: Iterator<Item: 'static, Item: 'static> {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
|
||||
fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> { iter::empty() }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> { iter::empty() }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> { iter::empty() }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
|
||||
const CIT1: impl Iterator<Item: Copy, Item: Send> = iter::empty();
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
const CIT2: impl Iterator<Item: Copy, Item: Copy> = iter::empty();
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
const CIT3: impl Iterator<Item: 'static, Item: 'static> = iter::empty();
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
static SIT1: impl Iterator<Item: Copy, Item: Send> = iter::empty();
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
static SIT2: impl Iterator<Item: Copy, Item: Copy> = iter::empty();
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
static SIT3: impl Iterator<Item: 'static, Item: 'static> = iter::empty();
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
|
||||
fn lit1() { let _: impl Iterator<Item: Copy, Item: Send> = iter::empty(); }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
fn lit2() { let _: impl Iterator<Item: Copy, Item: Copy> = iter::empty(); }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
fn lit3() { let _: impl Iterator<Item: 'static, Item: 'static> = iter::empty(); }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
|
||||
type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = T;
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T;
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T;
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
|
||||
type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~| ERROR could not find defining uses
|
||||
//~| ERROR could not find defining uses
|
||||
//~| ERROR could not find defining uses
|
||||
type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~| ERROR could not find defining uses
|
||||
//~| ERROR could not find defining uses
|
||||
//~| ERROR could not find defining uses
|
||||
type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~| ERROR could not find defining uses
|
||||
//~| ERROR could not find defining uses
|
||||
//~| ERROR could not find defining uses
|
||||
type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~| ERROR could not find defining uses
|
||||
//~| ERROR could not find defining uses
|
||||
//~| ERROR could not find defining uses
|
||||
type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~| ERROR could not find defining uses
|
||||
//~| ERROR could not find defining uses
|
||||
//~| ERROR could not find defining uses
|
||||
type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~| ERROR could not find defining uses
|
||||
//~| ERROR could not find defining uses
|
||||
//~| ERROR could not find defining uses
|
||||
|
||||
trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRS1: Iterator<Item: Copy, Item: Send> {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRS2: Iterator<Item: Copy, Item: Copy> {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRS3: Iterator<Item: 'static, Item: 'static> {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRW2<T> where T: Iterator<Item: Copy, Item: Copy> {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; }
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
|
||||
type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~| ERROR could not find defining uses
|
||||
//~| ERROR could not find defining uses
|
||||
type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~| ERROR could not find defining uses
|
||||
//~| ERROR could not find defining uses
|
||||
type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
|
||||
//~^ the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~^ ERROR the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~| ERROR could not find defining uses
|
||||
//~| ERROR could not find defining uses
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash
|
||||
--> $DIR/duplicate.rs:7:12
|
||||
--> $DIR/duplicate.rs:6:12
|
||||
|
|
||||
LL | #![feature(impl_trait_in_bindings)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -7,7 +7,7 @@ LL | #![feature(impl_trait_in_bindings)]
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:12:36
|
||||
--> $DIR/duplicate.rs:11:36
|
||||
|
|
||||
LL | struct SI1<T: Iterator<Item: Copy, Item: Send>> { f: T }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -15,7 +15,7 @@ LL | struct SI1<T: Iterator<Item: Copy, Item: Send>> { f: T }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:14:36
|
||||
--> $DIR/duplicate.rs:13:36
|
||||
|
|
||||
LL | struct SI2<T: Iterator<Item: Copy, Item: Copy>> { f: T }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -23,7 +23,7 @@ LL | struct SI2<T: Iterator<Item: Copy, Item: Copy>> { f: T }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:16:39
|
||||
--> $DIR/duplicate.rs:15:39
|
||||
|
|
||||
LL | struct SI3<T: Iterator<Item: 'static, Item: 'static>> { f: T }
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -31,7 +31,7 @@ LL | struct SI3<T: Iterator<Item: 'static, Item: 'static>> { f: T }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:18:45
|
||||
--> $DIR/duplicate.rs:17:45
|
||||
|
|
||||
LL | struct SW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -39,7 +39,7 @@ LL | struct SW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:20:45
|
||||
--> $DIR/duplicate.rs:19:45
|
||||
|
|
||||
LL | struct SW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -47,7 +47,7 @@ LL | struct SW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:22:48
|
||||
--> $DIR/duplicate.rs:21:48
|
||||
|
|
||||
LL | struct SW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T }
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -55,7 +55,7 @@ LL | struct SW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:25:34
|
||||
--> $DIR/duplicate.rs:24:34
|
||||
|
|
||||
LL | enum EI1<T: Iterator<Item: Copy, Item: Send>> { V(T) }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -63,7 +63,7 @@ LL | enum EI1<T: Iterator<Item: Copy, Item: Send>> { V(T) }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:27:34
|
||||
--> $DIR/duplicate.rs:26:34
|
||||
|
|
||||
LL | enum EI2<T: Iterator<Item: Copy, Item: Copy>> { V(T) }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -71,7 +71,7 @@ LL | enum EI2<T: Iterator<Item: Copy, Item: Copy>> { V(T) }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:29:37
|
||||
--> $DIR/duplicate.rs:28:37
|
||||
|
|
||||
LL | enum EI3<T: Iterator<Item: 'static, Item: 'static>> { V(T) }
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -79,7 +79,7 @@ LL | enum EI3<T: Iterator<Item: 'static, Item: 'static>> { V(T) }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:31:43
|
||||
--> $DIR/duplicate.rs:30:43
|
||||
|
|
||||
LL | enum EW1<T> where T: Iterator<Item: Copy, Item: Send> { V(T) }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -87,7 +87,7 @@ LL | enum EW1<T> where T: Iterator<Item: Copy, Item: Send> { V(T) }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:33:43
|
||||
--> $DIR/duplicate.rs:32:43
|
||||
|
|
||||
LL | enum EW2<T> where T: Iterator<Item: Copy, Item: Copy> { V(T) }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -95,7 +95,7 @@ LL | enum EW2<T> where T: Iterator<Item: Copy, Item: Copy> { V(T) }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:35:46
|
||||
--> $DIR/duplicate.rs:34:46
|
||||
|
|
||||
LL | enum EW3<T> where T: Iterator<Item: 'static, Item: 'static> { V(T) }
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -103,7 +103,7 @@ LL | enum EW3<T> where T: Iterator<Item: 'static, Item: 'static> { V(T) }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:38:35
|
||||
--> $DIR/duplicate.rs:37:35
|
||||
|
|
||||
LL | union UI1<T: Iterator<Item: Copy, Item: Send>> { f: T }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -111,7 +111,7 @@ LL | union UI1<T: Iterator<Item: Copy, Item: Send>> { f: T }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:40:35
|
||||
--> $DIR/duplicate.rs:39:35
|
||||
|
|
||||
LL | union UI2<T: Iterator<Item: Copy, Item: Copy>> { f: T }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -119,7 +119,7 @@ LL | union UI2<T: Iterator<Item: Copy, Item: Copy>> { f: T }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:42:38
|
||||
--> $DIR/duplicate.rs:41:38
|
||||
|
|
||||
LL | union UI3<T: Iterator<Item: 'static, Item: 'static>> { f: T }
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -127,7 +127,7 @@ LL | union UI3<T: Iterator<Item: 'static, Item: 'static>> { f: T }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:44:44
|
||||
--> $DIR/duplicate.rs:43:44
|
||||
|
|
||||
LL | union UW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -135,7 +135,7 @@ LL | union UW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:46:44
|
||||
--> $DIR/duplicate.rs:45:44
|
||||
|
|
||||
LL | union UW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -143,7 +143,7 @@ LL | union UW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:48:47
|
||||
--> $DIR/duplicate.rs:47:47
|
||||
|
|
||||
LL | union UW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T }
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -151,7 +151,7 @@ LL | union UW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:51:32
|
||||
--> $DIR/duplicate.rs:50:32
|
||||
|
|
||||
LL | fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -159,7 +159,7 @@ LL | fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:53:32
|
||||
--> $DIR/duplicate.rs:52:32
|
||||
|
|
||||
LL | fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -167,7 +167,7 @@ LL | fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:55:35
|
||||
--> $DIR/duplicate.rs:54:35
|
||||
|
|
||||
LL | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -175,7 +175,7 @@ LL | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:57:43
|
||||
--> $DIR/duplicate.rs:56:43
|
||||
|
|
||||
LL | fn FW1<T>() where T: Iterator<Item: Copy, Item: Send> {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -183,7 +183,7 @@ LL | fn FW1<T>() where T: Iterator<Item: Copy, Item: Send> {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:59:43
|
||||
--> $DIR/duplicate.rs:58:43
|
||||
|
|
||||
LL | fn FW2<T>() where T: Iterator<Item: Copy, Item: Copy> {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -191,7 +191,7 @@ LL | fn FW2<T>() where T: Iterator<Item: Copy, Item: Copy> {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:61:46
|
||||
--> $DIR/duplicate.rs:60:46
|
||||
|
|
||||
LL | fn FW3<T>() where T: Iterator<Item: 'static, Item: 'static> {}
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -199,7 +199,7 @@ LL | fn FW3<T>() where T: Iterator<Item: 'static, Item: 'static> {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:70:40
|
||||
--> $DIR/duplicate.rs:69:40
|
||||
|
|
||||
LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -207,7 +207,7 @@ LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:72:40
|
||||
--> $DIR/duplicate.rs:71:40
|
||||
|
|
||||
LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -215,7 +215,7 @@ LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:74:43
|
||||
--> $DIR/duplicate.rs:73:43
|
||||
|
|
||||
LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -223,7 +223,7 @@ LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:64:42
|
||||
--> $DIR/duplicate.rs:63:42
|
||||
|
|
||||
LL | fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> { iter::empty() }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -231,7 +231,7 @@ LL | fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> { iter::empty() }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:66:42
|
||||
--> $DIR/duplicate.rs:65:42
|
||||
|
|
||||
LL | fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> { iter::empty() }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -239,7 +239,7 @@ LL | fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> { iter::empty() }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:68:45
|
||||
--> $DIR/duplicate.rs:67:45
|
||||
|
|
||||
LL | fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> { iter::empty() }
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -247,7 +247,7 @@ LL | fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> { iter::empty()
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:77:39
|
||||
--> $DIR/duplicate.rs:76:39
|
||||
|
|
||||
LL | const CIT1: impl Iterator<Item: Copy, Item: Send> = iter::empty();
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -255,7 +255,7 @@ LL | const CIT1: impl Iterator<Item: Copy, Item: Send> = iter::empty();
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:79:39
|
||||
--> $DIR/duplicate.rs:78:39
|
||||
|
|
||||
LL | const CIT2: impl Iterator<Item: Copy, Item: Copy> = iter::empty();
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -263,7 +263,7 @@ LL | const CIT2: impl Iterator<Item: Copy, Item: Copy> = iter::empty();
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:81:42
|
||||
--> $DIR/duplicate.rs:80:42
|
||||
|
|
||||
LL | const CIT3: impl Iterator<Item: 'static, Item: 'static> = iter::empty();
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -271,7 +271,7 @@ LL | const CIT3: impl Iterator<Item: 'static, Item: 'static> = iter::empty();
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:83:40
|
||||
--> $DIR/duplicate.rs:82:40
|
||||
|
|
||||
LL | static SIT1: impl Iterator<Item: Copy, Item: Send> = iter::empty();
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -279,7 +279,7 @@ LL | static SIT1: impl Iterator<Item: Copy, Item: Send> = iter::empty();
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:85:40
|
||||
--> $DIR/duplicate.rs:84:40
|
||||
|
|
||||
LL | static SIT2: impl Iterator<Item: Copy, Item: Copy> = iter::empty();
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -287,7 +287,7 @@ LL | static SIT2: impl Iterator<Item: Copy, Item: Copy> = iter::empty();
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:87:43
|
||||
--> $DIR/duplicate.rs:86:43
|
||||
|
|
||||
LL | static SIT3: impl Iterator<Item: 'static, Item: 'static> = iter::empty();
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -295,7 +295,7 @@ LL | static SIT3: impl Iterator<Item: 'static, Item: 'static> = iter::empty();
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:90:46
|
||||
--> $DIR/duplicate.rs:89:46
|
||||
|
|
||||
LL | fn lit1() { let _: impl Iterator<Item: Copy, Item: Send> = iter::empty(); }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -303,7 +303,7 @@ LL | fn lit1() { let _: impl Iterator<Item: Copy, Item: Send> = iter::empty(); }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:92:46
|
||||
--> $DIR/duplicate.rs:91:46
|
||||
|
|
||||
LL | fn lit2() { let _: impl Iterator<Item: Copy, Item: Copy> = iter::empty(); }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -311,7 +311,7 @@ LL | fn lit2() { let _: impl Iterator<Item: Copy, Item: Copy> = iter::empty(); }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:94:49
|
||||
--> $DIR/duplicate.rs:93:49
|
||||
|
|
||||
LL | fn lit3() { let _: impl Iterator<Item: 'static, Item: 'static> = iter::empty(); }
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -319,7 +319,7 @@ LL | fn lit3() { let _: impl Iterator<Item: 'static, Item: 'static> = iter::empt
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:97:35
|
||||
--> $DIR/duplicate.rs:96:35
|
||||
|
|
||||
LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -327,7 +327,7 @@ LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:99:35
|
||||
--> $DIR/duplicate.rs:98:35
|
||||
|
|
||||
LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -335,7 +335,7 @@ LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:101:38
|
||||
--> $DIR/duplicate.rs:100:38
|
||||
|
|
||||
LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -343,7 +343,7 @@ LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:103:44
|
||||
--> $DIR/duplicate.rs:102:44
|
||||
|
|
||||
LL | type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = T;
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -351,7 +351,7 @@ LL | type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = T;
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:105:44
|
||||
--> $DIR/duplicate.rs:104:44
|
||||
|
|
||||
LL | type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T;
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -359,7 +359,7 @@ LL | type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T;
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:107:47
|
||||
--> $DIR/duplicate.rs:106:47
|
||||
|
|
||||
LL | type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T;
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -367,41 +367,41 @@ LL | type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T;
|
||||
| `Item` bound here first
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:110:1
|
||||
--> $DIR/duplicate.rs:109:1
|
||||
|
|
||||
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:110:36
|
||||
--> $DIR/duplicate.rs:109:36
|
||||
|
|
||||
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
| |
|
||||
| `Item` bound here first
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:112:1
|
||||
|
|
||||
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:112:36
|
||||
|
|
||||
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
| |
|
||||
| `Item` bound here first
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:114:1
|
||||
|
|
||||
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:114:36
|
||||
|
|
||||
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
| |
|
||||
| `Item` bound here first
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:119:1
|
||||
|
|
||||
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:114:39
|
||||
--> $DIR/duplicate.rs:119:39
|
||||
|
|
||||
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -409,13 +409,13 @@ LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
|
||||
| `Item` bound here first
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:116:1
|
||||
--> $DIR/duplicate.rs:124:1
|
||||
|
|
||||
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:116:40
|
||||
--> $DIR/duplicate.rs:124:40
|
||||
|
|
||||
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -423,13 +423,13 @@ LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
|
||||
| `Item` bound here first
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:118:1
|
||||
--> $DIR/duplicate.rs:129:1
|
||||
|
|
||||
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:118:40
|
||||
--> $DIR/duplicate.rs:129:40
|
||||
|
|
||||
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -437,13 +437,13 @@ LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
|
||||
| `Item` bound here first
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:120:1
|
||||
--> $DIR/duplicate.rs:134:1
|
||||
|
|
||||
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:120:43
|
||||
--> $DIR/duplicate.rs:134:43
|
||||
|
|
||||
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -451,7 +451,7 @@ LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:123:36
|
||||
--> $DIR/duplicate.rs:140:36
|
||||
|
|
||||
LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -459,7 +459,7 @@ LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:125:36
|
||||
--> $DIR/duplicate.rs:142:36
|
||||
|
|
||||
LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -467,7 +467,7 @@ LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:127:39
|
||||
--> $DIR/duplicate.rs:144:39
|
||||
|
|
||||
LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -475,7 +475,7 @@ LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:129:34
|
||||
--> $DIR/duplicate.rs:146:34
|
||||
|
|
||||
LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -483,7 +483,7 @@ LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:131:34
|
||||
--> $DIR/duplicate.rs:148:34
|
||||
|
|
||||
LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -491,7 +491,7 @@ LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:133:37
|
||||
--> $DIR/duplicate.rs:150:37
|
||||
|
|
||||
LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -499,7 +499,7 @@ LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:135:45
|
||||
--> $DIR/duplicate.rs:152:45
|
||||
|
|
||||
LL | trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -507,7 +507,7 @@ LL | trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:137:45
|
||||
--> $DIR/duplicate.rs:154:45
|
||||
|
|
||||
LL | trait TRW2<T> where T: Iterator<Item: Copy, Item: Copy> {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -515,7 +515,7 @@ LL | trait TRW2<T> where T: Iterator<Item: Copy, Item: Copy> {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:139:48
|
||||
--> $DIR/duplicate.rs:156:48
|
||||
|
|
||||
LL | trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -523,7 +523,7 @@ LL | trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:141:46
|
||||
--> $DIR/duplicate.rs:158:46
|
||||
|
|
||||
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -531,7 +531,7 @@ LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:143:46
|
||||
--> $DIR/duplicate.rs:160:46
|
||||
|
|
||||
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -539,7 +539,7 @@ LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:145:49
|
||||
--> $DIR/duplicate.rs:162:49
|
||||
|
|
||||
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -547,7 +547,7 @@ LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:147:43
|
||||
--> $DIR/duplicate.rs:164:43
|
||||
|
|
||||
LL | trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -555,7 +555,7 @@ LL | trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:149:43
|
||||
--> $DIR/duplicate.rs:166:43
|
||||
|
|
||||
LL | trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -563,7 +563,7 @@ LL | trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:151:46
|
||||
--> $DIR/duplicate.rs:168:46
|
||||
|
|
||||
LL | trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; }
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -571,7 +571,7 @@ LL | trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; }
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:154:40
|
||||
--> $DIR/duplicate.rs:171:40
|
||||
|
|
||||
LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -579,7 +579,7 @@ LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:156:44
|
||||
--> $DIR/duplicate.rs:175:44
|
||||
|
|
||||
LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
@ -587,7 +587,7 @@ LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from the trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:158:43
|
||||
--> $DIR/duplicate.rs:179:43
|
||||
|
|
||||
LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
@ -595,40 +595,112 @@ LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
|
||||
| `Item` bound here first
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:109:24
|
||||
|
|
||||
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:109:36
|
||||
|
|
||||
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:114:24
|
||||
|
|
||||
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:114:36
|
||||
|
|
||||
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:119:24
|
||||
|
|
||||
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:119:39
|
||||
|
|
||||
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:124:28
|
||||
|
|
||||
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:124:40
|
||||
|
|
||||
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:129:28
|
||||
|
|
||||
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:129:40
|
||||
|
|
||||
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:134:28
|
||||
|
|
||||
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:134:43
|
||||
|
|
||||
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:171:28
|
||||
|
|
||||
LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:171:40
|
||||
|
|
||||
LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:175:32
|
||||
|
|
||||
LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:175:44
|
||||
|
|
||||
LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:179:28
|
||||
|
|
||||
LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:179:43
|
||||
|
|
||||
LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 93 previous errors
|
||||
|
||||
|
@ -1,36 +1,33 @@
|
||||
// compile-fail
|
||||
// ignore-tidy-linelength
|
||||
// error-pattern:could not find defining uses
|
||||
|
||||
#![feature(associated_type_bounds)]
|
||||
#![feature(untagged_unions)]
|
||||
|
||||
struct S1 { f: dyn Iterator<Item: Copy> }
|
||||
//~^ associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| the value of the associated type `Item` (from the trait `std::iter::Iterator`) must be specified [E0191]
|
||||
//~^ ERROR associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| ERROR could not find defining uses
|
||||
struct S2 { f: Box<dyn Iterator<Item: Copy>> }
|
||||
//~^ associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| the value of the associated type `Item` (from the trait `std::iter::Iterator`) must be specified [E0191]
|
||||
//~^ ERROR associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| ERROR could not find defining uses
|
||||
struct S3 { f: dyn Iterator<Item: 'static> }
|
||||
//~^ associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| the value of the associated type `Item` (from the trait `std::iter::Iterator`) must be specified [E0191]
|
||||
//~^ ERROR associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| ERROR could not find defining uses
|
||||
|
||||
enum E1 { V(dyn Iterator<Item: Copy>) }
|
||||
//~^ associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| the value of the associated type `Item` (from the trait `std::iter::Iterator`) must be specified [E0191]
|
||||
//~^ ERROR associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| ERROR could not find defining uses
|
||||
enum E2 { V(Box<dyn Iterator<Item: Copy>>) }
|
||||
//~^ associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| the value of the associated type `Item` (from the trait `std::iter::Iterator`) must be specified [E0191]
|
||||
//~^ ERROR associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| ERROR could not find defining uses
|
||||
enum E3 { V(dyn Iterator<Item: 'static>) }
|
||||
//~^ associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| the value of the associated type `Item` (from the trait `std::iter::Iterator`) must be specified [E0191]
|
||||
//~^ ERROR associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| ERROR could not find defining uses
|
||||
|
||||
union U1 { f: dyn Iterator<Item: Copy> }
|
||||
//~^ associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| the value of the associated type `Item` (from the trait `std::iter::Iterator`) must be specified [E0191]
|
||||
//~^ ERROR associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| ERROR could not find defining uses
|
||||
union U2 { f: Box<dyn Iterator<Item: Copy>> }
|
||||
//~^ associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| the value of the associated type `Item` (from the trait `std::iter::Iterator`) must be specified [E0191]
|
||||
//~^ ERROR associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| ERROR could not find defining uses
|
||||
union U3 { f: dyn Iterator<Item: 'static> }
|
||||
//~^ associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| the value of the associated type `Item` (from the trait `std::iter::Iterator`) must be specified [E0191]
|
||||
//~^ ERROR associated type bounds are not allowed within structs, enums, or unions
|
||||
//~| ERROR could not find defining uses
|
||||
|
@ -1,53 +1,53 @@
|
||||
error: associated type bounds are not allowed within structs, enums, or unions
|
||||
--> $DIR/inside-adt.rs:8:29
|
||||
--> $DIR/inside-adt.rs:5:29
|
||||
|
|
||||
LL | struct S1 { f: dyn Iterator<Item: Copy> }
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: associated type bounds are not allowed within structs, enums, or unions
|
||||
--> $DIR/inside-adt.rs:11:33
|
||||
--> $DIR/inside-adt.rs:8:33
|
||||
|
|
||||
LL | struct S2 { f: Box<dyn Iterator<Item: Copy>> }
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: associated type bounds are not allowed within structs, enums, or unions
|
||||
--> $DIR/inside-adt.rs:14:29
|
||||
--> $DIR/inside-adt.rs:11:29
|
||||
|
|
||||
LL | struct S3 { f: dyn Iterator<Item: 'static> }
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: associated type bounds are not allowed within structs, enums, or unions
|
||||
--> $DIR/inside-adt.rs:18:26
|
||||
--> $DIR/inside-adt.rs:15:26
|
||||
|
|
||||
LL | enum E1 { V(dyn Iterator<Item: Copy>) }
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: associated type bounds are not allowed within structs, enums, or unions
|
||||
--> $DIR/inside-adt.rs:21:30
|
||||
--> $DIR/inside-adt.rs:18:30
|
||||
|
|
||||
LL | enum E2 { V(Box<dyn Iterator<Item: Copy>>) }
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: associated type bounds are not allowed within structs, enums, or unions
|
||||
--> $DIR/inside-adt.rs:24:26
|
||||
--> $DIR/inside-adt.rs:21:26
|
||||
|
|
||||
LL | enum E3 { V(dyn Iterator<Item: 'static>) }
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: associated type bounds are not allowed within structs, enums, or unions
|
||||
--> $DIR/inside-adt.rs:28:28
|
||||
--> $DIR/inside-adt.rs:25:28
|
||||
|
|
||||
LL | union U1 { f: dyn Iterator<Item: Copy> }
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: associated type bounds are not allowed within structs, enums, or unions
|
||||
--> $DIR/inside-adt.rs:31:32
|
||||
--> $DIR/inside-adt.rs:28:32
|
||||
|
|
||||
LL | union U2 { f: Box<dyn Iterator<Item: Copy>> }
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: associated type bounds are not allowed within structs, enums, or unions
|
||||
--> $DIR/inside-adt.rs:34:28
|
||||
--> $DIR/inside-adt.rs:31:28
|
||||
|
|
||||
LL | union U3 { f: dyn Iterator<Item: 'static> }
|
||||
| ^^^^^^^^^^^^^
|
||||
@ -57,22 +57,58 @@ error[E0601]: `main` function not found in crate `inside_adt`
|
||||
= note: consider adding a `main` function to `$DIR/inside-adt.rs`
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/inside-adt.rs:5:29
|
||||
|
|
||||
LL | struct S1 { f: dyn Iterator<Item: Copy> }
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/inside-adt.rs:8:33
|
||||
|
|
||||
LL | struct S2 { f: Box<dyn Iterator<Item: Copy>> }
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/inside-adt.rs:11:29
|
||||
|
|
||||
LL | struct S3 { f: dyn Iterator<Item: 'static> }
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/inside-adt.rs:15:26
|
||||
|
|
||||
LL | enum E1 { V(dyn Iterator<Item: Copy>) }
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/inside-adt.rs:18:30
|
||||
|
|
||||
LL | enum E2 { V(Box<dyn Iterator<Item: Copy>>) }
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/inside-adt.rs:21:26
|
||||
|
|
||||
LL | enum E3 { V(dyn Iterator<Item: 'static>) }
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/inside-adt.rs:25:28
|
||||
|
|
||||
LL | union U1 { f: dyn Iterator<Item: Copy> }
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/inside-adt.rs:28:32
|
||||
|
|
||||
LL | union U2 { f: Box<dyn Iterator<Item: Copy>> }
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/inside-adt.rs:31:28
|
||||
|
|
||||
LL | union U3 { f: dyn Iterator<Item: 'static> }
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 19 previous errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user