Skip to content

Commit b7589ce

Browse files
committed
---
yaml --- r: 214830 b: refs/heads/beta c: b700b37 h: refs/heads/master v: v3
1 parent 455dbcb commit b7589ce

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
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 37dd4174d56431e97adf06ecaf6395376ab2ebbc
26+
refs/heads/beta: b700b37094a7215e4ac344f691b26c2e5fc81734
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 8c0aa6d64ebab528f7eb182812007155d6044972
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/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)