Struct rustc_mir::borrow_check::nll::type_check::TypeChecker [−][src]
struct TypeChecker<'a, 'gcx: 'tcx, 'tcx: 'a> { infcx: &'a InferCtxt<'a, 'gcx, 'tcx>, param_env: ParamEnv<'gcx>, last_span: Span, mir: &'a Mir<'tcx>, mir_def_id: DefId, region_bound_pairs: &'a [(Region<'tcx>, GenericKind<'tcx>)], implicit_region_bound: Option<Region<'tcx>>, reported_errors: FxHashSet<(Ty<'tcx>, Span)>, borrowck_context: Option<&'a mut 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?
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: &'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?
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?
borrowck_context: Option<&'a mut 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?
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>,
universal_region_relations: &UniversalRegionRelations<'tcx>,
normalized_inputs_and_output: &[Ty<'tcx>]
)
[src]
pub(super) fn equate_inputs_and_outputs(
&mut self,
mir: &Mir<'tcx>,
mir_def_id: DefId,
universal_regions: &UniversalRegions<'tcx>,
universal_region_relations: &UniversalRegionRelations<'tcx>,
normalized_inputs_and_output: &[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?
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: &'a Mir<'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<&'a mut BorrowCheckContext<'a, 'tcx>>
) -> Self
[src]
fn new(
infcx: &'a InferCtxt<'a, 'gcx, 'tcx>,
mir: &'a Mir<'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<&'a mut BorrowCheckContext<'a, '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,
op: impl TypeOp<'gcx, 'tcx, Output = R>
) -> Fallible<R>
[src]
fn fully_perform_op<R>(
&mut self,
locations: Locations,
op: impl TypeOp<'gcx, 'tcx, Output = R>
) -> Fallible<R>
🔬 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: &[QueryRegionConstraint<'tcx>]
)
[src]
fn push_region_constraints(
&mut self,
locations: Locations,
data: &[QueryRegionConstraint<'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 sub_types(
&mut self,
sub: Ty<'tcx>,
sup: Ty<'tcx>,
locations: Locations
) -> Fallible<()>
[src]
fn sub_types(
&mut self,
sub: Ty<'tcx>,
sup: Ty<'tcx>,
locations: Locations
) -> Fallible<()>
🔬 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
) -> Fallible<()>
[src]
fn eq_types(
&mut self,
a: Ty<'tcx>,
b: Ty<'tcx>,
locations: Locations
) -> Fallible<()>
🔬 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_canonical_type_and_type(
&mut self,
a: CanonicalTy<'tcx>,
b: Ty<'tcx>,
locations: Locations
) -> Fallible<()>
[src]
fn eq_canonical_type_and_type(
&mut self,
a: CanonicalTy<'tcx>,
b: Ty<'tcx>,
locations: Locations
) -> Fallible<()>
🔬 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>,
errors_buffer: &mut Option<&mut Vec<Diagnostic>>
)
[src]
fn check_local(
&mut self,
mir: &Mir<'tcx>,
local: Local,
local_decl: &LocalDecl<'tcx>,
errors_buffer: &mut Option<&mut Vec<Diagnostic>>
)
🔬 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 add_reborrow_constraint(
&mut self,
location: Location,
borrow_region: Region<'tcx>,
borrowed_place: &Place<'tcx>
)
[src]
fn add_reborrow_constraint(
&mut self,
location: Location,
borrow_region: Region<'tcx>,
borrowed_place: &Place<'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?
Add the constraints that arise from a borrow expression &'a P
at the location L
.
Parameters
location
: the locationL
where the borrow expression occursborrow_region
: the region'a
associated with the borrowborrowed_place
: the placeP
being borrowed
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>, locations: Locations)
[src]
fn prove_trait_ref(&mut self, trait_ref: TraitRef<'tcx>, locations: Locations)
🔬 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_and_prove_instantiated_predicates(
&mut self,
instantiated_predicates: InstantiatedPredicates<'tcx>,
locations: Locations
)
[src]
fn normalize_and_prove_instantiated_predicates(
&mut self,
instantiated_predicates: InstantiatedPredicates<'tcx>,
locations: Locations
)
🔬 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(
&mut self,
predicates: impl IntoIterator<Item = Predicate<'tcx>>,
locations: Locations
)
[src]
fn prove_predicates(
&mut self,
predicates: impl IntoIterator<Item = Predicate<'tcx>>,
locations: Locations
)
🔬 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_predicate(&mut self, predicate: Predicate<'tcx>, locations: Locations)
[src]
fn prove_predicate(&mut self, predicate: Predicate<'tcx>, locations: Locations)
🔬 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>,
errors_buffer: Option<&mut Vec<Diagnostic>>
)
[src]
fn typeck_mir(
&mut self,
mir: &Mir<'tcx>,
errors_buffer: Option<&mut Vec<Diagnostic>>
)
🔬 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 NormalizeLocation
) -> T where
T: Normalizable<'gcx, 'tcx> + Copy,
[src]
fn normalize<T>(
&mut self,
value: T,
location: impl NormalizeLocation
) -> T where
T: Normalizable<'gcx, 'tcx> + Copy,
🔬 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>