Skip to content

Commit 6975071

Browse files
authored
Rollup merge of rust-lang#90102 - nbdd0121:box3, r=jonas-schievink
Remove `NullOp::Box` Follow up of rust-lang#89030 and MCP rust-lang/compiler-team#460. ~1 month later nothing seems to be broken, apart from a small regression that rust-lang#89332 (1aac85bb716c09304b313d69d30d74fe7e8e1a8e) shows could be regained by remvoing the diverging path, so it shall be safe to continue and remove `NullOp::Box` completely. r? `@jonas-schievink` `@rustbot` label T-compiler
2 parents f5bbd1b + 1788cfd commit 6975071

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

clippy_utils/src/qualify_min_const_fn.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ fn check_rvalue(tcx: TyCtxt<'tcx>, body: &Body<'tcx>, def_id: DefId, rvalue: &Rv
193193
}
194194
},
195195
Rvalue::NullaryOp(NullOp::SizeOf | NullOp::AlignOf, _) | Rvalue::ShallowInitBox(_, _) => Ok(()),
196-
Rvalue::NullaryOp(NullOp::Box, _) => Err((span, "heap allocations are not allowed in const fn".into())),
197196
Rvalue::UnaryOp(_, operand) => {
198197
let ty = operand.ty(body, tcx);
199198
if ty.is_integral() || ty.is_bool() {

0 commit comments

Comments
 (0)