Skip to content

Commit 00ebebb

Browse files
committed
auto merge of #17654 : gereeter/rust/no-unnecessary-cell, r=alexcrichton
There is more that could be done, but this was the low hanging fruit.
2 parents 8ab6fce + 25b4084 commit 00ebebb

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
@@ -538,7 +538,7 @@ fn encode_reexports(ecx: &EncodeContext,
538538
id: NodeId,
539539
path: PathElems) {
540540
debug!("(encoding info for module) encoding reexports for {}", id);
541-
match ecx.reexports2.borrow().find(&id) {
541+
match ecx.reexports2.find(&id) {
542542
Some(ref exports) => {
543543
debug!("(encoding info for module) found reexports for {}", id);
544544
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)