Closed
Description
The current implementation only handles enums of roughly the form:
enum E {
A(ALeft..., Niche, ARight...),
B,
C
}
This can be seen as a special-case, where B and C occupy 0 bytes, of:
enum E {
A(ALeft..., Niche, ARight...),
B(B...),
C(C...)
}
As long as B
and C
can fit before or after A
's Niche
, we can still apply the optimization.
Also see rust-lang/rfcs#1230 (comment) for the initial description.