2
2
// revisions: min_tait full_tait
3
3
#![ feature( min_type_alias_impl_trait) ]
4
4
#![ cfg_attr( full_tait, feature( type_alias_impl_trait) ) ]
5
- //[full_tait]~^ WARN incomplete
6
5
#![ feature( untagged_unions) ]
7
6
8
7
use std:: iter;
9
8
10
- struct SI1 < T : Iterator < Item : Copy , Item : Send > > { f : T }
11
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
12
- struct SI2 < T : Iterator < Item : Copy , Item : Copy > > { f : T }
13
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
14
- struct SI3 < T : Iterator < Item : ' static , Item : ' static > > { f : T }
15
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
16
- struct SW1 < T > where T : Iterator < Item : Copy , Item : Send > { f : T }
17
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
18
- struct SW2 < T > where T : Iterator < Item : Copy , Item : Copy > { f : T }
19
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
20
- struct SW3 < T > where T : Iterator < Item : ' static , Item : ' static > { f : T }
21
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
9
+ struct SI1 < T : Iterator < Item : Copy , Item : Send > > {
10
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
11
+ f : T ,
12
+ }
13
+ struct SI2 < T : Iterator < Item : Copy , Item : Copy > > {
14
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
15
+ f : T ,
16
+ }
17
+ struct SI3 < T : Iterator < Item : ' static , Item : ' static > > {
18
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
19
+ f : T ,
20
+ }
21
+ struct SW1 < T >
22
+ where
23
+ T : Iterator < Item : Copy , Item : Send > ,
24
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
25
+ {
26
+ f : T ,
27
+ }
28
+ struct SW2 < T >
29
+ where
30
+ T : Iterator < Item : Copy , Item : Copy > ,
31
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
32
+ {
33
+ f : T ,
34
+ }
35
+ struct SW3 < T >
36
+ where
37
+ T : Iterator < Item : ' static , Item : ' static > ,
38
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
39
+ {
40
+ f : T ,
41
+ }
22
42
23
- enum EI1 < T : Iterator < Item : Copy , Item : Send > > { V ( T ) }
24
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
25
- enum EI2 < T : Iterator < Item : Copy , Item : Copy > > { V ( T ) }
26
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
27
- enum EI3 < T : Iterator < Item : ' static , Item : ' static > > { V ( T ) }
28
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
29
- enum EW1 < T > where T : Iterator < Item : Copy , Item : Send > { V ( T ) }
30
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
31
- enum EW2 < T > where T : Iterator < Item : Copy , Item : Copy > { V ( T ) }
32
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
33
- enum EW3 < T > where T : Iterator < Item : ' static , Item : ' static > { V ( T ) }
34
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
43
+ enum EI1 < T : Iterator < Item : Copy , Item : Send > > {
44
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
45
+ V ( T ) ,
46
+ }
47
+ enum EI2 < T : Iterator < Item : Copy , Item : Copy > > {
48
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
49
+ V ( T ) ,
50
+ }
51
+ enum EI3 < T : Iterator < Item : ' static , Item : ' static > > {
52
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
53
+ V ( T ) ,
54
+ }
55
+ enum EW1 < T >
56
+ where
57
+ T : Iterator < Item : Copy , Item : Send > ,
58
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
59
+ {
60
+ V ( T ) ,
61
+ }
62
+ enum EW2 < T >
63
+ where
64
+ T : Iterator < Item : Copy , Item : Copy > ,
65
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
66
+ {
67
+ V ( T ) ,
68
+ }
69
+ enum EW3 < T >
70
+ where
71
+ T : Iterator < Item : ' static , Item : ' static > ,
72
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
73
+ {
74
+ V ( T ) ,
75
+ }
35
76
36
- union UI1 < T : Iterator < Item : Copy , Item : Send > > { f : T }
37
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
38
- union UI2 < T : Iterator < Item : Copy , Item : Copy > > { f : T }
39
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
40
- union UI3 < T : Iterator < Item : ' static , Item : ' static > > { f : T }
41
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
42
- union UW1 < T > where T : Iterator < Item : Copy , Item : Send > { f : T }
43
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
44
- union UW2 < T > where T : Iterator < Item : Copy , Item : Copy > { f : T }
45
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
46
- union UW3 < T > where T : Iterator < Item : ' static , Item : ' static > { f : T }
47
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
77
+ union UI1 < T : Iterator < Item : Copy , Item : Send > > {
78
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
79
+ f : T ,
80
+ }
81
+ union UI2 < T : Iterator < Item : Copy , Item : Copy > > {
82
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
83
+ f : T ,
84
+ }
85
+ union UI3 < T : Iterator < Item : ' static , Item : ' static > > {
86
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
87
+ f : T ,
88
+ }
89
+ union UW1 < T >
90
+ where
91
+ T : Iterator < Item : Copy , Item : Send > ,
92
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
93
+ {
94
+ f : T ,
95
+ }
96
+ union UW2 < T >
97
+ where
98
+ T : Iterator < Item : Copy , Item : Copy > ,
99
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
100
+ {
101
+ f : T ,
102
+ }
103
+ union UW3 < T >
104
+ where
105
+ T : Iterator < Item : ' static , Item : ' static > ,
106
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
107
+ {
108
+ f : T ,
109
+ }
48
110
49
111
fn FI1 < T : Iterator < Item : Copy , Item : Send > > ( ) { }
50
112
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
51
113
fn FI2 < T : Iterator < Item : Copy , Item : Copy > > ( ) { }
52
114
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
53
115
fn FI3 < T : Iterator < Item : ' static , Item : ' static > > ( ) { }
54
116
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
55
- fn FW1 < T > ( ) where T : Iterator < Item : Copy , Item : Send > { }
56
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
57
- fn FW2 < T > ( ) where T : Iterator < Item : Copy , Item : Copy > { }
58
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
59
- fn FW3 < T > ( ) where T : Iterator < Item : ' static , Item : ' static > { }
60
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
117
+ fn FW1 < T > ( )
118
+ where
119
+ T : Iterator < Item : Copy , Item : Send > ,
120
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
121
+ {
122
+ }
123
+ fn FW2 < T > ( )
124
+ where
125
+ T : Iterator < Item : Copy , Item : Copy > ,
126
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
127
+ {
128
+ }
129
+ fn FW3 < T > ( )
130
+ where
131
+ T : Iterator < Item : ' static , Item : ' static > ,
132
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
133
+ {
134
+ }
61
135
62
- fn FRPIT1 ( ) -> impl Iterator < Item : Copy , Item : Send > { iter:: empty ( ) }
63
- fn FRPIT2 ( ) -> impl Iterator < Item : Copy , Item : Copy > { iter:: empty ( ) }
64
- fn FRPIT3 ( ) -> impl Iterator < Item : ' static , Item : ' static > { iter:: empty ( ) }
136
+ fn FRPIT1 ( ) -> impl Iterator < Item : Copy , Item : Send > {
137
+ iter:: empty ( )
138
+ }
139
+ fn FRPIT2 ( ) -> impl Iterator < Item : Copy , Item : Copy > {
140
+ iter:: empty ( )
141
+ }
142
+ fn FRPIT3 ( ) -> impl Iterator < Item : ' static , Item : ' static > {
143
+ iter:: empty ( )
144
+ }
65
145
fn FAPIT1 ( _: impl Iterator < Item : Copy , Item : Send > ) { }
66
146
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
67
147
fn FAPIT2 ( _: impl Iterator < Item : Copy , Item : Copy > ) { }
@@ -75,12 +155,21 @@ type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
75
155
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
76
156
type TAI3 < T : Iterator < Item : ' static , Item : ' static > > = T ;
77
157
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
78
- type TAW1 < T > where T : Iterator < Item : Copy , Item : Send > = T ;
158
+ type TAW1 < T >
159
+ where
160
+ T : Iterator < Item : Copy , Item : Send > ,
79
161
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
80
- type TAW2 < T > where T : Iterator < Item : Copy , Item : Copy > = T ;
162
+ = T ;
163
+ type TAW2 < T >
164
+ where
165
+ T : Iterator < Item : Copy , Item : Copy > ,
81
166
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
82
- type TAW3 < T > where T : Iterator < Item : ' static , Item : ' static > = T ;
167
+ = T ;
168
+ type TAW3 < T >
169
+ where
170
+ T : Iterator < Item : ' static , Item : ' static > ,
83
171
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
172
+ = T ;
84
173
85
174
type ETAI1 < T : Iterator < Item : Copy , Item : Send > > = impl Copy ;
86
175
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
@@ -107,27 +196,57 @@ trait TRS2: Iterator<Item: Copy, Item: Copy> {}
107
196
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
108
197
trait TRS3 : Iterator < Item : ' static , Item : ' static > { }
109
198
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
110
- trait TRW1 < T > where T : Iterator < Item : Copy , Item : Send > { }
111
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
112
- trait TRW2 < T > where T : Iterator < Item : Copy , Item : Copy > { }
113
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
114
- trait TRW3 < T > where T : Iterator < Item : ' static , Item : ' static > { }
115
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
116
- trait TRSW1 where Self : Iterator < Item : Copy , Item : Send > { }
117
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
118
- //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
119
- trait TRSW2 where Self : Iterator < Item : Copy , Item : Copy > { }
120
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
121
- //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
122
- trait TRSW3 where Self : Iterator < Item : ' static , Item : ' static > { }
123
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
124
- //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
125
- trait TRA1 { type A : Iterator < Item : Copy , Item : Send > ; }
126
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
127
- trait TRA2 { type A : Iterator < Item : Copy , Item : Copy > ; }
128
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
129
- trait TRA3 { type A : Iterator < Item : ' static , Item : ' static > ; }
130
- //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
199
+ trait TRW1 < T >
200
+ where
201
+ T : Iterator < Item : Copy , Item : Send > ,
202
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
203
+ {
204
+ }
205
+ trait TRW2 < T >
206
+ where
207
+ T : Iterator < Item : Copy , Item : Copy > ,
208
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
209
+ {
210
+ }
211
+ trait TRW3 < T >
212
+ where
213
+ T : Iterator < Item : ' static , Item : ' static > ,
214
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
215
+ {
216
+ }
217
+ trait TRSW1
218
+ where
219
+ Self : Iterator < Item : Copy , Item : Send > ,
220
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
221
+ //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
222
+ {
223
+ }
224
+ trait TRSW2
225
+ where
226
+ Self : Iterator < Item : Copy , Item : Copy > ,
227
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
228
+ //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
229
+ {
230
+ }
231
+ trait TRSW3
232
+ where
233
+ Self : Iterator < Item : ' static , Item : ' static > ,
234
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
235
+ //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
236
+ {
237
+ }
238
+ trait TRA1 {
239
+ type A : Iterator < Item : Copy , Item : Send > ;
240
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
241
+ }
242
+ trait TRA2 {
243
+ type A : Iterator < Item : Copy , Item : Copy > ;
244
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
245
+ }
246
+ trait TRA3 {
247
+ type A : Iterator < Item : ' static , Item : ' static > ;
248
+ //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
249
+ }
131
250
132
251
type TADyn1 = dyn Iterator < Item : Copy , Item : Send > ;
133
252
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
0 commit comments