Skip to content

Commit 2d2ac32

Browse files
Remove unused StableMap and StableSet types from rustc_data_structures
1 parent 376a695 commit 2d2ac32

File tree

35 files changed

+35
-215
lines changed

35 files changed

+35
-215
lines changed

compiler/rustc_ast_lowering/src/asm.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ use super::LoweringContext;
44

55
use rustc_ast::ptr::P;
66
use rustc_ast::*;
7-
use rustc_data_structures::fx::FxHashMap;
8-
use rustc_data_structures::stable_set::FxHashSet;
7+
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
98
use rustc_errors::struct_span_err;
109
use rustc_hir as hir;
1110
use rustc_hir::def::{DefKind, Res};

compiler/rustc_borrowck/src/diagnostics/region_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Error reporting machinery for lifetime errors.
22
3-
use rustc_data_structures::stable_set::FxHashSet;
3+
use rustc_data_structures::fx::FxHashSet;
44
use rustc_errors::{Applicability, Diagnostic, DiagnosticBuilder, ErrorGuaranteed, MultiSpan};
55
use rustc_hir::def_id::DefId;
66
use rustc_hir::intravisit::Visitor;

compiler/rustc_codegen_gcc/src/abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use gccjit::{ToLValue, ToRValue, Type};
22
use rustc_codegen_ssa::traits::{AbiBuilderMethods, BaseTypeMethods};
3-
use rustc_data_structures::stable_set::FxHashSet;
3+
use rustc_data_structures::fx::FxHashSet;
44
use rustc_middle::bug;
55
use rustc_middle::ty::Ty;
66
use rustc_target::abi::call::{CastTarget, FnAbi, PassMode, Reg, RegKind};

compiler/rustc_codegen_gcc/src/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use rustc_codegen_ssa::traits::{
3030
OverflowOp,
3131
StaticBuilderMethods,
3232
};
33-
use rustc_data_structures::stable_set::FxHashSet;
33+
use rustc_data_structures::fx::FxHashSet;
3434
use rustc_middle::ty::{ParamEnv, Ty, TyCtxt};
3535
use rustc_middle::ty::layout::{FnAbiError, FnAbiOfHelpers, FnAbiRequest, HasParamEnv, HasTyCtxt, LayoutError, LayoutOfHelpers, TyAndLayout};
3636
use rustc_span::Span;

compiler/rustc_data_structures/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,10 @@ pub mod sip128;
6161
pub mod small_c_str;
6262
pub mod small_str;
6363
pub mod snapshot_map;
64-
pub mod stable_map;
6564
pub mod svh;
6665
pub use ena::snapshot_vec;
6766
pub mod memmap;
6867
pub mod sorted_map;
69-
pub mod stable_set;
7068
#[macro_use]
7169
pub mod stable_hasher;
7270
mod atomic_ref;

compiler/rustc_data_structures/src/stable_map.rs

-100
This file was deleted.

compiler/rustc_data_structures/src/stable_set.rs

-77
This file was deleted.

compiler/rustc_errors/src/diagnostic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::{
33
CodeSuggestion, DiagnosticMessage, EmissionGuarantee, Level, LintDiagnosticBuilder, MultiSpan,
44
SubdiagnosticMessage, Substitution, SubstitutionPart, SuggestionStyle,
55
};
6-
use rustc_data_structures::stable_map::FxHashMap;
6+
use rustc_data_structures::fx::FxHashMap;
77
use rustc_error_messages::FluentValue;
88
use rustc_lint_defs::{Applicability, LintExpectationId};
99
use rustc_span::edition::LATEST_STABLE_EDITION;

compiler/rustc_hir/src/pat_util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::def::{CtorOf, DefKind, Res};
22
use crate::def_id::DefId;
33
use crate::hir::{self, HirId, PatKind};
4-
use rustc_data_structures::stable_set::FxHashSet;
4+
use rustc_data_structures::fx::FxHashSet;
55
use rustc_span::hygiene::DesugaringKind;
66
use rustc_span::symbol::Ident;
77
use rustc_span::Span;

