All structures with only one field should be unpacked. This would allow to produce faster code.
Location : in typed_rust after the lifetime analysis pass
Exemple :
struct MyNum {
x : i32,
}
fn main() {
let y = MyNum { x : 3 };
let val = y.x;
}
The code above is equivalent to :
fn main() {
let y = 3;
let val = y;
}