Struct rustc::ty::TypeContents
[−]
[src]
pub struct TypeContents {
pub bits: u64,
}rustc_private)Type contents is how the type checker reasons about kinds. They track what kinds of things are found within a type. You can think of them as kind of an "anti-kind". They track the kinds of values and thinks that are contained in types. Having a larger contents for a type tends to rule that type out from various kinds. For example, a type that contains a reference is not sendable.
The reason we compute type contents and not kinds is that it is easier for me (nmatsakis) to think about what is contained within a type than to think about what is not contained within a type.
Fields
bits: u64
rustc_private)Methods
impl TypeContents[src]
fn when(&self, cond: bool) -> TypeContents
fn intersects(&self, tc: TypeContents) -> bool
fn owns_owned(&self) -> bool
fn interior_param(&self) -> bool
fn interior_unsafe(&self) -> bool
fn needs_drop(&self, _: TyCtxt) -> bool
fn owned_pointer(&self) -> TypeContents
rustc_private)Includes only those bits that still apply when indirected through a Box pointer
fn union<T, F>(v: &[T], f: F) -> TypeContents where F: FnMut(&T) -> TypeContents
fn has_dtor(&self) -> bool
Trait Implementations
impl BitOr for TypeContents[src]
type Output = TypeContents
The resulting type after applying the | operator
fn bitor(self, other: TypeContents) -> TypeContents
The method for the | operator
impl BitAnd for TypeContents[src]
type Output = TypeContents
The resulting type after applying the & operator
fn bitand(self, other: TypeContents) -> TypeContents
The method for the & operator
impl Sub for TypeContents[src]
type Output = TypeContents
The resulting type after applying the - operator
fn sub(self, other: TypeContents) -> TypeContents
The method for the - operator
impl Debug for TypeContents[src]
Derived Implementations
impl Copy for TypeContents[src]
impl Clone for TypeContents[src]
fn clone(&self) -> TypeContents
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more