mirror of
https://github.com/allankoechke/rust.git
synced 2026-11-30 17:26:12 +00:00
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),
},
```
27 lines
622 B
Plaintext
27 lines
622 B
Plaintext
error: align: Align(2 bytes)
|
|
--> $DIR/enum.rs:9:1
|
|
|
|
|
LL | enum UninhabitedVariantAlign {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: size: Size(16 bytes)
|
|
--> $DIR/enum.rs:15:1
|
|
|
|
|
LL | enum UninhabitedVariantSpace {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: backend_repr: ScalarPair { a: u8 is 0..=1, b: u8 is .., b_offset: Size(1 bytes) }
|
|
--> $DIR/enum.rs:21:1
|
|
|
|
|
LL | enum ScalarPairDifferingSign {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: size: Size(4 bytes)
|
|
--> $DIR/enum.rs:31:1
|
|
|
|
|
LL | enum DefinedLayoutAllUninhabited {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 4 previous errors
|
|
|