mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-03 17:35:28 +03:00
Return coherent description for boolean instead of panicking
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user