@@ -25,9 +25,8 @@ use rustc::ty::wf::object_region_bounds;
2525use rustc_back:: slice;
2626use require_c_abi_if_variadic;
2727use util:: common:: { ErrorReported , FN_OUTPUT_NAME } ;
28- use util:: nodemap:: { NodeMap , FxHashSet } ;
28+ use util:: nodemap:: FxHashSet ;
2929
30- use std:: cell:: RefCell ;
3130use std:: iter;
3231use syntax:: { abi, ast} ;
3332use syntax:: feature_gate:: { GateIssue , emit_feature_err} ;
@@ -37,9 +36,6 @@ use syntax_pos::Span;
3736pub trait AstConv < ' gcx , ' tcx > {
3837 fn tcx < ' a > ( & ' a self ) -> TyCtxt < ' a , ' gcx , ' tcx > ;
3938
40- /// A cache used for the result of `ast_ty_to_ty_cache`
41- fn ast_ty_to_ty_cache ( & self ) -> & RefCell < NodeMap < Ty < ' tcx > > > ;
42-
4339 /// Returns the set of bounds in scope for the type parameter with
4440 /// the given id.
4541 fn get_type_parameter_bounds ( & self , span : Span , def_id : DefId )
@@ -1074,11 +1070,6 @@ impl<'o, 'gcx: 'tcx, 'tcx> AstConv<'gcx, 'tcx>+'o {
10741070
10751071 let tcx = self . tcx ( ) ;
10761072
1077- let cache = self . ast_ty_to_ty_cache ( ) ;
1078- if let Some ( ty) = cache. borrow ( ) . get ( & ast_ty. id ) {
1079- return ty;
1080- }
1081-
10821073 let result_ty = match ast_ty. node {
10831074 hir:: TySlice ( ref ty) => {
10841075 tcx. mk_slice ( self . ast_ty_to_ty ( & ty) )
@@ -1240,8 +1231,6 @@ impl<'o, 'gcx: 'tcx, 'tcx> AstConv<'gcx, 'tcx>+'o {
12401231 }
12411232 } ;
12421233
1243- cache. borrow_mut ( ) . insert ( ast_ty. id , result_ty) ;
1244-
12451234 result_ty
12461235 }
12471236
0 commit comments