about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJordan McQueen <jmq@Jordans-MacBook-Air.local>2022-07-23 13:26:45 +0900
committerJordan McQueen <jmq@Jordans-MacBook-Air.local>2022-07-23 13:26:45 +0900
commite0c9be539a2129478b4d6246cda6a398738290a0 (patch)
treea9fdfc4b7fd049a396a4b89f6c967a3b722c0976
parent848090dcd18553b790461132ca9d2a020aeea9a2 (diff)
downloadrust-e0c9be539a2129478b4d6246cda6a398738290a0.tar.gz
rust-e0c9be539a2129478b4d6246cda6a398738290a0.zip
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).
-rw-r--r--compiler/rustc_resolve/src/late.rs2
1 files changed, 1 insertions, 1 deletions
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);