Rustup to rustc 1.12.0-nightly (f93aaf84c 2016-07-09)

This commit is contained in:
mcarton 2016-07-10 15:42:02 +02:00
parent 1f7d7d76e7
commit 3a201f43ec
No known key found for this signature in database
GPG Key ID: 5E427C794CBA45E8
3 changed files with 4 additions and 6 deletions

View File

@ -253,7 +253,6 @@ fn bindings<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, pat: &Pat) -> HashMap<Interned
} }
} }
PatKind::Lit(..) | PatKind::Lit(..) |
PatKind::QPath(..) |
PatKind::Range(..) | PatKind::Range(..) |
PatKind::Wild | PatKind::Wild |
PatKind::Path(..) => (), PatKind::Path(..) => (),

View File

@ -202,7 +202,7 @@ fn check_single_match_opt_like(cx: &LateContext, ex: &Expr, arms: &[Arm], expr:
path.to_string() path.to_string()
} }
PatKind::Binding(BindByValue(MutImmutable), ident, None) => ident.node.to_string(), PatKind::Binding(BindByValue(MutImmutable), ident, None) => ident.node.to_string(),
PatKind::Path(ref path) => path.to_string(), PatKind::Path(None, ref path) => path.to_string(),
_ => return, _ => return,
}; };

View File

@ -148,11 +148,10 @@ impl<'a, 'tcx: 'a> SpanlessEq<'a, 'tcx> {
(&PatKind::Binding(ref lb, ref li, ref lp), &PatKind::Binding(ref rb, ref ri, ref rp)) => { (&PatKind::Binding(ref lb, ref li, ref lp), &PatKind::Binding(ref rb, ref ri, ref rp)) => {
lb == rb && li.node.as_str() == ri.node.as_str() && both(lp, rp, |l, r| self.eq_pat(l, r)) lb == rb && li.node.as_str() == ri.node.as_str() && both(lp, rp, |l, r| self.eq_pat(l, r))
} }
(&PatKind::Path(ref l), &PatKind::Path(ref r)) => self.eq_path(l, r), (&PatKind::Path(ref ql, ref l), &PatKind::Path(ref qr, ref r)) => {
(&PatKind::Lit(ref l), &PatKind::Lit(ref r)) => self.eq_expr(l, r), both(ql, qr, |ql, qr| self.eq_qself(ql, qr)) && self.eq_path(l, r)
(&PatKind::QPath(ref ls, ref lp), &PatKind::QPath(ref rs, ref rp)) => {
self.eq_qself(ls, rs) && self.eq_path(lp, rp)
} }
(&PatKind::Lit(ref l), &PatKind::Lit(ref r)) => self.eq_expr(l, r),
(&PatKind::Tuple(ref l, ls), &PatKind::Tuple(ref r, rs)) => { (&PatKind::Tuple(ref l, ls), &PatKind::Tuple(ref r, rs)) => {
ls == rs && over(l, r, |l, r| self.eq_pat(l, r)) ls == rs && over(l, r, |l, r| self.eq_pat(l, r))
} }