about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-10-30 06:40:36 +0100
committerGitHub <noreply@github.com>2024-10-30 06:40:36 +0100
commit2480e3bbc5c74717dbc9475edef58d492e443deb (patch)
tree14ef7cffbba6c3c1feff479e1b2f85742271a2a9 /compiler/rustc_parse/src/parser
parentaf33bc3ec05c84be1ab9b9114cf9d3ae589d60a1 (diff)
parentdd2b027d5d509dd95c5ef6f83ea6283f3e98d5ed (diff)
downloadrust-2480e3bbc5c74717dbc9475edef58d492e443deb.tar.gz
rust-2480e3bbc5c74717dbc9475edef58d492e443deb.zip
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``
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs
index 77ad4fdeeb1..50a8b6542df 100644
--- a/compiler/rustc_parse/src/parser/mod.rs
+++ b/compiler/rustc_parse/src/parser/mod.rs
@@ -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) {