#[repr(transparent)]pub struct RevealedTy<'tcx>(Ty<'tcx>);Expand description
A type which has gone through cx.reveal_opaque_ty, i.e. if it was opaque it was replaced by
the hidden type if allowed in the current body. This ensures we consistently inspect the hidden
types when we should.
Use .inner() or deref to get to the Ty<'tcx>.
Tuple Fields§
§0: Ty<'tcx>Implementations§
Methods from Deref<Target = Ty<'tcx>>§
pub fn sort_string(self, tcx: TyCtxt<'tcx>) -> Cow<'static, str>
pub fn prefix_string(self, tcx: TyCtxt<'_>) -> Cow<'static, str>
pub fn inhabited_predicate(self, tcx: TyCtxt<'tcx>) -> InhabitedPredicate<'tcx>
Sourcepub fn is_inhabited_from(
self,
tcx: TyCtxt<'tcx>,
module: LocalModId,
typing_env: TypingEnv<'tcx>,
) -> bool
pub fn is_inhabited_from( self, tcx: TyCtxt<'tcx>, module: LocalModId, typing_env: TypingEnv<'tcx>, ) -> bool
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 {
use super::Void;
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.
Sourcepub fn is_privately_uninhabited(
self,
tcx: TyCtxt<'tcx>,
typing_env: TypingEnv<'tcx>,
) -> bool
pub fn is_privately_uninhabited( self, tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>, ) -> bool
Returns true if the type is uninhabited without regard to visibility.
This is still conservative; for instance, a #[non_exhaustive] enum in another crate
is always considered inhabited.
Sourcepub fn is_opsem_inhabited(
self,
tcx: TyCtxt<'tcx>,
typing_env: TypingEnv<'tcx>,
) -> bool
pub fn is_opsem_inhabited( self, tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>, ) -> bool
Returns whether self is considered inhabited on the opsem level, i.e., its validity
invariant might be satisfiable. self is expected to be monomorphic and normalized.
Key constraints are:
- if a type’s validity invariant is satisfiable, it must be opsem-inhabited.
- if a type’s layout is marked uninhabited, it must be opsem-uninhabited.
Beyond that, the value returned by this function is not a stable guarantee.
pub fn kind(self) -> &'tcx TyKind<TyCtxt<'tcx>>
pub fn is_unit(self) -> bool
Sourcepub fn is_usize_like(self) -> bool
pub fn is_usize_like(self) -> bool
Check if type is an usize or an integral type variable.
pub fn is_never(self) -> bool
pub fn is_primitive(self) -> bool
pub fn is_adt(self) -> bool
pub fn is_self_param(self) -> bool
pub fn is_ref(self) -> bool
pub fn is_ty_var(self) -> bool
pub fn ty_vid(self) -> Option<TyVid>
pub fn float_vid(self) -> Option<FloatVid>
pub fn is_ty_or_numeric_infer(self) -> bool
pub fn is_phantom_data(self) -> bool
pub fn is_unsafe_cell(self) -> bool
pub fn is_bool(self) -> bool
Sourcepub fn is_imm_ref_str(self) -> bool
pub fn is_imm_ref_str(self) -> bool
Returns true if this type is &str. The reference’s lifetime is ignored.
pub fn is_param(self, index: u32) -> bool
pub fn is_slice(self) -> bool
pub fn is_array_slice(self) -> bool
pub fn is_array(self) -> bool
pub fn is_simd(self) -> bool
pub fn is_scalable_vector(self) -> bool
pub fn sequence_element_type(self, tcx: TyCtxt<'tcx>) -> Ty<'tcx>
pub fn scalable_vector_parts( self, tcx: TyCtxt<'tcx>, ) -> Option<(u16, Ty<'tcx>, NumScalableVectors)>
pub fn simd_size_and_type(self, tcx: TyCtxt<'tcx>) -> (u64, Ty<'tcx>)
pub fn is_mutable_ptr(self) -> bool
Sourcepub fn ref_mutability(self) -> Option<Mutability>
pub fn ref_mutability(self) -> Option<Mutability>
Get the mutability of the reference or None when not a reference
pub fn is_raw_ptr(self) -> bool
Sourcepub fn is_any_ptr(self) -> bool
pub fn is_any_ptr(self) -> bool
Tests if this is any kind of primitive pointer type (reference, raw pointer, fn pointer).
Box is not considered a pointer here!
pub fn is_box(self) -> bool
Sourcepub fn is_box_global(self, tcx: TyCtxt<'tcx>) -> bool
pub fn is_box_global(self, tcx: TyCtxt<'tcx>) -> bool
Tests whether this is a Box definitely using the global allocator.
If the allocator is still generic, the answer is false, but it may
later turn out that it does use the global allocator.
pub fn boxed_ty(self) -> Option<Ty<'tcx>>
pub fn pinned_ty(self) -> Option<Ty<'tcx>>
Sourcepub fn maybe_pinned_ref(
self,
) -> Option<(Ty<'tcx>, Pinnedness, Mutability, Region<TyCtxt<'tcx>>)>
pub fn maybe_pinned_ref( self, ) -> Option<(Ty<'tcx>, Pinnedness, Mutability, Region<TyCtxt<'tcx>>)>
Returns the type, pinnedness, mutability, and the region of a reference (&T or &mut T)
or a pinned-reference type (Pin<&T> or Pin<&mut T>).
Regarding the pin_ergonomics feature, one of the goals is to make pinned references
(Pin<&T> and Pin<&mut T>) behaves similar to normal references (&T and &mut T).
This function is useful when references and pinned references are processed similarly.
Sourcepub fn expect_boxed_ty(self) -> Ty<'tcx>
pub fn expect_boxed_ty(self) -> Ty<'tcx>
Panics if called on any type other than Box<T>.
Sourcepub fn is_scalar(self) -> bool
pub fn is_scalar(self) -> bool
A scalar type is one that denotes an atomic datum, with no sub-components. (A RawPtr is scalar because it represents a non-managed pointer, so its contents are abstract to rustc.)
Sourcepub fn is_floating_point(self) -> bool
pub fn is_floating_point(self) -> bool
Returns true if this type is a floating point type.
pub fn is_trait(self) -> bool
pub fn is_enum(self) -> bool
pub fn is_union(self) -> bool
pub fn is_closure(self) -> bool
pub fn is_coroutine(self) -> bool
pub fn is_coroutine_closure(self) -> bool
pub fn is_integral(self) -> bool
pub fn is_fresh_ty(self) -> bool
pub fn is_fresh(self) -> bool
pub fn is_char(self) -> bool
pub fn is_numeric(self) -> bool
pub fn is_signed(self) -> bool
pub fn is_ptr_sized_integral(self) -> bool
pub fn has_concrete_skeleton(self) -> bool
Sourcepub fn contains(self, other: Ty<'tcx>) -> bool
pub fn contains(self, other: Ty<'tcx>) -> bool
Checks whether a type recursively contains another type
Example: Option<()> contains ()
Sourcepub fn contains_closure(self) -> bool
pub fn contains_closure(self) -> bool
Checks whether a type recursively contains any closure
Example: Option<{closure@file.rs:4:20}> returns true
Sourcepub fn find_async_drop_impl_coroutine<F>(
self,
tcx: TyCtxt<'tcx>,
f: F,
) -> Ty<'tcx>
pub fn find_async_drop_impl_coroutine<F>( self, tcx: TyCtxt<'tcx>, f: F, ) -> Ty<'tcx>
Returns the deepest async_drop_in_place::{closure} implementation.
async_drop_in_place<T>::{closure}, when T is a coroutine, is a proxy-impl
to call async drop poll from impl coroutine.
Sourcepub fn builtin_deref(self, explicit: bool) -> Option<Ty<'tcx>>
pub fn builtin_deref(self, explicit: bool) -> Option<Ty<'tcx>>
Returns the type of *ty.
The parameter explicit indicates if this is an explicit dereference.
Some types – notably raw ptrs – can only be dereferenced explicitly.
Sourcepub fn builtin_index(self) -> Option<Ty<'tcx>>
pub fn builtin_index(self) -> Option<Ty<'tcx>>
Returns the type of ty[i].
pub fn fn_sig( self, tcx: TyCtxt<'tcx>, ) -> Binder<TyCtxt<'tcx>, FnSig<TyCtxt<'tcx>>>
pub fn unnormalized_fn_sig( self, tcx: TyCtxt<'tcx>, ) -> Unnormalized<TyCtxt<'tcx>, Binder<TyCtxt<'tcx>, FnSig<TyCtxt<'tcx>>>>
pub fn is_fn(self) -> bool
pub fn is_fn_ptr(self) -> bool
pub fn is_opaque(self) -> bool
pub fn ty_adt_def(self) -> Option<AdtDef<'tcx>>
Sourcepub fn tuple_fields(self) -> &'tcx RawList<(), Ty<'tcx>>
pub fn tuple_fields(self) -> &'tcx RawList<(), Ty<'tcx>>
Returns a list of tuple type arguments.
Panics when called on anything but a tuple.
Sourcepub fn opt_tuple_fields(self) -> Option<&'tcx RawList<(), Ty<'tcx>>>
pub fn opt_tuple_fields(self) -> Option<&'tcx RawList<(), Ty<'tcx>>>
Returns a list of tuple type arguments, or None if self isn’t a tuple.
Sourcepub fn variant_range(self, tcx: TyCtxt<'tcx>) -> Option<Range<VariantIdx>>
pub fn variant_range(self, tcx: TyCtxt<'tcx>) -> Option<Range<VariantIdx>>
If the type contains variants, returns the valid range of variant indices.
Sourcepub fn discriminant_for_variant(
self,
tcx: TyCtxt<'tcx>,
variant_index: VariantIdx,
) -> Option<Discr<'tcx>>
pub fn discriminant_for_variant( self, tcx: TyCtxt<'tcx>, variant_index: VariantIdx, ) -> Option<Discr<'tcx>>
If the type contains variants, returns the variant for variant_index.
Panics if variant_index is out of range.
Sourcepub fn discriminant_ty(self, tcx: TyCtxt<'tcx>) -> Ty<'tcx>
pub fn discriminant_ty(self, tcx: TyCtxt<'tcx>) -> Ty<'tcx>
Returns the type of the discriminant of this type.
Sourcepub fn ptr_metadata_ty_or_tail(
self,
tcx: TyCtxt<'tcx>,
normalize: impl FnMut(Unnormalized<TyCtxt<'tcx>, Ty<'tcx>>) -> Ty<'tcx>,
) -> Result<Ty<'tcx>, Ty<'tcx>>
pub fn ptr_metadata_ty_or_tail( self, tcx: TyCtxt<'tcx>, normalize: impl FnMut(Unnormalized<TyCtxt<'tcx>, Ty<'tcx>>) -> Ty<'tcx>, ) -> Result<Ty<'tcx>, Ty<'tcx>>
Returns the type of metadata for (potentially wide) pointers to this type, or the struct tail if the metadata type cannot be determined.
Sourcepub fn ptr_metadata_ty(
self,
tcx: TyCtxt<'tcx>,
normalize: impl FnMut(Unnormalized<TyCtxt<'tcx>, Ty<'tcx>>) -> Ty<'tcx>,
) -> Ty<'tcx>
pub fn ptr_metadata_ty( self, tcx: TyCtxt<'tcx>, normalize: impl FnMut(Unnormalized<TyCtxt<'tcx>, Ty<'tcx>>) -> Ty<'tcx>, ) -> Ty<'tcx>
Returns the type of metadata for (potentially wide) pointers to this type. Causes an ICE if the metadata type cannot be determined.
Sourcepub fn pointee_metadata_ty_or_projection(self, tcx: TyCtxt<'tcx>) -> Ty<'tcx>
pub fn pointee_metadata_ty_or_projection(self, tcx: TyCtxt<'tcx>) -> Ty<'tcx>
Given a pointer or reference type, returns the type of the pointee’s
metadata. If it can’t be determined exactly (perhaps due to still
being generic) then a projection through ptr::Pointee will be returned.
This is particularly useful for getting the type of the result of
UnOp::PtrMetadata.
Panics if self is not dereferenceable.
Sourcepub fn to_opt_closure_kind(self) -> Option<ClosureKind>
pub fn to_opt_closure_kind(self) -> Option<ClosureKind>
When we create a closure, we record its kind (i.e., what trait
it implements, constrained by how it uses its borrows) into its
ty::ClosureArgs or ty::CoroutineClosureArgs using a type
parameter. This is kind of a phantom type, except that the
most convenient thing for us to are the integral types. This
function converts such a special type into the closure
kind. To go the other way, use Ty::from_closure_kind.
Note that during type checking, we use an inference variable
to represent the closure kind, because it has not yet been
inferred. Once upvar inference (in rustc_hir_analysis/src/check/upvar.rs)
is complete, that type variable will be unified with one of
the integral types.
if let TyKind::Closure(def_id, args) = closure_ty.kind()
&& let Some(closure_kind) = args.as_closure().kind_ty().to_opt_closure_kind()
{
println!("{closure_kind:?}");
} else if let TyKind::CoroutineClosure(def_id, args) = closure_ty.kind()
&& let Some(closure_kind) = args.as_coroutine_closure().kind_ty().to_opt_closure_kind()
{
println!("{closure_kind:?}");
}After upvar analysis, you should instead use ty::ClosureArgs::kind()
or ty::CoroutineClosureArgs::kind() to assert that the ClosureKind
has been constrained instead of manually calling this method.
if let TyKind::Closure(def_id, args) = closure_ty.kind()
{
println!("{:?}", args.as_closure().kind());
} else if let TyKind::CoroutineClosure(def_id, args) = closure_ty.kind()
{
println!("{:?}", args.as_coroutine_closure().kind());
}Sourcepub fn has_trivial_sizedness(
self,
tcx: TyCtxt<'tcx>,
sizedness: SizedTraitKind,
) -> bool
pub fn has_trivial_sizedness( self, tcx: TyCtxt<'tcx>, sizedness: SizedTraitKind, ) -> bool
Fast path helper for testing if a type is Sized or MetaSized.
Returning true means the type is known to implement the sizedness trait. Returning false
means nothing – could be sized, might not be.
Note that we could never rely on the fact that a type such as [_] is trivially !Sized
because we could be in a type environment with a bound such as [_]: Copy. A function with
such a bound obviously never can be called, but that doesn’t mean it shouldn’t typecheck.
This is why this method doesn’t return Option<bool>.
Sourcepub fn is_trivially_pure_clone_copy(self) -> bool
pub fn is_trivially_pure_clone_copy(self) -> bool
Fast path helper for primitives which are always Copy and which
have a side-effect-free Clone impl.
Returning true means the type is known to be pure and Copy+Clone.
Returning false means nothing – could be Copy, might not be.
This is mostly useful for optimizations, as these are the types on which we can replace cloning with dereferencing.
pub fn is_trivially_wf(self, tcx: TyCtxt<'tcx>) -> bool
Sourcepub fn primitive_symbol(self) -> Option<Symbol>
pub fn primitive_symbol(self) -> Option<Symbol>
If self is a primitive, return its Symbol.
pub fn is_c_void(self, tcx: TyCtxt<'_>) -> bool
pub fn is_async_drop_in_place_coroutine(self, tcx: TyCtxt<'_>) -> bool
Sourcepub fn is_known_rigid(self) -> bool
pub fn is_known_rigid(self) -> bool
Returns true when the outermost type cannot be further normalized,
resolved, or instantiated. This includes all primitive types, but also
things like ADTs and trait objects, since even if their arguments or
nested types may be further simplified, the outermost TyKind or
type constructor remains the same.
Sourcepub fn walk(self) -> TypeWalker<TyCtxt<'tcx>> ⓘ
pub fn walk(self) -> TypeWalker<TyCtxt<'tcx>> ⓘ
Iterator that walks self and any types reachable from
self, in depth-first order. Note that just walks the types
that appear in self, it does not descend into the fields of
structs or variants. For example:
isize => { isize }
Foo<Bar<isize>> => { Foo<Bar<isize>>, Bar<isize>, isize }
[isize] => { [isize], isize }Sourcepub fn is_like_maybe_dangling(self) -> bool
pub fn is_like_maybe_dangling(self) -> bool
Returns true if this is a MaybeDangling<T>-like type, i.e., a type whose inner
references are not required to be dereferenceable and are not reborrowed.
Sourcepub fn primitive_size(self, tcx: TyCtxt<'tcx>) -> Size
pub fn primitive_size(self, tcx: TyCtxt<'tcx>) -> Size
Returns the Size for primitive types (bool, uint, int, char, float).
pub fn int_size_and_signed(self, tcx: TyCtxt<'tcx>) -> (Size, bool)
Sourcepub fn numeric_min_and_max_as_bits(
self,
tcx: TyCtxt<'tcx>,
) -> Option<(u128, u128)>
pub fn numeric_min_and_max_as_bits( self, tcx: TyCtxt<'tcx>, ) -> Option<(u128, u128)>
Returns the minimum and maximum values for the given numeric type (including chars) or
returns None if the type is not numeric.
Sourcepub fn numeric_max_val(self, tcx: TyCtxt<'tcx>) -> Option<Const<'tcx>>
pub fn numeric_max_val(self, tcx: TyCtxt<'tcx>) -> Option<Const<'tcx>>
Returns the maximum value for the given numeric type (including chars)
or returns None if the type is not numeric.
Sourcepub fn numeric_min_val(self, tcx: TyCtxt<'tcx>) -> Option<Const<'tcx>>
pub fn numeric_min_val(self, tcx: TyCtxt<'tcx>) -> Option<Const<'tcx>>
Returns the minimum value for the given numeric type (including chars)
or returns None if the type is not numeric.
Sourcepub fn is_sized(self, tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>) -> bool
pub fn is_sized(self, tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>) -> bool
Checks whether values of this type T have a size known at
compile time (i.e., whether T: Sized). Lifetimes are ignored
for the purposes of this check, so it can be an
over-approximation in generic contexts, where one can have
strange rules like <T as Foo<'static>>::Bar: Sized that
actually carry lifetime requirements.
Sourcepub fn is_freeze(self, tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>) -> bool
pub fn is_freeze(self, tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>) -> bool
Checks whether values of this type T implement the Freeze
trait – frozen types are those that do not contain an
UnsafeCell anywhere. This is a language concept used to
distinguish “true immutability”, which is relevant to
optimization as well as the rules around static values. Note
that the Freeze trait is not exposed to end users and is
effectively an implementation detail.
Sourcepub fn is_trivially_freeze(self) -> bool
pub fn is_trivially_freeze(self) -> bool
Fast path helper for testing if a type is Freeze.
Returning true means the type is known to be Freeze. Returning
false means nothing – could be Freeze, might not be.
Sourcepub fn is_unsafe_unpin(
self,
tcx: TyCtxt<'tcx>,
typing_env: TypingEnv<'tcx>,
) -> bool
pub fn is_unsafe_unpin( self, tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>, ) -> bool
Checks whether values of this type T implement the UnsafeUnpin trait.
Sourcepub fn is_unpin(self, tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>) -> bool
pub fn is_unpin(self, tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>) -> bool
Checks whether values of this type T implement the Unpin trait.
Note that this is a safe trait, so it cannot be very semantically meaningful.
However, as a hack to mitigate https://github.com/rust-lang/rust/issues/63818 until a
proper solution is implemented, we do give special semantics to the Unpin trait.
Sourcepub fn has_unsafe_fields(self) -> bool
pub fn has_unsafe_fields(self) -> bool
Checks whether this type is an ADT that has unsafe fields.
Sourcepub fn is_async_drop(
self,
tcx: TyCtxt<'tcx>,
typing_env: TypingEnv<'tcx>,
) -> bool
pub fn is_async_drop( self, tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>, ) -> bool
Checks whether values of this type T implement the AsyncDrop trait.
Sourcepub fn needs_drop(self, tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>) -> bool
pub fn needs_drop(self, tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>) -> bool
If ty.needs_drop(...) returns true, then ty is definitely
non-copy and might have a destructor attached; if it returns
false, then ty definitely has no destructor (i.e., no drop glue).
(Note that this implies that if ty has a destructor attached,
then needs_drop will definitely return true for ty.)
Note that this method is used to check eligible types in unions.
Sourcepub fn needs_async_drop(
self,
tcx: TyCtxt<'tcx>,
typing_env: TypingEnv<'tcx>,
) -> bool
pub fn needs_async_drop( self, tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>, ) -> bool
If ty.needs_async_drop(...) returns true, then ty is definitely
non-copy and might have a async destructor attached; if it returns
false, then ty definitely has no async destructor (i.e., no async
drop glue).
(Note that this implies that if ty has an async destructor attached,
then needs_async_drop will definitely return true for ty.)
Sourcepub fn has_significant_drop(
self,
tcx: TyCtxt<'tcx>,
typing_env: TypingEnv<'tcx>,
) -> bool
pub fn has_significant_drop( self, tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>, ) -> bool
Checks if ty has a significant drop.
Note that this method can return false even if ty has a destructor
attached; even if that is the case then the adt has been marked with
the attribute rustc_insignificant_dtor.
Note that this method is used to check for change in drop order for 2229 drop reorder migration analysis.
Sourcepub fn is_structural_eq_shallow(self, tcx: TyCtxt<'tcx>) -> bool
pub fn is_structural_eq_shallow(self, tcx: TyCtxt<'tcx>) -> bool
Returns true if equality for this type is both reflexive and structural.
Reflexive equality for a type is indicated by an Eq impl for that type.
Primitive types (u32, str) have structural equality by definition. For composite data
types, equality for the type as a whole is structural when it is the same as equality
between all components (fields, array elements, etc.) of that type. For ADTs, structural
equality is indicated by an implementation of StructuralPartialEq for that type.
This function is “shallow” because it may return true for a composite type whose fields
are not StructuralPartialEq. For example, [T; 4] has structural equality regardless of T
because equality for arrays is determined by the equality of each array element. If you
want to know whether a given call to PartialEq::eq will proceed structurally all the way
down, you will need to use a type visitor.
Sourcepub fn peel_refs(self) -> Ty<'tcx>
pub fn peel_refs(self) -> Ty<'tcx>
Peel off all reference types in this type until there are none left.
This method is idempotent, i.e. ty.peel_refs().peel_refs() == ty.peel_refs().
§Examples
u8->u8&'a mut u8->u8&'a &'b u8->u8&'a *const &'b u8 -> *const &'b u8
Sourcepub fn is_primitive_ty(self) -> bool
pub fn is_primitive_ty(self) -> bool
Similar to Ty::is_primitive, but also considers inferred numeric values to be primitive.
Sourcepub fn is_simple_ty(self) -> bool
pub fn is_simple_ty(self) -> bool
Whether the type is succinctly representable as a type instead of just referred to with a description in error messages. This is used in the main error message.
Sourcepub fn is_simple_text(self) -> bool
pub fn is_simple_text(self) -> bool
Whether the type is succinctly representable as a type instead of just referred to with a
description in error messages. This is used in the primary span label. Beyond what
is_simple_ty includes, it also accepts ADTs with no type arguments and references to
ADTs with no type arguments.
Trait Implementations§
Source§impl<'tcx> Clone for RevealedTy<'tcx>
impl<'tcx> Clone for RevealedTy<'tcx>
impl<'tcx> Copy for RevealedTy<'tcx>
Source§impl<'tcx> Debug for RevealedTy<'tcx>
impl<'tcx> Debug for RevealedTy<'tcx>
Source§impl<'tcx> Deref for RevealedTy<'tcx>
impl<'tcx> Deref for RevealedTy<'tcx>
Source§impl<'tcx> Display for RevealedTy<'tcx>
impl<'tcx> Display for RevealedTy<'tcx>
impl<'tcx> Eq for RevealedTy<'tcx>
Source§impl<'tcx> Hash for RevealedTy<'tcx>
impl<'tcx> Hash for RevealedTy<'tcx>
Source§impl<'tcx> PartialEq for RevealedTy<'tcx>
impl<'tcx> PartialEq for RevealedTy<'tcx>
impl<'tcx> StructuralPartialEq for RevealedTy<'tcx>
Auto Trait Implementations§
impl<'tcx> !RefUnwindSafe for RevealedTy<'tcx>
impl<'tcx> !UnwindSafe for RevealedTy<'tcx>
impl<'tcx> DynSend for RevealedTy<'tcx>
impl<'tcx> DynSync for RevealedTy<'tcx>
impl<'tcx> Freeze for RevealedTy<'tcx>
impl<'tcx> Send for RevealedTy<'tcx>
impl<'tcx> Sync for RevealedTy<'tcx>
impl<'tcx> Unpin for RevealedTy<'tcx>
impl<'tcx> UnsafeUnpin for RevealedTy<'tcx>
Blanket Implementations§
Source§impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut T
fn allocate_from_iter( arena: &'tcx Arena<'tcx>, iter: impl IntoIterator<Item = T>, ) -> &'tcx mut [T]
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<K> IntoQueryKey<K> for K
impl<K> IntoQueryKey<K> for K
Source§fn into_query_key(self) -> K
fn into_query_key(self) -> K
Self to K.
This should always be a very cheap conversion, e.g. LocalDefId::to_def_id.Source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
Source§impl<I, T> UpcastFrom<I, T> for T
impl<I, T> UpcastFrom<I, T> for T
fn upcast_from(from: T, _tcx: I) -> T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes