Random musing on the library-level UB casting problem #139036
Labels
C-discussion
Category: Discussion or questions that doesn't represent real issues.
T-lang
Relevant to the language 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.
Over in:
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:Playground link
Translating this to a non-
dyn
context, we get this, which has a similar shape to it:Playground link
@rustbot labels +T-lang +T-types +C-discussion
The text was updated successfully, but these errors were encountered: