Correct list of miri-supported operations
Heap allocations are out, indirect `fn` calls are in!
This commit is contained in:
parent
670c84dde3
commit
27bd84916c
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue