aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/expr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/expr.rs')
-rw-r--r--crates/ra_hir/src/expr.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs
index 486314cc5..0fadab560 100644
--- a/crates/ra_hir/src/expr.rs
+++ b/crates/ra_hir/src/expr.rs
@@ -14,7 +14,7 @@ use crate::{
14 name::AsName, 14 name::AsName,
15 type_ref::{Mutability, TypeRef}, 15 type_ref::{Mutability, TypeRef},
16}; 16};
17use crate::{ path::GenericArgs, ty::primitive::{UintTy, UncertainIntTy, UncertainFloatTy}}; 17use crate::{ path::GenericArgs, ty::primitive::{IntTy, UncertainIntTy, FloatTy, UncertainFloatTy}};
18 18
19pub use self::scope::{ExprScopes, ScopesWithSourceMap, ScopeEntryWithSyntax}; 19pub use self::scope::{ExprScopes, ScopesWithSourceMap, ScopeEntryWithSyntax};
20 20
@@ -723,7 +723,8 @@ impl ExprCollector {
723 723
724 let lit = match child.flavor() { 724 let lit = match child.flavor() {
725 LiteralFlavor::IntNumber { suffix } => { 725 LiteralFlavor::IntNumber { suffix } => {
726 let known_name = suffix.and_then(|it| UncertainIntTy::from_suffix(&it)); 726 let known_name = suffix
727 .and_then(|it| IntTy::from_suffix(&it).map(UncertainIntTy::Known));
727 728
728 Literal::Int( 729 Literal::Int(
729 Default::default(), 730 Default::default(),
@@ -731,7 +732,8 @@ impl ExprCollector {
731 ) 732 )
732 } 733 }
733 LiteralFlavor::FloatNumber { suffix } => { 734 LiteralFlavor::FloatNumber { suffix } => {
734 let known_name = suffix.and_then(|it| UncertainFloatTy::from_suffix(&it)); 735 let known_name = suffix
736 .and_then(|it| FloatTy::from_suffix(&it).map(UncertainFloatTy::Known));
735 737
736 Literal::Float( 738 Literal::Float(
737 Default::default(), 739 Default::default(),
@@ -741,7 +743,7 @@ impl ExprCollector {
741 LiteralFlavor::ByteString => Literal::ByteString(Default::default()), 743 LiteralFlavor::ByteString => Literal::ByteString(Default::default()),
742 LiteralFlavor::String => Literal::String(Default::default()), 744 LiteralFlavor::String => Literal::String(Default::default()),
743 LiteralFlavor::Byte => { 745 LiteralFlavor::Byte => {
744 Literal::Int(Default::default(), UncertainIntTy::Unsigned(UintTy::U8)) 746 Literal::Int(Default::default(), UncertainIntTy::Known(IntTy::u8()))
745 } 747 }
746 LiteralFlavor::Bool => Literal::Bool(Default::default()), 748 LiteralFlavor::Bool => Literal::Bool(Default::default()),
747 LiteralFlavor::Char => Literal::Char(Default::default()), 749 LiteralFlavor::Char => Literal::Char(Default::default()),