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.
This commit is contained in:
Augie Fackler 2025-03-27 12:39:48 -04:00
parent 77eb97d9a9
commit 1437dec799

View file

@ -8,7 +8,8 @@ use pulldown_cmark::{
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};
@ -423,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 {