Closed
Description
One of the tricky questions that came up when implementing default binding modes is how to handle the compiler's current logic around patterns with ref
bindings. Currently, if a ref-binding is included, this disables coercion for let
statements and tweaks how we handle match
statements. It's unclear precisely what we ought to do now that ref
bindings are not always syntactically visible. This issue exists to track the question.
There has already been a number of conversations on the topic. Here are some links for background reading:
- @nikomatsakis commenting on why we can probably get away with only considering syntactic bindings.
- @arielb1's response points out that we might want to consider possible future behavior around
DerefPure
as well - Some follow-up discussion between @nikomatsakis and @arielb1 on gitter
- A very early conversation on the topic.