Returns false if any of the generic arguments are themselves generic
Closures bring enclosed variables with them that are effectively additional parameters.
There is no convenient way to look up their types later on. I.e. unlike ordinary parameters
whose types can be looked up in mir.local_decls, these extra parameters need their
types extracted from the closure type definitions via the tricky logic below.
Returns true if the two given types are equal after erasing regions
Returns true if the given two pointer types are equivalent.
We suppose that a reference type and a mut/const raw pointer type are equivalent if
their dereference types are equivalent.
Pointers of equivalent types can point to the same object.
Given an object that may contain nested objects, flatten it by extracting all the bottom-level subobjects.
This function returns a vector of tuples, each including a subobject’s memory offset from the base object,
its path representation and its type.
Returns the target type of a reference type.
Returns the rustc TyKind of the downcast projection
Returns the element type of an array or slice type.
Returns the type of the field with the given ordinal.
Returns all the projections of pointer type fields contained in the given type
Returns whether the type is a pointer to a basic type
e.g. *u8, *
u8, *()
Returns whether the type is a primitive type or an array or slice containing basic ty elements
e.g. u8,
u8, ()
Determines if the given type is fully concrete.
Returns true if this type is dyn Fn, dyn FnMut or dyn FnOnce.
Returns true if the given type is a reference (or raw pointer) to a dynamic type
Returns true if this id corresponds to the fn_trait|fn_mut_trait|fn_once_trait
Returns true if the given type is a reference (or raw pointer) to a foreign type
Returns true if the given type is a reference (or raw pointer) to a collection type, in which
case the reference/pointer independently tracks the length of the collection, thus effectively
tracking a slice of the underlying collection.
Returns a layout for the given type, if concrete.
Returns a vector of field projections paired with their corresponding types contained in the given type
repr(transparent) is used on structs with a single non-zero-sized field (there may be
additional zero-sized fields).
Get the type and field index after removing the transparent wrapper
Returns the size for the given type