-
Notifications
You must be signed in to change notification settings - Fork 751
/
Copy pathrust.test
538 lines (346 loc) · 9.34 KB
/
rust.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
RUN: llvm-cxxfilt -n < %s | FileCheck --match-full-lines %s
CHECK: a::main
_RNvC1a4main
CHECK: hello::rust
_RNvCshGpAVYOtgW1_5hello4rust
CHECK: a::b::c
_RNvNvC1a1b1c
; Instantiating crate
CHECK: crate
_RC5crateC3foo
; Closure namespace
CHECK: crate::{closure#0}
_RNCC5crate0
CHECK: crate::{closure#1}
_RNCC5crates_0
CHECK: crate::{closure:foo#0}
_RNCC5crate3foo
CHECK: crate::{closure:foo#1}
_RNCC5crates_3foo
; Shim namespace
CHECK: crate::{shim:reify#0}
_RNSC5crate5reify
; Unrecognized special namespace
CHECK: crate::{Z:ident#10}
_RNZC5crates8_5ident
; Inherent impl
CHECK: <_>
_RMC5cratep
CHECK: <_>
_RMs_C5cratep
; Trait impl
CHECK: <_ as Clone>
_RXC5cratepC5Clone
CHECK: <_ as Clone>
_RXs_C5cratepC5Clone
; Trait definition
CHECK: <_ as Ord>
_RYpC3Ord
; Generic type arguments
CHECK: generic::<_>
_RIC7genericpE
CHECK: generic::<_, _>
_RIC7genericppE
CHECK: generic::<_, _, _>
_RIC7genericpppE
; Generic const arguments
CHECK: generic_const::<_>
_RIC13generic_constKpE
; Generic lifetime arguments
CHECK: generic_lifetime::<'_>
_RIC16generic_lifetimeL_E
; Invalid lifetime index.
CHECK: _RIC16generic_lifetimeL0_E
_RIC16generic_lifetimeL0_E
; Basic types
CHECK: basic::<i8>
_RIC5basicaE
CHECK: basic::<bool>
_RIC5basicbE
CHECK: basic::<char>
_RIC5basiccE
CHECK: basic::<f64>
_RIC5basicdE
CHECK: basic::<str>
_RIC5basiceE
CHECK: basic::<f32>
_RIC5basicfE
CHECK: basic::<u8>
_RIC5basichE
CHECK: basic::<isize>
_RIC5basiciE
CHECK: basic::<usize>
_RIC5basicjE
CHECK: basic::<i32>
_RIC5basiclE
CHECK: basic::<u32>
_RIC5basicmE
CHECK: basic::<i128>
_RIC5basicnE
CHECK: basic::<u128>
_RIC5basicoE
CHECK: basic::<_>
_RIC5basicpE
CHECK: basic::<i16>
_RIC5basicsE
CHECK: basic::<u16>
_RIC5basictE
CHECK: basic::<()>
_RIC5basicuE
CHECK: basic::<...>
_RIC5basicvE
CHECK: basic::<i64>
_RIC5basicxE
CHECK: basic::<u64>
_RIC5basicyE
CHECK: basic::<!>
_RIC5basiczE
; Named types. Test possible paths productions.
CHECK: named::<name>
_RIC5namedC4nameE
CHECK: named::<<_>>
_RIC5namedMC5cratepE
CHECK: named::<<_ as Name>>
_RIC5namedXC5cratepC4NameE
CHECK: named::<<_ as Name>>
_RIC5namedYpC4NameE
CHECK: named::<name::Name>
_RIC5namedNvC4name4NameE
CHECK: named::<Name<>>
_RIC5namedIC4NameEE
; Types
CHECK: types::<[u8; 0]>
_RIC5typesAhj0_E
CHECK: types::<[_]>
_RIC5typesSpE
CHECK: types::<()>
_RIC5typesTEE
CHECK: types::<(_,)>
_RIC5typesTpEE
CHECK: types::<(_, _)>
_RIC5typesTppEE
CHECK: types::<(_, _, _)>
_RIC5typesTpppEE
CHECK: types::<&_>
_RIC5typesRpE
CHECK: types::<&_>
_RIC5typesRL_pE
CHECK: types::<&mut _>
_RIC5typesQpE
CHECK: types::<&mut _>
_RIC5typesQL_pE
CHECK: types::<*const _>
_RIC5typesPpE
CHECK: types::<*mut _>
_RIC5typesOpE
; Function signatures
CHECK: function::<fn()>
_RIC8functionFEuE
CHECK: function::<fn() -> _>
_RIC8functionFEpE
CHECK: function::<fn(_)>
_RIC8functionFpEuE
CHECK: function::<fn(_, _)>
_RIC8functionFppEuE
CHECK: function::<fn(_, _, _)>
_RIC8functionFpppEuE
CHECK: function::<unsafe fn()>
_RIC8functionFUEuE
CHECK: function::<extern "C" fn()>
_RIC8functionFKCEuE
CHECK: function::<extern "cdecl" fn()>
_RIC8functionFK5cdeclEuE
CHECK: function::<unsafe extern "C-cmse-nonsecure-call" fn()>
_RIC8functionFUK21C_cmse_nonsecure_callEuE
; Invalid ABI with punycode.
CHECK: _RIC8functionFKu3n3hEuE
_RIC8functionFKu3n3hEuE
; Trait objects
CHECK: trait::<dyn >
_RIC5traitDEL_E
CHECK: trait::<dyn for<'a> >
_RIC5traitDG_EL_E
CHECK: trait::<for<'a> fn(dyn for<'b> + 'a)>
_RIC5traitFG_DG_EL0_EuE
CHECK: trait::<dyn Display>
_RIC5traitDC7DisplayEL_E
CHECK: trait::<dyn Display + Send + Sync>
_RIC5traitDC7DisplayC4SendC4SyncEL_E
CHECK: trait::<dyn for<'a> Display>
_RIC5traitDG_C7DisplayEL_E
CHECK: trait::<dyn IntoIterator<_, Item = _>>
_RIC5traitDIC12IntoIteratorpEp4ItempEL_E
CHECK: trait::<dyn IntoIterator<Item = _>>
_RIC5traitDC12IntoIteratorp4ItempEL_E
CHECK: trait::<dyn IntoIterator<Item = _, IntoIter = _>>
_RIC5traitDC12IntoIteratorp4Itempp8IntoIterpEL_E
; Invalid trait object, missing lifetime.
CHECK: _RIC5traitDEE
_RIC5traitDEE
; Binders
CHECK: binders::<for<'a> fn(&'a _)>
_RIC7bindersFG_RL0_pEuE
CHECK: binders::<for<'a> fn(&'a mut _)>
_RIC7bindersFG_QL0_pEuE
CHECK: binders::<for<'a, 'b> fn(&'a _, &'b _)>
_RIC7bindersFG0_RL1_pRL0_pEuE
CHECK: binders::<for<'a, 'b> fn() -> for<'c, 'd> fn(&'a _, &'d _)>
_RIC7bindersFG0_EFG0_RL3_pRL0_pEuE
CHECK: binders::<for<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p, 'q, 'r, 's, 't, 'u, 'v, 'w, 'x, 'y, 'z, 'z1, 'z2, 'z3, 'z4> fn(&'a &'b &'c &'d &'e &'f &'g &'h &'i &'j &'k &'l &'m &'n &'o &'p &'q &'r &'s &'t &'u &'v &'w &'x &'y &'z &'z1 &'z2 &'z3 &'z4 ())>
_RIC7bindersFGs_RLt_RLs_RLr_RLq_RLp_RLo_RLn_RLm_RLl_RLk_RLj_RLi_RLh_RLg_RLf_RLe_RLd_RLc_RLb_RLa_RL9_RL8_RL7_RL6_RL5_RL4_RL3_RL2_RL1_RL0_uEuE
; Invalid binder. Too many bound lifetimes.
CHECK: _RIC7bindersFGFF_EuE
_RIC7bindersFGFF_EuE
; Integer constants. Test value demangling.
CHECK: integer::<0>
_RIC7integerKi0_E
CHECK: integer::<1>
_RIC7integerKi1_E
CHECK: integer::<-1>
_RIC7integerKin1_E
CHECK: integer::<-15>
_RIC7integerKinf_E
CHECK: integer::<-16>
_RIC7integerKin10_E
CHECK: integer::<18446744073709551615>
_RIC7integerKoffffffffffffffff_E
CHECK: integer::<0x10000000000000000>
_RIC7integerKo10000000000000000_E
CHECK: integer::<-0x123456789abcdef01>
_RIC7integerKnn123456789abcdef01_E
; Invalid integer constant without any digits:
CHECK: _RIC7integerKi_E
_RIC7integerKi_E
; Invalid integer constants with insignificant leading zeros:
CHECK: _RIC7integerKi00_E
_RIC7integerKi00_E
CHECK: _RIC7integerKi01_E
_RIC7integerKi01_E
; Integer constants. Test all integer types.
CHECK: i8::<0>
_RIC2i8Ka0_E
CHECK: u8::<0>
_RIC2u8Kh0_E
CHECK: isize::<0>
_RIC5isizeKi0_E
CHECK: usize::<0>
_RIC5usizeKj0_E
CHECK: i32::<0>
_RIC3i32Kl0_E
CHECK: u32::<0>
_RIC3u32Km0_E
CHECK: i128::<0>
_RIC4i128Kn0_E
CHECK: u128::<0>
_RIC4u128Ko0_E
CHECK: i16::<0>
_RIC3i16Ks0_E
CHECK: u16::<0>
_RIC3u16Kt0_E
CHECK: i64::<0>
_RIC3i64Kx0_E
CHECK: u64::<0>
_RIC3u64Ky0_E
; Bool constants
CHECK: bool::<false>
_RIC4boolKb0_E
CHECK: bool::<true>
_RIC4boolKb1_E
; Invalid bool constants
CHECK: _RIC4boolKb2_E
_RIC4boolKb2_E
CHECK: _RIC4boolKbn0_E
_RIC4boolKbn0_E
; Char constants
CHECK: char::<'a'>
_RIC4charKc61_E
CHECK: char::<'"'>
_RIC4charKc22_E
CHECK: char::<'\t'>
_RIC4charKc9_E
CHECK: char::<'\r'>
_RIC4charKcd_E
CHECK: char::<'\n'>
_RIC4charKca_E
CHECK: char::<'\\'>
_RIC4charKc5c_E
CHECK: char::<'\''>
_RIC4charKc27_E
CHECK: char::<'\u{1f40d}'>
_RIC4charKc1f40d_E
CHECK: char::<'\u{10ffff}'>
_RIC4charKc10ffff_E
; Invalid char constants
CHECK: _RIC4charKc1234567_E
_RIC4charKc1234567_E
; Backreferences
CHECK: backref::<backref::ident>
_RIC7backrefNvB0_5identE
CHECK: backref::<(), ()>
_RIC7backrefuB9_E
CHECK: backref::<7, 7>
_RIC7backrefKi7_KBa_E
; Invalid backreferences
CHECK: _RB_
_RB_
CHECK: _RB5_
_RB5_
CHECK: _RNvB_1a
_RNvB_1a
CHECK: _RIC7backrefSB9_E
_RIC7backrefSB9_E
CHECK: _RIC7backrefKBa_E
_RIC7backrefKBa_E
; Dot suffix
CHECK: dot (.llvm.1234)
_RC3dot.llvm.1234
CHECK: dot (.llvm.6789)
_RC3dotC5crate.llvm.6789
; Punycode
CHECK: punycode::東京
_RNvC8punycodeu7_1lqs71d
CHECK: punycode::zażółć_gęślą_jaźń
_RNvC8punycodeu29za_gl_ja_w3a7psa2tqtgb10airva
CHECK: punycode::საჭმელად_გემრიელი_სადილი
_RNvC8punycodeu30____7hkackfecea1cbdathfdh9hlq6y
CHECK: Gödel::Escher::Bach
_RNtNvCu8Gdel_5qa6Escher4Bach
CHECK: punycode::🦁🐅
_RNvC8punycodeu7wn8hx1g
; Punycode - invalid code point
CHECK: _RCu5r731r
_RCu5r731r
CHECK: _RCu8b44444yy
_RCu8b44444yy
CHECK: _RNvC1au25zzzzzzzzzzzzzzzzzzzzzzzzz
_RNvC1au25zzzzzzzzzzzzzzzzzzzzzzzzz
; Punycode - early EOF
CHECK: _RCu8_CCCAR_u4
_RCu8_CCCAR_u4
; Punycode - overflow
CHECK: _RNvC1au21p18888888888888888888
_RNvC1au21p18888888888888888888
; Invalid mangled characters
CHECK: _RNvC2a.1c
_RNvC2a.1c
CHECK: _RNvC2a$1c
_RNvC2a$1c
; Invalid namespace (not in [a-zA-Z]).
CHECK: _RN_C5crate4main
_RN_C5crate4main
; Invalid identifier length (UINT64_MAX + 3, which happens to be ok after a wraparound).
CHECK: _RNvC2ab18446744073709551618xy
_RNvC2ab18446744073709551618xy
; Mangling scheme includes an optional encoding version. When present it would
; indicate an encoding we don't support yet. Check that it is rejected:
CHECK: _R0NvC1a4main
_R0NvC1a4main
; Early EOF
CHECK: _RNv
_RNv
CHECK: _RNvC
_RNvC
CHECK: _RNvC1a5main
_RNvC1a5main
CHECK: _RNvC1a20abc
_RNvC1a20abc