mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-16 22:16:53 +00:00
Fix adjacent code
This commit is contained in:
parent
ddf7f18190
commit
1a2c5a35b9
@ -17,7 +17,7 @@ use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
|
||||
use derive_setters::Setters;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxIndexMap, FxIndexSet};
|
||||
use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
|
||||
use rustc_data_structures::sync::{DynSend, IntoDynSyncSend};
|
||||
use rustc_error_messages::{FluentArgs, SpanLabel};
|
||||
use rustc_lexer;
|
||||
@ -1840,7 +1840,7 @@ impl HumanEmitter {
|
||||
!is_cont && line_idx + 1 == annotated_file.lines.len(),
|
||||
);
|
||||
|
||||
let mut to_add = FxHashMap::default();
|
||||
let mut to_add = FxIndexMap::default();
|
||||
|
||||
for (depth, style) in depths {
|
||||
// FIXME(#120456) - is `swap_remove` correct?
|
||||
|
@ -275,7 +275,9 @@ pub(crate) fn parse_check_cfg(dcx: DiagCtxtHandle<'_>, specs: Vec<String>) -> Ch
|
||||
.expecteds
|
||||
.entry(name.name)
|
||||
.and_modify(|v| match v {
|
||||
ExpectedValues::Some(v) if !values_any_specified => {
|
||||
ExpectedValues::Some(v) if !values_any_specified =>
|
||||
{
|
||||
#[allow(rustc::potential_query_instability)]
|
||||
v.extend(values.clone())
|
||||
}
|
||||
ExpectedValues::Some(_) => *v = ExpectedValues::Any,
|
||||
|
@ -3934,12 +3934,14 @@ impl<'a, 'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
|
||||
// Move up the non-overlapping bindings to the or-pattern.
|
||||
// Existing bindings just get "merged".
|
||||
let collected = bindings.pop().unwrap().1;
|
||||
#[allow(rustc::potential_query_instability)] // FIXME
|
||||
bindings.last_mut().unwrap().1.extend(collected);
|
||||
}
|
||||
// This or-pattern itself can itself be part of a product,
|
||||
// e.g. `(V1(a) | V2(a), a)` or `(a, V1(a) | V2(a))`.
|
||||
// Both cases bind `a` again in a product pattern and must be rejected.
|
||||
let collected = bindings.pop().unwrap().1;
|
||||
#[allow(rustc::potential_query_instability)] // FIXME
|
||||
bindings.last_mut().unwrap().1.extend(collected);
|
||||
|
||||
// Prevent visiting `ps` as we've already done so above.
|
||||
|
@ -47,7 +47,7 @@ pub(crate) struct Cache {
|
||||
|
||||
/// Similar to `paths`, but only holds external paths. This is only used for
|
||||
/// generating explicit hyperlinks to other crates.
|
||||
pub(crate) external_paths: FxHashMap<DefId, (Vec<Symbol>, ItemType)>,
|
||||
pub(crate) external_paths: FxIndexMap<DefId, (Vec<Symbol>, ItemType)>,
|
||||
|
||||
/// Maps local `DefId`s of exported types to fully qualified paths.
|
||||
/// Unlike 'paths', this mapping ignores any renames that occur
|
||||
|
Loading…
Reference in New Issue
Block a user