Improve bug! message for impossible case in Relate
Hitting this branch in Clippy and I think it makes sense to print both values here in case other people hit this branch, too.
This commit is contained in:
parent
6622172734
commit
d654e3c69b
1 changed files with 6 additions and 1 deletions
|
|
@ -702,7 +702,12 @@ impl<'tcx> Relate<'tcx> for Kind<'tcx> {
|
|||
(UnpackedKind::Type(a_ty), UnpackedKind::Type(b_ty)) => {
|
||||
Ok(relation.relate(&a_ty, &b_ty)?.into())
|
||||
}
|
||||
(UnpackedKind::Lifetime(_), _) | (UnpackedKind::Type(_), _) => bug!()
|
||||
(UnpackedKind::Lifetime(unpacked), x) => {
|
||||
bug!("impossible case reached: can't relate: {:?} with {:?}", unpacked, x)
|
||||
}
|
||||
(UnpackedKind::Type(unpacked), x) => {
|
||||
bug!("impossible case reached: can't relate: {:?} with {:?}", unpacked, x)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue