@@ -494,30 +494,6 @@ impl DebruijnIndex {
494
494
Some ( DebruijnIndex :: from ( self . as_usize ( ) - amount) )
495
495
}
496
496
}
497
-
498
- /// Adjusts any De Bruijn indices so as to make `to_binder` the
499
- /// innermost binder. That is, if we have something bound at `to_binder`,
500
- /// it will now be bound at INNERMOST. This is an appropriate thing to do
501
- /// when moving a region out from inside binders:
502
- ///
503
- /// ```ignore
504
- /// for<'a> fn(for<'b> for<'c> fn(&'a u32), _)
505
- /// // Binder: D3 D2 D1 ^^
506
- /// ```
507
- ///
508
- /// Here, the region `'a` would have the De Bruijn index D3,
509
- /// because it is the bound 3 binders out. However, if we wanted
510
- /// to refer to that region `'a` in the second argument (the `_`),
511
- /// those two binders would not be in scope. In that case, we
512
- /// might invoke `shift_out_to_binder(D3)`. This would adjust the
513
- /// De Bruijn index of `'a` to D1 (the innermost binder).
514
- ///
515
- /// If we invoke `shift_out_to_binder` and the region is in fact
516
- /// bound by one of the binders we are shifting out of, that is an
517
- /// error (and should fail an assertion failure).
518
- pub fn shifted_out_to_binder ( self , to_binder : DebruijnIndex ) -> Option < Self > {
519
- self . shifted_out_by ( to_binder. as_usize ( ) - Self :: INNERMOST . as_usize ( ) )
520
- }
521
497
}
522
498
523
499
/// A "DynTy" could be either a `dyn Trait` or an (opaque) `impl
0 commit comments