use node_id for indexing in ast_to_ty_cache
This commit is contained in:
parent
0419e36b76
commit
16da4e15af
@ -262,7 +262,7 @@ struct ctxt_ {
|
||||
needs_drop_cache: HashMap<t, bool>,
|
||||
needs_unwind_cleanup_cache: HashMap<t, bool>,
|
||||
mut tc_cache: LinearMap<uint, TypeContents>,
|
||||
ast_ty_to_ty_cache: HashMap<@ast::Ty, ast_ty_to_ty_cache_entry>,
|
||||
ast_ty_to_ty_cache: HashMap<node_id, ast_ty_to_ty_cache_entry>,
|
||||
enum_var_cache: HashMap<def_id, @~[VariantInfo]>,
|
||||
trait_method_cache: HashMap<def_id, @~[method]>,
|
||||
ty_param_bounds: HashMap<ast::node_id, param_bounds>,
|
||||
|
@ -277,7 +277,7 @@ fn check_path_args(tcx: ty::ctxt,
|
||||
|
||||
let tcx = self.tcx();
|
||||
|
||||
match tcx.ast_ty_to_ty_cache.find(&ast_ty) {
|
||||
match tcx.ast_ty_to_ty_cache.find(&ast_ty.id) {
|
||||
Some(ty::atttce_resolved(ty)) => return ty,
|
||||
Some(ty::atttce_unresolved) => {
|
||||
tcx.sess.span_fatal(ast_ty.span, ~"illegal recursive type; \
|
||||
@ -287,7 +287,7 @@ fn check_path_args(tcx: ty::ctxt,
|
||||
None => { /* go on */ }
|
||||
}
|
||||
|
||||
tcx.ast_ty_to_ty_cache.insert(ast_ty, ty::atttce_unresolved);
|
||||
tcx.ast_ty_to_ty_cache.insert(ast_ty.id, ty::atttce_unresolved);
|
||||
let typ = match /*bad*/copy ast_ty.node {
|
||||
ast::ty_nil => ty::mk_nil(tcx),
|
||||
ast::ty_bot => ty::mk_bot(tcx),
|
||||
@ -409,7 +409,7 @@ fn check_path_args(tcx: ty::ctxt,
|
||||
}
|
||||
};
|
||||
|
||||
tcx.ast_ty_to_ty_cache.insert(ast_ty, ty::atttce_resolved(typ));
|
||||
tcx.ast_ty_to_ty_cache.insert(ast_ty.id, ty::atttce_resolved(typ));
|
||||
return typ;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user