Skip to content

Commit a1f690b

Browse files
committed
Remove the #[pin_v2] test since it produces different errors on different archs
1 parent e614ed4 commit a1f690b

File tree

2 files changed

+41
-66
lines changed

2 files changed

+41
-66
lines changed

tests/ui/pin-ergonomics/pin_v2-attr.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
extern_types,
66
associated_type_defaults,
77
fn_delegation,
8+
asm_experimental_arch,
89
)]
910
#![allow(incomplete_features)]
1011
#![pin_v2] //~ ERROR `#[pin_v2]` attribute cannot be used on crates
@@ -135,24 +136,4 @@ macro_rules! macro_def {
135136
#[pin_v2] //~ ERROR `#[pin_v2]` attribute cannot be used on macro calls
136137
macro_def!();
137138

138-
// Restricted on architectures where inline assembly is stable
139-
// accroding to `compiler/rustc_ast_lowering/src/asm.rs`
140-
#[cfg(any(
141-
target_arch = "x86",
142-
target_arch = "x86_64",
143-
target_arch = "arm",
144-
target_arch = "aarch64",
145-
target_arch = "arm64ec",
146-
target_arch = "riscv32",
147-
target_arch = "riscv64",
148-
target_arch = "loongarch32",
149-
target_arch = "loongarch64",
150-
target_arch = "s390x",
151-
))]
152-
std::arch::global_asm! {
153-
"{}",
154-
#[pin_v2] //~ ERROR this attribute is not supported on assembly
155-
const 0
156-
}
157-
158139
fn main() {}
Lines changed: 40 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,318 +1,312 @@
11
error: `#[pin_v2]` attribute cannot be used on macro calls
2-
--> $DIR/pin_v2-attr.rs:135:1
2+
--> $DIR/pin_v2-attr.rs:136:1
33
|
44
LL | #[pin_v2]
55
| ^^^^^^^^^
66
|
77
= help: `#[pin_v2]` can be applied to data types and unions
88

9-
error: this attribute is not supported on assembly
10-
--> $DIR/pin_v2-attr.rs:154:5
11-
|
12-
LL | #[pin_v2]
13-
| ^^^^^^^^^
14-
159
error: allow, cfg, cfg_attr, deny, expect, forbid, and warn are the only allowed built-in attributes in function parameters
16-
--> $DIR/pin_v2-attr.rs:84:12
10+
--> $DIR/pin_v2-attr.rs:85:12
1711
|
1812
LL | fn f<T, U>(#[pin_v2] param: Foo<T, U>)
1913
| ^^^^^^^^^
2014

2115
error: `#[pin_v2]` attribute cannot be used on crates
22-
--> $DIR/pin_v2-attr.rs:10:1
16+
--> $DIR/pin_v2-attr.rs:11:1
2317
|
2418
LL | #![pin_v2]
2519
| ^^^^^^^^^^
2620
|
2721
= help: `#[pin_v2]` can be applied to data types and unions
2822

2923
error: `#[pin_v2]` attribute cannot be used on function params
30-
--> $DIR/pin_v2-attr.rs:27:10
24+
--> $DIR/pin_v2-attr.rs:28:10
3125
|
3226
LL | enum Foo<#[pin_v2] T, #[pin_v2] U = ()> {
3327
| ^^^^^^^^^
3428
|
3529
= help: `#[pin_v2]` can be applied to data types and unions
3630

3731
error: `#[pin_v2]` attribute cannot be used on function params
38-
--> $DIR/pin_v2-attr.rs:27:23
32+
--> $DIR/pin_v2-attr.rs:28:23
3933
|
4034
LL | enum Foo<#[pin_v2] T, #[pin_v2] U = ()> {
4135
| ^^^^^^^^^
4236
|
4337
= help: `#[pin_v2]` can be applied to data types and unions
4438

4539
error: `#[pin_v2]` attribute cannot be used on enum variants
46-
--> $DIR/pin_v2-attr.rs:30:5
40+
--> $DIR/pin_v2-attr.rs:31:5
4741
|
4842
LL | #[pin_v2]
4943
| ^^^^^^^^^
5044
|
5145
= help: `#[pin_v2]` can be applied to data types and unions
5246

5347
error: `#[pin_v2]` attribute cannot be used on struct fields
54-
--> $DIR/pin_v2-attr.rs:32:18
48+
--> $DIR/pin_v2-attr.rs:33:18
5549
|
5650
LL | TupleVariant(#[pin_v2] T),
5751
| ^^^^^^^^^
5852
|
5953
= help: `#[pin_v2]` can be applied to data types and unions
6054

6155
error: `#[pin_v2]` attribute cannot be used on struct fields
62-
--> $DIR/pin_v2-attr.rs:34:9
56+
--> $DIR/pin_v2-attr.rs:35:9
6357
|
6458
LL | #[pin_v2]
6559
| ^^^^^^^^^
6660
|
6761
= help: `#[pin_v2]` can be applied to data types and unions
6862

6963
error: `#[pin_v2]` attribute cannot be used on traits
70-
--> $DIR/pin_v2-attr.rs:39:1
64+
--> $DIR/pin_v2-attr.rs:40:1
7165
|
7266
LL | #[pin_v2]
7367
| ^^^^^^^^^
7468
|
7569
= help: `#[pin_v2]` can be applied to data types and unions
7670

7771
error: `#[pin_v2]` attribute cannot be used on associated consts
78-
--> $DIR/pin_v2-attr.rs:41:5
72+
--> $DIR/pin_v2-attr.rs:42:5
7973
|
8074
LL | #[pin_v2]
8175
| ^^^^^^^^^
8276
|
8377
= help: `#[pin_v2]` can be applied to data types and unions
8478

8579
error: `#[pin_v2]` attribute cannot be used on associated types
86-
--> $DIR/pin_v2-attr.rs:43:5
80+
--> $DIR/pin_v2-attr.rs:44:5
8781
|
8882
LL | #[pin_v2]
8983
| ^^^^^^^^^
9084
|
9185
= help: `#[pin_v2]` can be applied to data types and unions
9286

9387
error: `#[pin_v2]` attribute cannot be used on required trait methods
94-
--> $DIR/pin_v2-attr.rs:46:5
88+
--> $DIR/pin_v2-attr.rs:47:5
9589
|
9690
LL | #[pin_v2]
9791
| ^^^^^^^^^
9892
|
9993
= help: `#[pin_v2]` can be applied to data types and unions
10094

10195
error: `#[pin_v2]` attribute cannot be used on provided trait methods
102-
--> $DIR/pin_v2-attr.rs:48:5
96+
--> $DIR/pin_v2-attr.rs:49:5
10397
|
10498
LL | #[pin_v2]
10599
| ^^^^^^^^^
106100
|
107101
= help: `#[pin_v2]` can be applied to data types and unions
108102

109103
error: `#[pin_v2]` attribute cannot be used on trait aliases
110-
--> $DIR/pin_v2-attr.rs:52:1
104+
--> $DIR/pin_v2-attr.rs:53:1
111105
|
112106
LL | #[pin_v2]
113107
| ^^^^^^^^^
114108
|
115109
= help: `#[pin_v2]` can be applied to data types and unions
116110

117111
error: `#[pin_v2]` attribute cannot be used on inherent impl blocks
118-
--> $DIR/pin_v2-attr.rs:55:1
112+
--> $DIR/pin_v2-attr.rs:56:1
119113
|
120114
LL | #[pin_v2]
121115
| ^^^^^^^^^
122116
|
123117
= help: `#[pin_v2]` can be applied to data types and unions
124118

125119
error: `#[pin_v2]` attribute cannot be used on delegations
126-
--> $DIR/pin_v2-attr.rs:58:5
120+
--> $DIR/pin_v2-attr.rs:59:5
127121
|
128122
LL | #[pin_v2]
129123
| ^^^^^^^^^
130124
|
131125
= help: `#[pin_v2]` can be applied to data types and unions
132126

133127
error: `#[pin_v2]` attribute cannot be used on inherent methods
134-
--> $DIR/pin_v2-attr.rs:61:5
128+
--> $DIR/pin_v2-attr.rs:62:5
135129
|
136130
LL | #[pin_v2]
137131
| ^^^^^^^^^
138132
|
139133
= help: `#[pin_v2]` can be applied to data types and unions
140134

141135
error: `#[pin_v2]` attribute cannot be used on trait impl blocks
142-
--> $DIR/pin_v2-attr.rs:65:1
136+
--> $DIR/pin_v2-attr.rs:66:1
143137
|
144138
LL | #[pin_v2]
145139
| ^^^^^^^^^
146140
|
147141
= help: `#[pin_v2]` can be applied to data types and unions
148142

149143
error: `#[pin_v2]` attribute cannot be used on trait methods in impl blocks
150-
--> $DIR/pin_v2-attr.rs:67:5
144+
--> $DIR/pin_v2-attr.rs:68:5
151145
|
152146
LL | #[pin_v2]
153147
| ^^^^^^^^^
154148
|
155149
= help: `#[pin_v2]` can be applied to data types and unions
156150

157151
error: `#[pin_v2]` attribute cannot be used on extern crates
158-
--> $DIR/pin_v2-attr.rs:71:1
152+
--> $DIR/pin_v2-attr.rs:72:1
159153
|
160154
LL | #[pin_v2]
161155
| ^^^^^^^^^
162156
|
163157
= help: `#[pin_v2]` can be applied to data types and unions
164158

165159
error: `#[pin_v2]` attribute cannot be used on use statements
166-
--> $DIR/pin_v2-attr.rs:74:1
160+
--> $DIR/pin_v2-attr.rs:75:1
167161
|
168162
LL | #[pin_v2]
169163
| ^^^^^^^^^
170164
|
171165
= help: `#[pin_v2]` can be applied to data types and unions
172166

173167
error: `#[pin_v2]` attribute cannot be used on statics
174-
--> $DIR/pin_v2-attr.rs:77:1
168+
--> $DIR/pin_v2-attr.rs:78:1
175169
|
176170
LL | #[pin_v2]
177171
| ^^^^^^^^^
178172
|
179173
= help: `#[pin_v2]` can be applied to data types and unions
180174

181175
error: `#[pin_v2]` attribute cannot be used on constants
182-
--> $DIR/pin_v2-attr.rs:80:1
176+
--> $DIR/pin_v2-attr.rs:81:1
183177
|
184178
LL | #[pin_v2]
185179
| ^^^^^^^^^
186180
|
187181
= help: `#[pin_v2]` can be applied to data types and unions
188182

189183
error: `#[pin_v2]` attribute cannot be used on functions
190-
--> $DIR/pin_v2-attr.rs:83:1
184+
--> $DIR/pin_v2-attr.rs:84:1
191185
|
192186
LL | #[pin_v2]
193187
| ^^^^^^^^^
194188
|
195189
= help: `#[pin_v2]` can be applied to data types and unions
196190

197191
error: `#[pin_v2]` attribute cannot be used on function params
198-
--> $DIR/pin_v2-attr.rs:84:12
192+
--> $DIR/pin_v2-attr.rs:85:12
199193
|
200194
LL | fn f<T, U>(#[pin_v2] param: Foo<T, U>)
201195
| ^^^^^^^^^
202196
|
203197
= help: `#[pin_v2]` can be applied to data types and unions
204198

205199
error: `#[pin_v2]` attribute cannot be used on closures
206-
--> $DIR/pin_v2-attr.rs:92:5
200+
--> $DIR/pin_v2-attr.rs:93:5
207201
|
208202
LL | #[pin_v2]
209203
| ^^^^^^^^^
210204
|
211205
= help: `#[pin_v2]` can be applied to data types and unions
212206

213207
error: `#[pin_v2]` attribute cannot be used on expressions
214-
--> $DIR/pin_v2-attr.rs:94:5
208+
--> $DIR/pin_v2-attr.rs:95:5
215209
|
216210
LL | #[pin_v2]
217211
| ^^^^^^^^^
218212
|
219213
= help: `#[pin_v2]` can be applied to data types and unions
220214

221215
error: `#[pin_v2]` attribute cannot be used on struct fields
222-
--> $DIR/pin_v2-attr.rs:98:9
216+
--> $DIR/pin_v2-attr.rs:99:9
223217
|
224218
LL | #[pin_v2]
225219
| ^^^^^^^^^
226220
|
227221
= help: `#[pin_v2]` can be applied to data types and unions
228222

229223
error: `#[pin_v2]` attribute cannot be used on statements
230-
--> $DIR/pin_v2-attr.rs:96:5
224+
--> $DIR/pin_v2-attr.rs:97:5
231225
|
232226
LL | #[pin_v2]
233227
| ^^^^^^^^^
234228
|
235229
= help: `#[pin_v2]` can be applied to data types and unions
236230

237231
error: `#[pin_v2]` attribute cannot be used on match arms
238-
--> $DIR/pin_v2-attr.rs:102:9
232+
--> $DIR/pin_v2-attr.rs:103:9
239233
|
240234
LL | #[pin_v2]
241235
| ^^^^^^^^^
242236
|
243237
= help: `#[pin_v2]` can be applied to data types and unions
244238

245239
error: `#[pin_v2]` attribute cannot be used on pattern fields
246-
--> $DIR/pin_v2-attr.rs:106:13
240+
--> $DIR/pin_v2-attr.rs:107:13
247241
|
248242
LL | #[pin_v2]
249243
| ^^^^^^^^^
250244
|
251245
= help: `#[pin_v2]` can be applied to data types and unions
252246

253247
error: `#[pin_v2]` attribute cannot be used on where predicates
254-
--> $DIR/pin_v2-attr.rs:88:5
248+
--> $DIR/pin_v2-attr.rs:89:5
255249
|
256250
LL | #[pin_v2]
257251
| ^^^^^^^^^
258252
|
259253
= help: `#[pin_v2]` can be applied to data types and unions
260254

261255
error: `#[pin_v2]` attribute cannot be used on modules
262-
--> $DIR/pin_v2-attr.rs:112:1
256+
--> $DIR/pin_v2-attr.rs:113:1
263257
|
264258
LL | #[pin_v2]
265259
| ^^^^^^^^^
266260
|
267261
= help: `#[pin_v2]` can be applied to data types and unions
268262

269263
error: `#[pin_v2]` attribute cannot be used on foreign modules
270-
--> $DIR/pin_v2-attr.rs:115:1
264+
--> $DIR/pin_v2-attr.rs:116:1
271265
|
272266
LL | #[pin_v2]
273267
| ^^^^^^^^^
274268
|
275269
= help: `#[pin_v2]` can be applied to data types and unions
276270

277271
error: `#[pin_v2]` attribute cannot be used on foreign types
278-
--> $DIR/pin_v2-attr.rs:117:5
272+
--> $DIR/pin_v2-attr.rs:118:5
279273
|
280274
LL | #[pin_v2]
281275
| ^^^^^^^^^
282276
|
283277
= help: `#[pin_v2]` can be applied to data types and unions
284278

285279
error: `#[pin_v2]` attribute cannot be used on foreign statics
286-
--> $DIR/pin_v2-attr.rs:120:5
280+
--> $DIR/pin_v2-attr.rs:121:5
287281
|
288282
LL | #[pin_v2]
289283
| ^^^^^^^^^
290284
|
291285
= help: `#[pin_v2]` can be applied to data types and unions
292286

293287
error: `#[pin_v2]` attribute cannot be used on foreign functions
294-
--> $DIR/pin_v2-attr.rs:123:5
288+
--> $DIR/pin_v2-attr.rs:124:5
295289
|
296290
LL | #[pin_v2]
297291
| ^^^^^^^^^
298292
|
299293
= help: `#[pin_v2]` can be applied to data types and unions
300294

301295
error: `#[pin_v2]` attribute cannot be used on type aliases
302-
--> $DIR/pin_v2-attr.rs:127:1
296+
--> $DIR/pin_v2-attr.rs:128:1
303297
|
304298
LL | #[pin_v2]
305299
| ^^^^^^^^^
306300
|
307301
= help: `#[pin_v2]` can be applied to data types and unions
308302

309303
error: `#[pin_v2]` attribute cannot be used on macro defs
310-
--> $DIR/pin_v2-attr.rs:130:1
304+
--> $DIR/pin_v2-attr.rs:131:1
311305
|
312306
LL | #[pin_v2]
313307
| ^^^^^^^^^
314308
|
315309
= help: `#[pin_v2]` can be applied to data types and unions
316310

317-
error: aborting due to 40 previous errors
311+
error: aborting due to 39 previous errors
318312

0 commit comments

Comments
 (0)