1 # This file holds test cases for the Rust demangler.
2 # Each test case looks like this:
4 # input to be demangled
7 # See demangle-expected for documentation of supported options.
9 # A line starting with `#' is ignored.
10 # However, blank lines in this file are NOT ignored.
17 # Demangles as rust symbol.
19 _ZN4main4main17he714a2e23ed7db23E
21 # Also demangles as c++ gnu v3 mangled symbol. But with extra Rust hash.
23 _ZN4main4main17he714a2e23ed7db23E
24 main::main::he714a2e23ed7db23
25 # But auto should demangle fully gnu-v3 -> rust -> demangled, not partially.
27 _ZN4main4main17he714a2e23ed7db23E
29 # Hash is exactly 16 hex chars. Not more.
31 _ZN4main4main18h1e714a2e23ed7db23E
32 main::main::h1e714a2e23ed7db23
35 _ZN4main4main16h714a2e23ed7db23E
36 main::main::h714a2e23ed7db23
39 _ZN4main4main17he714a2e23ed7db2gE
40 main::main::he714a2e23ed7db2g
41 # $XX$ substitutions should not contain just numbers.
43 _ZN4main4$99$17he714a2e23ed7db23E
45 # _ at start of path should be removed.
46 # ".." translates to "::" "$GT$" to ">" and "$LT$" to "<".
48 _ZN71_$LT$Test$u20$$u2b$$u20$$u27$static$u20$as$u20$foo..Bar$LT$Test$GT$$GT$3bar17h930b740aa94f1d3aE
49 <Test + 'static as foo::Bar<Test>>::bar
52 _ZN54_$LT$I$u20$as$u20$core..iter..traits..IntoIterator$GT$9into_iter17h8581507801fb8615E
53 <I as core::iter::traits::IntoIterator>::into_iter
56 _ZN10parse_tsan4main17hdbbfdf1c6a7e27d9E
60 _ZN65_$LT$std..env..Args$u20$as$u20$core..iter..iterator..Iterator$GT$4next17h420a7c8d0c7eef40E
61 <std::env::Args as core::iter::iterator::Iterator>::next
64 _ZN4core3str9from_utf817hdcea28871313776dE
68 _ZN4core3mem7size_of17h18bde9bb8c22e2cfE
72 _ZN5alloc4heap8allocate17hd55c03e6cb81d924E
76 _ZN4core3ptr8null_mut17h736cce09ca0ac11aE
80 _ZN4core3ptr31_$LT$impl$u20$$BP$mut$u20$T$GT$7is_null17h7f9de798bc3f0879E
81 core::ptr::<impl *mut T>::is_null
84 _ZN40_$LT$alloc..raw_vec..RawVec$LT$T$GT$$GT$6double17h4166e2b47539e1ffE
85 <alloc::raw_vec::RawVec<T>>::double
88 _ZN39_$LT$collections..vec..Vec$LT$T$GT$$GT$4push17hd4b6b23c1b88141aE
89 <collections::vec::Vec<T>>::push
92 _ZN70_$LT$collections..vec..Vec$LT$T$GT$$u20$as$u20$core..ops..DerefMut$GT$9deref_mut17hf299b860dc5a831cE
93 <collections::vec::Vec<T> as core::ops::DerefMut>::deref_mut
96 _ZN63_$LT$core..ptr..Unique$LT$T$GT$$u20$as$u20$core..ops..Deref$GT$5deref17hc784b4a166cb5e5cE
97 <core::ptr::Unique<T> as core::ops::Deref>::deref
100 _ZN40_$LT$alloc..raw_vec..RawVec$LT$T$GT$$GT$3ptr17h7570b6e9070b693bE
101 <alloc::raw_vec::RawVec<T>>::ptr
104 _ZN4core3ptr31_$LT$impl$u20$$BP$mut$u20$T$GT$7is_null17h0f3228f343444ac8E
105 core::ptr::<impl *mut T>::is_null
108 _ZN53_$LT$$u5b$T$u5d$$u20$as$u20$core..slice..SliceExt$GT$10as_mut_ptr17h153241df1c7d1666E
109 <[T] as core::slice::SliceExt>::as_mut_ptr
112 _ZN11collections5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$10as_mut_ptr17hf12a6d0409938c96E
113 collections::slice::<impl [T]>::as_mut_ptr
116 _ZN4core3ptr5write17h651fe53ec860e780E
120 _ZN65_$LT$std..env..Args$u20$as$u20$core..iter..iterator..Iterator$GT$4next17h420a7c8d0c7eef40E
121 <std::env::Args as core::iter::iterator::Iterator>::next
124 _ZN54_$LT$I$u20$as$u20$core..iter..traits..IntoIterator$GT$9into_iter17he06cb713aae5b465E
125 <I as core::iter::traits::IntoIterator>::into_iter
128 _ZN71_$LT$collections..vec..IntoIter$LT$T$GT$$u20$as$u20$core..ops..Drop$GT$4drop17hf7f23304ebe62eedE
129 <collections::vec::IntoIter<T> as core::ops::Drop>::drop
132 _ZN86_$LT$collections..vec..IntoIter$LT$T$GT$$u20$as$u20$core..iter..iterator..Iterator$GT$4next17h04b3fbf148c39713E
133 <collections::vec::IntoIter<T> as core::iter::iterator::Iterator>::next
136 _ZN75_$LT$$RF$$u27$a$u20$mut$u20$I$u20$as$u20$core..iter..iterator..Iterator$GT$4next17ha050492063e0fd20E
137 <&'a mut I as core::iter::iterator::Iterator>::next
138 # Different hashes are OK, they are just stripped.
140 _ZN13drop_contents17hfe3c0a68c8ad1c74E
144 _ZN13drop_contents17h48cb59bef15bb555E
148 _ZN4core3mem7size_of17h900b33157bf58f26E
152 _ZN67_$LT$alloc..raw_vec..RawVec$LT$T$GT$$u20$as$u20$core..ops..Drop$GT$4drop17h96a5cf6e94807905E
153 <alloc::raw_vec::RawVec<T> as core::ops::Drop>::drop
156 _ZN68_$LT$core..nonzero..NonZero$LT$T$GT$$u20$as$u20$core..ops..Deref$GT$5deref17hc49056f882aa46dbE
157 <core::nonzero::NonZero<T> as core::ops::Deref>::deref
160 _ZN63_$LT$core..ptr..Unique$LT$T$GT$$u20$as$u20$core..ops..Deref$GT$5deref17h19f2ad4920655e85E
161 <core::ptr::Unique<T> as core::ops::Deref>::deref
164 _ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17h059a991a004536adE
165 issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo