mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Return coherent description for boolean instead of panicking
This commit is contained in:
parent
96f1da8268
commit
0b418f2b03
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user