Skip to content

Commit

Permalink
Fix ambiguity of glob import with matches! now in the standard library
Browse files Browse the repository at this point in the history
```
error[E0659]: `matches` is ambiguous (glob import vs any other name from outer scope during import/macro resolution)
   --> html5ever/src/tree_builder/tag_sets.rs:109:5
    |
109 |     matches!(
    |     ^^^^^^^ ambiguous name
    |
    = note: `matches` could refer to a macro from prelude
note: `matches` could also refer to the macro imported here
   --> html5ever/src/tree_builder/tag_sets.rs:13:5
    |
13  | use mac::*;
    |     ^^^^^^
    = help: consider adding an explicit import of `matches` to disambiguate
    = help: or use `self::matches` to refer to this macro unambiguously

error: aborting due to 2 previous errors
```
  • Loading branch information
SimonSapin committed Oct 25, 2019
1 parent fbe0779 commit 2e2f860
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion html5ever/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "html5ever"
version = "0.25.0"
version = "0.25.1"
authors = [ "The html5ever Project Developers" ]
license = "MIT / Apache-2.0"
repository = "https://github.com/servo/html5ever"
Expand Down
2 changes: 1 addition & 1 deletion html5ever/src/tree_builder/tag_sets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//! Various sets of HTML tag names, and macros for declaring them.
use crate::ExpandedName;
use mac::*;
use mac::{matches, _tt_as_expr_hack};
use markup5ever::{expanded_name, local_name, namespace_prefix, namespace_url, ns};

macro_rules! declare_tag_set_impl ( ($param:ident, $b:ident, $supr:ident, $($tag:tt)+) => (
Expand Down
2 changes: 1 addition & 1 deletion html5ever/src/util/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use mac::*;
use mac::{matches, _tt_as_expr_hack};
use std::fmt;

pub fn to_escaped_string<T: fmt::Debug>(x: &T) -> String {
Expand Down
2 changes: 1 addition & 1 deletion xml5ever/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "xml5ever"
version = "0.16.0"
version = "0.16.1"
authors = ["The xml5ever project developers"]
license = "MIT / Apache-2.0"
repository = "https://github.com/servo/html5ever"
Expand Down
2 changes: 1 addition & 1 deletion xml5ever/src/tree_builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
mod types;

use log::{debug, warn};
use mac::*;
use mac::{matches, _tt_as_expr_hack, unwrap_or_return};
use markup5ever::{local_name, namespace_prefix, namespace_url, ns};
use std::borrow::Cow;
use std::borrow::Cow::Borrowed;
Expand Down
2 changes: 1 addition & 1 deletion xml5ever/src/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use mac::*;
use mac::{matches, _tt_as_expr_hack};

/// Is the character an ASCII alphanumeric character?
pub fn is_ascii_alnum(c: char) -> bool {
Expand Down

0 comments on commit 2e2f860

Please sign in to comment.