From 0b418f2b03fdd146a6099ea8032ea8580d2edf49 Mon Sep 17 00:00:00 2001 From: Urgau Date: Fri, 3 May 2024 21:13:10 +0200 Subject: [PATCH] Return coherent description for boolean instead of panicking --- compiler/rustc_ast/src/token.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_ast/src/token.rs b/compiler/rustc_ast/src/token.rs index 6e9465307490..72f89737f995 100644 --- a/compiler/rustc_ast/src/token.rs +++ b/compiler/rustc_ast/src/token.rs @@ -167,7 +167,7 @@ pub fn article(self) -> &'static str { pub fn descr(self) -> &'static str { match self { - Bool => panic!("literal token contains `Lit::Bool`"), + Bool => "boolean", Byte => "byte", Char => "char", Integer => "integer",