Inconsistent vtable layout with HRTBs #135316
Labels
A-coercions
Area: implicit and explicit `expr as Type` coercions
A-higher-ranked
Area: Higher-ranked things (e.g., lifetimes, types, trait bounds aka HRTBs)
A-trait-objects
Area: trait objects, vtable layout
C-bug
Category: This is a bug.
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
P-high
High priority
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 for<'a> Trait<&'static (), &'a ()>
anddyn Trait<&'static (), &'static ()>
aren't compatible.@rustbot label I-unsound, T-compiler, A-trait-objects, A-coercions, A-higher-ranked
This code example is technically a regression, starting to misbehave somewhere between
1.55
and1.56
(haven't further bisected yet…)The text was updated successfully, but these errors were encountered: