Skip to content

Commit

Permalink
Auto merge of #107728 - RalfJung:miri-dyn-star, r=RalfJung,oli-obk
Browse files Browse the repository at this point in the history
Miri: basic dyn* support

As usual I am very unsure about the dynamic dispatch stuff, but it passes even the `Pin<&mut dyn* Trait>` test so that is something.

TBH I think it was a mistake to make `dyn Trait` and `dyn* Trait` part of the same `TyKind` variant. Almost everywhere in Miri this lead to the wrong default behavior, resulting in strange ICEs instead of nice "unimplemented" messages. The two types describe pretty different runtime data layout after all.

Strangely I did not need to do the equivalent of [this diff](rust-lang/rust#106532 (comment)) in Miri. Maybe that is because the unsizing logic matches on `ty::Dynamic(.., ty::Dyn)` already? In `unsized_info` I don't think the `target_dyn_kind` can be `DynStar`, since then it wouldn't be unsized!

r? `@oli-obk` Cc `@eholk` (dyn-star) rust-lang/rust#102425
  • Loading branch information
bors committed Feb 21, 2023
2 parents 82fe3d7 ebc2bd6 commit c2dd4d8
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit c2dd4d8

Please sign in to comment.