address review again
This commit is contained in:
parent
ba00189d8e
commit
6af8fb7936
20 changed files with 119 additions and 520 deletions
|
@ -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,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue