Skip to content

Commit f65d734

Browse files
committed
Auto merge of rust-lang#12425 - feniljain:fix_bugs, r=lnicola
fix: float display impl should solve rust-lang#12414
2 parents a5d7ab5 + 25f3e7a commit f65d734

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/hir-def/src/expr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl FloatTypeWrapper {
5252

5353
impl std::fmt::Display for FloatTypeWrapper {
5454
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
55-
write!(f, "{}", f64::from_bits(self.0))
55+
write!(f, "{:?}", f64::from_bits(self.0))
5656
}
5757
}
5858

crates/ide/src/hover/tests.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3634,7 +3634,7 @@ const FOO$0: f32 = 1f32;
36343634
```
36353635
36363636
```rust
3637-
const FOO: f32 = 1
3637+
const FOO: f32 = 1.0
36383638
```
36393639
36403640
---
@@ -3656,7 +3656,7 @@ const FOO$0: f64 = 1.0f64;
36563656
```
36573657
36583658
```rust
3659-
const FOO: f64 = 1
3659+
const FOO: f64 = 1.0
36603660
```
36613661
36623662
---

0 commit comments

Comments
 (0)