Upgrade to rustc 1.18.0-nightly (5f13a3b54 2017-04-15)

This version enables [struct field reordering][1] which brings the size
of the types for specified values of some CSS properties under the threshold
such that they shouldn’t be boxed anymore, making unit tests fail.

Simply unboxing them moves the test failure to Stylo’s unit tests,
since the stable compiler used in that case does not do field re-ordering.
Therefore, we manually reorder a couple fields to effectively bring this
optimization to older compilers for a few specific types.

[1]: https://github.com/rust-lang/rust/pull/40377
This commit is contained in:
Simon Sapin 2017-04-15 13:42:50 +02:00
parent 7ae9c96467
commit daba02438d
11 changed files with 50 additions and 53 deletions

View file

@ -46,7 +46,7 @@ impl ToComputedValue for specified::Length {
fn to_computed_value(&self, context: &Context) -> Au {
match *self {
specified::Length::NoCalc(l) => l.to_computed_value(context),
specified::Length::Calc(ref calc, range) => range.clamp(calc.to_computed_value(context).length()),
specified::Length::Calc(range, ref calc) => range.clamp(calc.to_computed_value(context).length()),
}
}