rustc: Move original_crate_name to a query

This commit is contained in:
Alex Crichton 2017-08-28 17:30:27 -07:00
parent d6c88f4936
commit 52b67f988d
8 changed files with 19 additions and 21 deletions

View file

@ -207,7 +207,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
continue // These are `krate.exported_macros`, handled in `self.visit()`.
}
let imported_from = self.cx.sess().cstore.original_crate_name(def_id.krate);
let imported_from = self.cx.tcx.original_crate_name(def_id.krate);
let def = match self.cx.sess().cstore.load_macro(def_id, self.cx.sess()) {
LoadedMacro::MacroDef(macro_def) => macro_def,
// FIXME(jseyfried): document proc macro reexports