about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-08-03 10:42:30 +0000
committerbors <bors@rust-lang.org>2021-08-03 10:42:30 +0000
commit2939249f294dd54a9ce78a8ee1f2922a44e7fb7c (patch)
tree215f7fbbdcd75b81227c37b506c3e4fccbdc7985 /compiler/rustc_parse/src/parser
parent3354a44d2fa8d5ba6b8d6b40d2596de2c8292ec1 (diff)
parent331e78d80422ca779c71b19d9273f5d8ee737643 (diff)
downloadrust-2939249f294dd54a9ce78a8ee1f2922a44e7fb7c.tar.gz
rust-2939249f294dd54a9ce78a8ee1f2922a44e7fb7c.zip
Auto merge of #87725 - JohnTitor:rollup-2ywcpuk, r=JohnTitor
Rollup of 8 pull requests

Successful merges:

 - #87645 (Properly find owner of closure in THIR unsafeck)
 - #87646 (Fix a parser ICE on invalid `fn` body)
 - #87652 (Validate that naked functions are never inlined)
 - #87685 (Write docs for SyncOnceCell From and Default impl)
 - #87693 (Add `aarch64-apple-ios-sim` as a possible target to the manifest)
 - #87708 (Add convenience method for handling ipv4-mapped addresses by canonicalizing them)
 - #87711 (Correct typo)
 - #87716 (Allow generic SIMD array element type)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/item.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs
index f77f9bc454b..9fcf2c4d5ec 100644
--- a/compiler/rustc_parse/src/parser/item.rs
+++ b/compiler/rustc_parse/src/parser/item.rs
@@ -1714,13 +1714,11 @@ impl<'a> Parser<'a> {
                     // the AST for typechecking.
                     err.span_label(ident.span, "while parsing this `fn`");
                     err.emit();
-                    (Vec::new(), None)
                 } else {
                     return Err(err);
                 }
-            } else {
-                unreachable!()
             }
+            (Vec::new(), None)
         };
         attrs.extend(inner_attrs);
         Ok(body)