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 rustc guide for more details.
Methods
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn note_and_explain_region(
self,
region_scope_tree: &ScopeTree,
err: &mut DiagnosticBuilder,
prefix: &str,
region: Region<'tcx>,
suffix: &str
)
[src]
pub fn note_and_explain_region(
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?
pub fn note_and_explain_free_region(
self,
err: &mut DiagnosticBuilder,
prefix: &str,
region: Region<'tcx>,
suffix: &str
)
[src]
pub fn note_and_explain_free_region(
self,
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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'gcx>
pub fn infer_ctxt(self) -> InferCtxtBuilder<'a, 'gcx, 'tcx>
[src]
pub fn infer_ctxt(self) -> InferCtxtBuilder<'a, 'gcx, 'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'tcx, 'gcx> TyCtxt<'a, 'tcx, 'gcx>
[src]
impl<'a, 'tcx, 'gcx> TyCtxt<'a, 'tcx, 'gcx>
pub fn require_lang_item(&self, lang_item: LangItem) -> DefId
[src]
pub fn require_lang_item(&self, lang_item: LangItem) -> 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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn eval_stability(
self,
def_id: DefId,
id: Option<NodeId>,
span: Span
) -> EvalResult
[src]
pub fn eval_stability(
self,
def_id: DefId,
id: Option<NodeId>,
span: Span
) -> EvalResult
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Evaluates the stability of an item.
Returns EvalResult::Allow
if the item is stable, or unstable but the corresponding
#![feature]
has been provided. Returns EvalResult::Deny
which describes the offending
unstable feature otherwise.
If id
is Some(_)
, this function will also check if the item at def_id
has been
deprecated. If the item is indeed deprecated, we will emit a deprecation lint attached to
id
.
pub fn check_stability(self, def_id: DefId, id: Option<NodeId>, span: Span)
[src]
pub fn check_stability(self, def_id: DefId, id: Option<NodeId>, span: Span)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Checks if an item is stable or error out.
If the item defined by def_id
is unstable and the corresponding #![feature]
does not
exist, emits an error.
Additionally, this function will also check if the item is deprecated. If so, and id
is
not None
, a deprecated lint attached to id
will be emitted.
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn lookup_deprecation(self, id: DefId) -> Option<Deprecation>
[src]
pub fn lookup_deprecation(self, id: DefId) -> Option<Deprecation>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn recursive_type_with_infinite_size_error(
self,
type_def_id: DefId
) -> DiagnosticBuilder<'tcx>
[src]
pub fn recursive_type_with_infinite_size_error(
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]
pub fn report_object_safety_error(
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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn astconv_object_safety_violations(
self,
trait_def_id: DefId
) -> Vec<ObjectSafetyViolation>
[src]
pub fn astconv_object_safety_violations(
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]
pub fn object_safety_violations(
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]
pub fn is_vtable_safe_method(
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]
impl<'a, 'tcx> TyCtxt<'a, 'tcx, 'tcx>
pub fn subst_and_normalize_erasing_regions<T>(
self,
param_substs: &Substs<'tcx>,
param_env: ParamEnv<'tcx>,
value: &T
) -> T where
T: TypeFoldable<'tcx>,
[src]
pub fn subst_and_normalize_erasing_regions<T>(
self,
param_substs: &Substs<'tcx>,
param_env: ParamEnv<'tcx>,
value: &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?
Monomorphizes a type from the AST by first applying the in-scope substitutions and then normalizing any associated types.
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
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]
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>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn upcast_choices(
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]
pub fn count_own_vtable_entries(self, trait_ref: PolyTraitRef<'tcx>) -> 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 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]
pub fn get_vtable_index_of_object_method<N>(
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]
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>)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
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>)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn impl_is_default(self, node_item_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 impl_item_is_final(self, node_item: &NodeItem<Defaultness>) -> bool
[src]
pub fn impl_item_is_final(self, node_item: &NodeItem<Defaultness>) -> 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<'cx, 'tcx> TyCtxt<'cx, 'tcx, 'tcx>
[src]
impl<'cx, 'tcx> TyCtxt<'cx, 'tcx, 'tcx>
pub fn normalize_erasing_regions<T>(
self,
param_env: ParamEnv<'tcx>,
value: T
) -> T where
T: TypeFoldable<'tcx>,
[src]
pub fn normalize_erasing_regions<T>(
self,
param_env: ParamEnv<'tcx>,
value: 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?
Erase the regions in value
and then fully normalize all the
types found within. The result will also have regions erased.
This is appropriate to use only after type-check: it assumes that normalization will succeed, for example.
pub fn normalize_erasing_late_bound_regions<T>(
self,
param_env: ParamEnv<'tcx>,
value: &Binder<T>
) -> T where
T: TypeFoldable<'tcx>,
[src]
pub fn normalize_erasing_late_bound_regions<T>(
self,
param_env: ParamEnv<'tcx>,
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?
If you have a Binder<T>
, you can do this to strip out the
late-bound regions and then normalize the result, yielding up
a T
(with regions erased). This is appropriate when the
binder is being instantiated at the call site.
NB. Currently, higher-ranked type bounds inhibit normalization. Therefore, each time we erase them in translation, we need to normalize the contents.
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn note_and_explain_type_err(
self,
db: &mut DiagnosticBuilder,
err: &TypeError<'tcx>,
sp: Span
)
[src]
pub fn note_and_explain_type_err(
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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn erase_regions<T>(self, value: &T) -> T where
T: TypeFoldable<'tcx>,
[src]
pub fn erase_regions<T>(self, value: &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?
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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn collect_regions<T>(
self,
value: &T,
region_set: &mut FxHashSet<Region<'tcx>>
) -> bool where
T: TypeFoldable<'tcx>,
[src]
pub fn collect_regions<T>(
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]
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>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn for_each_free_region<T, F>(self, value: &T, callback: F) where
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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
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]
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>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn liberate_late_bound_regions<T>(
&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]
pub fn flatten_late_bound_regions<T>(
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]
pub fn collect_constrained_late_bound_regions<T>(
&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]
pub fn collect_referenced_late_bound_regions<T>(
&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]
pub fn erase_late_bound_regions<T>(self, 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 '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]
pub fn anonymize_late_bound_regions<T>(self, sig: &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?
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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn is_ty_uninhabited_from(self, module: DefId, ty: Ty<'tcx>) -> bool
[src]
pub fn is_ty_uninhabited_from(self, module: DefId, ty: Ty<'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?
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]
pub fn is_ty_uninhabited_from_all_modules(self, ty: Ty<'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_enum_variant_uninhabited_from(
self,
module: DefId,
variant: &'tcx VariantDef,
substs: &'tcx Substs<'tcx>
) -> bool
[src]
pub fn is_enum_variant_uninhabited_from(
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]
pub fn is_variant_uninhabited_from_all_modules(
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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn item_path_str(self, def_id: DefId) -> String
[src]
pub fn item_path_str(self, def_id: DefId) -> String
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn node_path_str(self, id: NodeId) -> String
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn absolute_item_path_str(self, def_id: DefId) -> String
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn push_krate_path<T>(self, buffer: &mut T, cnum: CrateNum) 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?
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]
pub fn try_push_visible_item_path<T>(
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]
pub fn push_item_path<T>(self, buffer: &mut T, def_id: DefId) 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?
pub fn parent_def_id(self, def_id: DefId) -> Option<DefId>
[src]
pub fn parent_def_id(self, def_id: DefId) -> Option<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?
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> TyCtxt<'a, 'tcx, 'tcx>
[src]
impl<'a, 'tcx> TyCtxt<'a, 'tcx, 'tcx>
pub fn layout_of(
self,
param_env_and_ty: ParamEnvAnd<'tcx, Ty<'tcx>>
) -> Result<TyLayout<'tcx>, LayoutError<'tcx>>
[src]
pub fn layout_of(
self,
param_env_and_ty: ParamEnvAnd<'tcx, Ty<'tcx>>
) -> Result<TyLayout<'tcx>, 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?
Computes the layout of a type. Note that this implicitly executes in "reveal all" mode.
impl<'a, 'tcx, 'lcx> TyCtxt<'a, 'tcx, 'lcx>
[src]
impl<'a, 'tcx, 'lcx> TyCtxt<'a, 'tcx, 'lcx>
pub fn at(self, span: Span) -> TyCtxtAt<'a, 'tcx, 'lcx>
[src]
pub fn at(self, span: Span) -> TyCtxtAt<'a, 'tcx, 'lcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn type_of(self, key: DefId) -> 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?
Records the type of every item.
pub fn generics_of(self, key: DefId) -> &'tcx Generics
[src]
pub fn generics_of(self, key: DefId) -> &'tcx Generics
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn predicates_of(self, key: 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?
pub fn super_predicates_of(self, key: DefId) -> GenericPredicates<'tcx>
[src]
pub fn super_predicates_of(self, key: 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?
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]
pub fn type_param_predicates(
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]
pub fn trait_def(self, key: DefId) -> &'tcx TraitDef
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn adt_def(self, key: DefId) -> &'tcx 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 adt_destructor(self, key: DefId) -> Option<Destructor>
[src]
pub fn adt_destructor(self, key: DefId) -> 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?
pub fn adt_sized_constraint(self, key: DefId) -> &'tcx [Ty<'tcx>]
[src]
pub fn adt_sized_constraint(self, key: DefId) -> &'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 adt_dtorck_constraint(
self,
key: DefId
) -> Result<DtorckConstraint<'tcx>, NoSolution>
[src]
pub fn adt_dtorck_constraint(
self,
key: DefId
) -> Result<DtorckConstraint<'tcx>, NoSolution>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn is_const_fn(self, key: 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?
True if this is a const fn
pub fn is_foreign_item(self, key: DefId) -> bool
[src]
pub fn is_foreign_item(self, key: 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?
True if this is a foreign item (i.e., linked via extern { ... }
).
pub fn crate_variances(self, key: CrateNum) -> Lrc<CrateVariancesMap>
[src]
pub fn crate_variances(self, key: CrateNum) -> Lrc<CrateVariancesMap>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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) -> Lrc<Vec<Variance>>
[src]
pub fn variances_of(self, key: DefId) -> Lrc<Vec<Variance>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn inferred_outlives_of(self, key: DefId) -> Vec<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?
Maps from def-id of a type to its (inferred) outlives.
pub fn associated_item_def_ids(self, key: DefId) -> Lrc<Vec<DefId>>
[src]
pub fn associated_item_def_ids(self, key: DefId) -> Lrc<Vec<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?
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]
pub fn associated_item(self, key: DefId) -> AssociatedItem
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn impl_trait_ref(self, key: DefId) -> Option<TraitRef<'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_polarity(self, key: DefId) -> ImplPolarity
[src]
pub fn impl_polarity(self, key: DefId) -> ImplPolarity
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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) -> Lrc<Vec<DefId>>
[src]
pub fn inherent_impls(self, key: DefId) -> Lrc<Vec<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?
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) -> Lrc<DefIdSet>
[src]
pub fn mir_keys(self, key: CrateNum) -> Lrc<DefIdSet>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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, Lrc<IdxSetBuf<Local>>)
[src]
pub fn mir_const_qualif(self, key: DefId) -> (u8, Lrc<IdxSetBuf<Local>>)
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn mir_built(self, key: DefId) -> &'tcx Steal<Mir<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
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]
pub fn mir_const(self, key: DefId) -> &'tcx Steal<Mir<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
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]
pub fn mir_validated(self, key: DefId) -> &'tcx Steal<Mir<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn optimized_mir(self, key: DefId) -> &'tcx Mir<'tcx>
[src]
pub fn optimized_mir(self, key: DefId) -> &'tcx Mir<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
MIR 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]
pub fn unsafety_check_result(self, key: DefId) -> UnsafetyCheckResult
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn unsafe_derive_on_repr_packed(self, key: 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?
HACK: when evaluated, this reports a "unsafe derive on repr(packed)" error
pub fn fn_sig(self, key: DefId) -> PolyFnSig<'tcx>
[src]
pub fn fn_sig(self, key: DefId) -> PolyFnSig<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The signature of functions and closures.
pub fn coerce_unsized_info(self, key: DefId) -> CoerceUnsizedInfo
[src]
pub fn coerce_unsized_info(self, key: DefId) -> CoerceUnsizedInfo
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn typeck_item_bodies(self, key: CrateNum) -> CompileResult
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn typeck_tables_of(self, key: DefId) -> &'tcx TypeckTables<'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 used_trait_imports(self, key: DefId) -> Lrc<DefIdSet>
[src]
pub fn used_trait_imports(self, key: DefId) -> Lrc<DefIdSet>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn has_typeck_tables(self, key: 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 coherent_trait(self, key: DefId)
[src]
pub fn coherent_trait(self, key: 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?
pub fn borrowck(self, key: DefId) -> Lrc<BorrowCheckResult>
[src]
pub fn borrowck(self, key: DefId) -> Lrc<BorrowCheckResult>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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<'tcx>>
[src]
pub fn mir_borrowck(self, key: DefId) -> Option<ClosureRegionRequirements<'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?
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]
pub fn crate_inherent_impls(self, key: CrateNum) -> CrateInherentImpls
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn crate_inherent_impls_overlap_check(self, key: CrateNum)
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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, GlobalId<'tcx>>
) -> EvalResult<'tcx>
[src]
pub fn const_eval(
self,
key: ParamEnvAnd<'tcx, GlobalId<'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]
pub fn check_match(self, key: DefId) -> Result<(), 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?
pub fn privacy_access_levels(self, key: CrateNum) -> Lrc<AccessLevels>
[src]
pub fn privacy_access_levels(self, key: CrateNum) -> Lrc<AccessLevels>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn reachable_set(self, key: CrateNum) -> ReachableSet
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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) -> Lrc<ScopeTree>
[src]
pub fn region_scope_tree(self, key: DefId) -> Lrc<ScopeTree>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn mir_shims(self, key: InstanceDef<'tcx>) -> &'tcx Mir<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn def_symbol_name(self, key: DefId) -> SymbolName
[src]
pub fn def_symbol_name(self, key: DefId) -> SymbolName
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn symbol_name(self, key: Instance<'tcx>) -> SymbolName
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn describe_def(self, key: DefId) -> Option<Def>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn def_span(self, key: DefId) -> 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?
pub fn lookup_stability(self, key: DefId) -> Option<&'tcx Stability>
[src]
pub fn lookup_stability(self, key: DefId) -> Option<&'tcx Stability>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn lookup_deprecation_entry(self, key: DefId) -> Option<DeprecationEntry>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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) -> Lrc<[Attribute]>
[src]
pub fn item_attrs(self, key: DefId) -> Lrc<[Attribute]>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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_fn_attrs(self, key: DefId) -> TransFnAttrs
[src]
pub fn trans_fn_attrs(self, key: DefId) -> TransFnAttrs
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn fn_arg_names(self, key: DefId) -> Vec<Name>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn impl_parent(self, key: DefId) -> Option<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?
pub fn trait_of_item(self, key: DefId) -> Option<DefId>
[src]
pub fn trait_of_item(self, key: DefId) -> Option<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?
pub fn item_body_nested_bodies(self, key: DefId) -> ExternBodyNestedBodies
[src]
pub fn item_body_nested_bodies(self, key: DefId) -> ExternBodyNestedBodies
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn const_is_rvalue_promotable_to_static(self, key: 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 rvalue_promotable_map(self, key: DefId) -> Lrc<ItemLocalSet>
[src]
pub fn rvalue_promotable_map(self, key: DefId) -> Lrc<ItemLocalSet>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn is_mir_available(self, key: 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 vtable_methods(
self,
key: PolyTraitRef<'tcx>
) -> Lrc<Vec<Option<(DefId, &'tcx Substs<'tcx>)>>>
[src]
pub fn vtable_methods(
self,
key: PolyTraitRef<'tcx>
) -> Lrc<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]
pub fn trans_fulfill_obligation(
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) -> Lrc<TraitImpls>
[src]
pub fn trait_impls_of(self, key: DefId) -> Lrc<TraitImpls>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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) -> Lrc<Graph>
[src]
pub fn specialization_graph_of(self, key: DefId) -> Lrc<Graph>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn is_object_safe(self, key: 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 param_env(self, key: DefId) -> ParamEnv<'tcx>
[src]
pub fn param_env(self, key: DefId) -> ParamEnv<'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 is_copy_raw(self, key: ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool
[src]
pub fn is_copy_raw(self, key: ParamEnvAnd<'tcx, Ty<'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_sized_raw(self, key: ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool
[src]
pub fn is_sized_raw(self, key: ParamEnvAnd<'tcx, Ty<'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_freeze_raw(self, key: ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool
[src]
pub fn is_freeze_raw(self, key: ParamEnvAnd<'tcx, Ty<'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 needs_drop_raw(self, key: ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool
[src]
pub fn needs_drop_raw(self, key: ParamEnvAnd<'tcx, Ty<'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 layout_raw(
self,
key: ParamEnvAnd<'tcx, Ty<'tcx>>
) -> Result<&'tcx LayoutDetails, LayoutError<'tcx>>
[src]
pub fn layout_raw(
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
) -> Lrc<Vec<(CrateNum, LinkagePreference)>>
[src]
pub fn dylib_dependency_formats(
self,
key: CrateNum
) -> Lrc<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]
pub fn is_panic_runtime(self, key: CrateNum) -> 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_compiler_builtins(self, key: CrateNum) -> bool
[src]
pub fn is_compiler_builtins(self, key: CrateNum) -> 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 has_global_allocator(self, key: CrateNum) -> bool
[src]
pub fn has_global_allocator(self, key: CrateNum) -> 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_sanitizer_runtime(self, key: CrateNum) -> bool
[src]
pub fn is_sanitizer_runtime(self, key: CrateNum) -> 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_profiler_runtime(self, key: CrateNum) -> bool
[src]
pub fn is_profiler_runtime(self, key: CrateNum) -> 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 panic_strategy(self, key: CrateNum) -> PanicStrategy
[src]
pub fn panic_strategy(self, key: CrateNum) -> PanicStrategy
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn is_no_builtins(self, key: CrateNum) -> 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 extern_crate(self, key: DefId) -> Lrc<Option<ExternCrate>>
[src]
pub fn extern_crate(self, key: DefId) -> Lrc<Option<ExternCrate>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn specializes(self, key: (DefId, 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 in_scope_traits_map(
self,
key: DefIndex
) -> Option<Lrc<FxHashMap<ItemLocalId, Lrc<StableVec<TraitCandidate>>>>>
[src]
pub fn in_scope_traits_map(
self,
key: DefIndex
) -> Option<Lrc<FxHashMap<ItemLocalId, Lrc<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<Lrc<Vec<Export>>>
[src]
pub fn module_exports(self, key: DefId) -> Option<Lrc<Vec<Export>>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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) -> Lrc<LintLevelMap>
[src]
pub fn lint_levels(self, key: CrateNum) -> Lrc<LintLevelMap>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn impl_defaultness(self, key: DefId) -> Defaultness
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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 check_item_well_formed(self, key: DefId)
[src]
pub fn check_item_well_formed(self, key: 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?
pub fn check_trait_item_well_formed(self, key: DefId)
[src]
pub fn check_trait_item_well_formed(self, key: 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?
pub fn check_impl_item_well_formed(self, key: DefId)
[src]
pub fn check_impl_item_well_formed(self, key: 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?
pub fn reachable_non_generics(self, key: CrateNum) -> Lrc<DefIdSet>
[src]
pub fn reachable_non_generics(self, key: CrateNum) -> Lrc<DefIdSet>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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_reachable_non_generic(self, key: DefId) -> bool
[src]
pub fn is_reachable_non_generic(self, key: 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 native_libraries(self, key: CrateNum) -> Lrc<Vec<NativeLibrary>>
[src]
pub fn native_libraries(self, key: CrateNum) -> Lrc<Vec<NativeLibrary>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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 foreign_modules(self, key: CrateNum) -> Lrc<Vec<ForeignModule>>
[src]
pub fn foreign_modules(self, key: CrateNum) -> Lrc<Vec<ForeignModule>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn plugin_registrar_fn(self, key: CrateNum) -> Option<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?
pub fn derive_registrar_fn(self, key: CrateNum) -> Option<DefId>
[src]
pub fn derive_registrar_fn(self, key: CrateNum) -> Option<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?
pub fn crate_disambiguator(self, key: CrateNum) -> CrateDisambiguator
[src]
pub fn crate_disambiguator(self, key: CrateNum) -> CrateDisambiguator
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn crate_hash(self, key: CrateNum) -> Svh
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn original_crate_name(self, key: CrateNum) -> Symbol
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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)) -> Lrc<Vec<DefId>>
[src]
pub fn implementations_of_trait(self, key: (CrateNum, DefId)) -> Lrc<Vec<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?
pub fn all_trait_implementations(self, key: CrateNum) -> Lrc<Vec<DefId>>
[src]
pub fn all_trait_implementations(self, key: CrateNum) -> Lrc<Vec<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?
pub fn dllimport_foreign_items(self, key: CrateNum) -> Lrc<FxHashSet<DefId>>
[src]
pub fn dllimport_foreign_items(self, key: CrateNum) -> Lrc<FxHashSet<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?
pub fn is_dllimport_foreign_item(self, key: DefId) -> bool
[src]
pub fn is_dllimport_foreign_item(self, key: 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 is_statically_included_foreign_item(self, key: DefId) -> bool
[src]
pub fn is_statically_included_foreign_item(self, key: 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 native_library_kind(self, key: DefId) -> Option<NativeLibraryKind>
[src]
pub fn native_library_kind(self, key: DefId) -> Option<NativeLibraryKind>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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) -> Lrc<Vec<String>>
[src]
pub fn link_args(self, key: CrateNum) -> Lrc<Vec<String>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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) -> Lrc<ResolveLifetimes>
[src]
pub fn resolve_lifetimes(self, key: CrateNum) -> Lrc<ResolveLifetimes>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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<Lrc<FxHashMap<ItemLocalId, Region>>>
[src]
pub fn named_region_map(
self,
key: DefIndex
) -> Option<Lrc<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<Lrc<FxHashSet<ItemLocalId>>>
[src]
pub fn is_late_bound_map(
self,
key: DefIndex
) -> Option<Lrc<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<Lrc<FxHashMap<ItemLocalId, Lrc<Vec<ObjectLifetimeDefault>>>>>
[src]
pub fn object_lifetime_defaults_map(
self,
key: DefIndex
) -> Option<Lrc<FxHashMap<ItemLocalId, Lrc<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]
pub fn visibility(self, key: DefId) -> Visibility
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn dep_kind(self, key: CrateNum) -> DepKind
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn crate_name(self, key: CrateNum) -> Symbol
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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) -> Lrc<Vec<Export>>
[src]
pub fn item_children(self, key: DefId) -> Lrc<Vec<Export>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn extern_mod_stmt_cnum(self, key: DefId) -> Option<CrateNum>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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) -> Lrc<LanguageItems>
[src]
pub fn get_lang_items(self, key: CrateNum) -> Lrc<LanguageItems>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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) -> Lrc<Vec<(DefId, usize)>>
[src]
pub fn defined_lang_items(self, key: CrateNum) -> Lrc<Vec<(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?
pub fn missing_lang_items(self, key: CrateNum) -> Lrc<Vec<LangItem>>
[src]
pub fn missing_lang_items(self, key: CrateNum) -> Lrc<Vec<LangItem>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn extern_const_body(self, key: DefId) -> ExternConstBody<'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 visible_parent_map(self, key: CrateNum) -> Lrc<DefIdMap<DefId>>
[src]
pub fn visible_parent_map(self, key: CrateNum) -> Lrc<DefIdMap<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?
pub fn missing_extern_crate_item(self, key: CrateNum) -> bool
[src]
pub fn missing_extern_crate_item(self, key: CrateNum) -> 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 used_crate_source(self, key: CrateNum) -> Lrc<CrateSource>
[src]
pub fn used_crate_source(self, key: CrateNum) -> Lrc<CrateSource>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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) -> Lrc<Vec<CrateNum>>
[src]
pub fn postorder_cnums(self, key: CrateNum) -> Lrc<Vec<CrateNum>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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<Lrc<Vec<Freevar>>>
[src]
pub fn freevars(self, key: DefId) -> Option<Lrc<Vec<Freevar>>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn maybe_unused_trait_import(self, key: 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 maybe_unused_extern_crates(
self,
key: CrateNum
) -> Lrc<Vec<(DefId, Span)>>
[src]
pub fn maybe_unused_extern_crates(
self,
key: CrateNum
) -> Lrc<Vec<(DefId, 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?
pub fn stability_index(self, key: CrateNum) -> Lrc<Index<'tcx>>
[src]
pub fn stability_index(self, key: CrateNum) -> Lrc<Index<'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 all_crate_nums(self, key: CrateNum) -> Lrc<Vec<CrateNum>>
[src]
pub fn all_crate_nums(self, key: CrateNum) -> Lrc<Vec<CrateNum>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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<(ExportedSymbol, SymbolExportLevel)>>
[src]
pub fn exported_symbols(
self,
key: CrateNum
) -> Arc<Vec<(ExportedSymbol, 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]
pub fn collect_and_partition_translation_items(
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 symbol_export_level(self, key: DefId) -> SymbolExportLevel
[src]
pub fn symbol_export_level(self, key: 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 is_translated_item(self, key: DefId) -> bool
[src]
pub fn is_translated_item(self, key: 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 codegen_unit(self, key: InternedString) -> Arc<CodegenUnit<'tcx>>
[src]
pub fn codegen_unit(self, key: InternedString) -> 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 compile_codegen_unit(self, key: InternedString) -> Stats
[src]
pub fn compile_codegen_unit(self, key: InternedString) -> Stats
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn output_filenames(self, key: CrateNum) -> Arc<OutputFilenames>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn erase_regions_ty(self, key: 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 normalize_projection_ty(
self,
key: CanonicalProjectionGoal<'tcx>
) -> Result<Lrc<Canonical<'tcx, QueryResult<'tcx, NormalizationResult<'tcx>>>>, NoSolution>
[src]
pub fn normalize_projection_ty(
self,
key: CanonicalProjectionGoal<'tcx>
) -> Result<Lrc<Canonical<'tcx, QueryResult<'tcx, NormalizationResult<'tcx>>>>, NoSolution>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Do not call this query directly: invoke normalize
instead.
pub fn normalize_ty_after_erasing_regions(
self,
key: ParamEnvAnd<'tcx, Ty<'tcx>>
) -> Ty<'tcx>
[src]
pub fn normalize_ty_after_erasing_regions(
self,
key: ParamEnvAnd<'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?
Do not call this query directly: invoke normalize_erasing_regions
instead.
pub fn dropck_outlives(
self,
key: CanonicalTyGoal<'tcx>
) -> Result<Lrc<Canonical<'tcx, QueryResult<'tcx, DropckOutlivesResult<'tcx>>>>, NoSolution>
[src]
pub fn dropck_outlives(
self,
key: CanonicalTyGoal<'tcx>
) -> Result<Lrc<Canonical<'tcx, QueryResult<'tcx, DropckOutlivesResult<'tcx>>>>, NoSolution>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Do not call this query directly: invoke infcx.at().dropck_outlives()
instead.
pub fn substitute_normalize_and_test_predicates(
self,
key: (DefId, &'tcx Substs<'tcx>)
) -> bool
[src]
pub fn substitute_normalize_and_test_predicates(
self,
key: (DefId, &'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 target_features_whitelist(self, key: CrateNum) -> Lrc<FxHashSet<String>>
[src]
pub fn target_features_whitelist(self, key: CrateNum) -> Lrc<FxHashSet<String>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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_def_size_estimate(self, key: InstanceDef<'tcx>) -> usize
[src]
pub fn instance_def_size_estimate(self, key: InstanceDef<'tcx>) -> 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?
pub fn features_query(self, key: CrateNum) -> Lrc<Features>
[src]
pub fn features_query(self, key: CrateNum) -> Lrc<Features>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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 program_clauses_for(self, key: DefId) -> Lrc<Vec<Clause<'tcx>>>
[src]
pub fn program_clauses_for(self, key: DefId) -> Lrc<Vec<Clause<'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 wasm_custom_sections(self, key: CrateNum) -> Lrc<Vec<DefId>>
[src]
pub fn wasm_custom_sections(self, key: CrateNum) -> Lrc<Vec<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?
pub fn wasm_import_module_map(
self,
key: CrateNum
) -> Lrc<FxHashMap<DefId, String>>
[src]
pub fn wasm_import_module_map(
self,
key: CrateNum
) -> Lrc<FxHashMap<DefId, String>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn outlives_components(&self, ty0: Ty<'tcx>) -> Vec<Component<'tcx>>
[src]
pub fn outlives_components(&self, ty0: Ty<'tcx>) -> Vec<Component<'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 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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn for_each_impl<F: FnMut(DefId)>(self, def_id: DefId, f: F)
[src]
pub fn for_each_impl<F: FnMut(DefId)>(self, def_id: DefId, 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?
pub fn for_each_relevant_impl<F: FnMut(DefId)>(
self,
def_id: DefId,
self_ty: Ty<'tcx>,
f: F
)
[src]
pub fn for_each_relevant_impl<F: FnMut(DefId)>(
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]
impl<'a, 'tcx> TyCtxt<'a, 'tcx, 'tcx>
pub fn type_id_hash(self, ty: Ty<'tcx>) -> u64
[src]
pub fn type_id_hash(self, ty: Ty<'tcx>) -> u64
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn has_error_field(self, ty: Ty<'tcx>) -> bool
[src]
pub fn has_error_field(self, ty: Ty<'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 positional_element_ty(
self,
ty: Ty<'tcx>,
i: usize,
variant: Option<DefId>
) -> Option<Ty<'tcx>>
[src]
pub fn positional_element_ty(
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]
pub fn named_element_ty(
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]
pub fn struct_tail(self, ty: 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?
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]
pub fn struct_lockstep_tails(
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]
pub fn required_region_bounds(
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]
pub fn calculate_dtor(
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]
pub fn destructor_constraints(self, def: &'tcx AdtDef) -> Vec<Kind<'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?
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 is_closure(self, def_id: DefId) -> bool
[src]
pub fn is_closure(self, 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 closure_base_def_id(self, def_id: DefId) -> DefId
[src]
pub fn closure_base_def_id(self, def_id: DefId) -> 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?
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]
pub fn closure_env_ty(
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]
pub fn empty_substs_for_def_id(self, item_def_id: 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?
Given the def-id of some item that has no type parameters, make a suitable "empty substs" for it.
pub fn is_static(&self, def_id: DefId) -> Option<Mutability>
[src]
pub fn is_static(&self, def_id: DefId) -> Option<Mutability>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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 whether the node pointed to by def_id is a static item, and its mutability
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn global_tcx(self) -> TyCtxt<'a, 'gcx, 'gcx>
[src]
pub fn global_tcx(self) -> TyCtxt<'a, 'gcx, '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?
Get the global TyCtxt.
pub fn alloc_generics(self, generics: Generics) -> &'gcx Generics
[src]
pub fn alloc_generics(self, generics: Generics) -> &'gcx Generics
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn alloc_steal_mir(self, mir: Mir<'gcx>) -> &'gcx Steal<Mir<'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_mir(self, mir: Mir<'gcx>) -> &'gcx Mir<'gcx>
[src]
pub fn alloc_mir(self, mir: Mir<'gcx>) -> &'gcx Mir<'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_tables(
self,
tables: TypeckTables<'gcx>
) -> &'gcx TypeckTables<'gcx>
[src]
pub fn alloc_tables(
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]
pub fn alloc_trait_def(self, def: TraitDef) -> &'gcx TraitDef
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn alloc_adt_def(
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]
pub fn alloc_byte_array(self, bytes: &[u8]) -> &'gcx [u8]
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn alloc_const_slice(
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]
pub fn alloc_name_const_slice(
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]
pub fn intern_const_alloc(self, alloc: Allocation) -> &'gcx Allocation
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]) -> AllocId
[src]
pub fn allocate_cached(self, bytes: &[u8]) -> AllocId
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn intern_stability(self, stab: Stability) -> &'gcx Stability
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn intern_layout(self, layout: LayoutDetails) -> &'gcx LayoutDetails
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn lift<T: ?Sized + Lift<'tcx>>(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?
pub fn lift_to_global<T: ?Sized + Lift<'gcx>>(
self,
value: &T
) -> Option<T::Lifted>
[src]
pub fn lift_to_global<T: ?Sized + Lift<'gcx>>(
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 AllArenas<'tcx>,
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]
pub fn create_and_enter<F, R>(
s: &'tcx Session,
cstore: &'tcx CrateStore,
local_providers: Providers<'tcx>,
extern_providers: Providers<'tcx>,
arenas: &'tcx AllArenas<'tcx>,
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]
pub fn consider_optimizing<T: Fn() -> String>(&self, msg: T) -> 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 lang_items(self) -> Lrc<LanguageItems>
[src]
pub fn lang_items(self) -> Lrc<LanguageItems>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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_binop_lang_item(&self, def_id: DefId) -> Option<(BinOp, bool)>
[src]
pub fn is_binop_lang_item(&self, def_id: DefId) -> Option<(BinOp, 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?
Due to missing llvm support for lowering 128 bit math to software emulation (on some targets), the lowering can be done in MIR.
This function only exists until said support is implemented.
pub fn stability(self) -> Lrc<Index<'tcx>>
[src]
pub fn stability(self) -> Lrc<Index<'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 crates(self) -> Lrc<Vec<CrateNum>>
[src]
pub fn crates(self) -> Lrc<Vec<CrateNum>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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 features(self) -> Lrc<Features>
[src]
pub fn features(self) -> Lrc<Features>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn def_key(self, id: DefId) -> DefKey
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn def_path(self, id: DefId) -> DefPath
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn def_path_hash(self, def_id: DefId) -> DefPathHash
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn def_path_debug_str(self, def_id: DefId) -> String
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn metadata_encoding_version(self) -> Vec<u8>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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) -> Lrc<Any>
[src]
pub fn crate_data_as_rc_any(self, cnum: CrateNum) -> Lrc<Any>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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<'a>
[src]
pub fn create_stable_hashing_context(self) -> StableHashingContext<'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 allocate_metadata_dep_nodes(self)
[src]
pub fn allocate_metadata_dep_nodes(self)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn precompute_in_scope_traits_hashes(self)
[src]
pub fn precompute_in_scope_traits_hashes(self)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn serialize_query_result_cache<E>(
self,
encoder: &mut E
) -> Result<(), E::Error> where
E: TyEncoder,
[src]
pub fn serialize_query_result_cache<E>(
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?
pub fn nll(self) -> bool
[src]
pub fn nll(self) -> 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?
If true, we should use NLL-style region checking instead of lexical style.
pub fn use_mir(self) -> bool
[src]
pub fn use_mir(self) -> 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?
If true, we should use the MIR-based borrowck (we may also use the AST-based borrowck).
pub fn two_phase_borrows(self) -> bool
[src]
pub fn two_phase_borrows(self) -> 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?
If true, we should enable two-phase borrows checks. This is
done with either -Ztwo-phase-borrows
or with
#![feature(nll)]
.
pub fn borrowck_mode(&self) -> BorrowckMode
[src]
pub fn borrowck_mode(&self) -> BorrowckMode
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
What mode(s) of borrowck should we run? AST? MIR? both?
(Also considers the #![feature(nll)]
setting.)
pub fn emit_end_regions(self) -> bool
[src]
pub fn emit_end_regions(self) -> 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?
Should we emit EndRegion MIR statements? These are consumed by MIR borrowck, but not when NLL is used. They are also consumed by the validation stuff.
impl<'a, 'tcx> TyCtxt<'a, 'tcx, 'tcx>
[src]
impl<'a, 'tcx> TyCtxt<'a, 'tcx, 'tcx>
pub fn encode_metadata(self, link_meta: &LinkMeta) -> EncodedMetadata
[src]
pub fn encode_metadata(self, link_meta: &LinkMeta) -> 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]
impl<'a, 'tcx> TyCtxt<'a, 'tcx, 'tcx>
pub fn print_debug_stats(self)
[src]
pub fn print_debug_stats(self)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn mk_region(self, v: RegionKind) -> &'tcx RegionKind
[src]
pub fn mk_region(self, v: RegionKind) -> &'tcx RegionKind
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn mk_const(self, v: Const<'tcx>) -> &'tcx Const<'tcx>
[src]
pub fn mk_const(self, v: Const<'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?
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn _intern_existential_predicates(
self,
v: &[ExistentialPredicate<'tcx>]
) -> &'tcx Slice<ExistentialPredicate<'tcx>>
[src]
pub fn _intern_existential_predicates(
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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn _intern_predicates(
self,
v: &[Predicate<'tcx>]
) -> &'tcx Slice<Predicate<'tcx>>
[src]
pub fn _intern_predicates(
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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn _intern_type_list(self, v: &[Ty<'tcx>]) -> &'tcx Slice<Ty<'tcx>>
[src]
pub fn _intern_type_list(self, v: &[Ty<'tcx>]) -> &'tcx Slice<Ty<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn _intern_substs(self, v: &[Kind<'tcx>]) -> &'tcx Slice<Kind<'tcx>>
[src]
pub fn _intern_substs(self, v: &[Kind<'tcx>]) -> &'tcx Slice<Kind<'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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn _intern_canonical_var_infos(
self,
v: &[CanonicalVarInfo]
) -> &'tcx Slice<CanonicalVarInfo>
[src]
pub fn _intern_canonical_var_infos(
self,
v: &[CanonicalVarInfo]
) -> &'tcx Slice<CanonicalVarInfo>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn safe_to_unsafe_fn_ty(self, sig: PolyFnSig<'tcx>) -> Ty<'tcx>
[src]
pub fn safe_to_unsafe_fn_ty(self, sig: PolyFnSig<'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?
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]
pub fn coerce_closure_fn_ty(self, sig: PolyFnSig<'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?
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]
pub fn mk_ty(self, st: TypeVariants<'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_mach_int(self, tm: IntTy) -> Ty<'tcx>
[src]
pub fn mk_mach_int(self, tm: IntTy) -> 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_mach_uint(self, tm: UintTy) -> Ty<'tcx>
[src]
pub fn mk_mach_uint(self, tm: UintTy) -> 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_mach_float(self, tm: FloatTy) -> Ty<'tcx>
[src]
pub fn mk_mach_float(self, tm: FloatTy) -> 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_str(self) -> Ty<'tcx>
[src]
pub fn mk_str(self) -> 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_static_str(self) -> Ty<'tcx>
[src]
pub fn mk_static_str(self) -> 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_adt(self, def: &'tcx AdtDef, substs: &'tcx Substs<'tcx>) -> Ty<'tcx>
[src]
pub fn mk_adt(self, def: &'tcx AdtDef, 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_foreign(self, def_id: DefId) -> Ty<'tcx>
[src]
pub fn mk_foreign(self, def_id: DefId) -> 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_box(self, ty: Ty<'tcx>) -> Ty<'tcx>
[src]
pub fn mk_box(self, ty: 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 mk_ptr(self, tm: TypeAndMut<'tcx>) -> Ty<'tcx>
[src]
pub fn mk_ptr(self, tm: TypeAndMut<'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_ref(self, r: Region<'tcx>, tm: TypeAndMut<'tcx>) -> Ty<'tcx>
[src]
pub fn mk_ref(self, r: Region<'tcx>, tm: TypeAndMut<'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_mut_ref(self, r: Region<'tcx>, ty: Ty<'tcx>) -> Ty<'tcx>
[src]
pub fn mk_mut_ref(self, r: Region<'tcx>, ty: 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 mk_imm_ref(self, r: Region<'tcx>, ty: Ty<'tcx>) -> Ty<'tcx>
[src]
pub fn mk_imm_ref(self, r: Region<'tcx>, ty: 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 mk_mut_ptr(self, ty: Ty<'tcx>) -> Ty<'tcx>
[src]
pub fn mk_mut_ptr(self, ty: 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 mk_imm_ptr(self, ty: Ty<'tcx>) -> Ty<'tcx>
[src]
pub fn mk_imm_ptr(self, ty: 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 mk_nil_ptr(self) -> Ty<'tcx>
[src]
pub fn mk_nil_ptr(self) -> 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_array(self, ty: Ty<'tcx>, n: u64) -> Ty<'tcx>
[src]
pub fn mk_array(self, ty: Ty<'tcx>, n: u64) -> 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_slice(self, ty: Ty<'tcx>) -> Ty<'tcx>
[src]
pub fn mk_slice(self, ty: 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 intern_tup(self, ts: &[Ty<'tcx>]) -> Ty<'tcx>
[src]
pub fn intern_tup(self, ts: &[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 mk_tup<I: InternAs<[Ty<'tcx>], Ty<'tcx>>>(self, iter: I) -> I::Output
[src]
pub fn mk_tup<I: InternAs<[Ty<'tcx>], Ty<'tcx>>>(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_nil(self) -> Ty<'tcx>
[src]
pub fn mk_nil(self) -> 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_diverging_default(self) -> Ty<'tcx>
[src]
pub fn mk_diverging_default(self) -> 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_bool(self) -> Ty<'tcx>
[src]
pub fn mk_bool(self) -> 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_fn_def(self, def_id: DefId, substs: &'tcx Substs<'tcx>) -> Ty<'tcx>
[src]
pub fn mk_fn_def(self, 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_fn_ptr(self, fty: PolyFnSig<'tcx>) -> Ty<'tcx>
[src]
pub fn mk_fn_ptr(self, fty: PolyFnSig<'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_dynamic(
self,
obj: Binder<&'tcx Slice<ExistentialPredicate<'tcx>>>,
reg: Region<'tcx>
) -> Ty<'tcx>
[src]
pub fn mk_dynamic(
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]
pub fn mk_projection(
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]
pub fn mk_closure(
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]
pub fn mk_closure_from_closure_substs(
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]
pub fn mk_generator(
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_generator_witness(
self,
types: Binder<&'tcx Slice<Ty<'tcx>>>
) -> Ty<'tcx>
[src]
pub fn mk_generator_witness(
self,
types: Binder<&'tcx Slice<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 mk_var(self, v: TyVid) -> Ty<'tcx>
[src]
pub fn mk_var(self, v: TyVid) -> 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_int_var(self, v: IntVid) -> Ty<'tcx>
[src]
pub fn mk_int_var(self, v: IntVid) -> 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_float_var(self, v: FloatVid) -> Ty<'tcx>
[src]
pub fn mk_float_var(self, v: FloatVid) -> 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_infer(self, it: InferTy) -> Ty<'tcx>
[src]
pub fn mk_infer(self, it: InferTy) -> 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_param(self, index: u32, name: InternedString) -> Ty<'tcx>
[src]
pub fn mk_param(self, index: u32, name: InternedString) -> 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_self_type(self) -> Ty<'tcx>
[src]
pub fn mk_self_type(self) -> 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_param_from_def(self, def: &TypeParameterDef) -> Ty<'tcx>
[src]
pub fn mk_param_from_def(self, def: &TypeParameterDef) -> 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_anon(self, def_id: DefId, substs: &'tcx Substs<'tcx>) -> Ty<'tcx>
[src]
pub fn mk_anon(self, 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 intern_existential_predicates(
self,
eps: &[ExistentialPredicate<'tcx>]
) -> &'tcx Slice<ExistentialPredicate<'tcx>>
[src]
pub fn intern_existential_predicates(
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]
pub fn intern_predicates(
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]
pub fn intern_type_list(self, ts: &[Ty<'tcx>]) -> &'tcx Slice<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 intern_substs(self, ts: &[Kind<'tcx>]) -> &'tcx Slice<Kind<'tcx>>
[src]
pub fn intern_substs(self, ts: &[Kind<'tcx>]) -> &'tcx Slice<Kind<'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_canonical_var_infos(
self,
ts: &[CanonicalVarInfo]
) -> CanonicalVarInfos<'gcx>
[src]
pub fn intern_canonical_var_infos(
self,
ts: &[CanonicalVarInfo]
) -> CanonicalVarInfos<'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 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]
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>>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn mk_existential_predicates<I: InternAs<[ExistentialPredicate<'tcx>], &'tcx Slice<ExistentialPredicate<'tcx>>>>(
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]
pub fn mk_predicates<I: InternAs<[Predicate<'tcx>], &'tcx Slice<Predicate<'tcx>>>>(
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]
pub fn mk_type_list<I: InternAs<[Ty<'tcx>], &'tcx Slice<Ty<'tcx>>>>(
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]
pub fn mk_substs<I: InternAs<[Kind<'tcx>], &'tcx Slice<Kind<'tcx>>>>(
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]
pub fn mk_substs_trait(self, s: Ty<'tcx>, t: &[Ty<'tcx>]) -> &'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 lint_node<S: Into<MultiSpan>>(
self,
lint: &'static Lint,
id: NodeId,
span: S,
msg: &str
)
[src]
pub fn lint_node<S: Into<MultiSpan>>(
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]
pub fn lint_node_note<S: Into<MultiSpan>>(
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]
pub fn lint_level_at_node(
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]
pub fn struct_span_lint_node<S: Into<MultiSpan>>(
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]
pub fn struct_lint_node(
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<Lrc<StableVec<TraitCandidate>>>
[src]
pub fn in_scope_traits(
self,
id: HirId
) -> Option<Lrc<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 named_region(self, id: HirId) -> Option<Region>
[src]
pub fn named_region(self, id: HirId) -> Option<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(self, id: HirId) -> bool
[src]
pub fn is_late_bound(self, id: HirId) -> 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 object_lifetime_defaults(
self,
id: HirId
) -> Option<Lrc<Vec<ObjectLifetimeDefault>>>
[src]
pub fn object_lifetime_defaults(
self,
id: HirId
) -> Option<Lrc<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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn body_tables(self, body: BodyId) -> &'gcx TypeckTables<'gcx>
[src]
pub fn body_tables(self, body: BodyId) -> &'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 body_owners(
self
) -> impl Iterator<Item = DefId> + Captures<'tcx> + Captures<'gcx> + 'a
[src]
pub fn body_owners(
self
) -> impl Iterator<Item = DefId> + Captures<'tcx> + Captures<'gcx> + '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?
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]
pub fn expr_span(self, id: NodeId) -> 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?
pub fn provided_trait_methods(self, id: DefId) -> Vec<AssociatedItem>
[src]
pub fn provided_trait_methods(self, id: DefId) -> Vec<AssociatedItem>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn trait_relevant_for_never(self, did: 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 opt_associated_item(self, def_id: DefId) -> Option<AssociatedItem>
[src]
pub fn opt_associated_item(self, def_id: DefId) -> Option<AssociatedItem>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn associated_items(
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]
pub fn impls_are_allowed_to_overlap(
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]
pub fn expect_variant_def(self, def: Def) -> &'tcx VariantDef
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn adt_def_id_of_variant(self, variant_def: &'tcx VariantDef) -> 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?
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]
pub fn item_name(self, id: DefId) -> InternedString
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn instance_mir(self, instance: InstanceDef<'gcx>) -> &'gcx Mir<'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?
Return the possibly-auto-generated MIR of a (DefId, Subst) pair.
pub fn maybe_optimized_mir(self, did: DefId) -> Option<&'gcx Mir<'gcx>>
[src]
pub fn maybe_optimized_mir(self, did: DefId) -> Option<&'gcx Mir<'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?
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]
pub fn get_attrs(self, did: DefId) -> Attributes<'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?
Get the attributes of a definition.
pub fn has_attr(self, did: DefId, attr: &str) -> bool
[src]
pub fn has_attr(self, did: DefId, attr: &str) -> 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?
Determine whether an item is annotated with an attribute
pub fn trait_is_auto(self, trait_def_id: DefId) -> bool
[src]
pub fn trait_is_auto(self, trait_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?
Returns true if this is an auto trait
.
pub fn generator_layout(self, def_id: DefId) -> &'tcx GeneratorLayout<'tcx>
[src]
pub fn generator_layout(self, def_id: DefId) -> &'tcx GeneratorLayout<'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_id_of_impl(self, def_id: DefId) -> Option<DefId>
[src]
pub fn trait_id_of_impl(self, def_id: DefId) -> Option<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?
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]
pub fn impl_of_method(self, def_id: DefId) -> Option<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?
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]
pub fn span_of_impl(self, impl_did: DefId) -> Result<Span, Symbol>
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
pub fn hygienic_eq(
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]
pub fn adjust(self, name: Name, 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?
pub fn adjust_ident(
self,
ident: Ident,
scope: DefId,
block: NodeId
) -> (Ident, DefId)
[src]
pub fn adjust_ident(
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]
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx>
pub fn with_freevars<T, F>(self, fid: NodeId, f: F) -> T where
F: FnOnce(&[Freevar]) -> T,
[src]
pub fn with_freevars<T, F>(self, fid: NodeId, f: F) -> T where
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]
impl<'a, 'gcx, 'tcx> DepGraphSafe for TyCtxt<'a, 'gcx, 'tcx>
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<'a> for TyCtxt<'a, 'gcx, 'lcx>
[src]
impl<'a, 'gcx, 'lcx> StableHashingContextProvider<'a> for TyCtxt<'a, 'gcx, 'lcx>
fn get_stable_hashing_context(&self) -> StableHashingContext<'a>
[src]
fn get_stable_hashing_context(&self) -> StableHashingContext<'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?
impl<'a, 'gcx, 'tcx> HasDataLayout for TyCtxt<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> HasDataLayout for TyCtxt<'a, 'gcx, 'tcx>
fn data_layout(&self) -> &TargetDataLayout
[src]
fn data_layout(&self) -> &TargetDataLayout
🔬 This is a nightly-only experimental API. (rustc_private
)
this 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]
impl<'a, 'gcx, 'tcx> HasTyCtxt<'gcx> for TyCtxt<'a, 'gcx, 'tcx>
fn tcx<'b>(&'b self) -> TyCtxt<'b, 'gcx, 'gcx>
[src]
fn tcx<'b>(&'b self) -> TyCtxt<'b, 'gcx, '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?
impl<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> Copy for TyCtxt<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> Copy for TyCtxt<'a, 'gcx, 'tcx>
impl<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> Clone for TyCtxt<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> Clone for TyCtxt<'a, 'gcx, 'tcx>
fn clone(&self) -> TyCtxt<'a, 'gcx, 'tcx>
[src]
fn clone(&self) -> TyCtxt<'a, 'gcx, 'tcx>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'a, 'gcx, 'tcx> Deref for TyCtxt<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> Deref for TyCtxt<'a, 'gcx, 'tcx>
type Target = &'a GlobalCtxt<'gcx>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
fn deref(&self) -> &Self::Target
Dereferences the value.
impl<'a, 'gcx, 'tcx> DefIdTree for TyCtxt<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> DefIdTree for TyCtxt<'a, 'gcx, 'tcx>
fn parent(self, id: DefId) -> Option<DefId>
[src]
fn parent(self, id: DefId) -> Option<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?
fn is_descendant_of(self, descendant: DefId, ancestor: DefId) -> bool
[src]
fn is_descendant_of(self, descendant: DefId, ancestor: 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?