fix debruijn account in for_each_free_region

This commit is contained in:
Niko Matsakis 2017-11-22 16:52:29 -05:00
parent 243bf3f718
commit 2e63bb3419

View file

@ -247,7 +247,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
fn visit_region(&mut self, r: ty::Region<'tcx>) -> bool {
match *r {
ty::ReLateBound(debruijn, _) if debruijn.depth < self.current_depth => {
ty::ReLateBound(debruijn, _) if debruijn.depth <= self.current_depth => {
/* ignore bound regions */
}
_ => (self.callback)(r),