]>
Commit | Line | Data |
---|---|---|
dc9dc135 | 1 | #![feature(associated_type_bounds)] |
6a06907d XL |
2 | // revisions: min_tait full_tait |
3 | #![feature(min_type_alias_impl_trait)] | |
4 | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] | |
5 | //[full_tait]~^ WARN incomplete | |
f9f354fc | 6 | #![feature(impl_trait_in_bindings)] //~ WARN the feature `impl_trait_in_bindings` is incomplete |
dc9dc135 XL |
7 | #![feature(untagged_unions)] |
8 | ||
9 | use std::iter; | |
10 | ||
11 | struct SI1<T: Iterator<Item: Copy, Item: Send>> { f: T } | |
1b1a35ee | 12 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 13 | struct SI2<T: Iterator<Item: Copy, Item: Copy>> { f: T } |
1b1a35ee | 14 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 15 | struct SI3<T: Iterator<Item: 'static, Item: 'static>> { f: T } |
1b1a35ee | 16 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 17 | struct SW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T } |
1b1a35ee | 18 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 19 | struct SW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T } |
1b1a35ee | 20 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 21 | struct SW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T } |
1b1a35ee | 22 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 XL |
23 | |
24 | enum EI1<T: Iterator<Item: Copy, Item: Send>> { V(T) } | |
1b1a35ee | 25 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 26 | enum EI2<T: Iterator<Item: Copy, Item: Copy>> { V(T) } |
1b1a35ee | 27 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 28 | enum EI3<T: Iterator<Item: 'static, Item: 'static>> { V(T) } |
1b1a35ee | 29 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 30 | enum EW1<T> where T: Iterator<Item: Copy, Item: Send> { V(T) } |
1b1a35ee | 31 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 32 | enum EW2<T> where T: Iterator<Item: Copy, Item: Copy> { V(T) } |
1b1a35ee | 33 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 34 | enum EW3<T> where T: Iterator<Item: 'static, Item: 'static> { V(T) } |
1b1a35ee | 35 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 XL |
36 | |
37 | union UI1<T: Iterator<Item: Copy, Item: Send>> { f: T } | |
1b1a35ee | 38 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 39 | union UI2<T: Iterator<Item: Copy, Item: Copy>> { f: T } |
1b1a35ee | 40 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 41 | union UI3<T: Iterator<Item: 'static, Item: 'static>> { f: T } |
1b1a35ee | 42 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 43 | union UW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T } |
1b1a35ee | 44 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 45 | union UW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T } |
1b1a35ee | 46 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 47 | union UW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T } |
1b1a35ee | 48 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 XL |
49 | |
50 | fn FI1<T: Iterator<Item: Copy, Item: Send>>() {} | |
1b1a35ee | 51 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 52 | fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {} |
1b1a35ee | 53 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 54 | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {} |
1b1a35ee | 55 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 56 | fn FW1<T>() where T: Iterator<Item: Copy, Item: Send> {} |
1b1a35ee | 57 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 58 | fn FW2<T>() where T: Iterator<Item: Copy, Item: Copy> {} |
1b1a35ee | 59 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 60 | fn FW3<T>() where T: Iterator<Item: 'static, Item: 'static> {} |
1b1a35ee | 61 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 XL |
62 | |
63 | fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> { iter::empty() } | |
dc9dc135 | 64 | fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> { iter::empty() } |
dc9dc135 | 65 | fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> { iter::empty() } |
dc9dc135 | 66 | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {} |
1b1a35ee | 67 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 68 | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {} |
1b1a35ee | 69 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 70 | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {} |
1b1a35ee | 71 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 XL |
72 | |
73 | const CIT1: impl Iterator<Item: Copy, Item: Send> = iter::empty(); | |
1b1a35ee | 74 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 75 | const CIT2: impl Iterator<Item: Copy, Item: Copy> = iter::empty(); |
1b1a35ee | 76 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 77 | const CIT3: impl Iterator<Item: 'static, Item: 'static> = iter::empty(); |
1b1a35ee | 78 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 79 | static SIT1: impl Iterator<Item: Copy, Item: Send> = iter::empty(); |
1b1a35ee | 80 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 81 | static SIT2: impl Iterator<Item: Copy, Item: Copy> = iter::empty(); |
1b1a35ee | 82 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 83 | static SIT3: impl Iterator<Item: 'static, Item: 'static> = iter::empty(); |
1b1a35ee | 84 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 XL |
85 | |
86 | fn lit1() { let _: impl Iterator<Item: Copy, Item: Send> = iter::empty(); } | |
1b1a35ee | 87 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 88 | fn lit2() { let _: impl Iterator<Item: Copy, Item: Copy> = iter::empty(); } |
1b1a35ee | 89 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 90 | fn lit3() { let _: impl Iterator<Item: 'static, Item: 'static> = iter::empty(); } |
1b1a35ee | 91 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 XL |
92 | |
93 | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T; | |
1b1a35ee | 94 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 95 | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T; |
1b1a35ee | 96 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 97 | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T; |
1b1a35ee | 98 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 99 | type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = T; |
1b1a35ee | 100 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 101 | type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T; |
1b1a35ee | 102 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 103 | type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T; |
1b1a35ee | 104 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 105 | |
416331ca | 106 | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy; |
1b1a35ee | 107 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
416331ca | 108 | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy; |
1b1a35ee | 109 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
416331ca | 110 | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy; |
1b1a35ee | 111 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
416331ca | 112 | type ETAI4 = impl Iterator<Item: Copy, Item: Send>; |
1b1a35ee | 113 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
416331ca | 114 | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>; |
1b1a35ee | 115 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
416331ca | 116 | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>; |
1b1a35ee | 117 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 XL |
118 | |
119 | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {} | |
1b1a35ee | 120 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 121 | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {} |
1b1a35ee | 122 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 123 | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {} |
1b1a35ee | 124 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 125 | trait TRS1: Iterator<Item: Copy, Item: Send> {} |
1b1a35ee | 126 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 127 | trait TRS2: Iterator<Item: Copy, Item: Copy> {} |
1b1a35ee | 128 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 129 | trait TRS3: Iterator<Item: 'static, Item: 'static> {} |
1b1a35ee | 130 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 131 | trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {} |
1b1a35ee | 132 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 133 | trait TRW2<T> where T: Iterator<Item: Copy, Item: Copy> {} |
1b1a35ee | 134 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 135 | trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {} |
1b1a35ee | 136 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 137 | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {} |
1b1a35ee XL |
138 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
139 | //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] | |
dc9dc135 | 140 | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {} |
1b1a35ee XL |
141 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
142 | //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] | |
dc9dc135 | 143 | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {} |
1b1a35ee XL |
144 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
145 | //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] | |
dc9dc135 | 146 | trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; } |
1b1a35ee | 147 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 148 | trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; } |
1b1a35ee | 149 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 150 | trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; } |
1b1a35ee | 151 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 XL |
152 | |
153 | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>; | |
1b1a35ee | 154 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 155 | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>; |
1b1a35ee | 156 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 | 157 | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>; |
1b1a35ee | 158 | //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] |
dc9dc135 XL |
159 | |
160 | fn main() {} |