@@ -157,25 +157,6 @@ fn overlap_within_probe<'cx, 'tcx>(
157
157
impl2_def_id : DefId ,
158
158
snapshot : & CombinedSnapshot < ' _ , ' tcx > ,
159
159
) -> Option < OverlapResult < ' tcx > > {
160
- fn loose_check < ' cx , ' tcx > (
161
- selcx : & mut SelectionContext < ' cx , ' tcx > ,
162
- o : & PredicateObligation < ' tcx > ,
163
- ) -> bool {
164
- !selcx. predicate_may_hold_fatal ( o)
165
- }
166
-
167
- fn strict_check < ' cx , ' tcx > (
168
- selcx : & SelectionContext < ' cx , ' tcx > ,
169
- o : & PredicateObligation < ' tcx > ,
170
- ) -> bool {
171
- let infcx = selcx. infcx ( ) ;
172
- let tcx = infcx. tcx ;
173
- o. flip_polarity ( tcx)
174
- . as_ref ( )
175
- . map ( |o| selcx. infcx ( ) . predicate_must_hold_modulo_regions ( o) )
176
- . unwrap_or ( false )
177
- }
178
-
179
160
// For the purposes of this check, we don't bring any placeholder
180
161
// types into scope; instead, we replace the generic types with
181
162
// fresh type variables, and hence we do our evaluations in an
@@ -275,6 +256,25 @@ fn overlap_within_probe<'cx, 'tcx>(
275
256
Some ( OverlapResult { impl_header, intercrate_ambiguity_causes, involves_placeholder } )
276
257
}
277
258
259
+ fn loose_check < ' cx , ' tcx > (
260
+ selcx : & mut SelectionContext < ' cx , ' tcx > ,
261
+ o : & PredicateObligation < ' tcx > ,
262
+ ) -> bool {
263
+ !selcx. predicate_may_hold_fatal ( o)
264
+ }
265
+
266
+ fn strict_check < ' cx , ' tcx > (
267
+ selcx : & SelectionContext < ' cx , ' tcx > ,
268
+ o : & PredicateObligation < ' tcx > ,
269
+ ) -> bool {
270
+ let infcx = selcx. infcx ( ) ;
271
+ let tcx = infcx. tcx ;
272
+ o. flip_polarity ( tcx)
273
+ . as_ref ( )
274
+ . map ( |o| selcx. infcx ( ) . predicate_must_hold_modulo_regions ( o) )
275
+ . unwrap_or ( false )
276
+ }
277
+
278
278
pub fn trait_ref_is_knowable < ' tcx > (
279
279
tcx : TyCtxt < ' tcx > ,
280
280
trait_ref : ty:: TraitRef < ' tcx > ,
0 commit comments