Skip to content

Commit 5390cf3

Browse files
nikomatsakiswesleywiser
authored andcommitted
resolve_lifetime: types are not late-bound regions =)
1 parent 81f64b7 commit 5390cf3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/librustc/middle/resolve_lifetime.rs

+7
Original file line numberDiff line numberDiff line change
@@ -2567,6 +2567,13 @@ fn insert_late_bound_lifetimes(
25672567
// - do not appear in the where-clauses
25682568
// - are not implicitly captured by `impl Trait`
25692569
for param in &generics.params {
2570+
match param.kind {
2571+
hir::GenericParamKind::Lifetime { .. } => { /* fall through */ }
2572+
2573+
// Types are not late-bound.
2574+
hir::GenericParamKind::Type { .. } => continue,
2575+
}
2576+
25702577
let lt_name = hir::LifetimeName::Param(param.name.modern());
25712578
// appears in the where clauses? early-bound.
25722579
if appears_in_where_clause.regions.contains(&lt_name) {

0 commit comments

Comments
 (0)