Refactor token collection to capture trailing token immediately

This commit is contained in:
Aaron Hill 2021-01-14 10:42:01 -05:00
parent dc1eee2f25
commit ccfc292999
No known key found for this signature in database
GPG key ID: B4087E510E98B164
5 changed files with 124 additions and 118 deletions

View file

@ -292,7 +292,7 @@ pub fn nt_to_tokenstream(
} else if matches!(synthesize_tokens, CanSynthesizeMissingTokens::Yes) {
return fake_token_stream(sess, nt);
} else {
panic!("Missing tokens for nt {:?}", pprust::nonterminal_to_string(nt));
panic!("Missing tokens for nt at {:?}: {:?}", nt.span(), pprust::nonterminal_to_string(nt));
}
}