Reviewer changes

This commit is contained in:
Nick Cameron 2015-03-16 17:01:12 +13:00
parent 2df1ceb001
commit 1fd38c181a
2 changed files with 5 additions and 4 deletions

View File

@ -372,7 +372,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
ItemExternCrate(_) => {
// n.b. we don't need to look at the path option here, because cstore already did
for &crate_id in self.session.cstore.find_extern_mod_stmt_cnum(item.id).iter() {
if let Some(crate_id) = self.session.cstore.find_extern_mod_stmt_cnum(item.id) {
let def_id = DefId { krate: crate_id, node: 0 };
self.external_exports.insert(def_id);
let parent_link = ModuleParentLink(parent.downgrade(), name);

View File

@ -144,9 +144,10 @@ impl<'a> fold::Folder for TestHarnessGenerator<'a> {
// Make all tests public so we can call them from outside
// the module (note that the tests are re-exported and must
// be made public themselves to avoid privacy errors).
let mut result = (*i).clone();
result.vis = ast::Public;
P(result)
i.map(|mut i| {
i.vis = ast::Public;
i
})
}
}
} else {