#![feature(associated_type_bounds)] #![feature(type_alias_impl_trait)] use std::iter; use std::mem::ManuallyDrop; struct SI1> { //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] f: T, } struct SI2> { //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] f: T, } struct SI3> { //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] f: T, } struct SW1 where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { f: T, } struct SW2 where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { f: T, } struct SW3 where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { f: T, } enum EI1> { //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] V(T), } enum EI2> { //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] V(T), } enum EI3> { //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] V(T), } enum EW1 where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { V(T), } enum EW2 where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { V(T), } enum EW3 where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { V(T), } union UI1> { //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] f: ManuallyDrop, } union UI2> { //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] f: ManuallyDrop, } union UI3> { //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] f: ManuallyDrop, } union UW1 where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { f: ManuallyDrop, } union UW2 where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { f: ManuallyDrop, } union UW3 where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { f: ManuallyDrop, } fn FI1>() {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FI2>() {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FI3>() {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FW1() where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { } fn FW2() where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { } fn FW3() where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { } fn FRPIT1() -> impl Iterator { //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] iter::empty() } fn FRPIT2() -> impl Iterator { //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] iter::empty() } fn FRPIT3() -> impl Iterator { //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] iter::empty() } fn FAPIT1(_: impl Iterator) {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FAPIT2(_: impl Iterator) {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FAPIT3(_: impl Iterator) {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type TAI1> = T; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type TAI2> = T; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type TAI3> = T; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type TAW1 where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] = T; type TAW2 where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] = T; type TAW3 where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] = T; type ETAI1> = impl Copy; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type ETAI2> = impl Copy; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type ETAI3> = impl Copy; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type ETAI4 = impl Iterator; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type ETAI5 = impl Iterator; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type ETAI6 = impl Iterator; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRI1> {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRI2> {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRI3> {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRS1: Iterator {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRS2: Iterator {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRS3: Iterator {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRW1 where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { } trait TRW2 where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { } trait TRW3 where T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { } trait TRSW1 where Self: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { } trait TRSW2 where Self: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { } trait TRSW3 where Self: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] { } trait TRA1 { type A: Iterator; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] } trait TRA2 { type A: Iterator; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] } trait TRA3 { type A: Iterator; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] } type TADyn1 = dyn Iterator; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type TADyn2 = Box>; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type TADyn3 = dyn Iterator; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn main() {}