about summary refs log tree commit diff
path: root/compiler/rustc_ast/src/token.rs
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2024-05-03 21:13:10 +0200
committerUrgau <urgau@numericable.fr>2024-05-06 07:44:41 +0200
commit0b418f2b03fdd146a6099ea8032ea8580d2edf49 (patch)
tree2f3cd54375cd8f2e2811d1945f7f00abfc3e43e7 /compiler/rustc_ast/src/token.rs
parent96f1da82687f499dd3f57006ae71548714532382 (diff)
downloadrust-0b418f2b03fdd146a6099ea8032ea8580d2edf49.tar.gz
rust-0b418f2b03fdd146a6099ea8032ea8580d2edf49.zip
Return coherent description for boolean instead of panicking
Diffstat (limited to 'compiler/rustc_ast/src/token.rs')
-rw-r--r--compiler/rustc_ast/src/token.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ast/src/token.rs b/compiler/rustc_ast/src/token.rs
index 6e946530749..72f89737f99 100644
--- a/compiler/rustc_ast/src/token.rs
+++ b/compiler/rustc_ast/src/token.rs
@@ -167,7 +167,7 @@ impl LitKind {
 
     pub fn descr(self) -> &'static str {
         match self {
-            Bool => panic!("literal token contains `Lit::Bool`"),
+            Bool => "boolean",
             Byte => "byte",
             Char => "char",
             Integer => "integer",