Enum rustc_ast::ast::GenericBound [−][src]
pub enum GenericBound {
Trait(PolyTraitRef, TraitBoundModifier),
Outlives(Lifetime),
}
Expand description
The AST represents all type param bounds as types.
typeck::collect::compute_bounds
matches these against
the “special” built-in traits (see middle::lang_items
) and
detects Copy
, Send
and Sync
.
Variants
Trait(PolyTraitRef, TraitBoundModifier)
Tuple Fields of Trait
Outlives(Lifetime)
Tuple Fields of Outlives
0: Lifetime
Implementations
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for GenericBound
impl !Send for GenericBound
impl !Sync for GenericBound
impl Unpin for GenericBound
impl !UnwindSafe for GenericBound
Blanket Implementations
Mutably borrows from an owned value. Read more
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: 88 bytes
Size for each variant:
Trait
: 87 bytesOutlives
: 19 bytes