version = "0.0.0"
dependencies = [
"arena 0.0.0",
+ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc 0.0.0",
"rustc_data_structures 0.0.0",
}
WhereToResolve::MacroRules(legacy_scope) => match legacy_scope {
LegacyScope::Binding(legacy_binding) if ident == legacy_binding.ident =>
- Ok((legacy_binding.binding, Flags::MACRO_RULES, Flags::MODULE)),
+ Ok((legacy_binding.binding, Flags::MACRO_RULES, Flags::empty())),
_ => Err(Determinacy::Determined),
}
WhereToResolve::Module(module) => {
(innermost_binding.is_glob_import() ||
innermost_binding.may_appear_after(parent_scope.expansion, binding) ||
innermost_flags.intersects(ambig_flags) ||
- flags.intersects(innermost_ambig_flags)) {
+ flags.intersects(innermost_ambig_flags) ||
+ (innermost_flags.contains(Flags::MACRO_RULES) &&
+ flags.contains(Flags::MODULE) &&
+ !self.disambiguate_legacy_vs_modern(innermost_binding, binding))) {
self.ambiguity_errors.push(AmbiguityError {
ident,
b1: innermost_binding,
| ^^^^^^^^^^^^^
= note: macro-expanded macro imports do not shadow
-error[E0659]: `m` is ambiguous
- --> $DIR/macros.rs:48:5
- |
-LL | m!(); //~ ERROR ambiguous
- | ^ ambiguous name
- |
-note: `m` could refer to the name defined here
- --> $DIR/macros.rs:46:5
- |
-LL | macro_rules! m { () => {} }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: `m` could also refer to the name imported here
- --> $DIR/macros.rs:47:9
- |
-LL | use two_macros::m;
- | ^^^^^^^^^^^^^
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0659`.