diff options
| author | Aleksey Kladov <aleksey.kladov@gmail.com> | 2019-09-25 10:17:59 +0300 |
|---|---|---|
| committer | Aleksey Kladov <aleksey.kladov@gmail.com> | 2019-09-25 10:32:04 +0300 |
| commit | 538437e829fd1bdaaf5104f7750327cfdeed29bf (patch) | |
| tree | cb9f31a6c9482481bc2174f9f725e9e1dceda676 /src/libsyntax/ext/mbe/macro_parser.rs | |
| parent | 9a020186f8d4411a9820c4e3378f86ea2ca72af5 (diff) | |
| download | rust-538437e829fd1bdaaf5104f7750327cfdeed29bf.tar.gz rust-538437e829fd1bdaaf5104f7750327cfdeed29bf.zip | |
move function closer to its usage
Diffstat (limited to 'src/libsyntax/ext/mbe/macro_parser.rs')
| -rw-r--r-- | src/libsyntax/ext/mbe/macro_parser.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/libsyntax/ext/mbe/macro_parser.rs b/src/libsyntax/ext/mbe/macro_parser.rs index b51384d3b15..8f49ba9572d 100644 --- a/src/libsyntax/ext/mbe/macro_parser.rs +++ b/src/libsyntax/ext/mbe/macro_parser.rs @@ -413,18 +413,6 @@ fn nameize<I: Iterator<Item = NamedMatch>>( Success(ret_val) } -/// Generates an appropriate parsing failure message. For EOF, this is "unexpected end...". For -/// other tokens, this is "unexpected token...". -crate fn parse_failure_msg(tok: &Token) -> String { - match tok.kind { - token::Eof => "unexpected end of macro invocation".to_string(), - _ => format!( - "no rules expected the token `{}`", - pprust::token_to_string(tok) - ), - } -} - /// Performs a token equality check, ignoring syntax context (that is, an unhygienic comparison) fn token_name_eq(t1: &Token, t2: &Token) -> bool { if let (Some((ident1, is_raw1)), Some((ident2, is_raw2))) = (t1.ident(), t2.ident()) { |
