Skip to content

Commit

Permalink
Fix benchmarks to comply with rust-lang/rust#65846
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Oct 27, 2019
1 parent b44e8f2 commit cbf898d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,10 @@ impl<'a, 'b, 'i> DeclarationParser<'i> for ViewportRuleParser<'a, 'b> {
-> Result<Vec<ViewportDescriptorDeclaration>, ParseError<'i>> {
macro_rules! declaration {
($declaration:ident($parse:expr)) => {
declaration!($declaration(value: try!($parse(input)),
important: input.try(parse_important).is_ok()))
declaration!($declaration(value@ try!($parse(input)),
important@ input.try(parse_important).is_ok()))
};
($declaration:ident(value: $value:expr, important: $important:expr)) => {
($declaration:ident(value@ $value:expr, important@ $important:expr)) => {
ViewportDescriptorDeclaration::new(
self.context.stylesheet_origin,
ViewportDescriptor::$declaration($value),
Expand All @@ -306,8 +306,8 @@ impl<'a, 'b, 'i> DeclarationParser<'i> for ViewportRuleParser<'a, 'b> {
let shorthand = parse_shorthand(self.context, input)?;
let important = input.try(parse_important).is_ok();

Ok(vec![declaration!($min(value: shorthand.0, important: important)),
declaration!($max(value: shorthand.1, important: important))])
Ok(vec![declaration!($min(value@ shorthand.0, important@ important)),
declaration!($max(value@ shorthand.1, important@ important))])
}}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,10 @@ impl<'a, 'b, 'i> DeclarationParser<'i> for ViewportRuleParser<'a, 'b> {
-> Result<Vec<ViewportDescriptorDeclaration>, ParseError<'i>> {
macro_rules! declaration {
($declaration:ident($parse:expr)) => {
declaration!($declaration(value: try!($parse(input)),
important: input.try(parse_important).is_ok()))
declaration!($declaration(value@ try!($parse(input)),
important@ input.try(parse_important).is_ok()))
};
($declaration:ident(value: $value:expr, important: $important:expr)) => {
($declaration:ident(value@ $value:expr, important@ $important:expr)) => {
ViewportDescriptorDeclaration::new(
self.context.stylesheet_origin,
ViewportDescriptor::$declaration($value),
Expand All @@ -306,8 +306,8 @@ impl<'a, 'b, 'i> DeclarationParser<'i> for ViewportRuleParser<'a, 'b> {
let shorthand = parse_shorthand(self.context, input)?;
let important = input.try(parse_important).is_ok();

Ok(vec![declaration!($min(value: shorthand.0, important: important)),
declaration!($max(value: shorthand.1, important: important))])
Ok(vec![declaration!($min(value@ shorthand.0, important@ important)),
declaration!($max(value@ shorthand.1, important@ important))])
}}
}

Expand Down

0 comments on commit cbf898d

Please sign in to comment.