Unary move breaks linearity when moving out of enums #3082
Labels
A-lifetimes
Area: Lifetimes / regions
A-type-system
Area: Type system
I-crash
Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
This code compiles and runs the destructor twice:
If it's written
let x2 <- *x1
, it instead errors witherror: moving out of enum content
, which is perhaps what this should do too.The text was updated successfully, but these errors were encountered: