File tree 1 file changed +7
-1
lines changed
compiler/rustc_middle/src/ty 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -72,12 +72,18 @@ pub trait TypeVisitable<'tcx>: fmt::Debug + Clone {
72
72
self . visit_with ( & mut HasEscapingVarsVisitor { outer_index : binder } ) . is_break ( )
73
73
}
74
74
75
- /// Returns `true` if this `self` has any regions that escape `binder` (and
75
+ /// Returns `true` if this type has any regions that escape `binder` (and
76
76
/// hence are not bound by it).
77
77
fn has_vars_bound_above ( & self , binder : ty:: DebruijnIndex ) -> bool {
78
78
self . has_vars_bound_at_or_above ( binder. shifted_in ( 1 ) )
79
79
}
80
80
81
+ /// Return `true` if this type has regions that are not a part of the type.
82
+ /// For example, `for<'a> fn(&'a i32)` return `false`, while `fn(&'a i32)`
83
+ /// would return `true`. The latter can occur when traversing through the
84
+ /// former.
85
+ ///
86
+ /// See [`HasEscapingVarsVisitor`] for more information.
81
87
fn has_escaping_bound_vars ( & self ) -> bool {
82
88
self . has_vars_bound_at_or_above ( ty:: INNERMOST )
83
89
}
You can’t perform that action at this time.
0 commit comments