Open
Description
Consider the following situation:
- You have an
Box<dyn SomeTrait + 'a>
- You transmute it to a
Box<dyn SomeTrait + 'static>
Is this transmute UB, assuming you actually destroy the box before the end of the lifetime 'a
? It is a transmute that I see people do relatively often.
Similarly for &dyn SomeTrait
and &mut dyn SomeTrait
.
Metadata
Metadata
Assignees
Labels
No labels