@@ -799,10 +799,10 @@ impl<T> Binder<T> {
799
799
/// Skips the binder and returns the "bound" value. This is a
800
800
/// risky thing to do because it's easy to get confused about
801
801
/// debruijn indices and the like. It is usually better to
802
- /// discharge the binder using `no_late_bound_regions ` or
802
+ /// discharge the binder using `no_bound_vars ` or
803
803
/// `replace_late_bound_regions` or something like
804
804
/// that. `skip_binder` is only valid when you are either
805
- /// extracting data that has nothing to do with bound regions , you
805
+ /// extracting data that has nothing to do with bound vars , you
806
806
/// are doing some sort of test that does not involve bound
807
807
/// regions, or you are being very careful about your depth
808
808
/// accounting.
@@ -811,7 +811,7 @@ impl<T> Binder<T> {
811
811
///
812
812
/// - extracting the def-id from a PolyTraitRef;
813
813
/// - comparing the self type of a PolyTraitRef to see if it is equal to
814
- /// a type parameter `X`, since the type `X` does not reference any regions
814
+ /// a type parameter `X`, since the type `X` does not reference any regions
815
815
pub fn skip_binder ( & self ) -> & T {
816
816
& self . 0
817
817
}
@@ -833,17 +833,17 @@ impl<T> Binder<T> {
833
833
}
834
834
835
835
/// Unwraps and returns the value within, but only if it contains
836
- /// no bound regions at all. (In other words, if this binder --
836
+ /// no bound vars at all. (In other words, if this binder --
837
837
/// and indeed any enclosing binder -- doesn't bind anything at
838
838
/// all.) Otherwise, returns `None`.
839
839
///
840
840
/// (One could imagine having a method that just unwraps a single
841
- /// binder, but permits late-bound regions bound by enclosing
841
+ /// binder, but permits late-bound vars bound by enclosing
842
842
/// binders, but that would require adjusting the debruijn
843
843
/// indices, and given the shallow binding structure we often use,
844
844
/// would not be that useful.)
845
- pub fn no_late_bound_regions < ' tcx > ( self ) -> Option < T >
846
- where T : TypeFoldable < ' tcx >
845
+ pub fn no_bound_vars < ' tcx > ( self ) -> Option < T >
846
+ where T : TypeFoldable < ' tcx >
847
847
{
848
848
if self . skip_binder ( ) . has_escaping_bound_vars ( ) {
849
849
None
0 commit comments