Repository: rust-lang/miri

Issue #1038: Implement arbitrary-self dynamic method receivers
Created: 2019-11-07T07:43:31Z
The tests added in rust-lang/rust#54383 fail in Miri:
  15: core::result::unwrap_failed
             at src/libcore/result.rs:1165
  16: core::result::Result<T,E>::unwrap
             at /rustc/e4931eaaa3d95189b30e90d3af9f0db17c41bbb0/src/libcore/result.rs:933
  17: rustc_mir::interpret::place::<impl rustc_mir::interpret::operand::OpTy<Tag>>::assert_mem_place
             at /rustc/e4931eaaa3d95189b30e90d3af9f0db17c41bbb0/src/librustc_mir/interpret/place.rs:232
  18: rustc_mir::interpret::terminator::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::eval_fn_call
             at /rustc/e4931eaaa3d95189b30e90d3af9f0db17c41bbb0/src/librustc_mir/interpret/terminator.rs:437
  19: rustc_mir::interpret::terminator::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::eval_terminator
             at /rustc/e4931eaaa3d95189b30e90d3af9f0db17c41bbb0/src/librustc_mir/interpret/terminator.rs:94
  20: rustc_mir::interpret::step::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::terminator
             at /rustc/e4931eaaa3d95189b30e90d3af9f0db17c41bbb0/src/librustc_mir/interpret/step.rs:293
  21: rustc_mir::interpret::step::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::step
             at /rustc/e4931eaaa3d95189b30e90d3af9f0db17c41bbb0/src/librustc_mir/interpret/step.rs:69
  22: rustc_mir::interpret::step::<impl rustc_mir::interpret::eval_context::InterpCx<M>>::run
             at /rustc/e4931eaaa3d95189b30e90d3af9f0db17c41bbb0/src/librustc_mir/interpret/step.rs:40
  23: miri::eval::eval_main::{{closure}}
             at src/eval.rs:190

This is ICEing in this code:
https://github.com/rust-lang/rust/blob/7a76fe76f756895b8cda1e10398f2268656a2e0f/src/librustc_mir/interpret/terminator.rs#L430-L438
Clearly, that code assumes that only things that builtin_deref supports are receivers, and everything else is unsized -- hence the assert_mem_place, which fails.
So, how does one implement arbitrary-self dynamic receivers? What actually happens at run-time here? I don't know.^^
Cc @eddyb @mikeyhew

Duplicate issue #1795: ICE on "cargo miri test"
Created: 2021-05-13T21:42:22Z
error: internal compiler error: /rustc/952c5732c2d25a875f90e5cd5dd29a1a21c1d4a2/compiler/rustc_mir/src/interpret/place.rs:240:18: vtable not supported on type std::pin::Pin<&mut dyn std::future::Future<Output = ()> + std::marker::Send>

thread 'rustc' panicked at 'Box<Any>', /rustc/952c5732c2d25a875f90e5cd5dd29a1a21c1d4a2/library/std/src/panic.rs:59:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.54.0-nightly (952c5732c 2021-05-13) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: aborting due to previous error

Closing comment (2021-12-16T14:29:52Z): Closing as duplicate of #1038.