Struct rustc::ty::TyCtxt
[−]
[src]
pub struct TyCtxt<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> { /* fields omitted */ }
🔬 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 central data structure of the compiler. It stores references to the various arenas and also houses the results of the various compiler queries that have been performed. See the the module-level README for more details.
Methods
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn note_and_explain_region(
self,
region_scope_tree: &ScopeTree,
err: &mut DiagnosticBuilder,
prefix: &str,
region: Region<'tcx>,
suffix: &str
)
[src]
self,
region_scope_tree: &ScopeTree,
err: &mut DiagnosticBuilder,
prefix: &str,
region: Region<'tcx>,
suffix: &str
)
🔬 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> TyCtxt<'a, 'gcx, 'gcx>
[src]
pub fn infer_ctxt(self) -> InferCtxtBuilder<'a, 'gcx, 'tcx>
[src]
🔬 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, 'tcx> TyCtxt<'a, 'tcx, 'tcx>
[src]
pub fn erase_late_bound_regions_and_normalize<T>(self, value: &Binder<T>) -> T where
T: TransNormalize<'tcx>,
[src]
T: TransNormalize<'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?
Currently, higher-ranked type bounds inhibit normalization. Therefore, each time we erase them in translation, we need to normalize the contents.
pub fn fully_normalize_associated_types_in<T>(self, value: &T) -> T where
T: TransNormalize<'tcx>,
[src]
T: TransNormalize<'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?
Fully normalizes any associated types in value
, using an
empty environment and Reveal::All
mode (therefore, suitable
only for monomorphized code during trans, basically).
pub fn normalize_associated_type_in_env<T>(
self,
value: &T,
env: ParamEnv<'tcx>
) -> T where
T: TransNormalize<'tcx>,
[src]
self,
value: &T,
env: ParamEnv<'tcx>
) -> T where
T: TransNormalize<'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?
Does a best-effort to normalize any associated types in
value
; this includes revealing specializable types, so this
should be not be used during type-checking, but only during
optimization and code generation.
impl<'a, 'tcx, 'gcx> TyCtxt<'a, 'tcx, 'gcx>
[src]
pub fn require_lang_item(&self, lang_item: LangItem) -> DefId
[src]
🔬 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> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn check_stability(self, def_id: DefId, id: NodeId, span: Span)
[src]
🔬 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> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn lookup_deprecation(self, id: DefId) -> Option<Deprecation>
[src]
🔬 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> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn recursive_type_with_infinite_size_error(
self,
type_def_id: DefId
) -> DiagnosticBuilder<'tcx>
[src]
self,
type_def_id: DefId
) -> DiagnosticBuilder<'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?
pub fn report_object_safety_error(
self,
span: Span,
trait_def_id: DefId,
violations: Vec<ObjectSafetyViolation>
) -> DiagnosticBuilder<'tcx>
[src]
self,
span: Span,
trait_def_id: DefId,
violations: Vec<ObjectSafetyViolation>
) -> DiagnosticBuilder<'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> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn astconv_object_safety_violations(
self,
trait_def_id: DefId
) -> Vec<ObjectSafetyViolation>
[src]
self,
trait_def_id: DefId
) -> Vec<ObjectSafetyViolation>
🔬 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?
Returns the object safety violations that affect
astconv - currently, Self in supertraits. This is needed
because object_safety_violations
can't be used during
type collection.
pub fn object_safety_violations(
self,
trait_def_id: DefId
) -> Vec<ObjectSafetyViolation>
[src]
self,
trait_def_id: DefId
) -> Vec<ObjectSafetyViolation>
🔬 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?
pub fn is_vtable_safe_method(
self,
trait_def_id: DefId,
method: &AssociatedItem
) -> bool
[src]
self,
trait_def_id: DefId,
method: &AssociatedItem
) -> 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?
We say a method is vtable safe if it can be invoked on a trait
object. Note that object-safe traits can have some
non-vtable-safe methods, so long as they require Self:Sized
or
otherwise ensure that they cannot be used when Self=Trait
.
impl<'a, 'tcx> TyCtxt<'a, 'tcx, 'tcx>
[src]
pub fn trans_apply_param_substs<T>(
self,
param_substs: &Substs<'tcx>,
value: &T
) -> T where
T: TransNormalize<'tcx>,
[src]
self,
param_substs: &Substs<'tcx>,
value: &T
) -> T where
T: TransNormalize<'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?
Monomorphizes a type from the AST by first applying the in-scope substitutions and then normalizing any associated types.
pub fn trans_apply_param_substs_env<T>(
self,
param_substs: &Substs<'tcx>,
param_env: ParamEnv<'tcx>,
value: &T
) -> T where
T: TransNormalize<'tcx>,
[src]
self,
param_substs: &Substs<'tcx>,
param_env: ParamEnv<'tcx>,
value: &T
) -> T where
T: TransNormalize<'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> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn predicate_for_trait_def(
self,
param_env: ParamEnv<'tcx>,
cause: ObligationCause<'tcx>,
trait_def_id: DefId,
recursion_depth: usize,
param_ty: Ty<'tcx>,
ty_params: &[Ty<'tcx>]
) -> PredicateObligation<'tcx>
[src]
self,
param_env: ParamEnv<'tcx>,
cause: ObligationCause<'tcx>,
trait_def_id: DefId,
recursion_depth: usize,
param_ty: Ty<'tcx>,
ty_params: &[Ty<'tcx>]
) -> PredicateObligation<'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?
pub fn upcast_choices(
self,
source_trait_ref: PolyTraitRef<'tcx>,
target_trait_def_id: DefId
) -> Vec<PolyTraitRef<'tcx>>
[src]
self,
source_trait_ref: PolyTraitRef<'tcx>,
target_trait_def_id: DefId
) -> Vec<PolyTraitRef<'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?
Cast a trait reference into a reference to one of its super
traits; returns None
if target_trait_def_id
is not a
supertrait.
pub fn count_own_vtable_entries(self, trait_ref: PolyTraitRef<'tcx>) -> usize
[src]
🔬 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 a trait trait_ref
, returns the number of vtable entries
that come from trait_ref
, excluding its supertraits. Used in
computing the vtable base for an upcast trait of a trait object.
pub fn get_vtable_index_of_object_method<N>(
self,
object: &VtableObjectData<'tcx, N>,
method_def_id: DefId
) -> usize
[src]
self,
object: &VtableObjectData<'tcx, N>,
method_def_id: DefId
) -> usize
🔬 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 an upcast trait object described by object
, returns the
index of the method method_def_id
(which should be part of
object.upcast_trait_ref
) within the vtable for object
.
pub fn closure_trait_ref_and_return_type(
self,
fn_trait_def_id: DefId,
self_ty: Ty<'tcx>,
sig: PolyFnSig<'tcx>,
tuple_arguments: TupleArgumentsFlag
) -> Binder<(TraitRef<'tcx>, Ty<'tcx>)>
[src]
self,
fn_trait_def_id: DefId,
self_ty: Ty<'tcx>,
sig: PolyFnSig<'tcx>,
tuple_arguments: TupleArgumentsFlag
) -> Binder<(TraitRef<'tcx>, 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?
pub fn generator_trait_ref_and_outputs(
self,
fn_trait_def_id: DefId,
self_ty: Ty<'tcx>,
sig: PolyGenSig<'tcx>
) -> Binder<(TraitRef<'tcx>, Ty<'tcx>, Ty<'tcx>)>
[src]
self,
fn_trait_def_id: DefId,
self_ty: Ty<'tcx>,
sig: PolyGenSig<'tcx>
) -> Binder<(TraitRef<'tcx>, Ty<'tcx>, 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?
pub fn impl_is_default(self, node_item_def_id: DefId) -> bool
[src]
🔬 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?
pub fn impl_item_is_final(self, node_item: &NodeItem<Defaultness>) -> bool
[src]
🔬 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> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn note_and_explain_type_err(
self,
db: &mut DiagnosticBuilder,
err: &TypeError<'tcx>,
sp: Span
)
[src]
self,
db: &mut DiagnosticBuilder,
err: &TypeError<'tcx>,
sp: 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?
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn erase_regions<T>(self, value: &T) -> T where
T: TypeFoldable<'tcx>,
[src]
T: 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?
Returns an equivalent value with all free regions removed (note that late-bound regions remain, because they are important for subtyping, but they are anonymized and normalized as well)..
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn collect_regions<T>(
self,
value: &T,
region_set: &mut FxHashSet<Region<'tcx>>
) -> bool where
T: TypeFoldable<'tcx>,
[src]
self,
value: &T,
region_set: &mut FxHashSet<Region<'tcx>>
) -> bool where
T: 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?
Collects the free and escaping regions in value
into region_set
. Returns
whether any late-bound regions were skipped
pub fn fold_regions<T, F>(
self,
value: &T,
skipped_regions: &mut bool,
f: F
) -> T where
F: FnMut(Region<'tcx>, u32) -> Region<'tcx>,
T: TypeFoldable<'tcx>,
[src]
self,
value: &T,
skipped_regions: &mut bool,
f: F
) -> T where
F: FnMut(Region<'tcx>, u32) -> Region<'tcx>,
T: 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?
Folds the escaping and free regions in value
using f
, and
sets skipped_regions
to true if any late-bound region was found
and skipped.
pub fn for_each_free_region<T, F>(self, value: &T, callback: F) where
F: FnMut(Region<'tcx>),
T: TypeFoldable<'tcx>,
[src]
F: FnMut(Region<'tcx>),
T: 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?
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn replace_late_bound_regions<T, F>(
self,
value: &Binder<T>,
f: F
) -> (T, BTreeMap<BoundRegion, Region<'tcx>>) where
F: FnMut(BoundRegion) -> Region<'tcx>,
T: TypeFoldable<'tcx>,
[src]
self,
value: &Binder<T>,
f: F
) -> (T, BTreeMap<BoundRegion, Region<'tcx>>) where
F: FnMut(BoundRegion) -> Region<'tcx>,
T: 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?
Replace all regions bound by the given Binder
with the
results returned by the closure; the closure is expected to
return a free region (relative to this binder), and hence the
binder is removed in the return type. The closure is invoked
once for each unique BoundRegion
; multiple references to the
same BoundRegion
will reuse the previous result. A map is
returned at the end with each bound region and the free region
that replaced it.
pub fn liberate_late_bound_regions<T>(
&self,
all_outlive_scope: DefId,
value: &Binder<T>
) -> T where
T: TypeFoldable<'tcx>,
[src]
&self,
all_outlive_scope: DefId,
value: &Binder<T>
) -> T where
T: 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?
Replace any late-bound regions bound in value
with
free variants attached to all_outlive_scope
.
pub fn flatten_late_bound_regions<T>(
self,
bound2_value: &Binder<Binder<T>>
) -> Binder<T> where
T: TypeFoldable<'tcx>,
[src]
self,
bound2_value: &Binder<Binder<T>>
) -> Binder<T> where
T: 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?
Flattens two binding levels into one. So for<'a> for<'b> Foo
becomes for<'a,'b> Foo
.
pub fn collect_constrained_late_bound_regions<T>(
&self,
value: &Binder<T>
) -> FxHashSet<BoundRegion> where
T: TypeFoldable<'tcx>,
[src]
&self,
value: &Binder<T>
) -> FxHashSet<BoundRegion> where
T: 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?
Returns a set of all late-bound regions that are constrained
by value
, meaning that if we instantiate those LBR with
variables and equate value
with something else, those
variables will also be equated.
pub fn collect_referenced_late_bound_regions<T>(
&self,
value: &Binder<T>
) -> FxHashSet<BoundRegion> where
T: TypeFoldable<'tcx>,
[src]
&self,
value: &Binder<T>
) -> FxHashSet<BoundRegion> where
T: 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?
Returns a set of all late-bound regions that appear in value
anywhere.
pub fn erase_late_bound_regions<T>(self, value: &Binder<T>) -> T where
T: TypeFoldable<'tcx>,
[src]
T: 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?
Replace any late-bound regions bound in value
with 'erased
. Useful in trans but also
method lookup and a few other places where precise region relationships are not required.
pub fn anonymize_late_bound_regions<T>(self, sig: &Binder<T>) -> Binder<T> where
T: TypeFoldable<'tcx>,
[src]
T: 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?
Rewrite any late-bound regions so that they are anonymous. Region numbers are assigned starting at 1 and increasing monotonically in the order traversed by the fold operation.
The chief purpose of this function is to canonicalize regions so that two
FnSig
s or TraitRef
s which are equivalent up to region naming will become
structurally identical. For example, for<'a, 'b> fn(&'a isize, &'b isize)
and
for<'a, 'b> fn(&'b isize, &'a isize)
will become identical after anonymization.
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn is_ty_uninhabited_from(self, module: DefId, ty: Ty<'tcx>) -> bool
[src]
🔬 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?
Checks whether a type is visibly uninhabited from a particular module.
Example
enum Void {} mod a { pub mod b { pub struct SecretlyUninhabited { _priv: !, } } } mod c { pub struct AlsoSecretlyUninhabited { _priv: Void, } mod d { } } struct Foo { x: a::b::SecretlyUninhabited, y: c::AlsoSecretlyUninhabited, }
In this code, the type Foo
will only be visibly uninhabited inside the
modules b, c and d. This effects pattern-matching on Foo
or types that
contain Foo
.
Example
let foo_result: Result<T, Foo> = ... ; let Ok(t) = foo_result;
This code should only compile in modules where the uninhabitedness of Foo is visible.
pub fn is_ty_uninhabited_from_all_modules(self, ty: Ty<'tcx>) -> bool
[src]
🔬 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?
pub fn is_enum_variant_uninhabited_from(
self,
module: DefId,
variant: &'tcx VariantDef,
substs: &'tcx Substs<'tcx>
) -> bool
[src]
self,
module: DefId,
variant: &'tcx VariantDef,
substs: &'tcx Substs<'tcx>
) -> 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?
pub fn is_variant_uninhabited_from_all_modules(
self,
variant: &'tcx VariantDef,
substs: &'tcx Substs<'tcx>
) -> bool
[src]
self,
variant: &'tcx VariantDef,
substs: &'tcx Substs<'tcx>
) -> 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?
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn item_path_str(self, def_id: DefId) -> String
[src]
🔬 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?
Returns a string identifying this def-id. This string is suitable for user output. It is relative to the current crate root, unless with_forced_absolute_paths was used.
pub fn node_path_str(self, id: NodeId) -> String
[src]
🔬 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?
Returns a string identifying this local node-id.
pub fn absolute_item_path_str(self, def_id: DefId) -> String
[src]
🔬 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?
Returns a string identifying this def-id. This string is suitable for user output. It always begins with a crate identifier.
pub fn push_krate_path<T>(self, buffer: &mut T, cnum: CrateNum) where
T: ItemPathBuffer,
[src]
T: ItemPathBuffer,
🔬 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?
Returns the "path" to a particular crate. This can proceed in
various ways, depending on the root_mode
of the buffer
.
(See RootMode
enum for more details.)
pub fn try_push_visible_item_path<T>(
self,
buffer: &mut T,
external_def_id: DefId
) -> bool where
T: ItemPathBuffer,
[src]
self,
buffer: &mut T,
external_def_id: DefId
) -> bool where
T: ItemPathBuffer,
🔬 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 possible, this pushes a global path resolving to external_def_id
that is visible
from at least one local module and returns true. If the crate defining external_def_id
is
declared with an extern crate
, the path is guaranteed to use the extern crate
.
pub fn push_item_path<T>(self, buffer: &mut T, def_id: DefId) where
T: ItemPathBuffer,
[src]
T: ItemPathBuffer,
🔬 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?
pub fn parent_def_id(self, def_id: DefId) -> Option<DefId>
[src]
🔬 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?
Returns the def-id of def_id
's parent in the def tree. If
this returns None
, then def_id
represents a crate root or
inlined root.
impl<'a, 'tcx, 'lcx> TyCtxt<'a, 'tcx, 'lcx>
[src]
pub fn at(self, span: Span) -> TyCtxtAt<'a, 'tcx, 'lcx>
[src]
🔬 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?
Return a transparent wrapper for TyCtxt
which uses
span
as the location of queries performed through it.
pub fn type_of(self, key: DefId) -> Ty<'tcx>
[src]
🔬 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?
Records the type of every item.
pub fn generics_of(self, key: DefId) -> &'tcx Generics
[src]
🔬 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?
Maps from the def-id of an item (trait/struct/enum/fn) to its associated generics and predicates.
pub fn predicates_of(self, key: DefId) -> GenericPredicates<'tcx>
[src]
🔬 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?
pub fn super_predicates_of(self, key: DefId) -> GenericPredicates<'tcx>
[src]
🔬 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?
Maps from the def-id of a trait to the list of super-predicates. This is a subset of the full list of predicates. We store these in a separate map because we must evaluate them even during type conversion, often before the full predicates are available (note that supertraits have additional acyclicity requirements).
pub fn type_param_predicates(
self,
key: (DefId, DefId)
) -> GenericPredicates<'tcx>
[src]
self,
key: (DefId, DefId)
) -> GenericPredicates<'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?
To avoid cycles within the predicates of a single item we compute
per-type-parameter predicates for resolving T::AssocTy
.
pub fn trait_def(self, key: DefId) -> &'tcx TraitDef
[src]
🔬 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?
pub fn adt_def(self, key: DefId) -> &'tcx AdtDef
[src]
🔬 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?
pub fn adt_destructor(self, key: DefId) -> Option<Destructor>
[src]
🔬 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?
pub fn adt_sized_constraint(self, key: DefId) -> &'tcx [Ty<'tcx>]
[src]
🔬 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?
pub fn adt_dtorck_constraint(self, key: DefId) -> DtorckConstraint<'tcx>
[src]
🔬 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?
pub fn is_const_fn(self, key: DefId) -> bool
[src]
🔬 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?
True if this is a const fn
pub fn is_foreign_item(self, key: DefId) -> bool
[src]
🔬 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?
True if this is a foreign item (i.e., linked via extern { ... }
).
pub fn is_auto_impl(self, key: DefId) -> bool
[src]
🔬 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?
True if this is an auto impl (aka impl Foo for ..)
pub fn crate_variances(self, key: CrateNum) -> Rc<CrateVariancesMap>
[src]
🔬 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?
Get a map with the variance of every item; use item_variance
instead.
pub fn variances_of(self, key: DefId) -> Rc<Vec<Variance>>
[src]
🔬 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?
Maps from def-id of a type or region parameter to its (inferred) variance.
pub fn inferred_outlives_of(self, key: DefId) -> Vec<Predicate<'tcx>>
[src]
🔬 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?
Maps from def-id of a type to its (inferred) outlives.
pub fn associated_item_def_ids(self, key: DefId) -> Rc<Vec<DefId>>
[src]
🔬 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?
Maps from an impl/trait def-id to a list of the def-ids of its items
pub fn associated_item(self, key: DefId) -> AssociatedItem
[src]
🔬 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?
Maps from a trait item to the trait item "descriptor"
pub fn impl_trait_ref(self, key: DefId) -> Option<TraitRef<'tcx>>
[src]
🔬 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?
pub fn impl_polarity(self, key: DefId) -> ImplPolarity
[src]
🔬 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?
pub fn inherent_impls(self, key: DefId) -> Rc<Vec<DefId>>
[src]
🔬 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?
Maps a DefId of a type to a list of its inherent impls. Contains implementations of methods that are inherent to a type. Methods in these implementations don't need to be exported.
pub fn mir_keys(self, key: CrateNum) -> Rc<DefIdSet>
[src]
🔬 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?
Set of all the def-ids in this crate that have MIR associated with them. This includes all the body owners, but also things like struct constructors.
pub fn mir_const_qualif(self, key: DefId) -> (u8, Rc<IdxSetBuf<Local>>)
[src]
🔬 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?
Maps DefId's that have an associated Mir to the result of the MIR qualify_consts pass. The actual meaning of the value isn't known except to the pass itself.
pub fn mir_built(self, key: DefId) -> &'tcx Steal<Mir<'tcx>>
[src]
🔬 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?
Fetch the MIR for a given def-id right after it's built - this includes unreachable code.
pub fn mir_const(self, key: DefId) -> &'tcx Steal<Mir<'tcx>>
[src]
🔬 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?
Fetch the MIR for a given def-id up till the point where it is ready for const evaluation.
See the README for the mir
module for details.
pub fn mir_validated(self, key: DefId) -> &'tcx Steal<Mir<'tcx>>
[src]
🔬 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?
pub fn optimized_mir(self, key: DefId) -> &'tcx Mir<'tcx>
[src]
🔬 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 after our optimization passes have run. This is MIR that is ready for trans. This is also the only query that can fetch non-local MIR, at present.
pub fn unsafety_check_result(self, key: DefId) -> UnsafetyCheckResult
[src]
🔬 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 result of unsafety-checking this def-id.
pub fn unsafe_derive_on_repr_packed(self, key: DefId)
[src]
🔬 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?
HACK: when evaluated, this reports a "unsafe derive on repr(packed)" error
pub fn fn_sig(self, key: DefId) -> PolyFnSig<'tcx>
[src]
🔬 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 signature of functions and closures.
pub fn coerce_unsized_info(self, key: DefId) -> CoerceUnsizedInfo
[src]
🔬 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?
Caches CoerceUnsized kinds for impls on custom types.
pub fn typeck_item_bodies(self, key: CrateNum) -> CompileResult
[src]
🔬 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?
pub fn typeck_tables_of(self, key: DefId) -> &'tcx TypeckTables<'tcx>
[src]
🔬 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?
pub fn used_trait_imports(self, key: DefId) -> Rc<DefIdSet>
[src]
🔬 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?
pub fn has_typeck_tables(self, key: DefId) -> bool
[src]
🔬 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?
pub fn coherent_trait(self, key: (CrateNum, DefId))
[src]
🔬 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?
pub fn borrowck(self, key: DefId) -> Rc<BorrowCheckResult>
[src]
🔬 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?
pub fn mir_borrowck(self, key: DefId) -> Option<ClosureRegionRequirements>
[src]
🔬 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?
Borrow checks the function body. If this is a closure, returns additional requirements that the closure's creator must verify.
pub fn crate_inherent_impls(self, key: CrateNum) -> CrateInherentImpls
[src]
🔬 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?
Gets a complete map from all types to their inherent impls. Not meant to be used directly outside of coherence. (Defined only for LOCAL_CRATE)
pub fn crate_inherent_impls_overlap_check(self, key: CrateNum)
[src]
🔬 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?
Checks all types in the krate for overlap in their inherent impls. Reports errors. Not meant to be used directly outside of coherence. (Defined only for LOCAL_CRATE)
pub fn const_eval(
self,
key: ParamEnvAnd<'tcx, (DefId, &'tcx Substs<'tcx>)>
) -> EvalResult<'tcx>
[src]
self,
key: ParamEnvAnd<'tcx, (DefId, &'tcx Substs<'tcx>)>
) -> EvalResult<'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?
Results of evaluating const items or constants embedded in other items (such as enum variant explicit discriminants).
pub fn check_match(self, key: DefId) -> Result<(), ErrorReported>
[src]
🔬 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?
pub fn privacy_access_levels(self, key: CrateNum) -> Rc<AccessLevels>
[src]
🔬 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?
Performs the privacy check and computes "access levels".
pub fn reachable_set(self, key: CrateNum) -> ReachableSet
[src]
🔬 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?
pub fn region_scope_tree(self, key: DefId) -> Rc<ScopeTree>
[src]
🔬 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?
Per-body region::ScopeTree
. The DefId
should be the owner-def-id for the body;
in the case of closures, this will be redirected to the enclosing function.
pub fn mir_shims(self, key: InstanceDef<'tcx>) -> &'tcx Mir<'tcx>
[src]
🔬 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?
pub fn def_symbol_name(self, key: DefId) -> SymbolName
[src]
🔬 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?
pub fn symbol_name(self, key: Instance<'tcx>) -> SymbolName
[src]
🔬 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?
pub fn describe_def(self, key: DefId) -> Option<Def>
[src]
🔬 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?
pub fn def_span(self, key: DefId) -> Span
[src]
🔬 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?
pub fn lookup_stability(self, key: DefId) -> Option<&'tcx Stability>
[src]
🔬 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?
pub fn lookup_deprecation_entry(self, key: DefId) -> Option<DeprecationEntry>
[src]
🔬 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?
pub fn item_attrs(self, key: DefId) -> Rc<[Attribute]>
[src]
🔬 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?
pub fn fn_arg_names(self, key: DefId) -> Vec<Name>
[src]
🔬 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?
pub fn impl_parent(self, key: DefId) -> Option<DefId>
[src]
🔬 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?
pub fn trait_of_item(self, key: DefId) -> Option<DefId>
[src]
🔬 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?
pub fn is_exported_symbol(self, key: DefId) -> bool
[src]
🔬 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?
pub fn item_body_nested_bodies(self, key: DefId) -> ExternBodyNestedBodies
[src]
🔬 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?
pub fn const_is_rvalue_promotable_to_static(self, key: DefId) -> bool
[src]
🔬 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?
pub fn rvalue_promotable_map(self, key: DefId) -> Rc<ItemLocalSet>
[src]
🔬 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?
pub fn is_mir_available(self, key: DefId) -> bool
[src]
🔬 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?
pub fn vtable_methods(
self,
key: PolyTraitRef<'tcx>
) -> Rc<Vec<Option<(DefId, &'tcx Substs<'tcx>)>>>
[src]
self,
key: PolyTraitRef<'tcx>
) -> Rc<Vec<Option<(DefId, &'tcx Substs<'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?
pub fn trans_fulfill_obligation(
self,
key: (ParamEnv<'tcx>, PolyTraitRef<'tcx>)
) -> Vtable<'tcx, ()>
[src]
self,
key: (ParamEnv<'tcx>, PolyTraitRef<'tcx>)
) -> Vtable<'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?
pub fn trait_impls_of(self, key: DefId) -> Rc<TraitImpls>
[src]
🔬 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?
pub fn specialization_graph_of(self, key: DefId) -> Rc<Graph>
[src]
🔬 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?
pub fn is_object_safe(self, key: DefId) -> bool
[src]
🔬 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?
pub fn param_env(self, key: DefId) -> ParamEnv<'tcx>
[src]
🔬 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?
pub fn is_copy_raw(self, key: ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool
[src]
🔬 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?
pub fn is_sized_raw(self, key: ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool
[src]
🔬 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?
pub fn is_freeze_raw(self, key: ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool
[src]
🔬 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?
pub fn needs_drop_raw(self, key: ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool
[src]
🔬 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?
pub fn layout_raw(
self,
key: ParamEnvAnd<'tcx, Ty<'tcx>>
) -> Result<&'tcx LayoutDetails, LayoutError<'tcx>>
[src]
self,
key: ParamEnvAnd<'tcx, Ty<'tcx>>
) -> Result<&'tcx LayoutDetails, LayoutError<'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?
pub fn dylib_dependency_formats(
self,
key: CrateNum
) -> Rc<Vec<(CrateNum, LinkagePreference)>>
[src]
self,
key: CrateNum
) -> Rc<Vec<(CrateNum, LinkagePreference)>>
🔬 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?
pub fn is_panic_runtime(self, key: CrateNum) -> bool
[src]
🔬 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?
pub fn is_compiler_builtins(self, key: CrateNum) -> bool
[src]
🔬 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?
pub fn has_global_allocator(self, key: CrateNum) -> bool
[src]
🔬 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?
pub fn is_sanitizer_runtime(self, key: CrateNum) -> bool
[src]
🔬 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?
pub fn is_profiler_runtime(self, key: CrateNum) -> bool
[src]
🔬 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?
pub fn panic_strategy(self, key: CrateNum) -> PanicStrategy
[src]
🔬 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?
pub fn is_no_builtins(self, key: CrateNum) -> bool
[src]
🔬 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?
pub fn extern_crate(self, key: DefId) -> Rc<Option<ExternCrate>>
[src]
🔬 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?
pub fn specializes(self, key: (DefId, DefId)) -> bool
[src]
🔬 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?
pub fn in_scope_traits_map(
self,
key: DefIndex
) -> Option<Rc<FxHashMap<ItemLocalId, Rc<StableVec<TraitCandidate>>>>>
[src]
self,
key: DefIndex
) -> Option<Rc<FxHashMap<ItemLocalId, Rc<StableVec<TraitCandidate>>>>>
🔬 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?
pub fn module_exports(self, key: DefId) -> Option<Rc<Vec<Export>>>
[src]
🔬 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?
pub fn lint_levels(self, key: CrateNum) -> Rc<LintLevelMap>
[src]
🔬 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?
pub fn impl_defaultness(self, key: DefId) -> Defaultness
[src]
🔬 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?
pub fn exported_symbol_ids(self, key: CrateNum) -> Rc<DefIdSet>
[src]
🔬 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?
pub fn native_libraries(self, key: CrateNum) -> Rc<Vec<NativeLibrary>>
[src]
🔬 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?
pub fn plugin_registrar_fn(self, key: CrateNum) -> Option<DefId>
[src]
🔬 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?
pub fn derive_registrar_fn(self, key: CrateNum) -> Option<DefId>
[src]
🔬 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?
pub fn crate_disambiguator(self, key: CrateNum) -> CrateDisambiguator
[src]
🔬 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?
pub fn crate_hash(self, key: CrateNum) -> Svh
[src]
🔬 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?
pub fn original_crate_name(self, key: CrateNum) -> Symbol
[src]
🔬 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?
pub fn implementations_of_trait(self, key: (CrateNum, DefId)) -> Rc<Vec<DefId>>
[src]
🔬 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?
pub fn all_trait_implementations(self, key: CrateNum) -> Rc<Vec<DefId>>
[src]
🔬 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?
pub fn is_dllimport_foreign_item(self, key: DefId) -> bool
[src]
🔬 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?
pub fn is_statically_included_foreign_item(self, key: DefId) -> bool
[src]
🔬 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?
pub fn native_library_kind(self, key: DefId) -> Option<NativeLibraryKind>
[src]
🔬 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?
pub fn link_args(self, key: CrateNum) -> Rc<Vec<String>>
[src]
🔬 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?
pub fn resolve_lifetimes(self, key: CrateNum) -> Rc<ResolveLifetimes>
[src]
🔬 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?
pub fn named_region_map(
self,
key: DefIndex
) -> Option<Rc<FxHashMap<ItemLocalId, Region>>>
[src]
self,
key: DefIndex
) -> Option<Rc<FxHashMap<ItemLocalId, Region>>>
🔬 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?
pub fn is_late_bound_map(
self,
key: DefIndex
) -> Option<Rc<FxHashSet<ItemLocalId>>>
[src]
self,
key: DefIndex
) -> Option<Rc<FxHashSet<ItemLocalId>>>
🔬 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?
pub fn object_lifetime_defaults_map(
self,
key: DefIndex
) -> Option<Rc<FxHashMap<ItemLocalId, Rc<Vec<ObjectLifetimeDefault>>>>>
[src]
self,
key: DefIndex
) -> Option<Rc<FxHashMap<ItemLocalId, Rc<Vec<ObjectLifetimeDefault>>>>>
🔬 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?
pub fn visibility(self, key: DefId) -> Visibility
[src]
🔬 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?
pub fn dep_kind(self, key: CrateNum) -> DepKind
[src]
🔬 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?
pub fn crate_name(self, key: CrateNum) -> Symbol
[src]
🔬 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?
pub fn item_children(self, key: DefId) -> Rc<Vec<Export>>
[src]
🔬 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?
pub fn extern_mod_stmt_cnum(self, key: DefId) -> Option<CrateNum>
[src]
🔬 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?
pub fn get_lang_items(self, key: CrateNum) -> Rc<LanguageItems>
[src]
🔬 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?
pub fn defined_lang_items(self, key: CrateNum) -> Rc<Vec<(DefId, usize)>>
[src]
🔬 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?
pub fn missing_lang_items(self, key: CrateNum) -> Rc<Vec<LangItem>>
[src]
🔬 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?
pub fn extern_const_body(self, key: DefId) -> ExternConstBody<'tcx>
[src]
🔬 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?
pub fn visible_parent_map(self, key: CrateNum) -> Rc<DefIdMap<DefId>>
[src]
🔬 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?
pub fn missing_extern_crate_item(self, key: CrateNum) -> bool
[src]
🔬 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?
pub fn used_crate_source(self, key: CrateNum) -> Rc<CrateSource>
[src]
🔬 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?
pub fn postorder_cnums(self, key: CrateNum) -> Rc<Vec<CrateNum>>
[src]
🔬 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?
pub fn freevars(self, key: DefId) -> Option<Rc<Vec<Freevar>>>
[src]
🔬 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?
pub fn maybe_unused_trait_import(self, key: DefId) -> bool
[src]
🔬 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?
pub fn maybe_unused_extern_crates(self, key: CrateNum) -> Rc<Vec<(DefId, Span)>>
[src]
🔬 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?
pub fn stability_index(self, key: CrateNum) -> Rc<Index<'tcx>>
[src]
🔬 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?
pub fn all_crate_nums(self, key: CrateNum) -> Rc<Vec<CrateNum>>
[src]
🔬 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?
pub fn exported_symbols(
self,
key: CrateNum
) -> Arc<Vec<(String, Option<DefId>, SymbolExportLevel)>>
[src]
self,
key: CrateNum
) -> Arc<Vec<(String, Option<DefId>, SymbolExportLevel)>>
🔬 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?
pub fn collect_and_partition_translation_items(
self,
key: CrateNum
) -> (Arc<DefIdSet>, Arc<Vec<Arc<CodegenUnit<'tcx>>>>)
[src]
self,
key: CrateNum
) -> (Arc<DefIdSet>, Arc<Vec<Arc<CodegenUnit<'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?
pub fn export_name(self, key: DefId) -> Option<Symbol>
[src]
🔬 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?
pub fn contains_extern_indicator(self, key: DefId) -> bool
[src]
🔬 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?
pub fn is_translated_function(self, key: DefId) -> bool
[src]
🔬 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?
pub fn codegen_unit(self, key: InternedString) -> Arc<CodegenUnit<'tcx>>
[src]
🔬 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?
pub fn compile_codegen_unit(self, key: InternedString) -> Stats
[src]
🔬 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?
pub fn output_filenames(self, key: CrateNum) -> Arc<OutputFilenames>
[src]
🔬 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?
pub fn has_copy_closures(self, key: CrateNum) -> bool
[src]
🔬 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?
pub fn has_clone_closures(self, key: CrateNum) -> bool
[src]
🔬 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?
pub fn erase_regions_ty(self, key: Ty<'tcx>) -> Ty<'tcx>
[src]
🔬 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?
pub fn fully_normalize_monormophic_ty(self, key: Ty<'tcx>) -> Ty<'tcx>
[src]
🔬 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> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn outlives_components(&self, ty0: Ty<'tcx>) -> Vec<Component<'tcx>>
[src]
🔬 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?
Returns all the things that must outlive 'a
for the condition
ty0: 'a
to hold. Note that ty0
must be a fully resolved type.
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn for_each_impl<F: FnMut(DefId)>(self, def_id: DefId, f: F)
[src]
🔬 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?
pub fn for_each_relevant_impl<F: FnMut(DefId)>(
self,
def_id: DefId,
self_ty: Ty<'tcx>,
f: F
)
[src]
self,
def_id: DefId,
self_ty: Ty<'tcx>,
f: F
)
🔬 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?
Iterate over every impl that could possibly match the
self-type self_ty
.
impl<'a, 'tcx> TyCtxt<'a, 'tcx, 'tcx>
[src]
pub fn type_id_hash(self, ty: Ty<'tcx>) -> u64
[src]
🔬 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?
Creates a hash of the type Ty
which will be the same no matter what crate
context it's calculated within. This is used by the type_id
intrinsic.
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn has_error_field(self, ty: Ty<'tcx>) -> bool
[src]
🔬 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?
pub fn positional_element_ty(
self,
ty: Ty<'tcx>,
i: usize,
variant: Option<DefId>
) -> Option<Ty<'tcx>>
[src]
self,
ty: Ty<'tcx>,
i: usize,
variant: Option<DefId>
) -> Option<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?
Returns the type of element at index i
in tuple or tuple-like type t
.
For an enum t
, variant
is None only if t
is a univariant enum.
pub fn named_element_ty(
self,
ty: Ty<'tcx>,
n: Name,
variant: Option<DefId>
) -> Option<Ty<'tcx>>
[src]
self,
ty: Ty<'tcx>,
n: Name,
variant: Option<DefId>
) -> Option<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?
Returns the type of element at field n
in struct or struct-like type t
.
For an enum t
, variant
must be some def id.
pub fn struct_tail(self, ty: Ty<'tcx>) -> Ty<'tcx>
[src]
🔬 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?
Returns the deeply last field of nested structures, or the same type, if not a structure at all. Corresponds to the only possible unsized field, and its type can be used to determine unsizing strategy.
pub fn struct_lockstep_tails(
self,
source: Ty<'tcx>,
target: Ty<'tcx>
) -> (Ty<'tcx>, Ty<'tcx>)
[src]
self,
source: Ty<'tcx>,
target: Ty<'tcx>
) -> (Ty<'tcx>, 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?
Same as applying struct_tail on source
and target
, but only
keeps going as long as the two types are instances of the same
structure definitions.
For (Foo<Foo<T>>, Foo<Trait>)
, the result will be (Foo<T>, Trait)
,
whereas struct_tail produces T
, and Trait
, respectively.
pub fn required_region_bounds(
self,
erased_self_ty: Ty<'tcx>,
predicates: Vec<Predicate<'tcx>>
) -> Vec<Region<'tcx>>
[src]
self,
erased_self_ty: Ty<'tcx>,
predicates: Vec<Predicate<'tcx>>
) -> Vec<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?
Given a set of predicates that apply to an object type, returns
the region bounds that the (erased) Self
type must
outlive. Precisely because the Self
type is erased, the
parameter erased_self_ty
must be supplied to indicate what type
has been used to represent Self
in the predicates
themselves. This should really be a unique type; FreshTy(0)
is a
popular choice.
NB: in some cases, particularly around higher-ranked bounds,
this function returns a kind of conservative approximation.
That is, all regions returned by this function are definitely
required, but there may be other region bounds that are not
returned, as well as requirements like for<'a> T: 'a
.
Requires that trait definitions have been processed so that we can elaborate predicates and walk supertraits.
FIXME callers may only have a &[Predicate], not a Vec, so that's what this code should accept.
pub fn calculate_dtor(
self,
adt_did: DefId,
validate: &mut FnMut(Self, DefId) -> Result<(), ErrorReported>
) -> Option<Destructor>
[src]
self,
adt_did: DefId,
validate: &mut FnMut(Self, DefId) -> Result<(), ErrorReported>
) -> Option<Destructor>
🔬 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?
Calculate the destructor of a given type.
pub fn destructor_constraints(self, def: &'tcx AdtDef) -> Vec<Kind<'tcx>>
[src]
🔬 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?
Return the set of types that are required to be alive in
order to run the destructor of def
(see RFCs 769 and
1238).
Note that this returns only the constraints for the
destructor of def
itself. For the destructors of the
contents, you need adt_dtorck_constraint
.
pub fn dtorck_constraint_for_ty(
self,
span: Span,
for_ty: Ty<'tcx>,
depth: usize,
ty: Ty<'tcx>
) -> Result<DtorckConstraint<'tcx>, ErrorReported>
[src]
self,
span: Span,
for_ty: Ty<'tcx>,
depth: usize,
ty: Ty<'tcx>
) -> Result<DtorckConstraint<'tcx>, ErrorReported>
🔬 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?
Return a set of constraints that needs to be satisfied in
order for ty
to be valid for destruction.
pub fn is_closure(self, def_id: DefId) -> bool
[src]
🔬 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?
pub fn closure_base_def_id(self, def_id: DefId) -> DefId
[src]
🔬 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 the DefId
of a fn or closure, returns the DefId
of
the innermost fn item that the closure is contained within.
This is a significant def-id because, when we do
type-checking, we type-check this fn item and all of its
(transitive) closures together. Therefore, when we fetch the
typeck_tables_of
the closure, for example, we really wind up
fetching the typeck_tables_of
the enclosing fn item.
pub fn closure_env_ty(
self,
closure_def_id: DefId,
closure_substs: ClosureSubsts<'tcx>
) -> Option<Binder<Ty<'tcx>>>
[src]
self,
closure_def_id: DefId,
closure_substs: ClosureSubsts<'tcx>
) -> Option<Binder<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?
Given the def-id and substs a closure, creates the type of
self
argument that the closure expects. For example, for a
Fn
closure, this would return a reference type &T
where
T=closure_ty
.
Returns None
if this closure's kind has not yet been inferred.
This should only be possible during type checking.
Note that the return value is a late-bound region and hence wrapped in a binder.
pub fn empty_substs_for_def_id(self, item_def_id: DefId) -> &'tcx Substs<'tcx>
[src]
🔬 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 the def-id of some item that has no type parameters, make a suitable "empty substs" for it.
pub fn const_usize(&self, val: u16) -> ConstInt
[src]
🔬 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?
pub fn is_static_mut(&self, def_id: DefId) -> bool
[src]
🔬 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?
Check if the node pointed to by def_id is a mutable static item
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn alloc_generics(self, generics: Generics) -> &'gcx Generics
[src]
🔬 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?
pub fn alloc_steal_mir(self, mir: Mir<'gcx>) -> &'gcx Steal<Mir<'gcx>>
[src]
🔬 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?
pub fn alloc_mir(self, mir: Mir<'gcx>) -> &'gcx Mir<'gcx>
[src]
🔬 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?
pub fn alloc_tables(
self,
tables: TypeckTables<'gcx>
) -> &'gcx TypeckTables<'gcx>
[src]
self,
tables: TypeckTables<'gcx>
) -> &'gcx TypeckTables<'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?
pub fn alloc_trait_def(self, def: TraitDef) -> &'gcx TraitDef
[src]
🔬 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?
pub fn alloc_adt_def(
self,
did: DefId,
kind: AdtKind,
variants: Vec<VariantDef>,
repr: ReprOptions
) -> &'gcx AdtDef
[src]
self,
did: DefId,
kind: AdtKind,
variants: Vec<VariantDef>,
repr: ReprOptions
) -> &'gcx AdtDef
🔬 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?
pub fn alloc_byte_array(self, bytes: &[u8]) -> &'gcx [u8]
[src]
🔬 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?
pub fn alloc_const_slice(
self,
values: &[&'tcx Const<'tcx>]
) -> &'tcx [&'tcx Const<'tcx>]
[src]
self,
values: &[&'tcx Const<'tcx>]
) -> &'tcx [&'tcx Const<'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?
pub fn alloc_name_const_slice(
self,
values: &[(Name, &'tcx Const<'tcx>)]
) -> &'tcx [(Name, &'tcx Const<'tcx>)]
[src]
self,
values: &[(Name, &'tcx Const<'tcx>)]
) -> &'tcx [(Name, &'tcx Const<'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?
pub fn intern_const_alloc(self, alloc: Allocation) -> &'gcx Allocation
[src]
🔬 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?
pub fn allocate_cached(self, bytes: &[u8]) -> u64
[src]
🔬 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?
Allocates a byte or string literal for mir::interpret
pub fn intern_stability(self, stab: Stability) -> &'gcx Stability
[src]
🔬 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?
pub fn intern_layout(self, layout: LayoutDetails) -> &'gcx LayoutDetails
[src]
🔬 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?
pub fn lift<T: ?Sized + Lift<'tcx>>(self, value: &T) -> Option<T::Lifted>
[src]
🔬 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?
pub fn lift_to_global<T: ?Sized + Lift<'gcx>>(
self,
value: &T
) -> Option<T::Lifted>
[src]
self,
value: &T
) -> Option<T::Lifted>
🔬 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?
Like lift, but only tries in the global tcx.
pub fn create_and_enter<F, R>(
s: &'tcx Session,
cstore: &'tcx CrateStore,
local_providers: Providers<'tcx>,
extern_providers: Providers<'tcx>,
arenas: &'tcx GlobalArenas<'tcx>,
arena: &'tcx DroplessArena,
resolutions: Resolutions,
hir: Map<'tcx>,
on_disk_query_result_cache: OnDiskCache<'tcx>,
crate_name: &str,
tx: Sender<Box<Any + Send>>,
output_filenames: &OutputFilenames,
f: F
) -> R where
F: for<'b> FnOnce(TyCtxt<'b, 'tcx, 'tcx>) -> R,
[src]
s: &'tcx Session,
cstore: &'tcx CrateStore,
local_providers: Providers<'tcx>,
extern_providers: Providers<'tcx>,
arenas: &'tcx GlobalArenas<'tcx>,
arena: &'tcx DroplessArena,
resolutions: Resolutions,
hir: Map<'tcx>,
on_disk_query_result_cache: OnDiskCache<'tcx>,
crate_name: &str,
tx: Sender<Box<Any + Send>>,
output_filenames: &OutputFilenames,
f: F
) -> R where
F: for<'b> FnOnce(TyCtxt<'b, 'tcx, 'tcx>) -> 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?
Create a type context and call the closure with a TyCtxt
reference
to the context. The closure enforces that the type context and any interned
value (types, substs, etc.) can only be used while ty::tls
has a valid
reference to the context, to allow formatting values that need it.
pub fn consider_optimizing<T: Fn() -> String>(&self, msg: T) -> bool
[src]
🔬 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?
pub fn lang_items(self) -> Rc<LanguageItems>
[src]
🔬 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?
pub fn stability(self) -> Rc<Index<'tcx>>
[src]
🔬 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?
pub fn crates(self) -> Rc<Vec<CrateNum>>
[src]
🔬 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?
pub fn def_key(self, id: DefId) -> DefKey
[src]
🔬 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?
pub fn def_path(self, id: DefId) -> DefPath
[src]
🔬 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?
Convert a DefId
into its fully expanded DefPath
(every
DefId
is really just an interned def-path).
Note that if id
is not local to this crate, the result will
be a non-local DefPath
.
pub fn def_path_hash(self, def_id: DefId) -> DefPathHash
[src]
🔬 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?
pub fn def_path_debug_str(self, def_id: DefId) -> String
[src]
🔬 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?
pub fn metadata_encoding_version(self) -> Vec<u8>
[src]
🔬 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?
pub fn crate_data_as_rc_any(self, cnum: CrateNum) -> Rc<Any>
[src]
🔬 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?
pub fn create_stable_hashing_context(self) -> StableHashingContext<'gcx>
[src]
🔬 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?
pub fn allocate_metadata_dep_nodes(self)
[src]
🔬 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?
pub fn precompute_in_scope_traits_hashes(self)
[src]
🔬 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?
pub fn serialize_query_result_cache<E>(
self,
encoder: &mut E
) -> Result<(), E::Error> where
E: TyEncoder,
[src]
self,
encoder: &mut E
) -> Result<(), E::Error> where
E: TyEncoder,
🔬 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, 'tcx> TyCtxt<'a, 'tcx, 'tcx>
[src]
pub fn encode_metadata(
self,
link_meta: &LinkMeta,
reachable: &NodeSet
) -> EncodedMetadata
[src]
self,
link_meta: &LinkMeta,
reachable: &NodeSet
) -> EncodedMetadata
🔬 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, 'tcx> TyCtxt<'a, 'tcx, 'tcx>
[src]
pub fn print_debug_stats(self)
[src]
🔬 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> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn mk_region(self, v: RegionKind) -> &'tcx RegionKind
[src]
🔬 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> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn mk_const(self, v: Const<'tcx>) -> &'tcx Const<'tcx>
[src]
🔬 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> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn _intern_existential_predicates(
self,
v: &[ExistentialPredicate<'tcx>]
) -> &'tcx Slice<ExistentialPredicate<'tcx>>
[src]
self,
v: &[ExistentialPredicate<'tcx>]
) -> &'tcx Slice<ExistentialPredicate<'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> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn _intern_predicates(
self,
v: &[Predicate<'tcx>]
) -> &'tcx Slice<Predicate<'tcx>>
[src]
self,
v: &[Predicate<'tcx>]
) -> &'tcx Slice<Predicate<'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> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn _intern_type_list(self, v: &[Ty<'tcx>]) -> &'tcx Slice<Ty<'tcx>>
[src]
🔬 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> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn _intern_substs(self, v: &[Kind<'tcx>]) -> &'tcx Slice<Kind<'tcx>>
[src]
🔬 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> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn safe_to_unsafe_fn_ty(self, sig: PolyFnSig<'tcx>) -> Ty<'tcx>
[src]
🔬 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 a fn
type, returns an equivalent unsafe fn
type;
that is, a fn
type that is equivalent in every way for being
unsafe.
pub fn coerce_closure_fn_ty(self, sig: PolyFnSig<'tcx>) -> Ty<'tcx>
[src]
🔬 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 a closure signature sig
, returns an equivalent fn
type with the same signature. Detuples and so forth -- so
e.g. if we have a sig with Fn<(u32, i32)>
then you would get
a fn(u32, i32)
.
pub fn mk_ty(self, st: TypeVariants<'tcx>) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_mach_int(self, tm: IntTy) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_mach_uint(self, tm: UintTy) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_mach_float(self, tm: FloatTy) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_str(self) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_static_str(self) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_adt(self, def: &'tcx AdtDef, substs: &'tcx Substs<'tcx>) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_foreign(self, def_id: DefId) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_box(self, ty: Ty<'tcx>) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_ptr(self, tm: TypeAndMut<'tcx>) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_ref(self, r: Region<'tcx>, tm: TypeAndMut<'tcx>) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_mut_ref(self, r: Region<'tcx>, ty: Ty<'tcx>) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_imm_ref(self, r: Region<'tcx>, ty: Ty<'tcx>) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_mut_ptr(self, ty: Ty<'tcx>) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_imm_ptr(self, ty: Ty<'tcx>) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_nil_ptr(self) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_array(self, ty: Ty<'tcx>, n: u64) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_array_const_usize(self, ty: Ty<'tcx>, n: ConstUsize) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_slice(self, ty: Ty<'tcx>) -> Ty<'tcx>
[src]
🔬 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?
pub fn intern_tup(self, ts: &[Ty<'tcx>], defaulted: bool) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_tup<I: InternAs<[Ty<'tcx>], Ty<'tcx>>>(
self,
iter: I,
defaulted: bool
) -> I::Output
[src]
self,
iter: I,
defaulted: bool
) -> I::Output
🔬 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?
pub fn mk_nil(self) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_diverging_default(self) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_bool(self) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_fn_def(self, def_id: DefId, substs: &'tcx Substs<'tcx>) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_fn_ptr(self, fty: PolyFnSig<'tcx>) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_dynamic(
self,
obj: Binder<&'tcx Slice<ExistentialPredicate<'tcx>>>,
reg: Region<'tcx>
) -> Ty<'tcx>
[src]
self,
obj: Binder<&'tcx Slice<ExistentialPredicate<'tcx>>>,
reg: Region<'tcx>
) -> 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?
pub fn mk_projection(
self,
item_def_id: DefId,
substs: &'tcx Substs<'tcx>
) -> Ty<'tcx>
[src]
self,
item_def_id: DefId,
substs: &'tcx Substs<'tcx>
) -> 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?
pub fn mk_closure(
self,
closure_id: DefId,
substs: ClosureSubsts<'tcx>
) -> Ty<'tcx>
[src]
self,
closure_id: DefId,
substs: ClosureSubsts<'tcx>
) -> 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?
pub fn mk_closure_from_closure_substs(
self,
closure_id: DefId,
closure_substs: ClosureSubsts<'tcx>
) -> Ty<'tcx>
[src]
self,
closure_id: DefId,
closure_substs: ClosureSubsts<'tcx>
) -> 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?
pub fn mk_generator(
self,
id: DefId,
closure_substs: ClosureSubsts<'tcx>,
interior: GeneratorInterior<'tcx>
) -> Ty<'tcx>
[src]
self,
id: DefId,
closure_substs: ClosureSubsts<'tcx>,
interior: GeneratorInterior<'tcx>
) -> 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?
pub fn mk_var(self, v: TyVid) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_int_var(self, v: IntVid) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_float_var(self, v: FloatVid) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_infer(self, it: InferTy) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_param(self, index: u32, name: Name) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_self_type(self) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_param_from_def(self, def: &TypeParameterDef) -> Ty<'tcx>
[src]
🔬 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?
pub fn mk_anon(self, def_id: DefId, substs: &'tcx Substs<'tcx>) -> Ty<'tcx>
[src]
🔬 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?
pub fn intern_existential_predicates(
self,
eps: &[ExistentialPredicate<'tcx>]
) -> &'tcx Slice<ExistentialPredicate<'tcx>>
[src]
self,
eps: &[ExistentialPredicate<'tcx>]
) -> &'tcx Slice<ExistentialPredicate<'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?
pub fn intern_predicates(
self,
preds: &[Predicate<'tcx>]
) -> &'tcx Slice<Predicate<'tcx>>
[src]
self,
preds: &[Predicate<'tcx>]
) -> &'tcx Slice<Predicate<'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?
pub fn intern_type_list(self, ts: &[Ty<'tcx>]) -> &'tcx Slice<Ty<'tcx>>
[src]
🔬 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?
pub fn intern_substs(self, ts: &[Kind<'tcx>]) -> &'tcx Slice<Kind<'tcx>>
[src]
🔬 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?
pub fn mk_fn_sig<I>(
self,
inputs: I,
output: I::Item,
variadic: bool,
unsafety: Unsafety,
abi: Abi
) -> <I::Item as InternIteratorElement<Ty<'tcx>, FnSig<'tcx>>>::Output where
I: Iterator,
I::Item: InternIteratorElement<Ty<'tcx>, FnSig<'tcx>>,
[src]
self,
inputs: I,
output: I::Item,
variadic: bool,
unsafety: Unsafety,
abi: Abi
) -> <I::Item as InternIteratorElement<Ty<'tcx>, FnSig<'tcx>>>::Output where
I: Iterator,
I::Item: InternIteratorElement<Ty<'tcx>, FnSig<'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?
pub fn mk_existential_predicates<I: InternAs<[ExistentialPredicate<'tcx>], &'tcx Slice<ExistentialPredicate<'tcx>>>>(
self,
iter: I
) -> I::Output
[src]
self,
iter: I
) -> I::Output
🔬 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?
pub fn mk_predicates<I: InternAs<[Predicate<'tcx>], &'tcx Slice<Predicate<'tcx>>>>(
self,
iter: I
) -> I::Output
[src]
self,
iter: I
) -> I::Output
🔬 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?
pub fn mk_type_list<I: InternAs<[Ty<'tcx>], &'tcx Slice<Ty<'tcx>>>>(
self,
iter: I
) -> I::Output
[src]
self,
iter: I
) -> I::Output
🔬 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?
pub fn mk_substs<I: InternAs<[Kind<'tcx>], &'tcx Slice<Kind<'tcx>>>>(
self,
iter: I
) -> I::Output
[src]
self,
iter: I
) -> I::Output
🔬 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?
pub fn mk_substs_trait(self, s: Ty<'tcx>, t: &[Ty<'tcx>]) -> &'tcx Substs<'tcx>
[src]
🔬 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?
pub fn lint_node<S: Into<MultiSpan>>(
self,
lint: &'static Lint,
id: NodeId,
span: S,
msg: &str
)
[src]
self,
lint: &'static Lint,
id: NodeId,
span: S,
msg: &str
)
🔬 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?
pub fn lint_node_note<S: Into<MultiSpan>>(
self,
lint: &'static Lint,
id: NodeId,
span: S,
msg: &str,
note: &str
)
[src]
self,
lint: &'static Lint,
id: NodeId,
span: S,
msg: &str,
note: &str
)
🔬 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?
pub fn lint_level_at_node(
self,
lint: &'static Lint,
id: NodeId
) -> (Level, LintSource)
[src]
self,
lint: &'static Lint,
id: NodeId
) -> (Level, LintSource)
🔬 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?
pub fn struct_span_lint_node<S: Into<MultiSpan>>(
self,
lint: &'static Lint,
id: NodeId,
span: S,
msg: &str
) -> DiagnosticBuilder<'tcx>
[src]
self,
lint: &'static Lint,
id: NodeId,
span: S,
msg: &str
) -> DiagnosticBuilder<'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?
pub fn struct_lint_node(
self,
lint: &'static Lint,
id: NodeId,
msg: &str
) -> DiagnosticBuilder<'tcx>
[src]
self,
lint: &'static Lint,
id: NodeId,
msg: &str
) -> DiagnosticBuilder<'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?
pub fn in_scope_traits(self, id: HirId) -> Option<Rc<StableVec<TraitCandidate>>>
[src]
🔬 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?
pub fn named_region(self, id: HirId) -> Option<Region>
[src]
🔬 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?
pub fn is_late_bound(self, id: HirId) -> bool
[src]
🔬 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?
pub fn object_lifetime_defaults(
self,
id: HirId
) -> Option<Rc<Vec<ObjectLifetimeDefault>>>
[src]
self,
id: HirId
) -> Option<Rc<Vec<ObjectLifetimeDefault>>>
🔬 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> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn body_tables(self, body: BodyId) -> &'gcx TypeckTables<'gcx>
[src]
🔬 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?
pub fn body_owners(self) -> impl Iterator<Item = DefId> + 'a
[src]
🔬 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?
Returns an iterator of the def-ids for all body-owners in this
crate. If you would prefer to iterate over the bodies
themselves, you can do self.hir.krate().body_ids.iter()
.
pub fn expr_span(self, id: NodeId) -> Span
[src]
🔬 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?
pub fn expr_is_lval(self, expr: &Expr) -> bool
[src]
🔬 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?
pub fn provided_trait_methods(self, id: DefId) -> Vec<AssociatedItem>
[src]
🔬 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?
pub fn trait_relevant_for_never(self, did: DefId) -> bool
[src]
🔬 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?
pub fn opt_associated_item(self, def_id: DefId) -> Option<AssociatedItem>
[src]
🔬 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?
pub fn associated_items(
self,
def_id: DefId
) -> impl Iterator<Item = AssociatedItem> + 'a
[src]
self,
def_id: DefId
) -> impl Iterator<Item = AssociatedItem> + 'a
🔬 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?
pub fn impls_are_allowed_to_overlap(
self,
def_id1: DefId,
def_id2: DefId
) -> bool
[src]
self,
def_id1: DefId,
def_id2: DefId
) -> 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?
Returns true if the impls are the same polarity and are implementing a trait which contains no items
pub fn expect_variant_def(self, def: Def) -> &'tcx VariantDef
[src]
🔬 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?
pub fn adt_def_id_of_variant(self, variant_def: &'tcx VariantDef) -> DefId
[src]
🔬 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 a VariantDef
, returns the def-id of the AdtDef
of which it is a part.
pub fn item_name(self, id: DefId) -> InternedString
[src]
🔬 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?
pub fn instance_mir(self, instance: InstanceDef<'gcx>) -> &'gcx Mir<'gcx>
[src]
🔬 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?
Return the possibly-auto-generated MIR of a (DefId, Subst) pair.
pub fn maybe_optimized_mir(self, did: DefId) -> Option<&'gcx Mir<'gcx>>
[src]
🔬 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 the DefId of an item, returns its MIR, borrowed immutably. Returns None if there is no MIR for the DefId
pub fn get_attrs(self, did: DefId) -> Attributes<'gcx>
[src]
🔬 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?
Get the attributes of a definition.
pub fn has_attr(self, did: DefId, attr: &str) -> bool
[src]
🔬 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?
Determine whether an item is annotated with an attribute
pub fn trait_is_auto(self, trait_def_id: DefId) -> bool
[src]
🔬 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?
Returns true if this is an auto trait
.
NB. For a limited time, also returns true if impl Trait for .. { }
is in the code-base.
pub fn generator_layout(self, def_id: DefId) -> &'tcx GeneratorLayout<'tcx>
[src]
🔬 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?
pub fn trait_id_of_impl(self, def_id: DefId) -> Option<DefId>
[src]
🔬 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 the def_id of an impl, return the def_id of the trait it implements.
If it implements no trait, return None
.
pub fn impl_of_method(self, def_id: DefId) -> Option<DefId>
[src]
🔬 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 the given def ID describes a method belonging to an impl, return the
ID of the impl that the method belongs to. Otherwise, return None
.
pub fn span_of_impl(self, impl_did: DefId) -> Result<Span, Symbol>
[src]
🔬 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?
Looks up the span of impl_did
if the impl is local; otherwise returns Err
with the name of the crate containing the impl.
pub fn hygienic_eq(
self,
use_name: Name,
def_name: Name,
def_parent_def_id: DefId
) -> bool
[src]
self,
use_name: Name,
def_name: Name,
def_parent_def_id: DefId
) -> 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?
pub fn adjust(self, name: Name, scope: DefId, block: NodeId) -> (Ident, DefId)
[src]
🔬 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?
pub fn adjust_ident(
self,
ident: Ident,
scope: DefId,
block: NodeId
) -> (Ident, DefId)
[src]
self,
ident: Ident,
scope: DefId,
block: NodeId
) -> (Ident, 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?
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
pub fn with_freevars<T, F>(self, fid: NodeId, f: F) -> T where
F: FnOnce(&[Freevar]) -> T,
[src]
F: FnOnce(&[Freevar]) -> 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?
Trait Implementations
impl<'a, 'gcx, 'tcx> DepGraphSafe for TyCtxt<'a, 'gcx, 'tcx>
[src]
The type context itself can be used to access all kinds of tracked state, but those accesses should always generate read events.
impl<'a, 'gcx, 'lcx> StableHashingContextProvider for TyCtxt<'a, 'gcx, 'lcx>
[src]
type ContextType = StableHashingContext<'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?
fn create_stable_hashing_context(&self) -> Self::ContextType
[src]
🔬 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> HasDataLayout for TyCtxt<'a, 'gcx, 'tcx>
[src]
fn data_layout(&self) -> &TargetDataLayout
[src]
🔬 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> HasTyCtxt<'gcx> for TyCtxt<'a, 'gcx, 'tcx>
[src]
fn tcx<'b>(&'b self) -> TyCtxt<'b, 'gcx, 'gcx>
[src]
🔬 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: 'a + 'tcx, 'tcx: 'a> Copy for TyCtxt<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> Clone for TyCtxt<'a, 'gcx, 'tcx>
[src]
fn clone(&self) -> TyCtxt<'a, 'gcx, 'tcx>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a, 'gcx, 'tcx> Deref for TyCtxt<'a, 'gcx, 'tcx>
[src]
type Target = &'a GlobalCtxt<'gcx>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl<'a, 'gcx, 'tcx> DefIdTree for TyCtxt<'a, 'gcx, 'tcx>
[src]
fn parent(self, id: DefId) -> Option<DefId>
[src]
🔬 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 is_descendant_of(self, descendant: DefId, ancestor: DefId) -> bool
[src]
🔬 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?