Skip to content

Commit 27bd849

Browse files
Correct list of miri-supported operations
Heap allocations are out, indirect `fn` calls are in!
1 parent 670c84d commit 27bd849

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_mir/transform/check_consts/validation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,8 +636,6 @@ pub mod ops {
636636
#[derive(Debug)]
637637
pub struct FnCallIndirect;
638638
impl NonConstOp for FnCallIndirect {
639-
const IS_SUPPORTED_IN_MIRI: bool = false;
640-
641639
fn emit_error(&self, item: &Item<'_, '_>, span: Span) {
642640
let mut err = item.tcx.sess.struct_span_err(
643641
span,
@@ -698,6 +696,8 @@ pub mod ops {
698696
#[derive(Debug)]
699697
pub struct HeapAllocation;
700698
impl NonConstOp for HeapAllocation {
699+
const IS_SUPPORTED_IN_MIRI: bool = false;
700+
701701
fn emit_error(&self, item: &Item<'_, '_>, span: Span) {
702702
let mut err = struct_span_err!(item.tcx.sess, span, E0010,
703703
"allocations are not allowed in {}s", item.mode);

0 commit comments

Comments
 (0)