Remove most of old resolve
resolve has a few type definitions in it that are used, so I left those and deleted everything else. Also, I switched rustdoc to use resolve3 instead of the old resolve. In a future commit I'll remove the type definitions entirely, as they're just duplicates of types defined in resolve3.
This commit is contained in:
parent
bc87e66355
commit
cf9a9d1ae8
5 changed files with 11 additions and 2336 deletions
|
|
@ -360,7 +360,7 @@ fn visit_fn(fk: visit::fn_kind, decl: fn_decl, body: blk,
|
|||
visit::visit_fn(fk, decl, body, sp, id, fn_maps, v);
|
||||
|
||||
alt fk {
|
||||
visit::fk_ctor(_, _, _, class_did) {
|
||||
visit::fk_ctor(_, _, _, _, class_did) {
|
||||
add_class_fields(fn_maps, class_did);
|
||||
}
|
||||
_ {}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -10,8 +10,8 @@ import syntax::ast_util::{dummy_sp, path_to_ident};
|
|||
import syntax::ast::def_id;
|
||||
import syntax::codemap::span;
|
||||
import syntax::print::pprust::pat_to_str;
|
||||
import middle::resolve::def_map;
|
||||
import back::abi;
|
||||
import resolve::def_map;
|
||||
import std::map::hashmap;
|
||||
import dvec::{dvec, extensions};
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import rustc::back::link;
|
|||
import rustc::metadata::filesearch;
|
||||
import rustc::front;
|
||||
import rustc::middle::resolve;
|
||||
import rustc::middle::resolve3;
|
||||
|
||||
export ctxt;
|
||||
export ctxt_handler;
|
||||
|
|
@ -115,7 +116,7 @@ fn build_ctxt(sess: session,
|
|||
let ast = front::test::modify_for_testing(sess, ast);
|
||||
let ast_map = ast_map::map_crate(sess.diagnostic(), *ast);
|
||||
*ignore_errors = true;
|
||||
let {exp_map, impl_map, _} = resolve::resolve_crate(sess, ast_map, ast);
|
||||
let {exp_map, impl_map, _} = resolve3::resolve_crate(sess, ast_map, ast);
|
||||
*ignore_errors = false;
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -270,8 +270,8 @@ fn for_each_reexported_impl(
|
|||
mod_id: ast::node_id
|
||||
) {
|
||||
let all_impls = all_impls(m);
|
||||
alt check *ctxt.impl_map.get(mod_id) {
|
||||
list::cons(impls, @list::nil) {
|
||||
alt *ctxt.impl_map.get(mod_id) {
|
||||
list::cons(impls, _) {
|
||||
for vec::each(*impls) |i| {
|
||||
// This impl is not an item in the current mod
|
||||
if !all_impls.contains_key(i.did) {
|
||||
|
|
@ -283,6 +283,9 @@ fn for_each_reexported_impl(
|
|||
}
|
||||
}
|
||||
}
|
||||
list::nil {
|
||||
// Do nothing -- mod has no impls
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue