You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Track what drop obligations are established on match arms.
This is accomplished by:
1. Add `MatchMode` enum to `expr_use_visitor`.
2. Computing the match mode for each pattern via a pre-pass, and then
passing the mode along when visiting the pattern in
expr_use_visitor.
3. Adding a `fn matched_pat` callback to expr_use_visitor, which is called on
all nodes of the pattern (as opposed to `fn consume_pat`, which is only
invoked for identifiers at the leaves of the pattern), and invoking it
accordingly.
Of particular interest are the `cat_downcast` instances established
when matching enum variants.
0 commit comments