Files
rust/tests/ui/layout/struct.stderr
Scott McMurray d0c3ca143a [rustc_abi] Customize Debug for Primitive and Scalar
Of late I've been looking at layout a bunch, which means staring at things like

```rust
backend_repr: ScalarPair {
    a: Initialized {
        value: Int(
            I8,
            false,
        ),
        valid_range: 0..=1,
    },
    b: Union {
        value: Int(
            I8,
            false,
        ),
    },
    b_offset: Size(1 bytes),
},
```

and that's just kinda long and unfriendly.

Thus this PR that just changes `Debug` -- nothing else! -- so for example that shows as

```rust
backend_repr: ScalarPair {
    a: u8 is 0..=1,
    b: union u8,
    b_offset: Size(1 bytes),
},
```
2026-07-18 23:29:41 -07:00

15 lines
368 B
Plaintext

error: backend_repr: Memory { sized: true }
--> $DIR/struct.rs:9:1
|
LL | struct AlignedZstPreventsScalar(i16, [i32; 0]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: backend_repr: Scalar(i32 is ..)
--> $DIR/struct.rs:12:1
|
LL | struct AlignedZstButStillScalar(i32, [i16; 0]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors