From 89b5907357c3933dc84c60eaea5dfe82cf634933 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Thu, 7 Nov 2019 19:15:48 +0100 Subject: [PATCH] TAIT: adjust save-analysis --- src/librustc_save_analysis/dump_visitor.rs | 38 ---------------------- src/librustc_save_analysis/sig.rs | 10 ------ 2 files changed, 48 deletions(-) diff --git a/src/librustc_save_analysis/dump_visitor.rs b/src/librustc_save_analysis/dump_visitor.rs index 92c391fb4a3..5bec5b5eb6b 100644 --- a/src/librustc_save_analysis/dump_visitor.rs +++ b/src/librustc_save_analysis/dump_visitor.rs @@ -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), } diff --git a/src/librustc_save_analysis/sig.rs b/src/librustc_save_analysis/sig.rs index d1b9b8ff44d..50dfac62024 100644 --- a/src/librustc_save_analysis/sig.rs +++ b/src/librustc_save_analysis/sig.rs @@ -447,16 +447,6 @@ fn make(&self, offset: usize, _parent_id: Option, 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)?;