2023-10-14 22:57:33 +00:00
|
|
|
error: use of a fallible conversion when an infallible one could be used
|
|
|
|
--> $DIR/unnecessary_fallible_conversions.rs:4:23
|
|
|
|
|
|
|
|
|
LL | let _: i64 = 0i32.try_into().unwrap();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: use: `into()`
|
|
|
|
|
|
2023-11-07 15:01:52 +00:00
|
|
|
= note: converting `i32` to `i64` cannot fail
|
2023-10-14 22:57:33 +00:00
|
|
|
= note: `-D clippy::unnecessary-fallible-conversions` implied by `-D warnings`
|
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_fallible_conversions)]`
|
|
|
|
|
|
|
|
error: use of a fallible conversion when an infallible one could be used
|
|
|
|
--> $DIR/unnecessary_fallible_conversions.rs:5:23
|
|
|
|
|
|
|
|
|
LL | let _: i64 = 0i32.try_into().expect("can't happen");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `into()`
|
2023-11-07 15:01:52 +00:00
|
|
|
|
|
|
|
|
= note: converting `i32` to `i64` cannot fail
|
2023-10-14 22:57:33 +00:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|