Skip to content

Commit 5b1ebd6

Browse files
committed
---
yaml --- r: 147555 b: refs/heads/try2 c: a66fcca h: refs/heads/master i: 147553: 2616441 147551: 10f90f9 v: v3
1 parent c9f1374 commit 5b1ebd6

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: daf31d2b4f35b5d125e2e354e9e9f74fe4ff52ff
8+
refs/heads/try2: a66fcca9c9c279db5ab804734a0310b6aec60415
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/middle/ty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ struct ctxt_ {
330330
destructor_for_type: RefCell<HashMap<ast::DefId, ast::DefId>>,
331331

332332
// 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>>,
334334

335335
// Maps a trait onto a list of impls of that trait.
336336
trait_impls: @mut HashMap<ast::DefId, @mut ~[@Impl]>,
@@ -1004,7 +1004,7 @@ pub fn mk_ctxt(s: session::Session,
10041004
provided_method_sources: RefCell::new(HashMap::new()),
10051005
supertraits: RefCell::new(HashMap::new()),
10061006
destructor_for_type: RefCell::new(HashMap::new()),
1007-
destructors: @mut HashSet::new(),
1007+
destructors: RefCell::new(HashSet::new()),
10081008
trait_impls: @mut HashMap::new(),
10091009
inherent_impls: @mut HashMap::new(),
10101010
impls: @mut HashMap::new(),

branches/try2/src/librustc/middle/typeck/check/method.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,8 @@ impl<'a> LookupContext<'a> {
11511151
let bad;
11521152
match candidate.origin {
11531153
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);
11551156
}
11561157
// XXX: does this properly enforce this on everything now
11571158
// that self has been merged in? -sully

branches/try2/src/librustc/middle/typeck/coherence.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,8 @@ impl CoherenceChecker {
709709
.borrow_mut();
710710
destructor_for_type.get().insert(type_def_id,
711711
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);
713714
}
714715
_ => {
715716
// Destructors only work on nominal types.

0 commit comments

Comments
 (0)