mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-26 22:53:28 +00:00
save-analysis: dump extern crate imports
This commit is contained in:
parent
b3c39560a4
commit
b82d2809fd
@ -1404,6 +1404,9 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> Visitor<'l> for DumpVisitor<'l, 'tc
|
||||
if !self.span.filter_generated(alias_span, item.span) {
|
||||
let span =
|
||||
self.span_from_span(alias_span.expect("No span found for extern crate"));
|
||||
let parent = self.save_ctxt.tcx.hir.opt_local_def_id(item.id)
|
||||
.and_then(|id| self.save_ctxt.tcx.parent_def_id(id))
|
||||
.map(::id_from_def_id);
|
||||
self.dumper.import(
|
||||
&Access {
|
||||
public: false,
|
||||
@ -1415,7 +1418,7 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> Visitor<'l> for DumpVisitor<'l, 'tc
|
||||
span,
|
||||
name: item.ident.to_string(),
|
||||
value: String::new(),
|
||||
parent: None,
|
||||
parent,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user