Skip to content

Commit dc614b9

Browse files
committed
Make matches exhaustive.
1 parent 87c841e commit dc614b9

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

compiler/rustc_resolve/src/late.rs

+9-3
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,9 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
13031303
| LifetimeRibKind::AnonymousCreateParameter { .. } => {
13041304
Some(LifetimeUseSet::One { use_span: ident.span, use_ctxt })
13051305
}
1306-
_ => None,
1306+
LifetimeRibKind::Generics { .. }
1307+
| LifetimeRibKind::ConstGeneric
1308+
| LifetimeRibKind::AnonConst => None,
13071309
})
13081310
.unwrap_or(LifetimeUseSet::Many);
13091311
debug!(?use_ctxt, ?use_set);
@@ -1390,7 +1392,9 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
13901392
return;
13911393
}
13921394
LifetimeRibKind::Item => break,
1393-
_ => {}
1395+
LifetimeRibKind::Generics { .. }
1396+
| LifetimeRibKind::ConstGeneric
1397+
| LifetimeRibKind::AnonConst => {}
13941398
}
13951399
}
13961400
// This resolution is wrong, it passes the work to HIR lifetime resolution.
@@ -1576,7 +1580,9 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
15761580
}
15771581
break;
15781582
}
1579-
_ => {}
1583+
LifetimeRibKind::Generics { .. }
1584+
| LifetimeRibKind::ConstGeneric
1585+
| LifetimeRibKind::AnonConst => {}
15801586
}
15811587
}
15821588

0 commit comments

Comments
 (0)