Rollup merge of #132332 - nnethercote:use-token_descr-more, r=estebank
Use `token_descr` more in error messages This is the first two commits from #124141, put into their own PR to get things rolling. Commit messages have the details. r? ``@estebank`` cc ``@petrochenkov``
This commit is contained in:
@@ -424,7 +424,7 @@ impl TokenDescription {
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn token_descr(token: &Token) -> String {
|
||||
pub fn token_descr(token: &Token) -> String {
|
||||
let name = pprust::token_to_string(token).to_string();
|
||||
|
||||
let kind = match (TokenDescription::from_token(token), &token.kind) {
|
||||
|
||||
Reference in New Issue
Block a user