diff options
author | Aleksey Kladov <[email protected]> | 2019-05-30 12:05:35 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-05-30 12:06:28 +0100 |
commit | e6545cc647829091dd5aae5753bd4f5302becab6 (patch) | |
tree | 640de902fede2421a299ba22609fbd9db5b07231 /crates/ra_hir/src/ty/primitive.rs | |
parent | 6b88735fe6cd3b259816c7c90a2675ee057c9e4c (diff) |
add ModuleDef::BuiltInType
Diffstat (limited to 'crates/ra_hir/src/ty/primitive.rs')
-rw-r--r-- | crates/ra_hir/src/ty/primitive.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/primitive.rs b/crates/ra_hir/src/ty/primitive.rs index b37326db7..e1ab16a6f 100644 --- a/crates/ra_hir/src/ty/primitive.rs +++ b/crates/ra_hir/src/ty/primitive.rs | |||
@@ -30,6 +30,12 @@ pub enum UncertainIntTy { | |||
30 | Known(IntTy), | 30 | Known(IntTy), |
31 | } | 31 | } |
32 | 32 | ||
33 | impl From<IntTy> for UncertainIntTy { | ||
34 | fn from(ty: IntTy) -> Self { | ||
35 | UncertainIntTy::Known(ty) | ||
36 | } | ||
37 | } | ||
38 | |||
33 | impl fmt::Display for UncertainIntTy { | 39 | impl fmt::Display for UncertainIntTy { |
34 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | 40 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
35 | match *self { | 41 | match *self { |
@@ -45,6 +51,12 @@ pub enum UncertainFloatTy { | |||
45 | Known(FloatTy), | 51 | Known(FloatTy), |
46 | } | 52 | } |
47 | 53 | ||
54 | impl From<FloatTy> for UncertainFloatTy { | ||
55 | fn from(ty: FloatTy) -> Self { | ||
56 | UncertainFloatTy::Known(ty) | ||
57 | } | ||
58 | } | ||
59 | |||
48 | impl fmt::Display for UncertainFloatTy { | 60 | impl fmt::Display for UncertainFloatTy { |
49 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | 61 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
50 | match *self { | 62 | match *self { |