Skip to content

Commit 5d93d9d

Browse files
committed
Introduce NullOp::AlignOf
1 parent 261e34d commit 5d93d9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_utils/src/qualify_min_const_fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ fn check_rvalue(tcx: TyCtxt<'tcx>, body: &Body<'tcx>, def_id: DefId, rvalue: &Rv
192192
))
193193
}
194194
},
195-
Rvalue::NullaryOp(NullOp::SizeOf, _) => Ok(()),
195+
Rvalue::NullaryOp(NullOp::SizeOf | NullOp::AlignOf, _) => Ok(()),
196196
Rvalue::NullaryOp(NullOp::Box, _) => Err((span, "heap allocations are not allowed in const fn".into())),
197197
Rvalue::UnaryOp(_, operand) => {
198198
let ty = operand.ty(body, tcx);

0 commit comments

Comments
 (0)