Inconsistent vtable layout with projections in supertrait bounds, making upcasting unsound #135315
Labels
A-coercions
Area: implicit and explicit `expr as Type` coercions
A-trait-objects
Area: trait objects, vtable layout
C-bug
Category: This is a bug.
F-trait_upcasting
`#![feature(trait_upcasting)]`
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
(playground)
example output (shortened):
so apparently, we're calling
_print_numbers
actually, because the vtable ofdyn Trait
anddyn Middle<()>
aren't compatible.@rustbot label F-trait_upcasting, I-unsound, T-compiler, requires-nightly, A-trait-objects, A-coercions
The text was updated successfully, but these errors were encountered: