// We now know that converting either the lhs or rhs is fallible. Before we
// suggest a fallible conversion, check if the value can never fit in the
// expected type.
- let msg = format!("`{}` can never fit into `{}`", src, expected_ty);
+ let msg = format!("`{}` cannot fit into type `{}`", src, expected_ty);
err.span_note(expr.span, &msg);
return;
} else if in_const_context {
LL | x_usize > -1_isize;
| ^^^^^^^^ expected `usize`, found `isize`
|
-note: `-1_isize` can never fit into `usize`
+note: `-1_isize` cannot fit into type `usize`
--> $DIR/numeric-cast-no-fix.rs:10:15
|
LL | x_usize > -1_isize;
LL | x_u128 > -1_isize;
| ^^^^^^^^ expected `u128`, found `isize`
|
-note: `-1_isize` can never fit into `u128`
+note: `-1_isize` cannot fit into type `u128`
--> $DIR/numeric-cast-no-fix.rs:12:14
|
LL | x_u128 > -1_isize;
LL | x_u64 > -1_isize;
| ^^^^^^^^ expected `u64`, found `isize`
|
-note: `-1_isize` can never fit into `u64`
+note: `-1_isize` cannot fit into type `u64`
--> $DIR/numeric-cast-no-fix.rs:14:13
|
LL | x_u64 > -1_isize;
LL | x_u32 > -1_isize;
| ^^^^^^^^ expected `u32`, found `isize`
|
-note: `-1_isize` can never fit into `u32`
+note: `-1_isize` cannot fit into type `u32`
--> $DIR/numeric-cast-no-fix.rs:16:13
|
LL | x_u32 > -1_isize;
LL | x_u16 > -1_isize;
| ^^^^^^^^ expected `u16`, found `isize`
|
-note: `-1_isize` can never fit into `u16`
+note: `-1_isize` cannot fit into type `u16`
--> $DIR/numeric-cast-no-fix.rs:18:13
|
LL | x_u16 > -1_isize;
LL | let f = [0; -4_isize];
| ^^^^^^^^ expected `usize`, found `isize`
|
-note: `-4_isize` can never fit into `usize`
+note: `-4_isize` cannot fit into type `usize`
--> $DIR/repeat_count.rs:19:17
|
LL | let f = [0; -4_isize];
LL | let f = [0_usize; -1_isize];
| ^^^^^^^^ expected `usize`, found `isize`
|
-note: `-1_isize` can never fit into `usize`
+note: `-1_isize` cannot fit into type `usize`
--> $DIR/repeat_count.rs:22:23
|
LL | let f = [0_usize; -1_isize];