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:
commit
2480e3bbc5
77 changed files with 152 additions and 159 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue