1
Fork 0

Auto merge of #131226 - nnethercote:rustc_infer-cleanups, r=lcnr

`rustc_infer` cleanups

Various small improvements I found while reading over this code.

r? `@lcnr`
This commit is contained in:
bors 2024-10-07 03:22:04 +00:00
commit 8841a3dadd
17 changed files with 97 additions and 202 deletions

View file

@ -212,15 +212,7 @@ impl<'tcx> Relate<TyCtxt<'tcx>> for ty::GenericArg<'tcx> {
(ty::GenericArgKind::Const(a_ct), ty::GenericArgKind::Const(b_ct)) => {
Ok(relation.relate(a_ct, b_ct)?.into())
}
(ty::GenericArgKind::Lifetime(unpacked), x) => {
bug!("impossible case reached: can't relate: {:?} with {:?}", unpacked, x)
}
(ty::GenericArgKind::Type(unpacked), x) => {
bug!("impossible case reached: can't relate: {:?} with {:?}", unpacked, x)
}
(ty::GenericArgKind::Const(unpacked), x) => {
bug!("impossible case reached: can't relate: {:?} with {:?}", unpacked, x)
}
_ => bug!("impossible case reached: can't relate: {a:?} with {b:?}"),
}
}
}