Skip to content
Permalink
Browse files

resolve: Include stdlib prelude into name lookup in macro namespace

This is going to be used when built-in macros are defined through libcore and made available to other crates through standard library prelude
  • Loading branch information...
petrochenkov committed Jul 3, 2019
1 parent 3041ec6 commit 8bc187d1047b3680efe2cda53dcc83f45012578b
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/librustc_resolve/macros.rs
@@ -867,7 +867,7 @@ impl<'a> Resolver<'a> {
}
}
}
WhereToResolve::MacroUsePrelude => WhereToResolve::BuiltinMacros,
WhereToResolve::MacroUsePrelude => WhereToResolve::StdLibPrelude,
WhereToResolve::BuiltinMacros => WhereToResolve::BuiltinAttrs,
WhereToResolve::BuiltinAttrs => WhereToResolve::LegacyPluginHelpers,
WhereToResolve::LegacyPluginHelpers => break, // nowhere else to search
@@ -877,7 +877,7 @@ impl<'a> Resolver<'a> {
WhereToResolve::StdLibPrelude => match ns {
TypeNS => WhereToResolve::BuiltinTypes,
ValueNS => break, // nowhere else to search
MacroNS => unreachable!(),
MacroNS => WhereToResolve::BuiltinMacros,
}
WhereToResolve::BuiltinTypes => break, // nowhere else to search
};

0 comments on commit 8bc187d

Please sign in to comment.
You can’t perform that action at this time.