aboutsummaryrefslogtreecommitdiffstats
path: root/components/style
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2017-11-09 12:36:16 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-11-09 12:43:23 +0100
commit954b2cc3d882ddec8a93a9ce2be2a20e11507bec (patch)
tree488aa643a887431e3fa9567962f70b3dafa32243 /components/style
parentae5dca985ee58fbcd18d7e470184beb2b7e3d547 (diff)
downloadservo-954b2cc3d882ddec8a93a9ce2be2a20e11507bec.tar.gz
servo-954b2cc3d882ddec8a93a9ce2be2a20e11507bec.zip
Allow unused imports for AsciiExt in style code.
See #19128, this part is cherry-picked so Gecko can build with rust nightly.
Diffstat (limited to 'components/style')
-rw-r--r--components/style/attr.rs2
-rw-r--r--components/style/counter_style/mod.rs2
-rw-r--r--components/style/custom_properties.rs2
-rw-r--r--components/style/gecko/generated/pseudo_element_definition.rs4
-rw-r--r--components/style/gecko/pseudo_element_definition.mako.rs4
-rw-r--r--components/style/gecko_string_cache/mod.rs2
-rw-r--r--components/style/properties/longhand/font.mako.rs2
-rw-r--r--components/style/properties/longhand/pointing.mako.rs2
-rw-r--r--components/style/str.rs2
-rw-r--r--components/style/stylesheets/viewport_rule.rs2
-rw-r--r--components/style/values/mod.rs2
-rw-r--r--components/style/values/specified/align.rs2
-rw-r--r--components/style/values/specified/angle.rs2
-rw-r--r--components/style/values/specified/calc.rs2
-rw-r--r--components/style/values/specified/grid.rs2
-rw-r--r--components/style/values/specified/length.rs2
-rw-r--r--components/style/values/specified/mod.rs2
-rw-r--r--components/style/values/specified/percentage.rs2
-rw-r--r--components/style/values/specified/text.rs2
-rw-r--r--components/style/values/specified/time.rs2
20 files changed, 22 insertions, 22 deletions
diff --git a/components/style/attr.rs b/components/style/attr.rs
index 7306b2e9e1d..789bb2d11f8 100644
--- a/components/style/attr.rs
+++ b/components/style/attr.rs
@@ -16,7 +16,7 @@ use selectors::attr::AttrSelectorOperation;
use servo_arc::Arc;
use servo_url::ServoUrl;
use shared_lock::Locked;
-use std::ascii::AsciiExt;
+#[allow(unused_imports)] use std::ascii::AsciiExt;
use std::str::FromStr;
use str::{HTML_SPACE_CHARACTERS, read_exponent, read_fraction};
use str::{read_numbers, split_commas, split_html_space_chars};
diff --git a/components/style/counter_style/mod.rs b/components/style/counter_style/mod.rs
index 0a219e70576..4e6f5b6addc 100644
--- a/components/style/counter_style/mod.rs
+++ b/components/style/counter_style/mod.rs
@@ -15,7 +15,7 @@ use error_reporting::{ContextualParseError, ParseErrorReporter};
use parser::{ParserContext, ParserErrorContext, Parse};
use selectors::parser::SelectorParseErrorKind;
use shared_lock::{SharedRwLockReadGuard, ToCssWithGuard};
-use std::ascii::AsciiExt;
+#[allow(unused_imports)] use std::ascii::AsciiExt;
use std::borrow::Cow;
use std::fmt;
use std::ops::Range;
diff --git a/components/style/custom_properties.rs b/components/style/custom_properties.rs
index 05967a8f922..4b564da6eed 100644
--- a/components/style/custom_properties.rs
+++ b/components/style/custom_properties.rs
@@ -14,7 +14,7 @@ use selector_map::{PrecomputedHashSet, PrecomputedHashMap};
use selectors::parser::SelectorParseErrorKind;
use servo_arc::Arc;
use smallvec::SmallVec;
-use std::ascii::AsciiExt;
+#[allow(unused_imports)] use std::ascii::AsciiExt;
use std::borrow::{Borrow, Cow};
use std::cmp;
use std::fmt;
diff --git a/components/style/gecko/generated/pseudo_element_definition.rs b/components/style/gecko/generated/pseudo_element_definition.rs
index c733234b364..4a18723ec85 100644
--- a/components/style/gecko/generated/pseudo_element_definition.rs
+++ b/components/style/gecko/generated/pseudo_element_definition.rs
@@ -1377,7 +1377,7 @@ impl PseudoElement {
/// Returns `None` if the pseudo-element is not recognised.
#[inline]
pub fn from_slice(s: &str, in_ua_stylesheet: bool) -> Option<Self> {
- use std::ascii::AsciiExt;
+ #[allow(unused_imports)] use std::ascii::AsciiExt;
// We don't need to support tree pseudos because functional
// pseudo-elements needs arguments, and thus should be created
@@ -1747,7 +1747,7 @@ impl PseudoElement {
/// Returns `None` if the pseudo-element is not recognized.
#[inline]
pub fn tree_pseudo_element(name: &str, args: Box<[Atom]>) -> Option<Self> {
- use std::ascii::AsciiExt;
+ #[allow(unused_imports)] use std::ascii::AsciiExt;
debug_assert!(name.starts_with("-moz-tree-"));
let tree_part = &name[10..];
if tree_part.eq_ignore_ascii_case("column") {
diff --git a/components/style/gecko/pseudo_element_definition.mako.rs b/components/style/gecko/pseudo_element_definition.mako.rs
index d36adf18f94..393fbf92895 100644
--- a/components/style/gecko/pseudo_element_definition.mako.rs
+++ b/components/style/gecko/pseudo_element_definition.mako.rs
@@ -225,7 +225,7 @@ impl PseudoElement {
/// Returns `None` if the pseudo-element is not recognised.
#[inline]
pub fn from_slice(s: &str, in_ua_stylesheet: bool) -> Option<Self> {
- use std::ascii::AsciiExt;
+ #[allow(unused_imports)] use std::ascii::AsciiExt;
// We don't need to support tree pseudos because functional
// pseudo-elements needs arguments, and thus should be created
@@ -247,7 +247,7 @@ impl PseudoElement {
/// Returns `None` if the pseudo-element is not recognized.
#[inline]
pub fn tree_pseudo_element(name: &str, args: Box<[Atom]>) -> Option<Self> {
- use std::ascii::AsciiExt;
+ #[allow(unused_imports)] use std::ascii::AsciiExt;
debug_assert!(name.starts_with("-moz-tree-"));
let tree_part = &name[10..];
% for pseudo in TREE_PSEUDOS:
diff --git a/components/style/gecko_string_cache/mod.rs b/components/style/gecko_string_cache/mod.rs
index 14e7ef0c143..f0474620052 100644
--- a/components/style/gecko_string_cache/mod.rs
+++ b/components/style/gecko_string_cache/mod.rs
@@ -13,7 +13,7 @@ use gecko_bindings::bindings::Gecko_ReleaseAtom;
use gecko_bindings::structs::{nsAtom, nsAtom_AtomKind, nsStaticAtom};
use nsstring::{nsAString, nsStr};
use precomputed_hash::PrecomputedHash;
-use std::ascii::AsciiExt;
+#[allow(unused_imports)] use std::ascii::AsciiExt;
use std::borrow::{Cow, Borrow};
use std::char::{self, DecodeUtf16};
use std::fmt::{self, Write};
diff --git a/components/style/properties/longhand/font.mako.rs b/components/style/properties/longhand/font.mako.rs
index 63f38521418..528f19ce65d 100644
--- a/components/style/properties/longhand/font.mako.rs
+++ b/components/style/properties/longhand/font.mako.rs
@@ -1577,7 +1577,7 @@ https://drafts.csswg.org/css-fonts-4/#low-level-font-variation-settings-control-
#[inline]
fn to_computed_value(&self, _context: &Context) -> computed_value::T {
- use std::ascii::AsciiExt;
+ #[allow(unused_imports)] use std::ascii::AsciiExt;
match *self {
SpecifiedValue::Normal => computed_value::T(0),
SpecifiedValue::Override(ref lang) => {
diff --git a/components/style/properties/longhand/pointing.mako.rs b/components/style/properties/longhand/pointing.mako.rs
index d03458ad7f6..f062272ff45 100644
--- a/components/style/properties/longhand/pointing.mako.rs
+++ b/components/style/properties/longhand/pointing.mako.rs
@@ -88,7 +88,7 @@
impl Parse for computed_value::Keyword {
fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
-> Result<computed_value::Keyword, ParseError<'i>> {
- use std::ascii::AsciiExt;
+ #[allow(unused_imports)] use std::ascii::AsciiExt;
use style_traits::cursor::Cursor;
let location = input.current_source_location();
let ident = input.expect_ident()?;
diff --git a/components/style/str.rs b/components/style/str.rs
index 731ffda0cc0..641f5501d89 100644
--- a/components/style/str.rs
+++ b/components/style/str.rs
@@ -7,7 +7,7 @@
#![deny(missing_docs)]
use num_traits::ToPrimitive;
-use std::ascii::AsciiExt;
+#[allow(unused_imports)] use std::ascii::AsciiExt;
use std::borrow::Cow;
use std::convert::AsRef;
use std::iter::{Filter, Peekable};
diff --git a/components/style/stylesheets/viewport_rule.rs b/components/style/stylesheets/viewport_rule.rs
index 710f53609b7..6220d858745 100644
--- a/components/style/stylesheets/viewport_rule.rs
+++ b/components/style/stylesheets/viewport_rule.rs
@@ -20,7 +20,7 @@ use properties::StyleBuilder;
use rule_cache::RuleCacheConditions;
use selectors::parser::SelectorParseErrorKind;
use shared_lock::{SharedRwLockReadGuard, StylesheetGuards, ToCssWithGuard};
-use std::ascii::AsciiExt;
+#[allow(unused_imports)] use std::ascii::AsciiExt;
use std::borrow::Cow;
use std::cell::RefCell;
use std::fmt;
diff --git a/components/style/values/mod.rs b/components/style/values/mod.rs
index 588cd90878e..7a690662acc 100644
--- a/components/style/values/mod.rs
+++ b/components/style/values/mod.rs
@@ -12,7 +12,7 @@ use Atom;
pub use cssparser::{RGBA, Token, Parser, serialize_identifier, CowRcStr, SourceLocation};
use parser::{Parse, ParserContext};
use selectors::parser::SelectorParseErrorKind;
-use std::ascii::AsciiExt;
+#[allow(unused_imports)] use std::ascii::AsciiExt;
use std::fmt::{self, Debug};
use std::hash;
use style_traits::{ToCss, ParseError, StyleParseErrorKind};
diff --git a/components/style/values/specified/align.rs b/components/style/values/specified/align.rs
index 66ba2116a62..985a35ee80e 100644
--- a/components/style/values/specified/align.rs
+++ b/components/style/values/specified/align.rs
@@ -10,7 +10,7 @@ use cssparser::Parser;
use gecko_bindings::structs;
use parser::{Parse, ParserContext};
use selectors::parser::SelectorParseErrorKind;
-use std::ascii::AsciiExt;
+#[allow(unused_imports)] use std::ascii::AsciiExt;
use std::fmt;
use style_traits::{ToCss, ParseError, StyleParseErrorKind};
diff --git a/components/style/values/specified/angle.rs b/components/style/values/specified/angle.rs
index 5ccc2bf5dcb..e3714a5babf 100644
--- a/components/style/values/specified/angle.rs
+++ b/components/style/values/specified/angle.rs
@@ -6,7 +6,7 @@
use cssparser::{Parser, Token};
use parser::{ParserContext, Parse};
-use std::ascii::AsciiExt;
+#[allow(unused_imports)] use std::ascii::AsciiExt;
use std::fmt;
use style_traits::{ToCss, ParseError};
use values::CSSFloat;
diff --git a/components/style/values/specified/calc.rs b/components/style/values/specified/calc.rs
index 545d93c84a0..f88105fdb61 100644
--- a/components/style/values/specified/calc.rs
+++ b/components/style/values/specified/calc.rs
@@ -8,7 +8,7 @@
use cssparser::{Parser, Token};
use parser::ParserContext;
-use std::ascii::AsciiExt;
+#[allow(unused_imports)] use std::ascii::AsciiExt;
use std::fmt;
use style_traits::{ToCss, ParseError, StyleParseErrorKind};
use style_traits::values::specified::AllowedNumericType;
diff --git a/components/style/values/specified/grid.rs b/components/style/values/specified/grid.rs
index 85f0dfda062..b951082aea9 100644
--- a/components/style/values/specified/grid.rs
+++ b/components/style/values/specified/grid.rs
@@ -7,7 +7,7 @@
use cssparser::{Parser, Token, ParseError as CssParseError};
use parser::{Parse, ParserContext};
-use std::ascii::AsciiExt;
+#[allow(unused_imports)] use std::ascii::AsciiExt;
use std::mem;
use style_traits::{ParseError, StyleParseErrorKind};
use values::{CSSFloat, CustomIdent};
diff --git a/components/style/values/specified/length.rs b/components/style/values/specified/length.rs
index 82c5363d2b5..f2e802d38cb 100644
--- a/components/style/values/specified/length.rs
+++ b/components/style/values/specified/length.rs
@@ -12,7 +12,7 @@ use euclid::Size2D;
use font_metrics::FontMetricsQueryResult;
use parser::{Parse, ParserContext};
use std::{cmp, fmt, mem};
-use std::ascii::AsciiExt;
+#[allow(unused_imports)] use std::ascii::AsciiExt;
use std::ops::{Add, Mul};
use style_traits::{ToCss, ParseError, StyleParseErrorKind};
use style_traits::values::specified::AllowedNumericType;
diff --git a/components/style/values/specified/mod.rs b/components/style/values/specified/mod.rs
index e6d1d2f9d56..11afe1dfd5f 100644
--- a/components/style/values/specified/mod.rs
+++ b/components/style/values/specified/mod.rs
@@ -11,7 +11,7 @@ use context::QuirksMode;
use cssparser::{Parser, Token, serialize_identifier};
use parser::{ParserContext, Parse};
use self::url::SpecifiedUrl;
-use std::ascii::AsciiExt;
+#[allow(unused_imports)] use std::ascii::AsciiExt;
use std::f32;
use std::fmt;
use style_traits::{ToCss, ParseError, StyleParseErrorKind};
diff --git a/components/style/values/specified/percentage.rs b/components/style/values/specified/percentage.rs
index 9e0315ead7b..7d06d56ab6e 100644
--- a/components/style/values/specified/percentage.rs
+++ b/components/style/values/specified/percentage.rs
@@ -6,7 +6,7 @@
use cssparser::{Parser, Token};
use parser::{Parse, ParserContext};
-use std::ascii::AsciiExt;
+#[allow(unused_imports)] use std::ascii::AsciiExt;
use std::fmt;
use style_traits::{ParseError, ToCss};
use style_traits::values::specified::AllowedNumericType;
diff --git a/components/style/values/specified/text.rs b/components/style/values/specified/text.rs
index 355cbc18960..251bb1861b8 100644
--- a/components/style/values/specified/text.rs
+++ b/components/style/values/specified/text.rs
@@ -7,7 +7,7 @@
use cssparser::{Parser, Token};
use parser::{Parse, ParserContext};
use selectors::parser::SelectorParseErrorKind;
-use std::ascii::AsciiExt;
+#[allow(unused_imports)] use std::ascii::AsciiExt;
use style_traits::ParseError;
use values::computed::{Context, ToComputedValue};
use values::computed::text::LineHeight as ComputedLineHeight;
diff --git a/components/style/values/specified/time.rs b/components/style/values/specified/time.rs
index 3143160abaa..bfc57d518dd 100644
--- a/components/style/values/specified/time.rs
+++ b/components/style/values/specified/time.rs
@@ -6,7 +6,7 @@
use cssparser::{Parser, Token};
use parser::{ParserContext, Parse};
-use std::ascii::AsciiExt;
+#[allow(unused_imports)] use std::ascii::AsciiExt;
use std::fmt;
use style_traits::{ToCss, ParseError, StyleParseErrorKind};
use style_traits::values::specified::AllowedNumericType;