File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,27 @@ pub(super) fn push_trait_super_clauses<I: Interner>(
73
73
}
74
74
}
75
75
76
+ /// Returns super-`TraitRef`s and super-`Projection`s that are quantified over the parameters of
77
+ /// `trait_id` and relevant higher-ranked lifetimes. The outer `Binders` is for the former and the
78
+ /// inner `Binders` is for the latter.
79
+ ///
80
+ /// For example, given the following trait definitions and `C` as `trait_id`,
81
+ ///
82
+ /// ```
83
+ /// trait A<'a, T> {}
84
+ /// trait B<'b, U> where Self: for<'x> A<'x, U> {}
85
+ /// trait C<'c, V> where Self: B<'c, V> {}
86
+ /// ```
87
+ ///
88
+ /// returns the following quantified `TraitRef`s.
89
+ ///
90
+ /// ```notrust
91
+ /// for<Self, 'c, V> {
92
+ /// for<'x> { Self: A<'x, V> }
93
+ /// for<> { Self: B<'c, V> }
94
+ /// for<> { Self: C<'c, V> }
95
+ /// }
96
+ /// ```
76
97
pub ( crate ) fn super_traits < I : Interner > (
77
98
db : & dyn RustIrDatabase < I > ,
78
99
trait_id : TraitId < I > ,
You can’t perform that action at this time.
0 commit comments