]> git.lizzy.rs Git - rust.git/commitdiff
resolve_lifetime: types are not late-bound regions =)
authorNiko Matsakis <niko@alum.mit.edu>
Thu, 6 Sep 2018 16:39:48 +0000 (12:39 -0400)
committerWesley Wiser <wwiser@gmail.com>
Thu, 6 Sep 2018 23:58:23 +0000 (19:58 -0400)
src/librustc/middle/resolve_lifetime.rs

index d0f801e661b438d56bbff0798e8768a27b450e86..db931d0a739ff8e7eedeb75d2b333899a913ca87 100644 (file)
@@ -2567,6 +2567,13 @@ fn insert_late_bound_lifetimes(
     // - do not appear in the where-clauses
     // - are not implicitly captured by `impl Trait`
     for param in &generics.params {
+        match param.kind {
+            hir::GenericParamKind::Lifetime { .. } => { /* fall through */ }
+
+            // Types are not late-bound.
+            hir::GenericParamKind::Type { .. } => continue,
+        }
+
         let lt_name = hir::LifetimeName::Param(param.name.modern());
         // appears in the where clauses? early-bound.
         if appears_in_where_clause.regions.contains(&lt_name) {