From 48ce016209357e12e0d471a0b194d21fd1773c76 Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Tue, 3 Dec 2013 12:57:51 -0800 Subject: [PATCH] Work around Rust bug causing nondeterministic CSS parse failure The bug is mozilla/rust#10683 and there's no fix yet, plus it would take us a while to upgrade Rust anyway. Fixes #1258. --- src/components/style/properties.rs.mako | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/style/properties.rs.mako b/src/components/style/properties.rs.mako index f9b4bb9010b..067f08b5a1a 100644 --- a/src/components/style/properties.rs.mako +++ b/src/components/style/properties.rs.mako @@ -933,7 +933,9 @@ enum PropertyDeclarationParseResult { impl PropertyDeclaration { pub fn parse(name: &str, value: &[ComponentValue], result_list: &mut ~[PropertyDeclaration]) -> PropertyDeclarationParseResult { - match name.to_ascii_lower().as_slice() { + // FIXME: local variable to work around Rust #10683 + let name_lower = name.to_ascii_lower(); + match name_lower.as_slice() { % for property in LONGHANDS: "${property.name}" => result_list.push(${property.ident}_declaration( match longhands::${property.ident}::parse_declared(value) {