Skip to content

Commit 3e52769

Browse files
powerboat9philberty
authored andcommitted
nr1.0: Remove support in expansion phase
gcc/rust/ChangeLog: * expand/rust-macro-expand.cc: Adjust includes. (MacroExpander::expand_crate): Remove usage of 1.0 resolver. * expand/rust-macro-expand.h: Adjust includes. (MacroExpander::MacroExpander): Remove initialization of resolver member variable. (MacroExpander::resolver): Remove member variable. Signed-off-by: Owen Avery <[email protected]>
1 parent df32148 commit 3e52769

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

gcc/rust/expand/rust-macro-expand.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@
2727
#include "rust-macro.h"
2828
#include "rust-parse.h"
2929
#include "rust-cfg-strip.h"
30-
#include "rust-early-name-resolver.h"
3130
#include "rust-proc-macro.h"
3231
#include "rust-token-tree-desugar.h"
3332

33+
// flag_assume_builtin_offset_of
34+
#include "options.h"
35+
3436
namespace Rust {
3537

3638
AST::Fragment
@@ -335,9 +337,6 @@ MacroExpander::expand_invoc (AST::MacroInvocation &invoc,
335337
void
336338
MacroExpander::expand_crate ()
337339
{
338-
NodeId scope_node_id = crate.get_node_id ();
339-
resolver->get_macro_scope ().push (scope_node_id);
340-
341340
/* fill macro/decorator map from init list? not sure where init list comes
342341
* from? */
343342

gcc/rust/expand/rust-macro-expand.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
#include "rust-ast.h"
2828
#include "rust-macro.h"
2929
#include "rust-hir-map.h"
30-
#include "rust-early-name-resolver.h"
31-
#include "rust-name-resolver.h"
3230
#include "rust-macro-invoc-lexer.h"
3331
#include "rust-proc-macro-invoc-lexer.h"
3432
#include "rust-token-converter.h"
@@ -301,8 +299,7 @@ struct MacroExpander
301299
: cfg (cfg), crate (crate), session (session),
302300
sub_stack (SubstitutionScope ()),
303301
expanded_fragment (AST::Fragment::create_error ()),
304-
has_changed_flag (false), resolver (Resolver::Resolver::get ()),
305-
mappings (Analysis::Mappings::get ())
302+
has_changed_flag (false), mappings (Analysis::Mappings::get ())
306303
{}
307304

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

516513
public:
517-
Resolver::Resolver *resolver;
518514
Analysis::Mappings &mappings;
519515
};
520516

0 commit comments

Comments
 (0)