diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_hir_def/src/body/lower.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/ast/expr_extensions.rs | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index 7b809cf4f..28c570c76 100644 --- a/crates/ra_hir_def/src/body/lower.rs +++ b/crates/ra_hir_def/src/body/lower.rs | |||
@@ -748,7 +748,7 @@ impl From<ast::LiteralKind> for Literal { | |||
748 | LiteralKind::ByteString => Literal::ByteString(Default::default()), | 748 | LiteralKind::ByteString => Literal::ByteString(Default::default()), |
749 | LiteralKind::String => Literal::String(Default::default()), | 749 | LiteralKind::String => Literal::String(Default::default()), |
750 | LiteralKind::Byte => Literal::Int(Default::default(), Some(BuiltinInt::U8)), | 750 | LiteralKind::Byte => Literal::Int(Default::default(), Some(BuiltinInt::U8)), |
751 | LiteralKind::Bool => Literal::Bool(Default::default()), | 751 | LiteralKind::Bool(val) => Literal::Bool(val), |
752 | LiteralKind::Char => Literal::Char(Default::default()), | 752 | LiteralKind::Char => Literal::Char(Default::default()), |
753 | } | 753 | } |
754 | } | 754 | } |
diff --git a/crates/ra_syntax/src/ast/expr_extensions.rs b/crates/ra_syntax/src/ast/expr_extensions.rs index 77cceb382..8bbd946c0 100644 --- a/crates/ra_syntax/src/ast/expr_extensions.rs +++ b/crates/ra_syntax/src/ast/expr_extensions.rs | |||
@@ -308,7 +308,7 @@ pub enum LiteralKind { | |||
308 | Byte, | 308 | Byte, |
309 | IntNumber { suffix: Option<SmolStr> }, | 309 | IntNumber { suffix: Option<SmolStr> }, |
310 | FloatNumber { suffix: Option<SmolStr> }, | 310 | FloatNumber { suffix: Option<SmolStr> }, |
311 | Bool, | 311 | Bool(bool), |
312 | } | 312 | } |
313 | 313 | ||
314 | impl ast::Literal { | 314 | impl ast::Literal { |
@@ -355,7 +355,8 @@ impl ast::Literal { | |||
355 | LiteralKind::FloatNumber { suffix: Self::find_suffix(&text, &FLOAT_SUFFIXES) } | 355 | LiteralKind::FloatNumber { suffix: Self::find_suffix(&text, &FLOAT_SUFFIXES) } |
356 | } | 356 | } |
357 | STRING | RAW_STRING => LiteralKind::String, | 357 | STRING | RAW_STRING => LiteralKind::String, |
358 | T![true] | T![false] => LiteralKind::Bool, | 358 | T![true] => LiteralKind::Bool(true), |
359 | T![false] => LiteralKind::Bool(false), | ||
359 | BYTE_STRING | RAW_BYTE_STRING => LiteralKind::ByteString, | 360 | BYTE_STRING | RAW_BYTE_STRING => LiteralKind::ByteString, |
360 | CHAR => LiteralKind::Char, | 361 | CHAR => LiteralKind::Char, |
361 | BYTE => LiteralKind::Byte, | 362 | BYTE => LiteralKind::Byte, |