Struct rustc_mir::borrow_check::nll::type_check::TypeChecker [−][src]
struct TypeChecker<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> { infcx: &'a InferCtxt<'a, 'gcx, 'tcx>, param_env: ParamEnv<'gcx>, last_span: Span, mir_def_id: DefId, region_bound_pairs: &'a [(Region<'tcx>, GenericKind<'tcx>)], implicit_region_bound: Option<Region<'tcx>>, reported_errors: FxHashSet<(Ty<'tcx>, Span)>, constraints: MirTypeckRegionConstraints<'tcx>, borrowck_context: Option<BorrowCheckContext<'a, 'tcx>>, mir: &'a Mir<'tcx>, }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The MIR type checker. Visits the MIR and enforces all the constraints needed for it to be valid and well-typed. Along the way, it accrues region constraints -- these can later be used by NLL region checking.
Fields
infcx: &'a InferCtxt<'a, 'gcx, 'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
param_env: ParamEnv<'gcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
last_span: Span
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
mir_def_id: DefId
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
region_bound_pairs: &'a [(Region<'tcx>, GenericKind<'tcx>)]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
implicit_region_bound: Option<Region<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
reported_errors: FxHashSet<(Ty<'tcx>, Span)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
constraints: MirTypeckRegionConstraints<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
borrowck_context: Option<BorrowCheckContext<'a, 'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
mir: &'a Mir<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Methods
impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx>
pub(super) fn equate_inputs_and_outputs(
&mut self,
mir: &Mir<'tcx>,
mir_def_id: DefId,
universal_regions: &UniversalRegions<'tcx>
)
[src]
pub(super) fn equate_inputs_and_outputs(
&mut self,
mir: &Mir<'tcx>,
mir_def_id: DefId,
universal_regions: &UniversalRegions<'tcx>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn equate_normalized_input_or_output(&mut self, a: Ty<'tcx>, b: Ty<'tcx>)
[src]
fn equate_normalized_input_or_output(&mut self, a: Ty<'tcx>, b: Ty<'tcx>)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx>
fn new(
infcx: &'a InferCtxt<'a, 'gcx, 'tcx>,
mir_def_id: DefId,
param_env: ParamEnv<'gcx>,
region_bound_pairs: &'a [(Region<'tcx>, GenericKind<'tcx>)],
implicit_region_bound: Option<Region<'tcx>>,
borrowck_context: Option<BorrowCheckContext<'a, 'tcx>>,
mir: &'a Mir<'tcx>
) -> Self
[src]
fn new(
infcx: &'a InferCtxt<'a, 'gcx, 'tcx>,
mir_def_id: DefId,
param_env: ParamEnv<'gcx>,
region_bound_pairs: &'a [(Region<'tcx>, GenericKind<'tcx>)],
implicit_region_bound: Option<Region<'tcx>>,
borrowck_context: Option<BorrowCheckContext<'a, 'tcx>>,
mir: &'a Mir<'tcx>
) -> Self
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fully_perform_op<R>(
&mut self,
locations: Locations,
describe_op: impl Fn() -> String,
op: impl FnOnce(&mut Self) -> InferResult<'tcx, R>
) -> Result<R, TypeError<'tcx>>
[src]
fn fully_perform_op<R>(
&mut self,
locations: Locations,
describe_op: impl Fn() -> String,
op: impl FnOnce(&mut Self) -> InferResult<'tcx, R>
) -> Result<R, TypeError<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Given some operation op
that manipulates types, proves
predicates, or otherwise uses the inference context, executes
op
and then executes all the further obligations that op
returns. This will yield a set of outlives constraints amongst
regions which are extracted and stored as having occured at
locations
.
Any rustc::infer
operations that might generate region
constraints should occur within this method so that those
constraints can be properly localized!
fn push_region_constraints(
&mut self,
locations: Locations,
data: Rc<RegionConstraintData<'tcx>>
)
[src]
fn push_region_constraints(
&mut self,
locations: Locations,
data: Rc<RegionConstraintData<'tcx>>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fully_perform_op_and_get_region_constraint_data<R>(
&mut self,
describe_op: impl Fn() -> String,
op: impl FnOnce(&mut Self) -> InferResult<'tcx, R>
) -> Result<(R, Option<Rc<RegionConstraintData<'tcx>>>), TypeError<'tcx>>
[src]
fn fully_perform_op_and_get_region_constraint_data<R>(
&mut self,
describe_op: impl Fn() -> String,
op: impl FnOnce(&mut Self) -> InferResult<'tcx, R>
) -> Result<(R, Option<Rc<RegionConstraintData<'tcx>>>), TypeError<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Helper for fully_perform_op
, but also used on its own
sometimes to enable better caching: executes op
fully (along
with resulting obligations) and returns the full set of region
obligations. If the same op
were to be performed at some
other location, then the same set of region obligations would
be generated there, so this can be useful for caching.
fn sub_types(
&mut self,
sub: Ty<'tcx>,
sup: Ty<'tcx>,
locations: Locations
) -> UnitResult<'tcx>
[src]
fn sub_types(
&mut self,
sub: Ty<'tcx>,
sup: Ty<'tcx>,
locations: Locations
) -> UnitResult<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn eq_types(
&mut self,
a: Ty<'tcx>,
b: Ty<'tcx>,
locations: Locations
) -> UnitResult<'tcx>
[src]
fn eq_types(
&mut self,
a: Ty<'tcx>,
b: Ty<'tcx>,
locations: Locations
) -> UnitResult<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn tcx(&self) -> TyCtxt<'a, 'gcx, 'tcx>
[src]
fn tcx(&self) -> TyCtxt<'a, 'gcx, 'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn check_stmt(
&mut self,
mir: &Mir<'tcx>,
stmt: &Statement<'tcx>,
location: Location
)
[src]
fn check_stmt(
&mut self,
mir: &Mir<'tcx>,
stmt: &Statement<'tcx>,
location: Location
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn check_terminator(
&mut self,
mir: &Mir<'tcx>,
term: &Terminator<'tcx>,
term_location: Location
)
[src]
fn check_terminator(
&mut self,
mir: &Mir<'tcx>,
term: &Terminator<'tcx>,
term_location: Location
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn check_call_dest(
&mut self,
mir: &Mir<'tcx>,
term: &Terminator<'tcx>,
sig: &FnSig<'tcx>,
destination: &Option<(Place<'tcx>, BasicBlock)>,
term_location: Location
)
[src]
fn check_call_dest(
&mut self,
mir: &Mir<'tcx>,
term: &Terminator<'tcx>,
sig: &FnSig<'tcx>,
destination: &Option<(Place<'tcx>, BasicBlock)>,
term_location: Location
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn check_call_inputs(
&mut self,
mir: &Mir<'tcx>,
term: &Terminator<'tcx>,
sig: &FnSig<'tcx>,
args: &[Operand<'tcx>],
term_location: Location
)
[src]
fn check_call_inputs(
&mut self,
mir: &Mir<'tcx>,
term: &Terminator<'tcx>,
sig: &FnSig<'tcx>,
args: &[Operand<'tcx>],
term_location: Location
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn check_iscleanup(
&mut self,
mir: &Mir<'tcx>,
block_data: &BasicBlockData<'tcx>
)
[src]
fn check_iscleanup(
&mut self,
mir: &Mir<'tcx>,
block_data: &BasicBlockData<'tcx>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn assert_iscleanup(
&mut self,
mir: &Mir<'tcx>,
ctxt: &Debug,
bb: BasicBlock,
iscleanuppad: bool
)
[src]
fn assert_iscleanup(
&mut self,
mir: &Mir<'tcx>,
ctxt: &Debug,
bb: BasicBlock,
iscleanuppad: bool
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn check_local(
&mut self,
mir: &Mir<'tcx>,
local: Local,
local_decl: &LocalDecl<'tcx>
)
[src]
fn check_local(
&mut self,
mir: &Mir<'tcx>,
local: Local,
local_decl: &LocalDecl<'tcx>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn aggregate_field_ty(
&mut self,
ak: &AggregateKind<'tcx>,
field_index: usize,
location: Location
) -> Result<Ty<'tcx>, FieldAccessError>
[src]
fn aggregate_field_ty(
&mut self,
ak: &AggregateKind<'tcx>,
field_index: usize,
location: Location
) -> Result<Ty<'tcx>, FieldAccessError>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn check_rvalue(
&mut self,
mir: &Mir<'tcx>,
rvalue: &Rvalue<'tcx>,
location: Location
)
[src]
fn check_rvalue(
&mut self,
mir: &Mir<'tcx>,
rvalue: &Rvalue<'tcx>,
location: Location
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn check_aggregate_rvalue(
&mut self,
mir: &Mir<'tcx>,
rvalue: &Rvalue<'tcx>,
aggregate_kind: &AggregateKind<'tcx>,
operands: &[Operand<'tcx>],
location: Location
)
[src]
fn check_aggregate_rvalue(
&mut self,
mir: &Mir<'tcx>,
rvalue: &Rvalue<'tcx>,
aggregate_kind: &AggregateKind<'tcx>,
operands: &[Operand<'tcx>],
location: Location
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn prove_aggregate_predicates(
&mut self,
aggregate_kind: &AggregateKind<'tcx>,
location: Location
)
[src]
fn prove_aggregate_predicates(
&mut self,
aggregate_kind: &AggregateKind<'tcx>,
location: Location
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn prove_trait_ref(&mut self, trait_ref: TraitRef<'tcx>, location: Location)
[src]
fn prove_trait_ref(&mut self, trait_ref: TraitRef<'tcx>, location: Location)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn prove_predicates<T>(&mut self, predicates: T, location: Location) where
T: IntoIterator<Item = Predicate<'tcx>> + Clone,
[src]
fn prove_predicates<T>(&mut self, predicates: T, location: Location) where
T: IntoIterator<Item = Predicate<'tcx>> + Clone,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn typeck_mir(&mut self, mir: &Mir<'tcx>)
[src]
fn typeck_mir(&mut self, mir: &Mir<'tcx>)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn normalize<T>(
&mut self,
value: &T,
location: impl ToLocations
) -> T where
T: Debug + TypeFoldable<'tcx>,
[src]
fn normalize<T>(
&mut self,
value: &T,
location: impl ToLocations
) -> T where
T: Debug + TypeFoldable<'tcx>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Auto Trait Implementations
impl<'a, 'gcx, 'tcx> !Send for TypeChecker<'a, 'gcx, 'tcx>
impl<'a, 'gcx, 'tcx> !Send for TypeChecker<'a, 'gcx, 'tcx>
impl<'a, 'gcx, 'tcx> !Sync for TypeChecker<'a, 'gcx, 'tcx>
impl<'a, 'gcx, 'tcx> !Sync for TypeChecker<'a, 'gcx, 'tcx>