Improve bug message in check_ty
This branch was hit in Clippy and I think it would be nice to show the thing that was unexpected in the bug message. It's also in line with the other `bug!` messages in `check_ty`.
This commit is contained in:
parent
d3d0bf0e9f
commit
037fdb8213
|
@ -1303,12 +1303,12 @@ fn type_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> Ty<'tcx> {
|
|||
}
|
||||
},
|
||||
|
||||
Node::GenericParam(param) => match param.kind {
|
||||
Node::GenericParam(param) => match ¶m.kind {
|
||||
hir::GenericParamKind::Type {
|
||||
default: Some(ref ty),
|
||||
..
|
||||
} => icx.to_ty(ty),
|
||||
_ => bug!("unexpected non-type NodeGenericParam"),
|
||||
x => bug!("unexpected non-type Node::GenericParam: {:?}", x),
|
||||
},
|
||||
|
||||
x => {
|
||||
|
|
Loading…
Reference in New Issue