aboutsummaryrefslogtreecommitdiffstats
path: root/components/style_derive/parse.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2018-11-10 11:48:09 -0500
committerGitHub <noreply@github.com>2018-11-10 11:48:09 -0500
commit3b1078b58d510668355adb294193c0fa436b79c9 (patch)
tree2c2be69a7c068d6c06d3b473ae722293d88caa87 /components/style_derive/parse.rs
parent7eb8544759d143b6622a734ab61b14af8ce55d82 (diff)
parentb0d13cc2543d78c3369ea9894f270a126867cfc0 (diff)
downloadservo-3b1078b58d510668355adb294193c0fa436b79c9.tar.gz
servo-3b1078b58d510668355adb294193c0fa436b79c9.zip
Auto merge of #22083 - servo:2018, r=emilio
Prepare stylo crates for switching to the 2018 edition This can land when [Gecko requires Rust 1.30](https://bugzilla.mozilla.org/show_bug.cgi?id=1504031). This does not switch the crates yet because the new edition is not yet stable in 1.30. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22083) <!-- Reviewable:end -->
Diffstat (limited to 'components/style_derive/parse.rs')
-rw-r--r--components/style_derive/parse.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/components/style_derive/parse.rs b/components/style_derive/parse.rs
index 76d2c8a82fc..a3f962d2145 100644
--- a/components/style_derive/parse.rs
+++ b/components/style_derive/parse.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use cg;
+use crate::cg;
+use crate::to_css::CssVariantAttrs;
use quote::Tokens;
use syn::{DeriveInput, Path};
use synstructure;
-use to_css::CssVariantAttrs;
#[darling(attributes(parse), default)]
#[derive(Default, FromVariant)]
@@ -79,7 +79,7 @@ pub fn derive(input: DeriveInput) -> Tokens {
match_ignore_ascii_case! { &ident,
#match_body
_ => Err(location.new_unexpected_token_error(
- ::cssparser::Token::Ident(ident.clone())
+ cssparser::Token::Ident(ident.clone())
))
}
}
@@ -88,12 +88,12 @@ pub fn derive(input: DeriveInput) -> Tokens {
};
let parse_trait_impl = quote! {
- impl ::parser::Parse for #name {
+ impl crate::parser::Parse for #name {
#[inline]
fn parse<'i, 't>(
- #context_ident: &::parser::ParserContext,
- input: &mut ::cssparser::Parser<'i, 't>,
- ) -> Result<Self, ::style_traits::ParseError<'i>> {
+ #context_ident: &crate::parser::ParserContext,
+ input: &mut cssparser::Parser<'i, 't>,
+ ) -> Result<Self, style_traits::ParseError<'i>> {
#parse_body
}
}
@@ -110,13 +110,13 @@ pub fn derive(input: DeriveInput) -> Tokens {
/// Parse this keyword.
#[inline]
pub fn parse<'i, 't>(
- input: &mut ::cssparser::Parser<'i, 't>,
- ) -> Result<Self, ::style_traits::ParseError<'i>> {
+ input: &mut cssparser::Parser<'i, 't>,
+ ) -> Result<Self, style_traits::ParseError<'i>> {
let location = input.current_source_location();
let ident = input.expect_ident()?;
Self::from_ident(ident.as_ref()).map_err(|()| {
location.new_unexpected_token_error(
- ::cssparser::Token::Ident(ident.clone())
+ cssparser::Token::Ident(ident.clone())
)
})
}