Skip to content

Commit 0dea7e3

Browse files
committed
---
yaml --- r: 147666 b: refs/heads/try2 c: 2ba1b0b h: refs/heads/master v: v3
1 parent 33c30b0 commit 0dea7e3

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
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: 620be9235dbbb2f57462761bcfe0bebb8e2bbece
8+
refs/heads/try2: 2ba1b0bc0682235293c963d5638a8306acdfa097
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: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ struct ctxt_ {
360360

361361
// The set of external nominal types whose implementations have been read.
362362
// This is used for lazy resolution of methods.
363-
populated_external_types: @mut HashSet<ast::DefId>,
363+
populated_external_types: RefCell<HashSet<ast::DefId>>,
364364

365365
// The set of external traits whose implementations have been read. This
366366
// is used for lazy resolution of traits.
@@ -1007,7 +1007,7 @@ pub fn mk_ctxt(s: session::Session,
10071007
used_unsafe: RefCell::new(HashSet::new()),
10081008
used_mut_nodes: RefCell::new(HashSet::new()),
10091009
impl_vtables: RefCell::new(HashMap::new()),
1010-
populated_external_types: @mut HashSet::new(),
1010+
populated_external_types: RefCell::new(HashSet::new()),
10111011
populated_external_traits: @mut HashSet::new(),
10121012

10131013
extern_const_statics: RefCell::new(HashMap::new()),
@@ -4525,8 +4525,11 @@ pub fn populate_implementations_for_type_if_necessary(tcx: ctxt,
45254525
if type_id.crate == LOCAL_CRATE {
45264526
return
45274527
}
4528-
if tcx.populated_external_types.contains(&type_id) {
4529-
return
4528+
{
4529+
let populated_external_types = tcx.populated_external_types.borrow();
4530+
if populated_external_types.get().contains(&type_id) {
4531+
return
4532+
}
45304533
}
45314534

45324535
csearch::each_implementation_for_type(tcx.sess.cstore, type_id,
@@ -4573,7 +4576,9 @@ pub fn populate_implementations_for_type_if_necessary(tcx: ctxt,
45734576
impls.get().insert(implementation_def_id, implementation);
45744577
});
45754578

4576-
tcx.populated_external_types.insert(type_id);
4579+
let mut populated_external_types = tcx.populated_external_types
4580+
.borrow_mut();
4581+
populated_external_types.get().insert(type_id);
45774582
}
45784583

45794584
/// Populates the type context with all the implementations for the given

0 commit comments

Comments
 (0)