AssocItemConstraintKind in rustc_ast::ast - Rust (original) (raw)

Enum AssocItemConstraintKind

Source

pub enum AssocItemConstraintKind {
    Equality {
        term: Term,
    },
    Bound {
        bounds: GenericBounds,
    },
}

Expand description

§

An equality constraint for an associated item (e.g., AssocTy = Ty in Trait<AssocTy = Ty>).

Also known as an associated item binding (we bind an associated item to a term).

Furthermore, associated type equality constraints can also be referred to as associated type bindings. Similarly with associated const equality constraints and associated const bindings.

Fields

§

A bound on an associated type (e.g., AssocTy: Bound in Trait<AssocTy: Bound>).

Fields

§

§

§

§

§

§

§

§

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: 24 bytes

Size for each variant: