Closed as not planned
Description
Over in:
- arbitrary_self_types + derive_coerce_pointee allows calling methods whose where clauses are violated #136702
- [WIP] Forbid object lifetime changing pointer casts #136776
We're talking about how safe lifetime casts can allow library-level UB. It's interesting to think about other things that fit this pattern that also might be said to cause library-level UB under certain expectations.
steffahn described in #136702 (comment) a plan for using dyn Trait
and nightly features for triggering library-level UB. It looks like this:
Translating this to a non-dyn
context, we get this, which has a similar shape to it:
@rustbot labels +T-lang +T-types +C-discussion