-
Notifications
You must be signed in to change notification settings - Fork 391
Closed
Description
#![feature(forget_unsized, unsized_fn_params)]
fn main() {
let b: Box<[u32]> = Box::new([1, 2, 3]);
std::mem::forget_unsized(*b);
}
Miri fails to run the above program with the following error:
error: unsupported operation: unsized locals are not supported
--> /home/julesbertholet/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:159:24
|
159 | intrinsics::forget(t)
| ^ unsized locals are not supported
|
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
= note: BACKTRACE:
= note: inside `std::mem::forget_unsized::<[u32]>`
There are no unsized locals in this program, so at the very least, the error message is incorrect.
Metadata
Metadata
Assignees
Labels
No labels