diff options
| author | Augie Fackler <augie@google.com> | 2025-03-27 12:39:48 -0400 |
|---|---|---|
| committer | Augie Fackler <augie@google.com> | 2025-03-27 12:39:48 -0400 |
| commit | 1437dec79942f1367b4cc7756e2f080261c34f3a (patch) | |
| tree | 62e8cd042a77b564236b2ede3406fea70b0cb000 /compiler/rustc_resolve/src/rustdoc.rs | |
| parent | 77eb97d9a983f213cff1df7e02a4a96273653482 (diff) | |
| download | rust-1437dec79942f1367b4cc7756e2f080261c34f3a.tar.gz rust-1437dec79942f1367b4cc7756e2f080261c34f3a.zip | |
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.
Diffstat (limited to 'compiler/rustc_resolve/src/rustdoc.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/rustdoc.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/rustdoc.rs b/compiler/rustc_resolve/src/rustdoc.rs index 9fda1eb4dc4..a32fe699016 100644 --- a/compiler/rustc_resolve/src/rustdoc.rs +++ b/compiler/rustc_resolve/src/rustdoc.rs @@ -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 { |
