rust/compiler/rustc_symbol_mangling/src
Matthias Krüger c531b01e9d
Rollup merge of #94359 - tmiasko:legacy-verbose-const, r=petrochenkov
Fix inconsistent symbol mangling of integers constants with -Zverbose

The `PrettyPrinter` changes formatting of array size and integer
constants based on `-Zverbose`, so its implementation cannot be used in
legacy symbol mangling.

Example symbol demangling before changes:

```console
$ cat a.rs
pub struct A<T>(T);
impl A<[u8; 128]> { pub fn f() {} }
$ rustc --crate-type=lib a.rs -Zverbose=n && nm -C ./liba.rlib
00000000 T a::A<[u8; 128]>::f
$ rustc --crate-type=lib a.rs -Zverbose=y && nm -C ./liba.rlib
00000000 T a::A<[u8; Const { ty. usize, val. Value(Scalar(0x0000000000000080)) }]>::f
```
2022-03-01 12:00:43 +01:00
..
legacy.rs Fix inconsistent symbol mangling of integers constants with -Zverbose 2022-02-28 21:48:42 +01:00
lib.rs Switch bootstrap cfgs 2022-02-25 08:00:52 -05:00
test.rs Move ty::print methods to Drop-based scope guards 2022-02-16 17:24:23 -05:00
v0.rs use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00