|
1 | 1 | use crate::clean::auto_trait::AutoTraitFinder;
|
2 | 2 | use crate::clean::blanket_impl::BlanketImplFinder;
|
3 | 3 | use crate::clean::{
|
4 |
| - inline, Clean, Crate, Generic, GenericArg, GenericArgs, ImportSource, Item, ItemKind, Lifetime, |
5 |
| - Path, PathSegment, PolyTrait, Primitive, PrimitiveType, ResolvedPath, Type, TypeBinding, |
6 |
| - Visibility, |
| 4 | + inline, Clean, Crate, ExternalCrate, Generic, GenericArg, GenericArgs, ImportSource, Item, |
| 5 | + ItemKind, Lifetime, Path, PathSegment, PolyTrait, Primitive, PrimitiveType, ResolvedPath, Type, |
| 6 | + TypeBinding, Visibility, |
7 | 7 | };
|
8 | 8 | use crate::core::DocContext;
|
9 | 9 | use crate::formats::item_type::ItemType;
|
@@ -35,11 +35,11 @@ crate fn krate(cx: &mut DocContext<'_>) -> Crate {
|
35 | 35 |
|
36 | 36 | let mut externs = Vec::new();
|
37 | 37 | for &cnum in cx.tcx.crates(()).iter() {
|
38 |
| - externs.push((cnum, cnum.clean(cx))); |
| 38 | + externs.push(ExternalCrate { crate_num: cnum }); |
39 | 39 | // Analyze doc-reachability for extern items
|
40 | 40 | LibEmbargoVisitor::new(cx).visit_lib(cnum);
|
41 | 41 | }
|
42 |
| - externs.sort_by(|&(a, _), &(b, _)| a.cmp(&b)); |
| 42 | + externs.sort_unstable(); |
43 | 43 |
|
44 | 44 | // Clean the crate, translating the entire librustc_ast AST to one that is
|
45 | 45 | // understood by rustdoc.
|
|
0 commit comments