mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
159 lines
5.2 KiB
Text
159 lines
5.2 KiB
Text
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:16:17
|
|
|
|
|
LL | let x = 22;
|
|
| ^^ help: consider adding suffix: `22_i32`
|
|
|
|
|
= note: `-D clippy::default-numeric-fallback` implied by `-D warnings`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:17:18
|
|
|
|
|
LL | let x = [1, 2, 3];
|
|
| ^ help: consider adding suffix: `1_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:17:21
|
|
|
|
|
LL | let x = [1, 2, 3];
|
|
| ^ help: consider adding suffix: `2_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:17:24
|
|
|
|
|
LL | let x = [1, 2, 3];
|
|
| ^ help: consider adding suffix: `3_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:18:28
|
|
|
|
|
LL | let x = if true { (1, 2) } else { (3, 4) };
|
|
| ^ help: consider adding suffix: `1_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:18:31
|
|
|
|
|
LL | let x = if true { (1, 2) } else { (3, 4) };
|
|
| ^ help: consider adding suffix: `2_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:18:44
|
|
|
|
|
LL | let x = if true { (1, 2) } else { (3, 4) };
|
|
| ^ help: consider adding suffix: `3_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:18:47
|
|
|
|
|
LL | let x = if true { (1, 2) } else { (3, 4) };
|
|
| ^ help: consider adding suffix: `4_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:19:23
|
|
|
|
|
LL | let x = match 1 {
|
|
| ^ help: consider adding suffix: `1_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:20:13
|
|
|
|
|
LL | 1 => 1,
|
|
| ^ help: consider adding suffix: `1_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:20:18
|
|
|
|
|
LL | 1 => 1,
|
|
| ^ help: consider adding suffix: `1_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:21:18
|
|
|
|
|
LL | _ => 2,
|
|
| ^ help: consider adding suffix: `2_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:25:17
|
|
|
|
|
LL | let x = 0.12;
|
|
| ^^^^ help: consider adding suffix: `0.12_f64`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:43:21
|
|
|
|
|
LL | let y = 1;
|
|
| ^ help: consider adding suffix: `1_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:51:21
|
|
|
|
|
LL | let y = 1;
|
|
| ^ help: consider adding suffix: `1_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:57:21
|
|
|
|
|
LL | let y = 1;
|
|
| ^ help: consider adding suffix: `1_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:69:9
|
|
|
|
|
LL | 1
|
|
| ^ help: consider adding suffix: `1_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:75:27
|
|
|
|
|
LL | let f = || -> _ { 1 };
|
|
| ^ help: consider adding suffix: `1_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:79:29
|
|
|
|
|
LL | let f = || -> i32 { 1 };
|
|
| ^ help: consider adding suffix: `1_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:93:21
|
|
|
|
|
LL | generic_arg(1);
|
|
| ^ help: consider adding suffix: `1_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:96:32
|
|
|
|
|
LL | let x: _ = generic_arg(1);
|
|
| ^ help: consider adding suffix: `1_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:114:28
|
|
|
|
|
LL | GenericStruct { x: 1 };
|
|
| ^ help: consider adding suffix: `1_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:117:36
|
|
|
|
|
LL | let _ = GenericStruct { x: 1 };
|
|
| ^ help: consider adding suffix: `1_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:137:23
|
|
|
|
|
LL | s.generic_arg(1);
|
|
| ^ help: consider adding suffix: `1_i32`
|
|
|
|
error: default numeric fallback might occur
|
|
--> $DIR/default_numeric_fallback.rs:144:21
|
|
|
|
|
LL | let x = 22;
|
|
| ^^ help: consider adding suffix: `22_i32`
|
|
...
|
|
LL | internal_macro!();
|
|
| ------------------ in this macro invocation
|
|
|
|
|
= note: this error originates in the macro `internal_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: aborting due to 25 previous errors
|
|
|