|
|
@ -110,11 +110,6 @@ struct Foo<u32, u16> {
|
|
|
|
The latter case quite simply wastes space. An optimal use of space therefore
|
|
|
|
The latter case quite simply wastes space. An optimal use of space therefore
|
|
|
|
requires different monomorphizations to have *different field orderings*.
|
|
|
|
requires different monomorphizations to have *different field orderings*.
|
|
|
|
|
|
|
|
|
|
|
|
**Note: this is a hypothetical optimization that is not yet implemented in Rust
|
|
|
|
|
|
|
|
1.0**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**Update: this is already implemented in Rust 1.18**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Enums make this consideration even more complicated. Naively, an enum such as:
|
|
|
|
Enums make this consideration even more complicated. Naively, an enum such as:
|
|
|
|
|
|
|
|
|
|
|
|
```rust
|
|
|
|
```rust
|
|
|
|