@@ -111,6 +111,9 @@ impl<'a, 'tcx> At<'a, 'tcx> {
111
111
}
112
112
113
113
/// Makes `a <: b`, where `a` may or may not be expected.
114
+ ///
115
+ /// See [`At::trace_exp`] and [`Trace::sub`] for a version of
116
+ /// this method that only requires `T: Relate<'tcx>`
114
117
pub fn sub_exp < T > ( self , a_is_expected : bool , a : T , b : T ) -> InferResult < ' tcx , ( ) >
115
118
where
116
119
T : ToTrace < ' tcx > ,
@@ -122,6 +125,9 @@ impl<'a, 'tcx> At<'a, 'tcx> {
122
125
/// call like `foo(x)`, where `foo: fn(i32)`, you might have
123
126
/// `sup(i32, x)`, since the "expected" type is the type that
124
127
/// appears in the signature.
128
+ ///
129
+ /// See [`At::trace`] and [`Trace::sub`] for a version of
130
+ /// this method that only requires `T: Relate<'tcx>`
125
131
pub fn sup < T > ( self , expected : T , actual : T ) -> InferResult < ' tcx , ( ) >
126
132
where
127
133
T : ToTrace < ' tcx > ,
@@ -130,6 +136,9 @@ impl<'a, 'tcx> At<'a, 'tcx> {
130
136
}
131
137
132
138
/// Makes `expected <: actual`.
139
+ ///
140
+ /// See [`At::trace`] and [`Trace::sub`] for a version of
141
+ /// this method that only requires `T: Relate<'tcx>`
133
142
pub fn sub < T > ( self , expected : T , actual : T ) -> InferResult < ' tcx , ( ) >
134
143
where
135
144
T : ToTrace < ' tcx > ,
@@ -138,6 +147,9 @@ impl<'a, 'tcx> At<'a, 'tcx> {
138
147
}
139
148
140
149
/// Makes `expected <: actual`.
150
+ ///
151
+ /// See [`At::trace_exp`] and [`Trace::eq`] for a version of
152
+ /// this method that only requires `T: Relate<'tcx>`
141
153
pub fn eq_exp < T > ( self , a_is_expected : bool , a : T , b : T ) -> InferResult < ' tcx , ( ) >
142
154
where
143
155
T : ToTrace < ' tcx > ,
@@ -146,6 +158,9 @@ impl<'a, 'tcx> At<'a, 'tcx> {
146
158
}
147
159
148
160
/// Makes `expected <: actual`.
161
+ ///
162
+ /// See [`At::trace`] and [`Trace::eq`] for a version of
163
+ /// this method that only requires `T: Relate<'tcx>`
149
164
pub fn eq < T > ( self , expected : T , actual : T ) -> InferResult < ' tcx , ( ) >
150
165
where
151
166
T : ToTrace < ' tcx > ,
@@ -176,6 +191,9 @@ impl<'a, 'tcx> At<'a, 'tcx> {
176
191
/// this can result in an error (e.g., if asked to compute LUB of
177
192
/// u32 and i32), it is meaningful to call one of them the
178
193
/// "expected type".
194
+ ///
195
+ /// See [`At::trace`] and [`Trace::lub`] for a version of
196
+ /// this method that only requires `T: Relate<'tcx>`
179
197
pub fn lub < T > ( self , expected : T , actual : T ) -> InferResult < ' tcx , T >
180
198
where
181
199
T : ToTrace < ' tcx > ,
@@ -186,6 +204,9 @@ impl<'a, 'tcx> At<'a, 'tcx> {
186
204
/// Computes the greatest-lower-bound, or mutual subtype, of two
187
205
/// values. As with `lub` order doesn't matter, except for error
188
206
/// cases.
207
+ ///
208
+ /// See [`At::trace`] and [`Trace::glb`] for a version of
209
+ /// this method that only requires `T: Relate<'tcx>`
189
210
pub fn glb < T > ( self , expected : T , actual : T ) -> InferResult < ' tcx , T >
190
211
where
191
212
T : ToTrace < ' tcx > ,
0 commit comments