Skip to content

Commit aa9d1d8

Browse files
Fix order of implementations in the "implementations on foreign types" section
1 parent 11cd1f0 commit aa9d1d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustdoc/html/render/print_item.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -991,14 +991,15 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
991991
}
992992
}
993993

994-
let (local, foreign) =
994+
let (local, mut foreign) =
995995
implementors.iter().partition::<Vec<_>, _>(|i| i.is_on_local_type(cx));
996996

997997
let (mut synthetic, mut concrete): (Vec<&&Impl>, Vec<&&Impl>) =
998998
local.iter().partition(|i| i.inner_impl().kind.is_auto());
999999

10001000
synthetic.sort_by_cached_key(|i| ImplString::new(i, cx));
10011001
concrete.sort_by_cached_key(|i| ImplString::new(i, cx));
1002+
foreign.sort_by_cached_key(|i| ImplString::new(i, cx));
10021003

10031004
if !foreign.is_empty() {
10041005
write_small_section_header(w, "foreign-impls", "Implementations on Foreign Types", "");

0 commit comments

Comments
 (0)