use rustc::middle::cstore::ExternCrate;
use rustc::middle::privacy::AccessLevels;
-use rustc::session::config::{CrateType, Input, OutputType};
use rustc::ty::{self, DefIdTree, TyCtxt};
use rustc::{bug, span_bug};
use rustc_ast::ast::{self, Attribute, NodeId, PatKind, DUMMY_NODE_ID};
use rustc_hir::def::{CtorOf, DefKind as HirDefKind, Res};
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
use rustc_hir::Node;
+use rustc_session::config::{CrateType, Input, OutputType};
use rustc_span::source_map::Spanned;
use rustc_span::*;
}
// FIXME(plietar): needs a new DefKind in rls-data
ast::ForeignItemKind::TyAlias(..) => None,
- ast::ForeignItemKind::Macro(..) => None,
+ ast::ForeignItemKind::MacCall(..) => None,
}
}
ExpnKind::Root | ExpnKind::AstPass(_) | ExpnKind::Desugaring(_) => return None,
};
- // If the callee is an imported macro from an external crate, need to get
- // the source span and name from the session, as their spans are localized
- // when read in, and no longer correspond to the source.
- if let Some(mac) = self.tcx.sess.imported_macro_spans.borrow().get(&callee.def_site) {
- let &(ref mac_name, mac_span) = mac;
- let mac_span = self.span_from_span(mac_span);
- return Some(MacroRef {
- span: callsite_span,
- qualname: mac_name.clone(), // FIXME: generate the real qualname
- callee_span: mac_span,
- });
- }
-
let callee_span = self.span_from_span(callee.def_site);
Some(MacroRef {
span: callsite_span,