This proposal brings some restrictions to address this issue
Assertion failed when destructuring list from a let binding · Issue #4632 · rescript-lang/rescript-compiler (github.com), this is a small change that should not impact users in general.
The toplevel fragile pattern makes calculating exports difficult, to avoid user surpise (assertion failure in compiler), we are going to check if the toplevel pattern match is fragile or not. If it is a fragile pattern in the toplevel, we will raise a type checking error.
For example:
let myList = list{1, 2, 3}
let list{head , ... tail} = myList // fragile pattern since myList may be empty
The old behavior is that this will crash the compiler, the new behavior will raise a type checking error instead. For irrefutable pattern, e.g, tuple, such restriction is lifted.