Skip to content

Commit 7fe1e8b

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 3b1fbc9 commit 7fe1e8b

File tree

7 files changed

+206
-7
lines changed

7 files changed

+206
-7
lines changed

servo/components/style/build.rs

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,101 @@ crate
702702
"
703703
)
704704
.
705+
envs
706+
(
707+
if
708+
std
709+
:
710+
:
711+
mem
712+
:
713+
:
714+
size_of
715+
:
716+
:
717+
<
718+
Option
719+
<
720+
bool
721+
>
722+
>
723+
(
724+
)
725+
=
726+
=
727+
1
728+
{
729+
/
730+
/
731+
FIXME
732+
:
733+
remove
734+
this
735+
envs
736+
(
737+
)
738+
call
739+
/
740+
/
741+
and
742+
make
743+
unconditional
744+
code
745+
that
746+
depends
747+
on
748+
RUSTC_HAS_PR45225
749+
/
750+
/
751+
once
752+
Firefox
753+
requires
754+
Rust
755+
1
756+
.
757+
23
758+
+
759+
/
760+
/
761+
https
762+
:
763+
/
764+
/
765+
github
766+
.
767+
com
768+
/
769+
rust
770+
-
771+
lang
772+
/
773+
rust
774+
/
775+
pull
776+
/
777+
45225
778+
vec
779+
!
780+
[
781+
(
782+
"
783+
RUSTC_HAS_PR45225
784+
"
785+
"
786+
1
787+
"
788+
)
789+
]
790+
}
791+
else
792+
{
793+
vec
794+
!
795+
[
796+
]
797+
}
798+
)
799+
.
705800
status
706801
(
707802
)

servo/components/style/properties/build.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,19 @@
319319
__file__
320320
=
321321
template
322+
323+
RUSTC_HAS_PR45225
324+
=
325+
os
326+
.
327+
environ
328+
.
329+
get
330+
(
331+
"
332+
RUSTC_HAS_PR45225
333+
"
334+
)
322335
)
323336

324337
if

servo/components/style/properties/data.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,19 @@
11941194
False
11951195
"
11961196
]
1197+
"
1198+
Unexpected
1199+
value
1200+
for
1201+
boolean
1202+
arguement
1203+
:
1204+
"
1205+
+
1206+
repr
1207+
(
1208+
arg
1209+
)
11971210

11981211
return
11991212
arg

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,8 @@ gecko
622622
"
623623
boxed
624624
=
625-
"
626-
True
627-
"
625+
not
626+
RUSTC_HAS_PR45225
628627
animation_value_type
629628
=
630629
"
@@ -980,9 +979,8 @@ gecko
980979
"
981980
boxed
982981
=
983-
"
984-
True
985-
"
982+
not
983+
RUSTC_HAS_PR45225
986984
animation_value_type
987985
=
988986
"

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1574,7 +1574,8 @@ Auto
15741574
"
15751575
boxed
15761576
=
1577-
True
1577+
not
1578+
RUSTC_HAS_PR45225
15781579
ignored_when_colors_disabled
15791580
=
15801581
True

servo/tests/unit/stylo/build.rs

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,61 @@ main
108108
(
109109
)
110110
{
111+
if
112+
std
113+
:
114+
:
115+
mem
116+
:
117+
:
118+
size_of
119+
:
120+
:
121+
<
122+
Option
123+
<
124+
bool
125+
>
126+
>
127+
(
128+
)
129+
=
130+
=
131+
1
132+
{
133+
/
134+
/
135+
https
136+
:
137+
/
138+
/
139+
github
140+
.
141+
com
142+
/
143+
rust
144+
-
145+
lang
146+
/
147+
rust
148+
/
149+
pull
150+
/
151+
45225
152+
println
153+
!
154+
(
155+
"
156+
cargo
157+
:
158+
rustc
159+
-
160+
cfg
161+
=
162+
rustc_has_pr45225
163+
"
164+
)
165+
}
111166
let
112167
root_path
113168
=

servo/tests/unit/stylo/size_of.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,19 @@ image
632632
:
633633
:
634634
ImageLayer
635+
if
636+
cfg
637+
!
638+
(
639+
rustc_has_pr45225
640+
)
641+
{
642+
40
643+
}
644+
else
645+
{
635646
48
647+
}
636648
)
637649
;
638650
size_of_test
@@ -646,6 +658,18 @@ image
646658
:
647659
:
648660
ImageLayer
661+
if
662+
cfg
663+
!
664+
(
665+
rustc_has_pr45225
666+
)
667+
{
668+
40
669+
}
670+
else
671+
{
649672
48
673+
}
650674
)
651675
;

0 commit comments

Comments
 (0)