We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Rvalue::ShallowInitBox
1 parent b51b172 commit fc8edf1Copy full SHA for fc8edf1
1 file changed
clippy_utils/src/qualify_min_const_fn.rs
@@ -194,6 +194,7 @@ fn check_rvalue(tcx: TyCtxt<'tcx>, body: &Body<'tcx>, def_id: DefId, rvalue: &Rv
194
},
195
Rvalue::NullaryOp(NullOp::SizeOf | NullOp::AlignOf, _) => Ok(()),
196
Rvalue::NullaryOp(NullOp::Box, _) => Err((span, "heap allocations are not allowed in const fn".into())),
197
+ Rvalue::ShallowInitBox(_, _) => Ok(()),
198
Rvalue::UnaryOp(_, operand) => {
199
let ty = operand.ty(body, tcx);
200
if ty.is_integral() || ty.is_bool() {
0 commit comments