mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
fix: Fix double rounding of f32
literals
This commit is contained in:
parent
a5b21ea0aa
commit
320022622c
4 changed files with 47 additions and 33 deletions
|
@ -5310,6 +5310,28 @@ const FOO$0: f64 = expf64(1.2);
|
|||
```
|
||||
"#]],
|
||||
);
|
||||
// check `f32` isn't double rounded via `f64`
|
||||
check(
|
||||
r#"
|
||||
/// This is a doc
|
||||
const FOO$0: f32 = 1.9999999403953552_f32;
|
||||
"#,
|
||||
expect![[r#"
|
||||
*FOO*
|
||||
|
||||
```rust
|
||||
test
|
||||
```
|
||||
|
||||
```rust
|
||||
const FOO: f32 = 1.9999999
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
This is a doc
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue