From 2e63bb34199545042c049f67be3e3253520a85fc Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 22 Nov 2017 16:52:29 -0500 Subject: [PATCH] fix debruijn account in `for_each_free_region` --- src/librustc/ty/fold.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc/ty/fold.rs b/src/librustc/ty/fold.rs index fbbc0e92bcd..069dc0275cb 100644 --- a/src/librustc/ty/fold.rs +++ b/src/librustc/ty/fold.rs @@ -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),