From 6f441e8fde85aac3321b1aad42eaa25d88d0a716 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 17 Aug 2012 14:31:39 -0700 Subject: [PATCH] rustc: Remove lookup_defs; unused. --- src/rustc/metadata/csearch.rs | 12 ------------ src/rustc/middle/resolve3.rs | 3 +-- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/rustc/metadata/csearch.rs b/src/rustc/metadata/csearch.rs index 69c76e40417..c12e18b15de 100644 --- a/src/rustc/metadata/csearch.rs +++ b/src/rustc/metadata/csearch.rs @@ -19,7 +19,6 @@ export get_class_method; export get_field_type; export get_type_param_count; export get_region_param; -export lookup_defs; export lookup_method_purity; export get_enum_variants; export get_impls_for_mod; @@ -43,17 +42,6 @@ fn get_type_param_count(cstore: cstore::cstore, def: ast::def_id) -> uint { return decoder::get_type_param_count(cdata, def.node); } -fn lookup_defs(cstore: cstore::cstore, cnum: ast::crate_num, - path: ~[ast::ident]) -> ~[ast::def] { - let mut result = ~[]; - debug!{"lookup_defs: path = %? cnum = %?", path, cnum}; - for resolve_path(cstore, cnum, path).each |elt| { - let (c, data, def) = elt; - vec::push(result, decoder::lookup_def(c, data, def)); - } - return result; -} - fn lookup_method_purity(cstore: cstore::cstore, did: ast::def_id) -> ast::purity { let cdata = cstore::get_crate_data(cstore, did.crate).data; diff --git a/src/rustc/middle/resolve3.rs b/src/rustc/middle/resolve3.rs index 9e6afc266b8..4c3a79aae19 100644 --- a/src/rustc/middle/resolve3.rs +++ b/src/rustc/middle/resolve3.rs @@ -1,6 +1,5 @@ import driver::session::session; -import metadata::csearch::{each_path}; -import metadata::csearch::{get_method_names_if_trait, lookup_defs}; +import metadata::csearch::{each_path, get_method_names_if_trait}; import metadata::cstore::find_use_stmt_cnum; import metadata::decoder::{def_like, dl_def, dl_field, dl_impl}; import middle::lang_items::LanguageItems;