Skip to content

Commit 1437dec

Browse files
committed
rustc_resolve: prevent iteration of refids for completeness
This came up in review, and it should help some future author not introduce non-deterministic output here.
1 parent 77eb97d commit 1437dec

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/rustc_resolve/src/rustdoc.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ use pulldown_cmark::{
88
use rustc_ast as ast;
99
use rustc_ast::attr::AttributeExt;
1010
use rustc_ast::util::comments::beautify_doc_string;
11-
use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
11+
use rustc_data_structures::fx::FxIndexMap;
12+
use rustc_data_structures::unord::UnordSet;
1213
use rustc_middle::ty::TyCtxt;
1314
use rustc_span::def_id::DefId;
1415
use rustc_span::{DUMMY_SP, InnerSpan, Span, Symbol, kw, sym};
@@ -423,7 +424,7 @@ fn parse_links<'md>(doc: &'md str) -> Vec<Box<str>> {
423424
);
424425
let mut links = Vec::new();
425426

426-
let mut refids = FxHashSet::default();
427+
let mut refids = UnordSet::default();
427428

428429
while let Some(event) = event_iter.next() {
429430
match event {

0 commit comments

Comments
 (0)