about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan MacKenzie <ecstaticmorse@gmail.com>2019-09-20 08:48:47 -0700
committerDylan MacKenzie <ecstaticmorse@gmail.com>2019-09-28 07:06:52 -0700
commit27bd84916c857f84d1562874e660cbb8f2d4aa2c (patch)
tree7eaf40867e174435ea634a382e5ba53aa4d6db75
parent670c84dde3ad25f113b00436066a65a0dfb808cd (diff)
downloadrust-27bd84916c857f84d1562874e660cbb8f2d4aa2c.tar.gz
rust-27bd84916c857f84d1562874e660cbb8f2d4aa2c.zip
Correct list of miri-supported operations
Heap allocations are out, indirect `fn` calls are in!
-rw-r--r--src/librustc_mir/transform/check_consts/validation.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_mir/transform/check_consts/validation.rs b/src/librustc_mir/transform/check_consts/validation.rs
index eee8f4856fd..6a8ac3f3085 100644
--- a/src/librustc_mir/transform/check_consts/validation.rs
+++ b/src/librustc_mir/transform/check_consts/validation.rs
@@ -636,8 +636,6 @@ pub mod ops {
     #[derive(Debug)]
     pub struct FnCallIndirect;
     impl NonConstOp for FnCallIndirect {
-        const IS_SUPPORTED_IN_MIRI: bool = false;
-
         fn emit_error(&self, item: &Item<'_, '_>, span: Span) {
             let mut err = item.tcx.sess.struct_span_err(
                 span,
@@ -698,6 +696,8 @@ pub mod ops {
     #[derive(Debug)]
     pub struct HeapAllocation;
     impl NonConstOp for HeapAllocation {
+        const IS_SUPPORTED_IN_MIRI: bool = false;
+
         fn emit_error(&self, item: &Item<'_, '_>, span: Span) {
             let mut err = struct_span_err!(item.tcx.sess, span, E0010,
                                            "allocations are not allowed in {}s", item.mode);