Skip to content

Commit

Permalink
Work around Rust bug causing nondeterministic CSS parse failure
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kmcallister committed Dec 3, 2013
1 parent a0c6075 commit 48ce016
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/style/properties.rs.mako
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

1 comment on commit 48ce016

@jdm
Copy link

@jdm jdm commented on 48ce016 Dec 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

Please sign in to comment.