1
Fork 0

Make the match in new_named_lifetime exhaustive.

This commit is contained in:
Nicholas Nethercote 2025-03-17 15:44:43 +11:00
parent fe4d14495f
commit 6496d6943f

View file

@ -1789,10 +1789,9 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
LifetimeRes::Infer => hir::LifetimeName::Infer,
LifetimeRes::Static { .. } => hir::LifetimeName::Static,
LifetimeRes::Error => hir::LifetimeName::Error,
res => panic!(
"Unexpected lifetime resolution {:?} for {:?} at {:?}",
res, ident, ident.span
),
LifetimeRes::ElidedAnchor { .. } => {
panic!("Unexpected `ElidedAnchar` {:?} at {:?}", ident, ident.span);
}
};
debug!(?res);