File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed
branches/dist-snap/src/librustc/middle Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9
- refs/heads/dist-snap: ea5368ce6e5eb1c9b28e3e072dca4f0b063f15b2
9
+ refs/heads/dist-snap: 727fa3aa01cc9cb5429e3782a45a8625ceeafd48
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
12
12
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
Original file line number Diff line number Diff line change @@ -1006,7 +1006,7 @@ pub fn mk_ctxt(s: session::Session,
1006
1006
impls : RefCell :: new ( HashMap :: new ( ) ) ,
1007
1007
used_unsafe : @mut HashSet :: new ( ) ,
1008
1008
used_mut_nodes : @mut HashSet :: new ( ) ,
1009
- impl_vtables : @ mut HashMap :: new ( ) ,
1009
+ impl_vtables : RefCell :: new ( HashMap :: new ( ) ) ,
1010
1010
populated_external_types : @mut HashSet :: new ( ) ,
1011
1011
populated_external_traits : @mut HashSet :: new ( ) ,
1012
1012
@@ -3980,8 +3980,9 @@ pub fn lookup_item_type(cx: ctxt,
3980
3980
pub fn lookup_impl_vtables ( cx : ctxt ,
3981
3981
did : ast:: DefId )
3982
3982
-> typeck:: impl_res {
3983
+ let mut impl_vtables = cx. impl_vtables . borrow_mut ( ) ;
3983
3984
lookup_locally_or_in_crate_store (
3984
- "impl_vtables" , did, cx . impl_vtables ,
3985
+ "impl_vtables" , did, impl_vtables. get ( ) ,
3985
3986
|| csearch:: get_impl_vtables ( cx, did) )
3986
3987
}
3987
3988
Original file line number Diff line number Diff line change @@ -778,7 +778,9 @@ pub fn resolve_impl(ccx: @mut CrateCtxt,
778
778
self_vtables : self_vtable_res
779
779
} ;
780
780
let impl_def_id = ast_util:: local_def ( impl_item. id ) ;
781
- ccx. tcx . impl_vtables . insert ( impl_def_id, res) ;
781
+
782
+ let mut impl_vtables = ccx. tcx . impl_vtables . borrow_mut ( ) ;
783
+ impl_vtables. get ( ) . insert ( impl_def_id, res) ;
782
784
}
783
785
784
786
impl visit:: Visitor < ( ) > for @FnCtxt {
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ use util::common::time;
68
68
use util:: ppaux:: Repr ;
69
69
use util:: ppaux;
70
70
71
+ use std:: cell:: RefCell ;
71
72
use std:: hashmap:: HashMap ;
72
73
use std:: result;
73
74
use extra:: list:: List ;
@@ -225,7 +226,7 @@ impl Repr for impl_res {
225
226
}
226
227
}
227
228
228
- pub type impl_vtable_map = @ mut HashMap < ast:: DefId , impl_res > ;
229
+ pub type impl_vtable_map = RefCell < HashMap < ast:: DefId , impl_res > > ;
229
230
230
231
pub struct CrateCtxt {
231
232
// A mapping from method call sites to traits that have that method.
You can’t perform that action at this time.
0 commit comments