Skip to content

Commit

Permalink
resolve: Include stdlib prelude into name lookup in macro namespace
Browse files Browse the repository at this point in the history
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 10, 2019
1 parent 3041ec6 commit 8bc187d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc_resolve/macros.rs
Expand Up @@ -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
Expand All @@ -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
};
Expand Down

0 comments on commit 8bc187d

Please sign in to comment.