Skip to content

Commit 0b418f2

Browse files
committed
Return coherent description for boolean instead of panicking
1 parent 96f1da8 commit 0b418f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: compiler/rustc_ast/src/token.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ impl LitKind {
167167

168168
pub fn descr(self) -> &'static str {
169169
match self {
170-
Bool => panic!("literal token contains `Lit::Bool`"),
170+
Bool => "boolean",
171171
Byte => "byte",
172172
Char => "char",
173173
Integer => "integer",

0 commit comments

Comments
 (0)