compiler/rustc_incremental/src/assert_module_sources.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//! was re-used.
2424
2525
use rustc_ast as ast;
26-
use rustc_data_structures::stable_set::FxHashSet;
26+
use rustc_data_structures::fx::FxHashSet;
2727
use rustc_hir::def_id::LOCAL_CRATE;
2828
use rustc_middle::mir::mono::CodegenUnitNameBuilder;
2929
use rustc_middle::ty::TyCtxt;

compiler/rustc_incremental/src/persist/work_product.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! [work products]: WorkProduct
44
55
use crate::persist::fs::*;
6-
use rustc_data_structures::stable_map::FxHashMap;
6+
use rustc_data_structures::fx::FxHashMap;
77
use rustc_fs_util::link_or_copy;
88
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
99
use rustc_session::Session;

compiler/rustc_infer/src/infer/error_reporting/nice_region_error/mismatched_static_lifetime.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::infer::error_reporting::note_and_explain_region;
66
use crate::infer::lexical_region_resolve::RegionResolutionError;
77
use crate::infer::{SubregionOrigin, TypeTrace};
88
use crate::traits::ObligationCauseCode;
9-
use rustc_data_structures::stable_set::FxHashSet;
9+
use rustc_data_structures::fx::FxHashSet;
1010
use rustc_errors::{Applicability, ErrorGuaranteed, MultiSpan};
1111
use rustc_hir as hir;
1212
use rustc_hir::intravisit::Visitor;

compiler/rustc_infer/src/infer/error_reporting/nice_region_error/static_impl_trait.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::infer::error_reporting::nice_region_error::NiceRegionError;
44
use crate::infer::lexical_region_resolve::RegionResolutionError;
55
use crate::infer::{SubregionOrigin, TypeTrace};
66
use crate::traits::{ObligationCauseCode, UnifyReceiverContext};
7-
use rustc_data_structures::stable_set::FxHashSet;
7+
use rustc_data_structures::fx::FxHashSet;
88
use rustc_errors::{struct_span_err, Applicability, Diagnostic, ErrorGuaranteed, MultiSpan};
99
use rustc_hir::def_id::DefId;
1010
use rustc_hir::intravisit::{walk_ty, Visitor};

compiler/rustc_infer/src/infer/error_reporting/note.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
357357
let trait_predicates = self.tcx.explicit_predicates_of(trait_item_def_id);
358358
let impl_predicates = self.tcx.explicit_predicates_of(impl_item_def_id);
359359

360-
let impl_predicates: rustc_data_structures::stable_set::FxHashSet<_> =
360+
let impl_predicates: rustc_data_structures::fx::FxHashSet<_> =
361361
impl_predicates.predicates.into_iter().map(|(pred, _)| pred).collect();
362362
let clauses: Vec<_> = trait_predicates
363363
.predicates

compiler/rustc_middle/src/mir/query.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use crate::mir::{Body, ConstantKind, Promoted};
44
use crate::ty::{self, OpaqueHiddenType, Ty, TyCtxt};
5-
use rustc_data_structures::stable_map::FxHashMap;
5+
use rustc_data_structures::fx::FxHashMap;
66
use rustc_data_structures::vec_map::VecMap;
77
use rustc_errors::ErrorGuaranteed;
88
use rustc_hir as hir;

compiler/rustc_middle/src/mir/switch_sources.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! Lazily compute the inverse of each `SwitchInt`'s switch targets. Modeled after
22
//! `Predecessors`/`PredecessorCache`.
33
4+
use rustc_data_structures::fx::FxHashMap;
45
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
5-
use rustc_data_structures::stable_map::FxHashMap;
66
use rustc_data_structures::sync::OnceCell;
77
use rustc_index::vec::IndexVec;
88
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};

compiler/rustc_middle/src/traits/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use rustc_data_structures::stable_set::FxHashSet;
1+
use rustc_data_structures::fx::FxHashSet;
22

33
use crate::ty::{PolyTraitRef, TyCtxt};
44

