Skip to content

Commit

Permalink
auto merge of #17654 : gereeter/rust/no-unnecessary-cell, r=alexcrichton
Browse files Browse the repository at this point in the history
There is more that could be done, but this was the low hanging fruit.
  • Loading branch information
bors committed Oct 1, 2014
2 parents 8ab6fce + 25b4084 commit 00ebebb
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 96 deletions.
2 changes: 1 addition & 1 deletion src/librustc/metadata/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ fn encode_reexports(ecx: &EncodeContext,
id: NodeId,
path: PathElems) {
debug!("(encoding info for module) encoding reexports for {}", id);
match ecx.reexports2.borrow().find(&id) {
match ecx.reexports2.find(&id) {
Some(ref exports) => {
debug!("(encoding info for module) found reexports for {}", id);
for exp in exports.iter() {
Expand Down
7 changes: 3 additions & 4 deletions src/librustc/middle/privacy.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand Down Expand Up @@ -347,9 +347,8 @@ impl<'a, 'tcx, 'v> Visitor<'v> for EmbargoVisitor<'a, 'tcx> {
// This code is here instead of in visit_item so that the
// crate module gets processed as well.
if self.prev_exported {
let exp_map2 = self.exp_map2.borrow();
assert!(exp_map2.contains_key(&id), "wut {:?}", id);
for export in exp_map2.get(&id).iter() {
assert!(self.exp_map2.contains_key(&id), "wut {:?}", id);
for export in self.exp_map2.get(&id).iter() {
if is_local(export.def_id) {
self.reexports.insert(export.def_id.node);
}
Expand Down
Loading

0 comments on commit 00ebebb

Please sign in to comment.