diff options
| author | Gary Guo <gary@garyguo.net> | 2021-09-06 18:33:23 +0100 |
|---|---|---|
| committer | Gary Guo <gary@garyguo.net> | 2021-09-25 01:08:41 +0100 |
| commit | c38da2e0a322908ba4b1d4b7e59c5da0531af4e1 (patch) | |
| tree | cd26f185c4302d0389f8703ea0d2b76cfa1ac4ba /src | |
| parent | 308dffd25cb55bbb4a1fbee9822cf82c6a5d012d (diff) | |
| download | rust-c38da2e0a322908ba4b1d4b7e59c5da0531af4e1.tar.gz rust-c38da2e0a322908ba4b1d4b7e59c5da0531af4e1.zip | |
Introduce `Rvalue::ShallowInitBox`
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs b/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs index e9a9895cb74..e2f2e2008bb 100644 --- a/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs +++ b/src/tools/clippy/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 }, Rvalue::NullaryOp(NullOp::SizeOf | NullOp::AlignOf, _) => Ok(()), Rvalue::NullaryOp(NullOp::Box, _) => Err((span, "heap allocations are not allowed in const fn".into())), + Rvalue::ShallowInitBox(_, _) => Ok(()), Rvalue::UnaryOp(_, operand) => { let ty = operand.ty(body, tcx); if ty.is_integral() || ty.is_bool() { |
