diff options
| author | bors <bors@rust-lang.org> | 2019-10-15 15:14:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-10-15 15:14:43 +0000 |
| commit | 237d54ff6c4fb3577e02d4c5af02813c11b63d01 (patch) | |
| tree | 339914aceec730f698e799ed859a7858443967d0 /src/libsyntax/parse/parser.rs | |
| parent | 437ca55f23b7ed0051334a7e38ecabd83a173b53 (diff) | |
| parent | 8370f14225cfb1a7f0eae8b8dadfaa4393e00d7c (diff) | |
| download | rust-237d54ff6c4fb3577e02d4c5af02813c11b63d01.tar.gz rust-237d54ff6c4fb3577e02d4c5af02813c11b63d01.zip | |
Auto merge of #65433 - Centril:rollup-rzvry15, r=Centril
Rollup of 4 pull requests Successful merges: - #64035 (Stabilize proc macros generating `macro_rules` items) - #65376 (syntax: misc extractions) - #65426 (Remove custom `PartialEq` impls for `LocalInternedString`.) - #65428 (Refactor: Rename `db` locals to `diag`) Failed merges: r? @ghost
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 478cfefc224..86383761484 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -15,12 +15,13 @@ use crate::ast::{ self, DUMMY_NODE_ID, AttrStyle, Attribute, CrateSugar, Ident, IsAsync, MacDelimiter, Mutability, StrStyle, Visibility, VisibilityKind, Unsafety, }; -use crate::parse::{ParseSess, PResult, Directory, DirectoryOwnership, SeqSep, literal, token}; +use crate::parse::{PResult, Directory, DirectoryOwnership, SeqSep}; use crate::parse::lexer::UnmatchedBrace; use crate::parse::lexer::comments::{doc_comment_style, strip_doc_comment_decoration}; -use crate::parse::token::{Token, TokenKind, DelimToken}; +use crate::parse::token::{self, Token, TokenKind, DelimToken}; use crate::print::pprust; use crate::ptr::P; +use crate::sess::ParseSess; use crate::source_map::respan; use crate::symbol::{kw, sym, Symbol}; use crate::tokenstream::{self, DelimSpan, TokenTree, TokenStream, TreeAndJoint}; @@ -637,10 +638,6 @@ impl<'a> Parser<'a> { } } - fn expect_no_suffix(&self, sp: Span, kind: &str, suffix: Option<ast::Name>) { - literal::expect_no_suffix(&self.sess.span_diagnostic, sp, kind, suffix) - } - /// Attempts to consume a `<`. If `<<` is seen, replaces it with a single /// `<` and continue. If `<-` is seen, replaces it with a single `<` /// and continue. If a `<` is not seen, returns false. @@ -1366,7 +1363,7 @@ impl<'a> Parser<'a> { ], Applicability::MaybeIncorrect, ).span_suggestion( - self.sess.source_map.next_point(self.prev_span), + self.sess.source_map().next_point(self.prev_span), "add a semicolon", ';'.to_string(), Applicability::MaybeIncorrect, |
