This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,20 @@ pub type PlaceholderIndex = chalk_ir::PlaceholderIndex;
8181pub type VariableKind = chalk_ir:: VariableKind < Interner > ;
8282pub type VariableKinds = chalk_ir:: VariableKinds < Interner > ;
8383pub type CanonicalVarKinds = chalk_ir:: CanonicalVarKinds < Interner > ;
84+ /// Represents generic parameters and an item bound by them. When the item has parent, the binders
85+ /// also contain the generic parameters for its parent. See chalk's documentation for details.
86+ ///
87+ /// One thing to keep in mind when working with `Binders` (and `Substitution`s, which represent
88+ /// generic arguments) in rust-analyzer is that the ordering within *is* significant - the generic
89+ /// parameters/arguments for an item MUST come before those for its parent. This is to facilitate
90+ /// the integration with chalk-solve, which mildly puts constraints as such. See #13335 for its
91+ /// motivation in detail.
8492pub type Binders < T > = chalk_ir:: Binders < T > ;
93+ /// Interned list of generic arguments for an item. When an item has parent, the `Substitution` for
94+ /// it contains generic arguments for both its parent and itself. See chalk's documentation for
95+ /// details.
96+ ///
97+ /// See `Binders` for the constraint on the ordering.
8598pub type Substitution = chalk_ir:: Substitution < Interner > ;
8699pub type GenericArg = chalk_ir:: GenericArg < Interner > ;
87100pub type GenericArgData = chalk_ir:: GenericArgData < Interner > ;
You can’t perform that action at this time.
0 commit comments