diff options
| author | bors <bors@rust-lang.org> | 2022-05-31 04:52:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-31 04:52:36 +0000 |
| commit | f65d734abc2559f87233483bee2fe61d6a75432b (patch) | |
| tree | 76bcfef9e1bdee0873fd57e568c7ab9c9393d80d | |
| parent | a5d7ab54f950d197d79b8f9739016f18a93bc491 (diff) | |
| parent | 25f3e7a33ce31b6712954caa52625cb5e5e72fc1 (diff) | |
| download | rust-f65d734abc2559f87233483bee2fe61d6a75432b.tar.gz rust-f65d734abc2559f87233483bee2fe61d6a75432b.zip | |
Auto merge of #12425 - feniljain:fix_bugs, r=lnicola
fix: float display impl should solve #12414
| -rw-r--r-- | crates/hir-def/src/expr.rs | 2 | ||||
| -rw-r--r-- | crates/ide/src/hover/tests.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir-def/src/expr.rs b/crates/hir-def/src/expr.rs index 97681abab1f..bc060858946 100644 --- a/crates/hir-def/src/expr.rs +++ b/crates/hir-def/src/expr.rs @@ -52,7 +52,7 @@ impl FloatTypeWrapper { impl std::fmt::Display for FloatTypeWrapper { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", f64::from_bits(self.0)) + write!(f, "{:?}", f64::from_bits(self.0)) } } diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs index 07f224da66c..c95a0e40054 100644 --- a/crates/ide/src/hover/tests.rs +++ b/crates/ide/src/hover/tests.rs @@ -3634,7 +3634,7 @@ const FOO$0: f32 = 1f32; ``` ```rust - const FOO: f32 = 1 + const FOO: f32 = 1.0 ``` --- @@ -3656,7 +3656,7 @@ const FOO$0: f64 = 1.0f64; ``` ```rust - const FOO: f64 = 1 + const FOO: f64 = 1.0 ``` --- |
