From f25ebfd3d72ab19ce14cb73fe6b968b93148088e Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Mon, 30 Sep 2019 20:36:34 +0000 Subject: [PATCH] servo: Merge #1328 - Work around Rust bug causing nondeterministic CSS parse failure (from kmcallister:properties); r=jdm 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. Source-Repo: https://github.com/servo/servo Source-Revision: 148d1720e539c36ed44efdc7ebf3e45f25388f13 UltraBlame original commit: 28bc03c8fa39fea27af15f247cb7cc3c3f6fe31d --- servo/src/components/style/properties.rs.mako | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servo/src/components/style/properties.rs.mako b/servo/src/components/style/properties.rs.mako index f9b4bb9010b79..067f08b5a1a87 100644 --- a/servo/src/components/style/properties.rs.mako +++ b/servo/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) {