Skip to content

Commit

Permalink
Return coherent description for boolean instead of panicking
Browse files Browse the repository at this point in the history
  • Loading branch information
Urgau committed May 3, 2024
1 parent d6d3b34 commit cc521f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit cc521f2

Please sign in to comment.