hir_ty

Type Alias Binders

source
pub type Binders<T> = Binders<T>;
Expand description

Represents generic parameters and an item bound by them. When the item has parent, the binders also contain the generic parameters for its parent. See chalk’s documentation for details.

One thing to keep in mind when working with Binders (and Substitutions, which represent generic arguments) in rust-analyzer is that the ordering within is significant - the generic parameters/arguments for an item MUST come before those for its parent. This is to facilitate the integration with chalk-solve, which mildly puts constraints as such. See #13335 for its motivation in detail.

Aliased Type§

struct Binders<T> {
    pub binders: VariableKinds<<T as HasInterner>::Interner>,
    /* private fields */
}

Fields§

§binders: VariableKinds<<T as HasInterner>::Interner>

The binders that quantify over the value.