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
let x = Some(1);match&x {Some(n) => n,// n should be &i32}match&mut x {Some(n) => n,// n should be &mut i32}
and so on. We currently just infer wrong types in this situation. To fix this, when walking through patterns with infer_pat, we need to keep track of the 'binding mode' and apply it when creating bindings. This is also explained in the rust reference; and I think rustc handles it here.
The text was updated successfully, but these errors were encountered:
E.g.
and so on. We currently just infer wrong types in this situation. To fix this, when walking through patterns with
infer_pat
, we need to keep track of the 'binding mode' and apply it when creating bindings. This is also explained in the rust reference; and I think rustc handles it here.The text was updated successfully, but these errors were encountered: