Rollup merge of #138678 - durin42:rmeta-stability, r=fmease
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:
commit
bdc5adfe78
4 changed files with 9 additions and 4 deletions
|
@ -1,13 +1,15 @@
|
|||
use std::mem;
|
||||
use std::ops::Range;
|
||||
|
||||
use itertools::Itertools;
|
||||
use pulldown_cmark::{
|
||||
BrokenLink, BrokenLinkCallback, CowStr, Event, LinkType, Options, Parser, Tag,
|
||||
};
|
||||
use rustc_ast as ast;
|
||||
use rustc_ast::attr::AttributeExt;
|
||||
use rustc_ast::util::comments::beautify_doc_string;
|
||||
use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
|
||||
use rustc_data_structures::fx::FxIndexMap;
|
||||
use rustc_data_structures::unord::UnordSet;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_span::def_id::DefId;
|
||||
use rustc_span::{DUMMY_SP, InnerSpan, Span, Symbol, kw, sym};
|
||||
|
@ -422,7 +424,7 @@ fn parse_links<'md>(doc: &'md str) -> Vec<Box<str>> {
|
|||
);
|
||||
let mut links = Vec::new();
|
||||
|
||||
let mut refids = FxHashSet::default();
|
||||
let mut refids = UnordSet::default();
|
||||
|
||||
while let Some(event) = event_iter.next() {
|
||||
match event {
|
||||
|
@ -454,7 +456,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) {
|
||||
links.push(preprocess_link(&refdef.dest));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue