Skip to content

Commit f510d98

Browse files
authored
Rollup merge of rust-lang#99631 - jmqd:master, r=oli-obk
Use span_bug in case of unexpected rib kind Extremely minor QOL change to improve the ICE compiler output in case this default match case is encountered (an unexpected rib kind). I have limited experience in this area of the compiler; please let me know if a span more precise than `param.ident.span` is more applicable.
2 parents 539b8dd + e0c9be5 commit f510d98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_resolve/src/late.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
21112111
let res = match kind {
21122112
ItemRibKind(..) | AssocItemRibKind => Res::Def(def_kind, def_id.to_def_id()),
21132113
NormalRibKind => Res::Err,
2114-
_ => bug!("Unexpected rib kind {:?}", kind),
2114+
_ => span_bug!(param.ident.span, "Unexpected rib kind {:?}", kind),
21152115
};
21162116
self.r.record_partial_res(param.id, PartialRes::new(res));
21172117
rib.bindings.insert(ident, res);

0 commit comments

Comments
 (0)