about summary refs log tree commit diff
path: root/src/librustc_parse/parser/diagnostics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_parse/parser/diagnostics.rs')
-rw-r--r--src/librustc_parse/parser/diagnostics.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_parse/parser/diagnostics.rs b/src/librustc_parse/parser/diagnostics.rs
index 578f816be58..fc8272a68da 100644
--- a/src/librustc_parse/parser/diagnostics.rs
+++ b/src/librustc_parse/parser/diagnostics.rs
@@ -866,7 +866,7 @@ impl<'a> Parser<'a> {
         let appl = Applicability::MachineApplicable;
         if self.token.span == DUMMY_SP || self.prev_span == DUMMY_SP {
             // Likely inside a macro, can't provide meaninful suggestions.
-            return self.expect(&token::Semi).map(|_| ());
+            return self.expect(&token::Semi).map(drop);
         } else if !sm.is_multiline(self.prev_span.until(self.token.span)) {
             // The current token is in the same line as the prior token, not recoverable.
         } else if self.look_ahead(1, |t| {
@@ -905,7 +905,7 @@ impl<'a> Parser<'a> {
                 .emit();
             return Ok(());
         }
-        self.expect(&token::Semi).map(|_| ()) // Error unconditionally
+        self.expect(&token::Semi).map(drop) // Error unconditionally
     }
 
     pub(super) fn parse_semi_or_incorrect_foreign_fn_body(