TAIT: adjust save-analysis

This commit is contained in:
Mazdak Farrokhzad 2019-11-07 19:15:48 +01:00
parent e31d75caee
commit 89b5907357
2 changed files with 0 additions and 48 deletions

View File

@ -1133,12 +1133,6 @@ fn process_impl_item(&mut self, impl_item: &'l ast::ImplItem, impl_id: DefId) {
// trait.
self.visit_ty(ty)
}
ast::ImplItemKind::OpaqueTy(ref bounds) => {
// FIXME: uses of the assoc type should ideally point to this
// 'def' and the name here should be a ref to the def in the
// trait.
self.process_bounds(&bounds);
}
ast::ImplItemKind::Macro(_) => {}
}
}
@ -1384,38 +1378,6 @@ fn visit_item(&mut self, item: &'l ast::Item) {
self.visit_ty(&ty);
self.process_generic_params(ty_params, &qualname, item.id);
}
OpaqueTy(ref bounds, ref ty_params) => {
let qualname = format!("::{}",
self.tcx.def_path_str(self.tcx.hir().local_def_id_from_node_id(item.id)));
let value = String::new();
if !self.span.filter_generated(item.ident.span) {
let span = self.span_from_span(item.ident.span);
let id = id_from_node_id(item.id, &self.save_ctxt);
let hir_id = self.tcx.hir().node_to_hir_id(item.id);
self.dumper.dump_def(
&access_from!(self.save_ctxt, item, hir_id),
Def {
kind: DefKind::Type,
id,
span,
name: item.ident.to_string(),
qualname: qualname.clone(),
value,
parent: None,
children: vec![],
decl_id: None,
docs: self.save_ctxt.docs_for_attrs(&item.attrs),
sig: sig::item_signature(item, &self.save_ctxt),
attributes: lower_attributes(item.attrs.clone(), &self.save_ctxt),
},
);
}
self.process_bounds(bounds);
self.process_generic_params(ty_params, &qualname, item.id);
}
Mac(_) => (),
_ => visit::walk_item(self, item),
}

View File

@ -447,16 +447,6 @@ fn make(&self, offset: usize, _parent_id: Option<NodeId>, scx: &SaveContext<'_,
Ok(merge_sigs(sig.text.clone(), vec![sig, ty]))
}
ast::ItemKind::OpaqueTy(ref bounds, ref generics) => {
let text = "type ".to_owned();
let mut sig = name_and_generics(text, offset, generics, self.id, self.ident, scx)?;
sig.text.push_str(" = impl ");
sig.text.push_str(&pprust::bounds_to_string(bounds));
sig.text.push(';');
Ok(sig)
}
ast::ItemKind::Enum(_, ref generics) => {
let text = "enum ".to_owned();
let mut sig = name_and_generics(text, offset, generics, self.id, self.ident, scx)?;