Skip to content

Commit fc8edf1

Browse files
committed
Introduce Rvalue::ShallowInitBox
1 parent b51b172 commit fc8edf1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clippy_utils/src/qualify_min_const_fn.rs

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

0 commit comments

Comments
 (0)