about summary refs log tree commit diff
path: root/src/librustc_mir/transform
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2019-11-10 09:27:12 +0900
committerGitHub <noreply@github.com>2019-11-10 09:27:12 +0900
commit401d9e1c28fdf9c1899f0d0ca0f8856849563917 (patch)
tree568c0e73da47f5adeaf199b72ef1629f8b48bd0c /src/librustc_mir/transform
parente88aa39e39d154c9137eaa0730f0c778fcaaa58f (diff)
parent972c3be6c35c0fa1121c4b497d98e51b4878c7c8 (diff)
downloadrust-401d9e1c28fdf9c1899f0d0ca0f8856849563917.tar.gz
rust-401d9e1c28fdf9c1899f0d0ca0f8856849563917.zip
Rollup merge of #65831 - matthewjasper:array-ptr-cast, r=oli-obk
Don't cast directly from &[T; N] to *const T

Split out from #64588

r? @oli-obk
Diffstat (limited to 'src/librustc_mir/transform')
-rw-r--r--src/librustc_mir/transform/qualify_min_const_fn.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_mir/transform/qualify_min_const_fn.rs b/src/librustc_mir/transform/qualify_min_const_fn.rs
index da1fba2518a..ab4b6153aa1 100644
--- a/src/librustc_mir/transform/qualify_min_const_fn.rs
+++ b/src/librustc_mir/transform/qualify_min_const_fn.rs
@@ -150,7 +150,8 @@ fn check_rvalue(
                 _ => check_operand(tcx, operand, span, def_id, body),
             }
         }
-        Rvalue::Cast(CastKind::Pointer(PointerCast::MutToConstPointer), operand, _) => {
+        Rvalue::Cast(CastKind::Pointer(PointerCast::MutToConstPointer), operand, _)
+        | Rvalue::Cast(CastKind::Pointer(PointerCast::ArrayToPointer), operand, _) => {
             check_operand(tcx, operand, span, def_id, body)
         }
         Rvalue::Cast(CastKind::Pointer(PointerCast::UnsafeFnPointer), _, _) |