Can implement coerce by packing a borrowed pointer inside a @Trait #7247
Labels
A-trait-system
Area: Trait system
A-type-system
Area: Type system
I-crash
Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
The gist is that the kind-checker permits putting borrowed pointers into traits, which will cause the compiler to forget about the lifetime. The following program uses this to return a borrowed pointer outside of its stack frame, and then collides another stack frame into it to implement type coercion.
This will be fixed by #3569.
The text was updated successfully, but these errors were encountered: