From e0c9be539a2129478b4d6246cda6a398738290a0 Mon Sep 17 00:00:00 2001 From: Jordan McQueen Date: Sat, 23 Jul 2022 13:26:45 +0900 Subject: [PATCH] Use span_bug in case of unexpected rib kind Extremely minor QOL change to improve the ICE output in case this default match case is encountered (an unexpected rib kind). --- compiler/rustc_resolve/src/late.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 49761023ec3..e739ed678d8 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -2111,7 +2111,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> { let res = match kind { ItemRibKind(..) | AssocItemRibKind => Res::Def(def_kind, def_id.to_def_id()), NormalRibKind => Res::Err, - _ => bug!("Unexpected rib kind {:?}", kind), + _ => span_bug!(param.ident.span, "Unexpected rib kind {:?}", kind), }; self.r.record_partial_res(param.id, PartialRes::new(res)); rib.bindings.insert(ident, res);