Allow unused imports for AsciiExt in style code.

See #19128, this part is cherry-picked so Gecko can build with rust nightly.
This commit is contained in:
Simon Sapin 2017-11-09 12:36:16 +01:00 committed by Emilio Cobos Álvarez
parent ae5dca985e
commit 954b2cc3d8
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
23 changed files with 25 additions and 25 deletions

View file

@ -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") {

View file

@ -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: