Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions gcc/rust/expand/rust-macro-expand.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
#include "rust-macro.h"
#include "rust-parse.h"
#include "rust-cfg-strip.h"
#include "rust-early-name-resolver.h"
#include "rust-proc-macro.h"
#include "rust-token-tree-desugar.h"

// flag_assume_builtin_offset_of
#include "options.h"

namespace Rust {

AST::Fragment
Expand Down Expand Up @@ -335,9 +337,6 @@ MacroExpander::expand_invoc (AST::MacroInvocation &invoc,
void
MacroExpander::expand_crate ()
{
NodeId scope_node_id = crate.get_node_id ();
resolver->get_macro_scope ().push (scope_node_id);

/* fill macro/decorator map from init list? not sure where init list comes
* from? */

Expand Down
6 changes: 1 addition & 5 deletions gcc/rust/expand/rust-macro-expand.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#include "rust-ast.h"
#include "rust-macro.h"
#include "rust-hir-map.h"
#include "rust-early-name-resolver.h"
#include "rust-name-resolver.h"
#include "rust-macro-invoc-lexer.h"
#include "rust-proc-macro-invoc-lexer.h"
#include "rust-token-converter.h"
Expand Down Expand Up @@ -301,8 +299,7 @@ struct MacroExpander
: cfg (cfg), crate (crate), session (session),
sub_stack (SubstitutionScope ()),
expanded_fragment (AST::Fragment::create_error ()),
has_changed_flag (false), resolver (Resolver::Resolver::get ()),
mappings (Analysis::Mappings::get ())
has_changed_flag (false), mappings (Analysis::Mappings::get ())
{}

~MacroExpander () = default;
Expand Down Expand Up @@ -514,7 +511,6 @@ struct MacroExpander
tl::optional<AST::MacroInvocation &> last_invoc;

public:
Resolver::Resolver *resolver;
Analysis::Mappings &mappings;
};

Expand Down
Loading