Skip to content

Commit 48ce016

Browse files
committed
Work around Rust bug causing nondeterministic CSS parse failure
The bug is rust-lang/rust#10683 and there's no fix yet, plus it would take us a while to upgrade Rust anyway. Fixes servo#1258.
1 parent a0c6075 commit 48ce016

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/style/properties.rs.mako

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,9 @@ enum PropertyDeclarationParseResult {
933933
impl PropertyDeclaration {
934934
pub fn parse(name: &str, value: &[ComponentValue],
935935
result_list: &mut ~[PropertyDeclaration]) -> PropertyDeclarationParseResult {
936-
match name.to_ascii_lower().as_slice() {
936+
// FIXME: local variable to work around Rust #10683
937+
let name_lower = name.to_ascii_lower();
938+
match name_lower.as_slice() {
937939
% for property in LONGHANDS:
938940
"${property.name}" => result_list.push(${property.ident}_declaration(
939941
match longhands::${property.ident}::parse_declared(value) {

0 commit comments

Comments
 (0)