Skip to content

Commit 25b4084

Browse files
author
Jonathan S
committed
Removed some unnecessary RefCells from resolve
1 parent 1f3cda8 commit 25b4084

File tree

3 files changed

+70
-96
lines changed

3 files changed

+70
-96
lines changed

src/librustc/metadata/encoder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ fn encode_reexports(ecx: &EncodeContext,
537537
id: NodeId,
538538
path: PathElems) {
539539
debug!("(encoding info for module) encoding reexports for {}", id);
540-
match ecx.reexports2.borrow().find(&id) {
540+
match ecx.reexports2.find(&id) {
541541
Some(ref exports) => {
542542
debug!("(encoding info for module) found reexports for {}", id);
543543
for exp in exports.iter() {

src/librustc/middle/privacy.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -347,9 +347,8 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EmbargoVisitor<'a, 'tcx> {
347347
// This code is here instead of in visit_item so that the
348348
// crate module gets processed as well.
349349
if self.prev_exported {
350-
let exp_map2 = self.exp_map2.borrow();
351-
assert!(exp_map2.contains_key(&id), "wut {:?}", id);
352-
for export in exp_map2.get(&id).iter() {
350+
assert!(self.exp_map2.contains_key(&id), "wut {:?}", id);
351+
for export in self.exp_map2.get(&id).iter() {
353352
if is_local(export.def_id) {
354353
self.reexports.insert(export.def_id.node);
355354
}

0 commit comments

Comments
 (0)