]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_resolve/macros.rs
Rollup merge of #65470 - traxys:fix_65401, r=michaelwoerister
[rust.git] / src / librustc_resolve / macros.rs
index 49186088fa06a79637cb039250d83e59cb1d6ca4..8b1b6db3ddc230342d43c38ef1a70ef6a64f4c98 100644 (file)
 use syntax::ast::{self, NodeId, Ident};
 use syntax::attr::StabilityLevel;
 use syntax::edition::Edition;
-use syntax::ext::base::{self, InvocationRes, Indeterminate, SpecialDerives};
-use syntax::ext::base::{MacroKind, SyntaxExtension};
-use syntax::ext::expand::{AstFragment, AstFragmentKind, Invocation, InvocationKind};
-use syntax::ext::hygiene::{self, ExpnId, ExpnData, ExpnKind};
-use syntax::ext::compile_declarative_macro;
+use syntax::expand::SpecialDerives;
 use syntax::feature_gate::{emit_feature_err, is_builtin_attr_name};
 use syntax::feature_gate::GateIssue;
 use syntax::print::pprust;
 use syntax::symbol::{Symbol, kw, sym};
+use syntax_expand::base::{self, InvocationRes, Indeterminate};
+use syntax_expand::base::SyntaxExtension;
+use syntax_expand::expand::{AstFragment, AstFragmentKind, Invocation, InvocationKind};
+use syntax_expand::compile_declarative_macro;
+use syntax_pos::hygiene::{self, ExpnId, ExpnData, ExpnKind};
 use syntax_pos::{Span, DUMMY_SP};
 
 use std::{mem, ptr};
 use rustc_data_structures::sync::Lrc;
-use syntax_pos::hygiene::AstPass;
+use syntax_pos::hygiene::{MacroKind, AstPass};
 
 type Res = def::Res<NodeId>;
 
@@ -108,15 +109,11 @@ fn resolve_dollar_crates(&mut self) {
         });
     }
 
-    // FIXME: `extra_placeholders` should be included into the `fragment` as regular placeholders.
-    fn visit_ast_fragment_with_placeholders(
-        &mut self, expansion: ExpnId, fragment: &AstFragment, extra_placeholders: &[NodeId]
-    ) {
+    fn visit_ast_fragment_with_placeholders(&mut self, expansion: ExpnId, fragment: &AstFragment) {
         // Integrate the new AST fragment into all the definition and module structures.
         // We are inside the `expansion` now, but other parent scope components are still the same.
         let parent_scope = ParentScope { expansion, ..self.invocation_parent_scopes[&expansion] };
-        let output_legacy_scope =
-            self.build_reduced_graph(fragment, extra_placeholders, parent_scope);
+        let output_legacy_scope = self.build_reduced_graph(fragment, parent_scope);
         self.output_legacy_scopes.insert(expansion, output_legacy_scope);
 
         parent_scope.module.unexpanded_invocations.borrow_mut().remove(&expansion);