Skip to content

Commit

Permalink
Auto merge of rust-lang#12425 - feniljain:fix_bugs, r=lnicola
Browse files Browse the repository at this point in the history
fix: float display impl

should solve rust-lang#12414
  • Loading branch information
bors committed May 31, 2022
2 parents a5d7ab5 + 25f3e7a commit f65d734
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/hir-def/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand Down
4 changes: 2 additions & 2 deletions crates/ide/src/hover/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3634,7 +3634,7 @@ const FOO$0: f32 = 1f32;
```
```rust
const FOO: f32 = 1
const FOO: f32 = 1.0
```
---
Expand All @@ -3656,7 +3656,7 @@ const FOO$0: f64 = 1.0f64;
```
```rust
const FOO: f64 = 1
const FOO: f64 = 1.0
```
---
Expand Down

0 comments on commit f65d734

Please sign in to comment.