From 136ad015b6862274bf8c161dc5d2955409ed1465 Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Fri, 6 Mar 2020 12:13:55 +0100 Subject: fix various typos --- src/librustc_parse/parser/attr.rs | 2 +- src/librustc_parse/parser/diagnostics.rs | 2 +- src/librustc_parse/parser/expr.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/librustc_parse/parser') diff --git a/src/librustc_parse/parser/attr.rs b/src/librustc_parse/parser/attr.rs index 2dccb04f6cc..bdd78e671a8 100644 --- a/src/librustc_parse/parser/attr.rs +++ b/src/librustc_parse/parser/attr.rs @@ -138,7 +138,7 @@ impl<'a> Parser<'a> { if let Some(prev_attr_sp) = prev_attr_sp { diagnostic - .span_label(attr_sp, "not permitted following an outer attibute") + .span_label(attr_sp, "not permitted following an outer attribute") .span_label(prev_attr_sp, prev_attr_note); } diff --git a/src/librustc_parse/parser/diagnostics.rs b/src/librustc_parse/parser/diagnostics.rs index 8b43b424f55..6587e763d50 100644 --- a/src/librustc_parse/parser/diagnostics.rs +++ b/src/librustc_parse/parser/diagnostics.rs @@ -895,7 +895,7 @@ impl<'a> Parser<'a> { let msg = format!("expected `;`, found `{}`", super::token_descr(&self.token)); let appl = Applicability::MachineApplicable; if self.token.span == DUMMY_SP || self.prev_token.span == DUMMY_SP { - // Likely inside a macro, can't provide meaninful suggestions. + // Likely inside a macro, can't provide meaningful suggestions. return self.expect(&token::Semi).map(drop); } else if !sm.is_multiline(self.prev_token.span.until(self.token.span)) { // The current token is in the same line as the prior token, not recoverable. diff --git a/src/librustc_parse/parser/expr.rs b/src/librustc_parse/parser/expr.rs index 18ddd23588e..e9ee797b90f 100644 --- a/src/librustc_parse/parser/expr.rs +++ b/src/librustc_parse/parser/expr.rs @@ -1373,7 +1373,7 @@ impl<'a> Parser<'a> { )) } - /// Parses an optional `move` prefix to a closure lke construct. + /// Parses an optional `move` prefix to a closure-like construct. fn parse_capture_clause(&mut self) -> CaptureBy { if self.eat_keyword(kw::Move) { CaptureBy::Value } else { CaptureBy::Ref } } -- cgit 1.4.1-3-g733a5