1
Fork 0

Prevent promotion of const fn calls in inline consts

This commit is contained in:
Oli Scherer 2023-09-18 15:30:07 +00:00
parent 44e199bf30
commit 9c762b58ba
15 changed files with 41 additions and 23 deletions

View file

@ -580,7 +580,7 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
}
}
BodyOwnerKind::Const | BodyOwnerKind::Static(..) => {
BodyOwnerKind::Const { .. } | BodyOwnerKind::Static(..) => {
let identity_args = GenericArgs::identity_for_item(tcx, typeck_root_def_id);
if self.mir_def.to_def_id() == typeck_root_def_id {
let args =