diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2015-03-16 17:01:12 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2015-03-16 17:01:12 +1300 |
| commit | 1fd38c181a5cadb854dd8eb22d1ba1b7f009a12f (patch) | |
| tree | 37920a87d52a2c488a148d12097481705b1c5b7a | |
| parent | 2df1ceb001662845e14e210f22adfe02dd88112b (diff) | |
| download | rust-1fd38c181a5cadb854dd8eb22d1ba1b7f009a12f.tar.gz rust-1fd38c181a5cadb854dd8eb22d1ba1b7f009a12f.zip | |
Reviewer changes
| -rw-r--r-- | src/librustc_resolve/build_reduced_graph.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/test.rs | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/librustc_resolve/build_reduced_graph.rs b/src/librustc_resolve/build_reduced_graph.rs index 0282484ba28..e62300098f6 100644 --- a/src/librustc_resolve/build_reduced_graph.rs +++ b/src/librustc_resolve/build_reduced_graph.rs @@ -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); diff --git a/src/libsyntax/test.rs b/src/libsyntax/test.rs index 991ab77419f..2a47a696b1c 100644 --- a/src/libsyntax/test.rs +++ b/src/libsyntax/test.rs @@ -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 { |
