2018-08-12 00:54:57 -05:00
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-53280-expected-float-found-integer-literal.rs:2:24
|
2018-08-12 00:54:57 -05:00
|
|
|
|
|
|
|
|
LL | let sixteen: f32 = 16;
|
|
|
|
| ^^
|
|
|
|
| |
|
2019-11-15 11:37:01 -06:00
|
|
|
| expected `f32`, found integer
|
2018-08-12 00:54:57 -05:00
|
|
|
| help: use a float literal: `16.0`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-53280-expected-float-found-integer-literal.rs:5:38
|
2018-08-12 00:54:57 -05:00
|
|
|
|
|
|
|
|
LL | let a_million_and_seventy: f64 = 1_000_070;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
| |
|
2019-11-15 11:37:01 -06:00
|
|
|
| expected `f64`, found integer
|
2018-08-12 00:54:57 -05:00
|
|
|
| help: use a float literal: `1_000_070.0`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-53280-expected-float-found-integer-literal.rs:8:30
|
2018-08-12 00:54:57 -05:00
|
|
|
|
|
|
|
|
LL | let negative_nine: f32 = -9;
|
|
|
|
| ^^
|
|
|
|
| |
|
2019-11-15 11:37:01 -06:00
|
|
|
| expected `f32`, found integer
|
2018-08-12 00:54:57 -05:00
|
|
|
| help: use a float literal: `-9.0`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-53280-expected-float-found-integer-literal.rs:15:30
|
2018-08-12 00:54:57 -05:00
|
|
|
|
|
|
|
|
LL | let sixteen_again: f64 = 0x10;
|
2019-11-15 11:37:01 -06:00
|
|
|
| ^^^^ expected `f64`, found integer
|
2018-08-12 00:54:57 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-53280-expected-float-found-integer-literal.rs:17:30
|
2018-08-12 00:54:57 -05:00
|
|
|
|
|
|
|
|
LL | let and_once_more: f32 = 0o20;
|
2019-11-15 11:37:01 -06:00
|
|
|
| ^^^^ expected `f32`, found integer
|
2018-08-12 00:54:57 -05:00
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|