compiler/rustc_mir_transform/src/uninhabited_enum_branching.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! A pass that eliminates branches on uninhabited enum variants.
22
33
use crate::MirPass;
4-
use rustc_data_structures::stable_set::FxHashSet;
4+
use rustc_data_structures::fx::FxHashSet;
55
use rustc_middle::mir::{
66
BasicBlockData, Body, Local, Operand, Rvalue, StatementKind, SwitchTargets, Terminator,
77
TerminatorKind,

compiler/rustc_target/src/asm/aarch64.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::{InlineAsmArch, InlineAsmType};
22
use crate::spec::{RelocModel, Target};
3-
use rustc_data_structures::stable_set::FxHashSet;
3+
use rustc_data_structures::fx::FxHashSet;
44
use rustc_macros::HashStable_Generic;
55
use rustc_span::Symbol;
66
use std::fmt;

compiler/rustc_target/src/asm/arm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::{InlineAsmArch, InlineAsmType};
22
use crate::spec::{RelocModel, Target};
3-
use rustc_data_structures::stable_set::FxHashSet;
3+
use rustc_data_structures::fx::FxHashSet;
44
use rustc_macros::HashStable_Generic;
55
use rustc_span::{sym, Symbol};
66
use std::fmt;

compiler/rustc_target/src/asm/riscv.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::{InlineAsmArch, InlineAsmType};
22
use crate::spec::{RelocModel, Target};
3-
use rustc_data_structures::stable_set::FxHashSet;
3+
use rustc_data_structures::fx::FxHashSet;
44
use rustc_macros::HashStable_Generic;
55
use rustc_span::{sym, Symbol};
66
use std::fmt;

compiler/rustc_target/src/asm/x86.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::{InlineAsmArch, InlineAsmType};
22
use crate::spec::{RelocModel, Target};
3-
use rustc_data_structures::stable_set::FxHashSet;
3+
use rustc_data_structures::fx::FxHashSet;
44
use rustc_macros::HashStable_Generic;
55
use rustc_span::Symbol;
66
use std::fmt;

compiler/rustc_traits/src/implied_outlives_bounds.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn compute_implied_outlives_bounds<'tcx>(
4747
// process it next. Because the resulting predicates aren't always
4848
// guaranteed to be a subset of the original type, so we need to store the
4949
// WF args we've computed in a set.
50-
let mut checked_wf_args = rustc_data_structures::stable_set::FxHashSet::default();
50+
let mut checked_wf_args = rustc_data_structures::fx::FxHashSet::default();
5151
let mut wf_args = vec![ty.into()];
5252

5353
let mut implied_bounds = vec![];

compiler/rustc_ty_utils/src/representability.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Check whether a type is representable.
2-
use rustc_data_structures::stable_map::FxHashMap;
2+
use rustc_data_structures::fx::FxHashMap;
33
use rustc_hir as hir;
44
use rustc_middle::ty::{self, Ty, TyCtxt};
55
use rustc_span::Span;

compiler/rustc_type_ir/src/codec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::Interner;
22

3-
use rustc_data_structures::stable_map::FxHashMap;
3+
use rustc_data_structures::fx::FxHashMap;
44
use rustc_serialize::{Decoder, Encoder};
55

66
/// The shorthand encoding uses an enum's variant index `usize`

compiler/rustc_typeck/src/check/compare_method.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::check::regionck::OutlivesEnvironmentExt;
22
use crate::errors::LifetimesOrBoundsMismatchOnTrait;
3-
use rustc_data_structures::stable_set::FxHashSet;
3+
use rustc_data_structures::fx::FxHashSet;
44
use rustc_errors::{pluralize, struct_span_err, Applicability, DiagnosticId, ErrorGuaranteed};
55
use rustc_hir as hir;
66
use rustc_hir::def::{DefKind, Res};

compiler/rustc_typeck/src/check/fallback.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
use crate::check::FnCtxt;
22
use rustc_data_structures::{
3-
fx::FxHashMap,
3+
fx::{FxHashMap, FxHashSet},
44
graph::WithSuccessors,
55
graph::{iterate::DepthFirstSearch, vec_graph::VecGraph},
6-
stable_set::FxHashSet,
76
};
87
use rustc_middle::ty::{self, Ty};
98

0 commit comments

Comments
 (0)