rustc_resolve: fix instability in lib.rmeta contents
rust-lang/rust@23032f31c9 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.
This commit is contained in:
parent
75530e9f72
commit
795a6669f8
3 changed files with 4 additions and 1 deletions
|
@ -4316,6 +4316,7 @@ name = "rustc_resolve"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
|
"itertools",
|
||||||
"pulldown-cmark 0.11.3",
|
"pulldown-cmark 0.11.3",
|
||||||
"rustc_arena",
|
"rustc_arena",
|
||||||
"rustc_ast",
|
"rustc_ast",
|
||||||
|
|
|
@ -6,6 +6,7 @@ edition = "2024"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# tidy-alphabetical-start
|
# tidy-alphabetical-start
|
||||||
bitflags = "2.4.1"
|
bitflags = "2.4.1"
|
||||||
|
itertools = "0.12"
|
||||||
pulldown-cmark = { version = "0.11", features = ["html"], default-features = false }
|
pulldown-cmark = { version = "0.11", features = ["html"], default-features = false }
|
||||||
rustc_arena = { path = "../rustc_arena" }
|
rustc_arena = { path = "../rustc_arena" }
|
||||||
rustc_ast = { path = "../rustc_ast" }
|
rustc_ast = { path = "../rustc_ast" }
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::ops::Range;
|
use std::ops::Range;
|
||||||
|
|
||||||
|
use itertools::Itertools;
|
||||||
use pulldown_cmark::{
|
use pulldown_cmark::{
|
||||||
BrokenLink, BrokenLinkCallback, CowStr, Event, LinkType, Options, Parser, Tag,
|
BrokenLink, BrokenLinkCallback, CowStr, Event, LinkType, Options, Parser, Tag,
|
||||||
};
|
};
|
||||||
|
@ -454,7 +455,7 @@ fn parse_links<'md>(doc: &'md str) -> Vec<Box<str>> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (label, refdef) in event_iter.reference_definitions().iter() {
|
for (label, refdef) in event_iter.reference_definitions().iter().sorted_by_key(|x| x.0) {
|
||||||
if !refids.contains(label) {
|
if !refids.contains(label) {
|
||||||
links.push(preprocess_link(&refdef.dest));
|
links.push(preprocess_link(&refdef.dest));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue