Skip to content

Commit e3fd7b8

Browse files
committed
---
yaml --- r: 212042 b: refs/heads/tmp c: b700b37 h: refs/heads/master v: v3
1 parent e2d51a7 commit e3fd7b8

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3232
refs/heads/beta: 62e70d35be3fe532c26a400b499c58a18f18dd3a
3333
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3434
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
35-
refs/heads/tmp: 37dd4174d56431e97adf06ecaf6395376ab2ebbc
35+
refs/heads/tmp: b700b37094a7215e4ac344f691b26c2e5fc81734
3636
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3737
refs/tags/homu-tmp: b77d60adb019bb5de05e884a99f3290ec4694137
3838
refs/heads/gate: 97c84447b65164731087ea82685580cc81424412

branches/tmp/src/librustc/metadata/decoder.rs

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -220,16 +220,8 @@ fn get_provided_source(d: rbml::Doc, cdata: Cmd) -> Option<ast::DefId> {
220220
})
221221
}
222222

223-
fn each_reexport<F>(d: rbml::Doc, mut f: F) -> bool where
224-
F: FnMut(rbml::Doc) -> bool,
225-
{
226-
for doc in reader::tagged_docs(d, tag_items_data_item_reexport) {
227-
if !f(doc) {
228-
return false;
229-
}
230-
}
231-
232-
true
223+
fn reexports<'a>(d: rbml::Doc<'a>) -> reader::TaggedDocsIterator<'a> {
224+
reader::tagged_docs(d, tag_items_data_item_reexport)
233225
}
234226

235227
fn variant_disr_val(d: rbml::Doc) -> Option<ty::Disr> {
@@ -615,8 +607,7 @@ fn each_child_of_item_or_crate<F, G>(intr: Rc<IdentInterner>,
615607
}
616608
}
617609

618-
// Iterate over all reexports.
619-
let _ = each_reexport(item_doc, |reexport_doc| {
610+
for reexport_doc in reexports(item_doc) {
620611
let def_id_doc = reader::get_doc(reexport_doc,
621612
tag_items_data_item_reexport_def_id);
622613
let child_def_id = translated_def_id(cdata, def_id_doc);
@@ -646,9 +637,7 @@ fn each_child_of_item_or_crate<F, G>(intr: Rc<IdentInterner>,
646637
// a public re-export.
647638
callback(def_like, token::intern(name), ast::Public);
648639
}
649-
650-
true
651-
});
640+
}
652641
}
653642

654643
/// Iterates over each child of the given item.

0 commit comments

Comments
 (0)