Rollup merge of #109222 - chenyukang:yukang/fix-109143, r=petrochenkov
Do not ICE for unexpected lifetime with ConstGeneric rib Fixes #109143 r? ````@petrochenkov```` Combining this test with the previous test will affect the previous diagnostics, so I added a separate test case.
This commit is contained in:
commit
dfd2b6493a
3 changed files with 27 additions and 4 deletions
|
@ -1478,8 +1478,9 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
|
|||
} else {
|
||||
LifetimeUseSet::Many
|
||||
}),
|
||||
LifetimeRibKind::Generics { .. } => None,
|
||||
LifetimeRibKind::ConstGeneric | LifetimeRibKind::AnonConst => {
|
||||
LifetimeRibKind::Generics { .. }
|
||||
| LifetimeRibKind::ConstGeneric => None,
|
||||
LifetimeRibKind::AnonConst => {
|
||||
span_bug!(ident.span, "unexpected rib kind: {:?}", rib.kind)
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue