Skip to content

Commit 4dec72d

Browse files
committed
servo: Merge #19316 - Fix Stylo tests to pass on both Stable and Nightly Rust (from servo:stylo-size-of); r=emilio
This is on top of servo/servo#19285. Rust Nightly has new enum memory layout optimizations: rust-lang/rust#45225 Source-Repo: https://github.com/servo/servo Source-Revision: 17e97b9320fdb7cdb33bbc5f4d0fde0653bbf2e4 UltraBlame original commit: 6de571030d5d998dcadbd3dac602fa006395165c
1 parent d9f645a commit 4dec72d

File tree

7 files changed

+138
-7
lines changed

7 files changed

+138
-7
lines changed

servo/components/style/build.rs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,52 @@ crate
644644
"
645645
)
646646
.
647+
envs
648+
(
649+
if
650+
std
651+
:
652+
:
653+
mem
654+
:
655+
:
656+
size_of
657+
:
658+
:
659+
<
660+
Option
661+
<
662+
bool
663+
>
664+
>
665+
(
666+
)
667+
=
668+
=
669+
1
670+
{
671+
vec
672+
!
673+
[
674+
(
675+
"
676+
RUSTC_HAS_PR45225
677+
"
678+
"
679+
1
680+
"
681+
)
682+
]
683+
}
684+
else
685+
{
686+
vec
687+
!
688+
[
689+
]
690+
}
691+
)
692+
.
647693
status
648694
(
649695
)

servo/components/style/properties/build.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,19 @@
258258
__file__
259259
=
260260
template
261+
262+
RUSTC_HAS_PR45225
263+
=
264+
os
265+
.
266+
environ
267+
.
268+
get
269+
(
270+
"
271+
RUSTC_HAS_PR45225
272+
"
273+
)
261274
)
262275

263276
if

servo/components/style/properties/data.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,19 @@
11071107
False
11081108
"
11091109
]
1110+
"
1111+
Unexpected
1112+
value
1113+
for
1114+
boolean
1115+
arguement
1116+
:
1117+
"
1118+
+
1119+
repr
1120+
(
1121+
arg
1122+
)
11101123

11111124
return
11121125
arg

servo/components/style/properties/longhand/inherited_svg.mako.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -564,9 +564,8 @@ gecko
564564
"
565565
boxed
566566
=
567-
"
568-
True
569-
"
567+
not
568+
RUSTC_HAS_PR45225
570569
animation_value_type
571570
=
572571
"
@@ -922,9 +921,8 @@ gecko
922921
"
923922
boxed
924923
=
925-
"
926-
True
927-
"
924+
not
925+
RUSTC_HAS_PR45225
928926
animation_value_type
929927
=
930928
"

servo/components/style/properties/longhand/pointing.mako.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,8 @@ Auto
15161516
"
15171517
boxed
15181518
=
1519-
True
1519+
not
1520+
RUSTC_HAS_PR45225
15201521
ignored_when_colors_disabled
15211522
=
15221523
True

servo/tests/unit/stylo/build.rs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,42 @@ main
5050
(
5151
)
5252
{
53+
if
54+
std
55+
:
56+
:
57+
mem
58+
:
59+
:
60+
size_of
61+
:
62+
:
63+
<
64+
Option
65+
<
66+
bool
67+
>
68+
>
69+
(
70+
)
71+
=
72+
=
73+
1
74+
{
75+
println
76+
!
77+
(
78+
"
79+
cargo
80+
:
81+
rustc
82+
-
83+
cfg
84+
=
85+
rustc_has_pr45225
86+
"
87+
)
88+
}
5389
let
5490
root_path
5591
=

servo/tests/unit/stylo/size_of.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,19 @@ image
416416
:
417417
:
418418
ImageLayer
419+
if
420+
cfg
421+
!
422+
(
423+
rustc_has_pr45225
424+
)
425+
{
426+
40
427+
}
428+
else
429+
{
419430
48
431+
}
420432
)
421433
;
422434
size_of_test
@@ -430,6 +442,18 @@ image
430442
:
431443
:
432444
ImageLayer
445+
if
446+
cfg
447+
!
448+
(
449+
rustc_has_pr45225
450+
)
451+
{
452+
40
453+
}
454+
else
455+
{
433456
48
457+
}
434458
)
435459
;

0 commit comments

Comments
 (0)