Skip to content

Commit 50f13a3

Browse files
committed
Fix clippy
1 parent c8a2f53 commit 50f13a3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs

+1
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ fn check_rvalue(tcx: TyCtxt<'tcx>, body: &Body<'tcx>, def_id: DefId, rvalue: &Rv
196196
},
197197
Rvalue::NullaryOp(NullOp::SizeOf, _) => Ok(()),
198198
Rvalue::NullaryOp(NullOp::Box, _) => Err((span, "heap allocations are not allowed in const fn".into())),
199+
Rvalue::InitBox(_, _) => Ok(()),
199200
Rvalue::UnaryOp(_, operand) => {
200201
let ty = operand.ty(body, tcx);
201202
if ty.is_integral() || ty.is_bool() {

0 commit comments

Comments
 (0)