Skip to content

Commit 6496d69

Browse files
committed
Make the match in new_named_lifetime exhaustive.
1 parent fe4d144 commit 6496d69

File tree

1 file changed

+3
-4
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+3
-4
lines changed

Diff for: compiler/rustc_ast_lowering/src/lib.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1789,10 +1789,9 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
17891789
LifetimeRes::Infer => hir::LifetimeName::Infer,
17901790
LifetimeRes::Static { .. } => hir::LifetimeName::Static,
17911791
LifetimeRes::Error => hir::LifetimeName::Error,
1792-
res => panic!(
1793-
"Unexpected lifetime resolution {:?} for {:?} at {:?}",
1794-
res, ident, ident.span
1795-
),
1792+
LifetimeRes::ElidedAnchor { .. } => {
1793+
panic!("Unexpected `ElidedAnchar` {:?} at {:?}", ident, ident.span);
1794+
}
17961795
};
17971796

17981797
debug!(?res);

0 commit comments

Comments
 (0)