mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Rollup merge of #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.
This commit is contained in:
commit
f510d98ad3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user