diff options
| author | bors <bors@rust-lang.org> | 2019-07-13 17:11:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-07-13 17:11:36 +0000 |
| commit | 69656fa4cbafc378fd63f9186d93b0df3cdd9320 (patch) | |
| tree | 690b6c3c570374a457a346b7462c8c7c9061d6c3 /src/libsyntax | |
| parent | ec30876f30082a7b32876bd78a8da01f11dcde1e (diff) | |
| parent | 791ceb6a9c5dfeeeb5fc6098db2022a99c2eec18 (diff) | |
| download | rust-69656fa4cbafc378fd63f9186d93b0df3cdd9320.tar.gz rust-69656fa4cbafc378fd63f9186d93b0df3cdd9320.zip | |
Auto merge of #62659 - Centril:rollup-90oz643, r=Centril
Rollup of 5 pull requests Successful merges: - #62577 (Add an AtomicCell abstraction) - #62585 (Make struct_tail normalize when possible) - #62604 (Handle errors during error recovery gracefully) - #62636 (rustbuild: Improve assert about building tools once) - #62651 (Make some rustc macros more hygienic) Failed merges: r? @ghost
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/diagnostics/macros.rs | 8 | ||||
| -rw-r--r-- | src/libsyntax/lib.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 11 |
3 files changed, 11 insertions, 10 deletions
diff --git a/src/libsyntax/diagnostics/macros.rs b/src/libsyntax/diagnostics/macros.rs index 6f7493ad597..b754d083376 100644 --- a/src/libsyntax/diagnostics/macros.rs +++ b/src/libsyntax/diagnostics/macros.rs @@ -170,19 +170,19 @@ macro_rules! help { #[macro_export] macro_rules! register_diagnostics { ($($code:tt),*) => ( - $(register_diagnostic! { $code })* + $($crate::register_diagnostic! { $code })* ); ($($code:tt),*,) => ( - $(register_diagnostic! { $code })* + $($crate::register_diagnostic! { $code })* ) } #[macro_export] macro_rules! register_long_diagnostics { ($($code:tt: $description:tt),*) => ( - $(register_diagnostic! { $code, $description })* + $($crate::register_diagnostic! { $code, $description })* ); ($($code:tt: $description:tt),*,) => ( - $(register_diagnostic! { $code, $description })* + $($crate::register_diagnostic! { $code, $description })* ) } diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index ee7fb97ffd7..591f2fb599b 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -18,9 +18,7 @@ #![feature(label_break_value)] #![feature(mem_take)] #![feature(nll)] -#![feature(rustc_attrs)] #![feature(rustc_diagnostic_macros)] -#![feature(step_trait)] #![feature(try_trait)] #![feature(unicode_internals)] diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index e0633f73ac4..83030e89af3 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -7410,10 +7410,13 @@ impl<'a> Parser<'a> { } else if self.look_ahead(1, |t| *t == token::OpenDelim(token::Paren)) { let ident = self.parse_ident().unwrap(); self.bump(); // `(` - let kw_name = if let Ok(Some(_)) = self.parse_self_arg_with_attrs() { - "method" - } else { - "function" + let kw_name = match self.parse_self_arg_with_attrs() { + Ok(Some(_)) => "method", + Ok(None) => "function", + Err(mut err) => { + err.cancel(); + "function" + } }; self.consume_block(token::Paren); let (kw, kw_name, ambiguous) = if self.check(&token::RArrow) { |
