rustdoc: Stop sorting external crates

Now that #73423 is fixed, sorting should no longer be necessary.
See also this discussion [1].

[1]: https://github.com/rust-lang/rust/pull/86889#discussion_r664134963
This commit is contained in:
Noah Lev 2021-10-29 20:57:12 -07:00
parent ebe9a11f71
commit a58e214894

View File

@ -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.