1
Fork 0

address review again

This commit is contained in:
b-naber 2022-09-14 15:35:24 +02:00
parent ba00189d8e
commit 6af8fb7936
20 changed files with 119 additions and 520 deletions

View file

@ -604,13 +604,11 @@ impl<'tcx> Inliner<'tcx> {
// `required_consts`, here we may not only have `ConstKind::Unevaluated`
// because we are calling `subst_and_normalize_erasing_regions`.
caller_body.required_consts.extend(
callee_body.required_consts.iter().copied().filter(|&ct| {
match ct.literal.const_for_ty() {
Some(_) => {
bug!("should never encounter ty::Unevaluated in required_consts")
}
None => true,
callee_body.required_consts.iter().copied().filter(|&ct| match ct.literal {
ConstantKind::Ty(_) => {
bug!("should never encounter ty::Unevaluated in `required_consts`")
}
ConstantKind::Val(..) | ConstantKind::Unevaluated(..) => true,
}),
);
}