diff options
| author | bors <bors@rust-lang.org> | 2019-10-06 04:59:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-10-06 04:59:16 +0000 |
| commit | 5a8fb7c24d85d0bd911ca465c4a077c7cee608ae (patch) | |
| tree | b096ac2dd13c5edbfc3edaf9ecce9edde915470d /src/libsyntax/parse/parser | |
| parent | 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91 (diff) | |
| parent | 69598dc3cfd7e0ad63282268ea58ebac0b6031dc (diff) | |
| download | rust-5a8fb7c24d85d0bd911ca465c4a077c7cee608ae.tar.gz rust-5a8fb7c24d85d0bd911ca465c4a077c7cee608ae.zip | |
Auto merge of #65152 - tmandry:rollup-btn4a01, r=tmandry
Rollup of 18 pull requests This contains changes from all the successful runs that bors marked as timed out, plus a revert of #63649 which appears to be the immediate cause of the timeouts. Successful merges: - #64708 (Stabilize `Option::as_deref` and `Option::as_deref_mut`) - #64728 (Stabilize UdpSocket::peer_addr) - #64765 (std: Reduce checks for `feature = "backtrace"`) - #64909 (When encountering chained operators use heuristics to recover from bad turbofish) - #65011 (Do not ICE when dereferencing non-Copy raw pointer) - #65064 (permit asyncawait-ondeck to be added by anyone) - #65066 ([const-prop] Fix ICE when trying to eval polymorphic promoted MIR) - #65100 (Replace GeneratorSubsts with SubstsRef) - #65105 (Split out some passes from librustc) - #65106 (Allow unused attributes to avoid incremental bug) - #65113 (Fix lonely backtick) - #65116 (Remove unneeded visit_statement definition) - #65118 (Update the documented default of -Z mutable-noalias) - #65123 (Account for macro invocation in `let mut $pat` diagnostic.) - #65124 (Replace some instances of `as *[const | mut] _` with `.cast()`) - #65126 (Fix typo on `now()` comments) - #65130 (lint: extern non-exhaustive types are improper) - #65151 (Revert #63649 - "Upgrade Emscripten targets to use upstream LLVM backend") Failed merges: r? @ghost
Diffstat (limited to 'src/libsyntax/parse/parser')
| -rw-r--r-- | src/libsyntax/parse/parser/expr.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser/pat.rs | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser/expr.rs b/src/libsyntax/parse/parser/expr.rs index 23674ad589d..b459782d237 100644 --- a/src/libsyntax/parse/parser/expr.rs +++ b/src/libsyntax/parse/parser/expr.rs @@ -238,7 +238,9 @@ impl<'a> Parser<'a> { self.bump(); if op.is_comparison() { - self.check_no_chained_comparison(&lhs, &op)?; + if let Some(expr) = self.check_no_chained_comparison(&lhs, &op)? { + return Ok(expr); + } } // Special cases: if op == AssocOp::As { diff --git a/src/libsyntax/parse/parser/pat.rs b/src/libsyntax/parse/parser/pat.rs index 7eb2a73a11a..48f9e301610 100644 --- a/src/libsyntax/parse/parser/pat.rs +++ b/src/libsyntax/parse/parser/pat.rs @@ -4,7 +4,7 @@ use crate::{maybe_recover_from_interpolated_ty_qpath, maybe_whole}; use crate::ptr::P; use crate::ast::{self, Attribute, Pat, PatKind, FieldPat, RangeEnd, RangeSyntax, Mac}; use crate::ast::{BindingMode, Ident, Mutability, Path, QSelf, Expr, ExprKind}; -use crate::mut_visit::{noop_visit_pat, MutVisitor}; +use crate::mut_visit::{noop_visit_pat, noop_visit_mac, MutVisitor}; use crate::parse::token::{self}; use crate::print::pprust; use crate::source_map::{respan, Span, Spanned}; @@ -481,6 +481,10 @@ impl<'a> Parser<'a> { fn make_all_value_bindings_mutable(pat: &mut P<Pat>) -> bool { struct AddMut(bool); impl MutVisitor for AddMut { + fn visit_mac(&mut self, mac: &mut Mac) { + noop_visit_mac(mac, self); + } + fn visit_pat(&mut self, pat: &mut P<Pat>) { if let PatKind::Ident(BindingMode::ByValue(ref mut m @ Mutability::Immutable), ..) = pat.kind |
