[−][src]Struct rustc_mir::borrow_check::nll::type_check::TypeChecker
🔬 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 occurred 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 relate_type_and_user_type(
&mut self,
a: Ty<'tcx>,
v: Variance,
b: CanonicalTy<'tcx>,
locations: Locations
) -> Fallible<()>
[src]
fn relate_type_and_user_type(
&mut self,
a: Ty<'tcx>,
v: Variance,
b: CanonicalTy<'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>
)
[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 ensure_place_sized(&mut self, ty: Ty<'tcx>, span: Span)
[src]
fn ensure_place_sized(&mut self, ty: Ty<'tcx>, 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?
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 rvalue_user_ty(&self, rvalue: &Rvalue<'tcx>) -> Option<CanonicalTy<'tcx>>
[src]
fn rvalue_user_ty(&self, rvalue: &Rvalue<'tcx>) -> Option<CanonicalTy<'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?
If this rvalue supports a user-given type annotation, then extract and return it. This represents the final type of the rvalue and will be unified with the inferred type.
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>)
[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 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>
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T
[src]
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<E> SpecializationError for E
[src]
impl<E> SpecializationError for E
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
[src]
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
🔬 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?
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more
impl<T> Erased for T
[src]
impl<T> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<T> Erased for T
impl<T> Erased for T
impl<T> MaybeResult for T
[src]
impl<T> MaybeResult for T
fn from_ok(x: T) -> T
[src]
fn from_ok(x: T) -> T
🔬 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 map_same<F>(self, f: F) -> T where
F: FnOnce(T) -> T,
[src]
fn map_same<F>(self, f: F) -> T where
F: FnOnce(T) -> T,
🔬 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, T> Captures for T where
T: ?Sized,
[src]
impl<'a, T> Captures for T where
T: ?Sized,