Closed
Description
For example, you have this code:
pub type Wibble {
Wibble(wibble: Int)
}
pub fn main(wibble: Wibble) {
let Wibble(inner) = wibble
do_something_with(inner)
}
But then you change the Wibble
type:
pub type Wibble {
Wibble(wibble: Int)
Wobble(wobble: Int)
}
The let
expression now fails to compile. It could be useful to have a code action to turn:
let Wibble(inner) = wibble
into:
let inner = case wibble {
Wibble(inner) -> inner
_ -> todo
}
This would be very similar to the code action to convert let assert
to case
, except it would only be offered if the let
expression is not exhaustive.
Metadata
Metadata
Assignees
Labels
No labels