You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: Miri evaluation error: index out of bounds: the len is 2 but the index is 2
--> t.rs:5:21
|
5 | catch_unwind(|| [0, 1][2]).unwrap_err();
| ^^^^^^^^^ Miri evaluation error: index out of bounds: the len is 2 but the index is 2
|
= note: inside call to closure at /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/src/libstd/panicking.rs:287:40
= note: inside call to `std::panicking::try::do_call::<[closure@t.rs:5:18: 5:30], i32>` at /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/src/libstd/panicking.rs:282:5
= note: inside call to `std::panicking::try::<i32, [closure@t.rs:5:18: 5:30]>` at /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/src/libstd/panic.rs:395:9
note: inside call to `std::panic::catch_unwind::<[closure@t.rs:5:18: 5:30], i32>` at t.rs:5:5
--> t.rs:5:5
|
5 | catch_unwind(|| [0, 1][2]).unwrap_err();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: inside call to `main` at /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/src/libstd/rt.rs:61:34
Miri engine: proper support for `Assert` MIR terminators
This puts down the basis for rust-lang/miri#1070, and I also did some clean-up. The Miri side of this is at rust-lang/miri#1084.
r? @oli-obk
The following code behaves wrong in Miri:
Instead of catching the panic, we get
Cc @Aaron1011
The text was updated successfully, but these errors were encountered: