Remove unused code from rustc_infer
This commit is contained in:
parent
6897619d6d
commit
9ed2177d86
3 changed files with 0 additions and 40 deletions
|
@ -113,13 +113,6 @@ impl Default for RegionckMode {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl RegionckMode {
|
impl RegionckMode {
|
||||||
pub fn suppressed(self) -> bool {
|
|
||||||
match self {
|
|
||||||
Self::Solve => false,
|
|
||||||
Self::Erase { suppress_errors } => suppress_errors,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Indicates that the MIR borrowck will repeat these region
|
/// Indicates that the MIR borrowck will repeat these region
|
||||||
/// checks, so we should ignore errors if NLL is (unconditionally)
|
/// checks, so we should ignore errors if NLL is (unconditionally)
|
||||||
/// enabled.
|
/// enabled.
|
||||||
|
@ -420,15 +413,6 @@ pub enum SubregionOrigin<'tcx> {
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
static_assert_size!(SubregionOrigin<'_>, 32);
|
static_assert_size!(SubregionOrigin<'_>, 32);
|
||||||
|
|
||||||
/// Places that type/region parameters can appear.
|
|
||||||
#[derive(Clone, Copy, Debug)]
|
|
||||||
pub enum ParameterOrigin {
|
|
||||||
Path, // foo::bar
|
|
||||||
MethodCall, // foo.bar() <-- parameters on impl providing bar()
|
|
||||||
OverloadedOperator, // a + b when overloaded
|
|
||||||
OverloadedDeref, // *a when overloaded
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Times when we replace late-bound regions with variables:
|
/// Times when we replace late-bound regions with variables:
|
||||||
#[derive(Clone, Copy, Debug)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
pub enum LateBoundRegionConversionTime {
|
pub enum LateBoundRegionConversionTime {
|
||||||
|
@ -508,21 +492,6 @@ pub enum NLLRegionVariableOrigin {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
impl NLLRegionVariableOrigin {
|
|
||||||
pub fn is_universal(self) -> bool {
|
|
||||||
match self {
|
|
||||||
NLLRegionVariableOrigin::FreeRegion => true,
|
|
||||||
NLLRegionVariableOrigin::Placeholder(..) => true,
|
|
||||||
NLLRegionVariableOrigin::Existential { .. } => false,
|
|
||||||
NLLRegionVariableOrigin::RootEmptyRegion => false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn is_existential(self) -> bool {
|
|
||||||
!self.is_universal()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FIXME(eddyb) investigate overlap between this and `TyOrConstInferVar`.
|
// FIXME(eddyb) investigate overlap between this and `TyOrConstInferVar`.
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
pub enum FixupError<'tcx> {
|
pub enum FixupError<'tcx> {
|
||||||
|
|
|
@ -28,7 +28,6 @@ use rustc_data_structures::fx::FxHashMap;
|
||||||
use rustc_middle::ty::error::TypeError;
|
use rustc_middle::ty::error::TypeError;
|
||||||
use rustc_middle::ty::fold::{TypeFoldable, TypeVisitor};
|
use rustc_middle::ty::fold::{TypeFoldable, TypeVisitor};
|
||||||
use rustc_middle::ty::relate::{self, Relate, RelateResult, TypeRelation};
|
use rustc_middle::ty::relate::{self, Relate, RelateResult, TypeRelation};
|
||||||
use rustc_middle::ty::subst::GenericArg;
|
|
||||||
use rustc_middle::ty::{self, InferConst, Ty, TyCtxt};
|
use rustc_middle::ty::{self, InferConst, Ty, TyCtxt};
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
|
|
||||||
|
@ -119,12 +118,6 @@ pub trait TypeRelatingDelegate<'tcx> {
|
||||||
fn forbid_inference_vars() -> bool;
|
fn forbid_inference_vars() -> bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
|
||||||
struct ScopesAndKind<'tcx> {
|
|
||||||
scopes: Vec<BoundRegionScope<'tcx>>,
|
|
||||||
kind: GenericArg<'tcx>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default)]
|
#[derive(Clone, Debug, Default)]
|
||||||
struct BoundRegionScope<'tcx> {
|
struct BoundRegionScope<'tcx> {
|
||||||
map: FxHashMap<ty::BoundRegion, ty::Region<'tcx>>,
|
map: FxHashMap<ty::BoundRegion, ty::Region<'tcx>>,
|
||||||
|
|
|
@ -59,9 +59,7 @@ pub type TraitObligation<'tcx> = Obligation<'tcx, ty::PolyTraitPredicate<'tcx>>;
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
static_assert_size!(PredicateObligation<'_>, 32);
|
static_assert_size!(PredicateObligation<'_>, 32);
|
||||||
|
|
||||||
pub type Obligations<'tcx, O> = Vec<Obligation<'tcx, O>>;
|
|
||||||
pub type PredicateObligations<'tcx> = Vec<PredicateObligation<'tcx>>;
|
pub type PredicateObligations<'tcx> = Vec<PredicateObligation<'tcx>>;
|
||||||
pub type TraitObligations<'tcx> = Vec<TraitObligation<'tcx>>;
|
|
||||||
|
|
||||||
pub type Selection<'tcx> = ImplSource<'tcx, PredicateObligation<'tcx>>;
|
pub type Selection<'tcx> = ImplSource<'tcx, PredicateObligation<'tcx>>;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue