File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed
branches/try2/src/librustc/middle Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: daf31d2b4f35b5d125e2e354e9e9f74fe4ff52ff
8
+ refs/heads/try2: a66fcca9c9c279db5ab804734a0310b6aec60415
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -330,7 +330,7 @@ struct ctxt_ {
330
330
destructor_for_type : RefCell < HashMap < ast:: DefId , ast:: DefId > > ,
331
331
332
332
// A method will be in this list if and only if it is a destructor.
333
- destructors : @ mut HashSet < ast:: DefId > ,
333
+ destructors : RefCell < HashSet < ast:: DefId > > ,
334
334
335
335
// Maps a trait onto a list of impls of that trait.
336
336
trait_impls : @mut HashMap < ast:: DefId , @mut ~[ @Impl ] > ,
@@ -1004,7 +1004,7 @@ pub fn mk_ctxt(s: session::Session,
1004
1004
provided_method_sources : RefCell :: new ( HashMap :: new ( ) ) ,
1005
1005
supertraits : RefCell :: new ( HashMap :: new ( ) ) ,
1006
1006
destructor_for_type : RefCell :: new ( HashMap :: new ( ) ) ,
1007
- destructors : @ mut HashSet :: new ( ) ,
1007
+ destructors : RefCell :: new ( HashSet :: new ( ) ) ,
1008
1008
trait_impls : @mut HashMap :: new ( ) ,
1009
1009
inherent_impls : @mut HashMap :: new ( ) ,
1010
1010
impls : @mut HashMap :: new ( ) ,
Original file line number Diff line number Diff line change @@ -1151,7 +1151,8 @@ impl<'a> LookupContext<'a> {
1151
1151
let bad;
1152
1152
match candidate. origin {
1153
1153
method_static( method_id) => {
1154
- bad = self . tcx ( ) . destructors . contains ( & method_id) ;
1154
+ let destructors = self . tcx ( ) . destructors . borrow ( ) ;
1155
+ bad = destructors. get ( ) . contains ( & method_id) ;
1155
1156
}
1156
1157
// XXX: does this properly enforce this on everything now
1157
1158
// that self has been merged in? -sully
Original file line number Diff line number Diff line change @@ -709,7 +709,8 @@ impl CoherenceChecker {
709
709
. borrow_mut ( ) ;
710
710
destructor_for_type. get ( ) . insert ( type_def_id,
711
711
method_def_id) ;
712
- tcx. destructors . insert ( method_def_id) ;
712
+ let mut destructors = tcx. destructors . borrow_mut ( ) ;
713
+ destructors. get ( ) . insert ( method_def_id) ;
713
714
}
714
715
_ => {
715
716
// Destructors only work on nominal types.
You can’t perform that action at this time.
0 commit comments