From df0e4bf911aecfa660dc2ad90573734dcd485e43 Mon Sep 17 00:00:00 2001 From: Jeffrey Seyfried Date: Mon, 26 Sep 2016 11:24:10 +0000 Subject: Move `ensure_complete_parse` into `expand.rs`. --- src/libsyntax/parse/parser.rs | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/libsyntax/parse') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 410ecf068b9..e83d003ab74 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -6171,18 +6171,4 @@ impl<'a> Parser<'a> { _ => Err(self.fatal("expected string literal")) } } - - pub fn ensure_complete_parse(&mut self, macro_name: ast::Name, kind_name: &str, span: Span) { - if self.token == token::Eof { - return - } - - let msg = format!("macro expansion ignores token `{}` and any following", - self.this_token_to_string()); - let mut err = self.diagnostic().struct_span_err(self.span, &msg); - let msg = format!("caused by the macro expansion here; the usage \ - of `{}!` is likely invalid in {} context", - macro_name, kind_name); - err.span_note(span, &msg).emit(); - } } -- cgit 1.4.1-3-g733a5