@@ -44,29 +44,6 @@ impl<'tcx> InferCtxt<'tcx> {
44
44
self . canonicalize_query_with_mode ( value, query_state, & CanonicalizeAllFreeRegions )
45
45
}
46
46
47
- /// Like [Self::canonicalize_query], but preserves distinct universes. For
48
- /// example, canonicalizing `&'?0: Trait<'?1>`, where `'?0` is in `U1` and
49
- /// `'?1` is in `U3` would be canonicalized to have `?0` in `U1` and `'?1`
50
- /// in `U2`.
51
- ///
52
- /// This is used for Chalk integration.
53
- pub fn canonicalize_query_preserving_universes < V > (
54
- & self ,
55
- value : V ,
56
- query_state : & mut OriginalQueryValues < ' tcx > ,
57
- ) -> Canonical < ' tcx , V >
58
- where
59
- V : TypeFoldable < TyCtxt < ' tcx > > ,
60
- {
61
- Canonicalizer :: canonicalize (
62
- value,
63
- Some ( self ) ,
64
- self . tcx ,
65
- & CanonicalizeAllFreeRegionsPreservingUniverses ,
66
- query_state,
67
- )
68
- }
69
-
70
47
/// Canonicalizes a query *response* `V`. When we canonicalize a
71
48
/// query response, we only canonicalize unbound inference
72
49
/// variables, and we leave other free regions alone. So,
@@ -313,30 +290,6 @@ impl CanonicalizeMode for CanonicalizeAllFreeRegions {
313
290
}
314
291
}
315
292
316
- struct CanonicalizeAllFreeRegionsPreservingUniverses ;
317
-
318
- impl CanonicalizeMode for CanonicalizeAllFreeRegionsPreservingUniverses {
319
- fn canonicalize_free_region < ' tcx > (
320
- & self ,
321
- canonicalizer : & mut Canonicalizer < ' _ , ' tcx > ,
322
- r : ty:: Region < ' tcx > ,
323
- ) -> ty:: Region < ' tcx > {
324
- let universe = canonicalizer. infcx . unwrap ( ) . universe_of_region ( r) ;
325
- canonicalizer. canonical_var_for_region (
326
- CanonicalVarInfo { kind : CanonicalVarKind :: Region ( universe) } ,
327
- r,
328
- )
329
- }
330
-
331
- fn any ( & self ) -> bool {
332
- true
333
- }
334
-
335
- fn preserve_universes ( & self ) -> bool {
336
- true
337
- }
338
- }
339
-
340
293
struct CanonicalizeFreeRegionsOtherThanStatic ;
341
294
342
295
impl CanonicalizeMode for CanonicalizeFreeRegionsOtherThanStatic {
0 commit comments