Closed
Description
This program:
fn main() {
let _ = 3.40282357e+38_f32;
let _ = 1.7976931348623159e+308_f64;
}
Produces this output:
error: literal out of range for `f32`
--> src/main.rs:2:14
|
2 | let _ = 3.40282357e+38_f32;
| ^^^^^^^^^^^^^^^^^^
|
= note: `#[deny(overflowing_literals)]` on by default
= note: the literal `3.40282357e+38_f32` does not fit into the type `f32` and will be converted to `std::f32::INFINITY`
error: literal out of range for `f64`
--> src/main.rs:3:14
|
3 | let _ = 1.7976931348623159e+308_f64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the literal `1.7976931348623159e+308_f64` does not fit into the type `f64` and will be converted to `std::f64::INFINITY`
Note the references to std::{f32, 64}::INFINITY
; these symbols have been superseded by associated consts at {f32,f64}::INFINITY
(#68490).
-
Update the error message to suggest the new symbols
-
Determine if any of the other old symbols are contained in any error messages.
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: An issue proposing an enhancement or a PR with one.Diagnostics: An error or lint that needs small tweaks.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Relevant to the compiler team, which will review and decide on the PR/issue.