Merge pull request #246 from fitzgen/unrecognized-token-with-expected

Ignore the possible expected token when we find an unrecognized token
This commit is contained in:
Niko Matsakis 2017-07-11 13:37:01 -04:00 committed by GitHub
commit 690db010be

View File

@ -209,7 +209,7 @@ fn parse_and_normalize_grammar(session: &Session, file_text: &FileText) -> io::R
}
Err(ParseError::UnrecognizedToken { token: Some((lo, _, hi)), expected }) => {
assert!(expected.is_empty()); // didn't implement this yet :)
let _ = expected; // didn't implement this yet :)
let text = &file_text.text()[lo..hi];
report_error(&file_text,
pt::Span(lo, hi),