Skip to content

Commit

Permalink
rustdoc: Stop sorting external crates
Browse files Browse the repository at this point in the history
Now that rust-lang#73423 is fixed, sorting should no longer be necessary.
See also this discussion [1].

[1]: rust-lang#86889 (comment)
  • Loading branch information
camelid committed Oct 30, 2021
1 parent ebe9a11 commit a58e214
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustdoc/clean/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ crate fn krate(cx: &mut DocContext<'_>) -> Crate {
let module = crate::visit_ast::RustdocVisitor::new(cx).visit();

let mut externs = Vec::new();
for &cnum in cx.tcx.crates(()).iter() {
for &cnum in cx.tcx.crates(()) {
externs.push(ExternalCrate { crate_num: cnum });
// Analyze doc-reachability for extern items
LibEmbargoVisitor::new(cx).visit_lib(cnum);
}
externs.sort_unstable_by_key(|e| e.crate_num);

// Clean the crate, translating the entire librustc_ast AST to one that is
// understood by rustdoc.
Expand Down

0 comments on commit a58e214

Please sign in to comment.