fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
751 B25 linesraw
1error[E0308]: mismatched types
2  --> $DIR/float-literal-inference-restrictions.rs:2:18
3   |
4LL |     let x: f32 = 1;
5   |                  ^
6   |                  |
7   |                  expected f32, found integer
8   |                  help: use a float literal: `1.0`
9   |
10   = note: expected type `f32`
11              found type `{integer}`
12
13error[E0308]: mismatched types
14  --> $DIR/float-literal-inference-restrictions.rs:3:18
15   |
16LL |     let y: f32 = 1f64;
17   |                  ^^^^ expected f32, found f64
18help: change the type of the numeric literal from `f64` to `f32`
19   |
20LL |     let y: f32 = 1f32;
21   |                  ^^^^
22
23error: aborting due to 2 previous errors
24
25For more information about this error, try `rustc --explain E0308`.