diff options
| author | bors <bors@rust-lang.org> | 2023-11-02 17:54:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-11-02 17:54:29 +0000 |
| commit | b20f40dba9feabf4b446d9b09d15996f0c046eff (patch) | |
| tree | 5c067a8fca6890bda6b67404154363ab1a85b048 /src | |
| parent | c5afe0a61e39bdd912803eae8d1887a513bdd172 (diff) | |
| parent | 2e4a36bb530096537ce5a72d18c4b8dd4ea2a97b (diff) | |
| download | rust-b20f40dba9feabf4b446d9b09d15996f0c046eff.tar.gz rust-b20f40dba9feabf4b446d9b09d15996f0c046eff.zip | |
Auto merge of #117521 - GuillaumeGomez:impl-on-foreign-order, r=notriddle
Fix order of implementations in the "implementations on foreign types" section Fixes #117391. We forgot to run the `sort_by_cached_key` on this section. This fixes it. r? `@notriddle`
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/html/render/print_item.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index 65e7c08d521..d226701ba4a 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -991,7 +991,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean: } } - let (local, foreign) = + let (local, mut foreign) = implementors.iter().partition::<Vec<_>, _>(|i| i.is_on_local_type(cx)); let (mut synthetic, mut concrete): (Vec<&&Impl>, Vec<&&Impl>) = @@ -999,6 +999,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean: synthetic.sort_by_cached_key(|i| ImplString::new(i, cx)); concrete.sort_by_cached_key(|i| ImplString::new(i, cx)); + foreign.sort_by_cached_key(|i| ImplString::new(i, cx)); if !foreign.is_empty() { write_small_section_header(w, "foreign-impls", "Implementations on Foreign Types", ""); |
