diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-03-28 12:59:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-28 12:59:55 +0100 |
| commit | bdc5adfe78b6d940c0f328a7bba6dbefaa71c427 (patch) | |
| tree | a06171be52162eb3ee6e73d6df9ae0a11a3dc9ce /src/librustdoc/html | |
| parent | ad87732caee5ff6b26273eeda0adb6e48d1a5b53 (diff) | |
| parent | 1437dec79942f1367b4cc7756e2f080261c34f3a (diff) | |
Rollup merge of #138678 - durin42:rmeta-stability, r=fmease
rustc_resolve: fix instability in lib.rmeta contents rust-lang/rust@23032f31c91f2 accidentally introduced some nondeterminism in the ordering of lib.rmeta files, which we caught in our bazel-based builds only recently due to being further behind than normal. In my testing, this fixes the issue.
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/markdown.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index 0d547a6a0d9..334a7a86989 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -1724,6 +1724,7 @@ pub(crate) fn markdown_links<'md, R>( md: &'md str, preprocess_link: impl Fn(MarkdownLink) -> Option<R>, ) -> Vec<R> { + use itertools::Itertools; if md.is_empty() { return vec![]; } @@ -1882,7 +1883,7 @@ pub(crate) fn markdown_links<'md, R>( let mut links = Vec::new(); let mut refdefs = FxIndexMap::default(); - for (label, refdef) in event_iter.reference_definitions().iter() { + for (label, refdef) in event_iter.reference_definitions().iter().sorted_by_key(|x| x.0) { refdefs.insert(label.to_string(), (false, refdef.dest.to_string(), refdef.span.clone())); } |
