mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Auto merge of #38937 - nrc:save-ty-fix, r=nikomatsakis
save-analysis: fix over-zealous filter on generated code
This commit is contained in:
commit
76bc5e1c80
@ -1343,18 +1343,19 @@ impl<'l, 'tcx: 'l, 'll, D: Dump +'ll> Visitor<'l> for DumpVisitor<'l, 'tcx, 'll,
|
|||||||
self.process_macro_use(t.span, t.id);
|
self.process_macro_use(t.span, t.id);
|
||||||
match t.node {
|
match t.node {
|
||||||
ast::TyKind::Path(_, ref path) => {
|
ast::TyKind::Path(_, ref path) => {
|
||||||
if self.span.filter_generated(None, t.span) {
|
if generated_code(t.span) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(id) = self.lookup_def_id(t.id) {
|
if let Some(id) = self.lookup_def_id(t.id) {
|
||||||
let sub_span = self.span.sub_span_for_type_name(t.span);
|
if let Some(sub_span) = self.span.sub_span_for_type_name(t.span) {
|
||||||
self.dumper.type_ref(TypeRefData {
|
self.dumper.type_ref(TypeRefData {
|
||||||
span: sub_span.expect("No span found for type ref"),
|
span: sub_span,
|
||||||
ref_id: Some(id),
|
ref_id: Some(id),
|
||||||
scope: self.cur_scope,
|
scope: self.cur_scope,
|
||||||
qualname: String::new()
|
qualname: String::new()
|
||||||
}.lower(self.tcx));
|
}.lower(self.tcx));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.write_sub_paths_truncated(path);
|
self.write_sub_paths_truncated(path);
|
||||||
|
Loading…
Reference in New Issue
Block a user