File tree 1 file changed +13
-0
lines changed
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;
81
81
pub type VariableKind = chalk_ir:: VariableKind < Interner > ;
82
82
pub type VariableKinds = chalk_ir:: VariableKinds < Interner > ;
83
83
pub 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.
84
92
pub 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.
85
98
pub type Substitution = chalk_ir:: Substitution < Interner > ;
86
99
pub type GenericArg = chalk_ir:: GenericArg < Interner > ;
87
100
pub type GenericArgData = chalk_ir:: GenericArgData < Interner > ;
You can’t perform that action at this time.
0 commit comments