summaryrefslogtreecommitdiff
path: root/src/expand/derive.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2018-12-29 16:55:27 +0800
committerJohn Hodge <tpg@mutabah.net>2018-12-29 16:55:27 +0800
commitcdedfd8738aa488f7b87fd65ac8ab160c0947b18 (patch)
tree8aede68f2c1a317adac1e69e7ea757dce8c1310e /src/expand/derive.cpp
parentbe45bb67e1cbcb3c68cdf6f5c9353ce98c67ee2e (diff)
downloadmrust-cdedfd8738aa488f7b87fd65ac8ab160c0947b18.tar.gz
Resolve/HIR - Rough handling of `pub use macro_path;`
Diffstat (limited to 'src/expand/derive.cpp')
-rw-r--r--src/expand/derive.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/expand/derive.cpp b/src/expand/derive.cpp
index 5e97c888..a03992da 100644
--- a/src/expand/derive.cpp
+++ b/src/expand/derive.cpp
@@ -2236,15 +2236,15 @@ static void derive_item(const Span& sp, const AST::Crate& crate, AST::Module& mo
bool found = false;
for(const auto& mac_path : mod.m_macro_imports)
{
- if( mac_path.first.back() == mac_name )
+ if( mac_path.name == mac_name )
{
- if( mac_path.second ) {
+ if( mac_path.macro_ptr ) {
// macro_rules! based derive?
TODO(sp, "Custom derive using macro_rules?");
}
else {
// proc_macro - Invoke the handler.
- auto lex = ProcMacro_Invoke(sp, crate, mac_path.first, path.nodes().back().name(), item);
+ auto lex = ProcMacro_Invoke(sp, crate, mac_path.path, path.nodes().back().name(), item);
if( lex )
{
Parse_ModRoot_Items(*lex, mod);