From 1e2af7d9353eef2115210bfe296744373e70e3a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Fri, 3 May 2019 10:41:26 -0700 Subject: [PATCH] Reword casting message --- src/librustc_typeck/check/demand.rs | 2 +- .../associated-types-path-2.stderr | 2 +- src/test/ui/indexing-requires-a-uint.stderr | 2 +- .../integer-literal-suffix-inference.stderr | 36 ++-- src/test/ui/issues/issue-13359.stderr | 4 +- src/test/ui/issues/issue-31910.stderr | 2 +- ...od-ambig-one-trait-unknown-int-type.stderr | 2 +- .../ui/mismatched_types/issue-26480.stderr | 2 +- src/test/ui/numeric/const-scope.stderr | 2 +- src/test/ui/numeric/len.stderr | 2 +- src/test/ui/numeric/numeric-cast-2.stderr | 6 +- src/test/ui/numeric/numeric-cast.stderr | 156 +++++++++--------- src/test/ui/repeat_count.stderr | 4 +- src/test/ui/shift-various-bad-types.stderr | 2 +- ...ounds-inconsistent-projection-error.stderr | 2 +- .../ui/tutorial-suffix-inference-test.stderr | 4 +- 16 files changed, 115 insertions(+), 115 deletions(-) diff --git a/src/librustc_typeck/check/demand.rs b/src/librustc_typeck/check/demand.rs index 8ae66a96c763a..473f952ca01b7 100644 --- a/src/librustc_typeck/check/demand.rs +++ b/src/librustc_typeck/check/demand.rs @@ -523,7 +523,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { let msg = format!("you can convert an `{}` to `{}`", checked_ty, expected_ty); let cast_msg = format!("you can cast an `{} to `{}`", checked_ty, expected_ty); - let try_msg = format!("{} or panic if it the converted value wouldn't fit", msg); + let try_msg = format!("{} and panic if the converted value wouldn't fit", msg); let lit_msg = format!( "change the type of the numeric literal from `{}` to `{}`", checked_ty, diff --git a/src/test/ui/associated-types/associated-types-path-2.stderr b/src/test/ui/associated-types/associated-types-path-2.stderr index c25f12d008703..1405cb1b4736c 100644 --- a/src/test/ui/associated-types/associated-types-path-2.stderr +++ b/src/test/ui/associated-types/associated-types-path-2.stderr @@ -49,7 +49,7 @@ error[E0308]: mismatched types | LL | let _: i32 = f2(2i32); | ^^^^^^^^ expected i32, found u32 -help: you can convert an `u32` to `i32` or panic if it the converted value wouldn't fit +help: you can convert an `u32` to `i32` and panic if the converted value wouldn't fit | LL | let _: i32 = f2(2i32).try_into().unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/indexing-requires-a-uint.stderr b/src/test/ui/indexing-requires-a-uint.stderr index 9dafe1c24f1c2..3300db58d44c3 100644 --- a/src/test/ui/indexing-requires-a-uint.stderr +++ b/src/test/ui/indexing-requires-a-uint.stderr @@ -12,7 +12,7 @@ error[E0308]: mismatched types | LL | bar::(i); // i should not be re-coerced back to an isize | ^ expected isize, found usize -help: you can convert an `usize` to `isize` or panic if it the converted value wouldn't fit +help: you can convert an `usize` to `isize` and panic if the converted value wouldn't fit | LL | bar::(i.try_into().unwrap()); // i should not be re-coerced back to an isize | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/integer-literal-suffix-inference.stderr b/src/test/ui/integer-literal-suffix-inference.stderr index b5b3f27f0e6cd..80b601dc4394b 100644 --- a/src/test/ui/integer-literal-suffix-inference.stderr +++ b/src/test/ui/integer-literal-suffix-inference.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | id_i8(a16); | ^^^ expected i8, found i16 -help: you can convert an `i16` to `i8` or panic if it the converted value wouldn't fit +help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit | LL | id_i8(a16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -13,7 +13,7 @@ error[E0308]: mismatched types | LL | id_i8(a32); | ^^^ expected i8, found i32 -help: you can convert an `i32` to `i8` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit | LL | id_i8(a32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -23,7 +23,7 @@ error[E0308]: mismatched types | LL | id_i8(a64); | ^^^ expected i8, found i64 -help: you can convert an `i64` to `i8` or panic if it the converted value wouldn't fit +help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit | LL | id_i8(a64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -42,7 +42,7 @@ error[E0308]: mismatched types | LL | id_i16(a32); | ^^^ expected i16, found i32 -help: you can convert an `i32` to `i16` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit | LL | id_i16(a32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -52,7 +52,7 @@ error[E0308]: mismatched types | LL | id_i16(a64); | ^^^ expected i16, found i64 -help: you can convert an `i64` to `i16` or panic if it the converted value wouldn't fit +help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit | LL | id_i16(a64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -80,7 +80,7 @@ error[E0308]: mismatched types | LL | id_i32(a64); | ^^^ expected i32, found i64 -help: you can convert an `i64` to `i32` or panic if it the converted value wouldn't fit +help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit | LL | id_i32(a64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -117,7 +117,7 @@ error[E0308]: mismatched types | LL | id_i8(c16); | ^^^ expected i8, found i16 -help: you can convert an `i16` to `i8` or panic if it the converted value wouldn't fit +help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit | LL | id_i8(c16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -127,7 +127,7 @@ error[E0308]: mismatched types | LL | id_i8(c32); | ^^^ expected i8, found i32 -help: you can convert an `i32` to `i8` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit | LL | id_i8(c32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -137,7 +137,7 @@ error[E0308]: mismatched types | LL | id_i8(c64); | ^^^ expected i8, found i64 -help: you can convert an `i64` to `i8` or panic if it the converted value wouldn't fit +help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit | LL | id_i8(c64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -156,7 +156,7 @@ error[E0308]: mismatched types | LL | id_i16(c32); | ^^^ expected i16, found i32 -help: you can convert an `i32` to `i16` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit | LL | id_i16(c32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -166,7 +166,7 @@ error[E0308]: mismatched types | LL | id_i16(c64); | ^^^ expected i16, found i64 -help: you can convert an `i64` to `i16` or panic if it the converted value wouldn't fit +help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit | LL | id_i16(c64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -194,7 +194,7 @@ error[E0308]: mismatched types | LL | id_i32(c64); | ^^^ expected i32, found i64 -help: you can convert an `i64` to `i32` or panic if it the converted value wouldn't fit +help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit | LL | id_i32(c64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -231,7 +231,7 @@ error[E0308]: mismatched types | LL | id_u8(b16); | ^^^ expected u8, found u16 -help: you can convert an `u16` to `u8` or panic if it the converted value wouldn't fit +help: you can convert an `u16` to `u8` and panic if the converted value wouldn't fit | LL | id_u8(b16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -241,7 +241,7 @@ error[E0308]: mismatched types | LL | id_u8(b32); | ^^^ expected u8, found u32 -help: you can convert an `u32` to `u8` or panic if it the converted value wouldn't fit +help: you can convert an `u32` to `u8` and panic if the converted value wouldn't fit | LL | id_u8(b32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -251,7 +251,7 @@ error[E0308]: mismatched types | LL | id_u8(b64); | ^^^ expected u8, found u64 -help: you can convert an `u64` to `u8` or panic if it the converted value wouldn't fit +help: you can convert an `u64` to `u8` and panic if the converted value wouldn't fit | LL | id_u8(b64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -270,7 +270,7 @@ error[E0308]: mismatched types | LL | id_u16(b32); | ^^^ expected u16, found u32 -help: you can convert an `u32` to `u16` or panic if it the converted value wouldn't fit +help: you can convert an `u32` to `u16` and panic if the converted value wouldn't fit | LL | id_u16(b32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -280,7 +280,7 @@ error[E0308]: mismatched types | LL | id_u16(b64); | ^^^ expected u16, found u64 -help: you can convert an `u64` to `u16` or panic if it the converted value wouldn't fit +help: you can convert an `u64` to `u16` and panic if the converted value wouldn't fit | LL | id_u16(b64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -308,7 +308,7 @@ error[E0308]: mismatched types | LL | id_u32(b64); | ^^^ expected u32, found u64 -help: you can convert an `u64` to `u32` or panic if it the converted value wouldn't fit +help: you can convert an `u64` to `u32` and panic if the converted value wouldn't fit | LL | id_u32(b64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/issues/issue-13359.stderr b/src/test/ui/issues/issue-13359.stderr index b16b7a5b2cf04..7cfd754f72d8e 100644 --- a/src/test/ui/issues/issue-13359.stderr +++ b/src/test/ui/issues/issue-13359.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | foo(1*(1 as isize)); | ^^^^^^^^^^^^^^ expected i16, found isize -help: you can convert an `isize` to `i16` or panic if it the converted value wouldn't fit +help: you can convert an `isize` to `i16` and panic if the converted value wouldn't fit | LL | foo((1*(1 as isize)).try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -13,7 +13,7 @@ error[E0308]: mismatched types | LL | bar(1*(1 as usize)); | ^^^^^^^^^^^^^^ expected u32, found usize -help: you can convert an `usize` to `u32` or panic if it the converted value wouldn't fit +help: you can convert an `usize` to `u32` and panic if the converted value wouldn't fit | LL | bar((1*(1 as usize)).try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/issues/issue-31910.stderr b/src/test/ui/issues/issue-31910.stderr index 8dd9287ffec79..e7555b958a3d4 100644 --- a/src/test/ui/issues/issue-31910.stderr +++ b/src/test/ui/issues/issue-31910.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | X = Trait::Number, | ^^^^^^^^^^^^^ expected isize, found i32 -help: you can convert an `i32` to `isize` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `isize` and panic if the converted value wouldn't fit | LL | X = Trait::Number.try_into().unwrap(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr index be701b2bb3973..063a4865b1987 100644 --- a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr +++ b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr @@ -11,7 +11,7 @@ error[E0308]: mismatched types | LL | let y: usize = x.foo(); | ^^^^^^^ expected usize, found isize -help: you can convert an `isize` to `usize` or panic if it the converted value wouldn't fit +help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit | LL | let y: usize = x.foo().try_into().unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/mismatched_types/issue-26480.stderr b/src/test/ui/mismatched_types/issue-26480.stderr index 1a81df8e2c464..881d9fd32029e 100644 --- a/src/test/ui/mismatched_types/issue-26480.stderr +++ b/src/test/ui/mismatched_types/issue-26480.stderr @@ -6,7 +6,7 @@ LL | $arr.len() * size_of($arr[0])); ... LL | write!(hello); | -------------- in this macro invocation -help: you can convert an `usize` to `u64` or panic if it the converted value wouldn't fit +help: you can convert an `usize` to `u64` and panic if the converted value wouldn't fit | LL | ($arr.len() * size_of($arr[0])).try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/numeric/const-scope.stderr b/src/test/ui/numeric/const-scope.stderr index ead3a79da0270..3f69bcc7d4a2f 100644 --- a/src/test/ui/numeric/const-scope.stderr +++ b/src/test/ui/numeric/const-scope.stderr @@ -37,7 +37,7 @@ error[E0308]: mismatched types | LL | let d: i8 = c; | ^ expected i8, found i32 -help: you can convert an `i32` to `i8` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit | LL | let d: i8 = c.try_into().unwrap(); | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/numeric/len.stderr b/src/test/ui/numeric/len.stderr index 5a9349b4c0f29..c767bdd9bd5a5 100644 --- a/src/test/ui/numeric/len.stderr +++ b/src/test/ui/numeric/len.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | test(array.len()); | ^^^^^^^^^^^ expected u32, found usize -help: you can convert an `usize` to `u32` or panic if it the converted value wouldn't fit +help: you can convert an `usize` to `u32` and panic if the converted value wouldn't fit | LL | test(array.len().try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/numeric/numeric-cast-2.stderr b/src/test/ui/numeric/numeric-cast-2.stderr index be4411e630bec..f58389ce96c3b 100644 --- a/src/test/ui/numeric/numeric-cast-2.stderr +++ b/src/test/ui/numeric/numeric-cast-2.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | let x: u16 = foo(); | ^^^^^ expected u16, found i32 -help: you can convert an `i32` to `u16` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit | LL | let x: u16 = foo().try_into().unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -13,7 +13,7 @@ error[E0308]: mismatched types | LL | let y: i64 = x + x; | ^^^^^ expected i64, found u16 -help: you can convert an `u16` to `i64` or panic if it the converted value wouldn't fit +help: you can convert an `u16` to `i64` and panic if the converted value wouldn't fit | LL | let y: i64 = (x + x).try_into().unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -23,7 +23,7 @@ error[E0308]: mismatched types | LL | let z: i32 = x + x; | ^^^^^ expected i32, found u16 -help: you can convert an `u16` to `i32` or panic if it the converted value wouldn't fit +help: you can convert an `u16` to `i32` and panic if the converted value wouldn't fit | LL | let z: i32 = (x + x).try_into().unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/numeric/numeric-cast.stderr b/src/test/ui/numeric/numeric-cast.stderr index 9e7dcf7e41b55..e66b83f2b39f5 100644 --- a/src/test/ui/numeric/numeric-cast.stderr +++ b/src/test/ui/numeric/numeric-cast.stderr @@ -3,7 +3,7 @@ error[E0308]: mismatched types | LL | foo::(x_u64); | ^^^^^ expected usize, found u64 -help: you can convert an `u64` to `usize` or panic if it the converted value wouldn't fit +help: you can convert an `u64` to `usize` and panic if the converted value wouldn't fit | LL | foo::(x_u64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -13,7 +13,7 @@ error[E0308]: mismatched types | LL | foo::(x_u32); | ^^^^^ expected usize, found u32 -help: you can convert an `u32` to `usize` or panic if it the converted value wouldn't fit +help: you can convert an `u32` to `usize` and panic if the converted value wouldn't fit | LL | foo::(x_u32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -23,7 +23,7 @@ error[E0308]: mismatched types | LL | foo::(x_u16); | ^^^^^ expected usize, found u16 -help: you can convert an `u16` to `usize` or panic if it the converted value wouldn't fit +help: you can convert an `u16` to `usize` and panic if the converted value wouldn't fit | LL | foo::(x_u16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -33,7 +33,7 @@ error[E0308]: mismatched types | LL | foo::(x_u8); | ^^^^ expected usize, found u8 -help: you can convert an `u8` to `usize` or panic if it the converted value wouldn't fit +help: you can convert an `u8` to `usize` and panic if the converted value wouldn't fit | LL | foo::(x_u8.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -43,7 +43,7 @@ error[E0308]: mismatched types | LL | foo::(x_isize); | ^^^^^^^ expected usize, found isize -help: you can convert an `isize` to `usize` or panic if it the converted value wouldn't fit +help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit | LL | foo::(x_isize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -53,7 +53,7 @@ error[E0308]: mismatched types | LL | foo::(x_i64); | ^^^^^ expected usize, found i64 -help: you can convert an `i64` to `usize` or panic if it the converted value wouldn't fit +help: you can convert an `i64` to `usize` and panic if the converted value wouldn't fit | LL | foo::(x_i64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -63,7 +63,7 @@ error[E0308]: mismatched types | LL | foo::(x_i32); | ^^^^^ expected usize, found i32 -help: you can convert an `i32` to `usize` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `usize` and panic if the converted value wouldn't fit | LL | foo::(x_i32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -73,7 +73,7 @@ error[E0308]: mismatched types | LL | foo::(x_i16); | ^^^^^ expected usize, found i16 -help: you can convert an `i16` to `usize` or panic if it the converted value wouldn't fit +help: you can convert an `i16` to `usize` and panic if the converted value wouldn't fit | LL | foo::(x_i16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -83,7 +83,7 @@ error[E0308]: mismatched types | LL | foo::(x_i8); | ^^^^ expected usize, found i8 -help: you can convert an `i8` to `usize` or panic if it the converted value wouldn't fit +help: you can convert an `i8` to `usize` and panic if the converted value wouldn't fit | LL | foo::(x_i8.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -93,7 +93,7 @@ error[E0308]: mismatched types | LL | foo::(x_usize); | ^^^^^^^ expected isize, found usize -help: you can convert an `usize` to `isize` or panic if it the converted value wouldn't fit +help: you can convert an `usize` to `isize` and panic if the converted value wouldn't fit | LL | foo::(x_usize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -103,7 +103,7 @@ error[E0308]: mismatched types | LL | foo::(x_u64); | ^^^^^ expected isize, found u64 -help: you can convert an `u64` to `isize` or panic if it the converted value wouldn't fit +help: you can convert an `u64` to `isize` and panic if the converted value wouldn't fit | LL | foo::(x_u64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -113,7 +113,7 @@ error[E0308]: mismatched types | LL | foo::(x_u32); | ^^^^^ expected isize, found u32 -help: you can convert an `u32` to `isize` or panic if it the converted value wouldn't fit +help: you can convert an `u32` to `isize` and panic if the converted value wouldn't fit | LL | foo::(x_u32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -123,7 +123,7 @@ error[E0308]: mismatched types | LL | foo::(x_u16); | ^^^^^ expected isize, found u16 -help: you can convert an `u16` to `isize` or panic if it the converted value wouldn't fit +help: you can convert an `u16` to `isize` and panic if the converted value wouldn't fit | LL | foo::(x_u16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -133,7 +133,7 @@ error[E0308]: mismatched types | LL | foo::(x_u8); | ^^^^ expected isize, found u8 -help: you can convert an `u8` to `isize` or panic if it the converted value wouldn't fit +help: you can convert an `u8` to `isize` and panic if the converted value wouldn't fit | LL | foo::(x_u8.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -143,7 +143,7 @@ error[E0308]: mismatched types | LL | foo::(x_i64); | ^^^^^ expected isize, found i64 -help: you can convert an `i64` to `isize` or panic if it the converted value wouldn't fit +help: you can convert an `i64` to `isize` and panic if the converted value wouldn't fit | LL | foo::(x_i64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -153,7 +153,7 @@ error[E0308]: mismatched types | LL | foo::(x_i32); | ^^^^^ expected isize, found i32 -help: you can convert an `i32` to `isize` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `isize` and panic if the converted value wouldn't fit | LL | foo::(x_i32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -163,7 +163,7 @@ error[E0308]: mismatched types | LL | foo::(x_i16); | ^^^^^ expected isize, found i16 -help: you can convert an `i16` to `isize` or panic if it the converted value wouldn't fit +help: you can convert an `i16` to `isize` and panic if the converted value wouldn't fit | LL | foo::(x_i16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -173,7 +173,7 @@ error[E0308]: mismatched types | LL | foo::(x_i8); | ^^^^ expected isize, found i8 -help: you can convert an `i8` to `isize` or panic if it the converted value wouldn't fit +help: you can convert an `i8` to `isize` and panic if the converted value wouldn't fit | LL | foo::(x_i8.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -183,7 +183,7 @@ error[E0308]: mismatched types | LL | foo::(x_usize); | ^^^^^^^ expected u64, found usize -help: you can convert an `usize` to `u64` or panic if it the converted value wouldn't fit +help: you can convert an `usize` to `u64` and panic if the converted value wouldn't fit | LL | foo::(x_usize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -220,7 +220,7 @@ error[E0308]: mismatched types | LL | foo::(x_isize); | ^^^^^^^ expected u64, found isize -help: you can convert an `isize` to `u64` or panic if it the converted value wouldn't fit +help: you can convert an `isize` to `u64` and panic if the converted value wouldn't fit | LL | foo::(x_isize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -230,7 +230,7 @@ error[E0308]: mismatched types | LL | foo::(x_i64); | ^^^^^ expected u64, found i64 -help: you can convert an `i64` to `u64` or panic if it the converted value wouldn't fit +help: you can convert an `i64` to `u64` and panic if the converted value wouldn't fit | LL | foo::(x_i64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -240,7 +240,7 @@ error[E0308]: mismatched types | LL | foo::(x_i32); | ^^^^^ expected u64, found i32 -help: you can convert an `i32` to `u64` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `u64` and panic if the converted value wouldn't fit | LL | foo::(x_i32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -250,7 +250,7 @@ error[E0308]: mismatched types | LL | foo::(x_i16); | ^^^^^ expected u64, found i16 -help: you can convert an `i16` to `u64` or panic if it the converted value wouldn't fit +help: you can convert an `i16` to `u64` and panic if the converted value wouldn't fit | LL | foo::(x_i16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -260,7 +260,7 @@ error[E0308]: mismatched types | LL | foo::(x_i8); | ^^^^ expected u64, found i8 -help: you can convert an `i8` to `u64` or panic if it the converted value wouldn't fit +help: you can convert an `i8` to `u64` and panic if the converted value wouldn't fit | LL | foo::(x_i8.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -270,7 +270,7 @@ error[E0308]: mismatched types | LL | foo::(x_usize); | ^^^^^^^ expected i64, found usize -help: you can convert an `usize` to `i64` or panic if it the converted value wouldn't fit +help: you can convert an `usize` to `i64` and panic if the converted value wouldn't fit | LL | foo::(x_usize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -280,7 +280,7 @@ error[E0308]: mismatched types | LL | foo::(x_u64); | ^^^^^ expected i64, found u64 -help: you can convert an `u64` to `i64` or panic if it the converted value wouldn't fit +help: you can convert an `u64` to `i64` and panic if the converted value wouldn't fit | LL | foo::(x_u64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -290,7 +290,7 @@ error[E0308]: mismatched types | LL | foo::(x_u32); | ^^^^^ expected i64, found u32 -help: you can convert an `u32` to `i64` or panic if it the converted value wouldn't fit +help: you can convert an `u32` to `i64` and panic if the converted value wouldn't fit | LL | foo::(x_u32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -300,7 +300,7 @@ error[E0308]: mismatched types | LL | foo::(x_u16); | ^^^^^ expected i64, found u16 -help: you can convert an `u16` to `i64` or panic if it the converted value wouldn't fit +help: you can convert an `u16` to `i64` and panic if the converted value wouldn't fit | LL | foo::(x_u16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -310,7 +310,7 @@ error[E0308]: mismatched types | LL | foo::(x_u8); | ^^^^ expected i64, found u8 -help: you can convert an `u8` to `i64` or panic if it the converted value wouldn't fit +help: you can convert an `u8` to `i64` and panic if the converted value wouldn't fit | LL | foo::(x_u8.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -320,7 +320,7 @@ error[E0308]: mismatched types | LL | foo::(x_isize); | ^^^^^^^ expected i64, found isize -help: you can convert an `isize` to `i64` or panic if it the converted value wouldn't fit +help: you can convert an `isize` to `i64` and panic if the converted value wouldn't fit | LL | foo::(x_isize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -357,7 +357,7 @@ error[E0308]: mismatched types | LL | foo::(x_usize); | ^^^^^^^ expected u32, found usize -help: you can convert an `usize` to `u32` or panic if it the converted value wouldn't fit +help: you can convert an `usize` to `u32` and panic if the converted value wouldn't fit | LL | foo::(x_usize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -367,7 +367,7 @@ error[E0308]: mismatched types | LL | foo::(x_u64); | ^^^^^ expected u32, found u64 -help: you can convert an `u64` to `u32` or panic if it the converted value wouldn't fit +help: you can convert an `u64` to `u32` and panic if the converted value wouldn't fit | LL | foo::(x_u64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -395,7 +395,7 @@ error[E0308]: mismatched types | LL | foo::(x_isize); | ^^^^^^^ expected u32, found isize -help: you can convert an `isize` to `u32` or panic if it the converted value wouldn't fit +help: you can convert an `isize` to `u32` and panic if the converted value wouldn't fit | LL | foo::(x_isize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -405,7 +405,7 @@ error[E0308]: mismatched types | LL | foo::(x_i64); | ^^^^^ expected u32, found i64 -help: you can convert an `i64` to `u32` or panic if it the converted value wouldn't fit +help: you can convert an `i64` to `u32` and panic if the converted value wouldn't fit | LL | foo::(x_i64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -415,7 +415,7 @@ error[E0308]: mismatched types | LL | foo::(x_i32); | ^^^^^ expected u32, found i32 -help: you can convert an `i32` to `u32` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `u32` and panic if the converted value wouldn't fit | LL | foo::(x_i32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -425,7 +425,7 @@ error[E0308]: mismatched types | LL | foo::(x_i16); | ^^^^^ expected u32, found i16 -help: you can convert an `i16` to `u32` or panic if it the converted value wouldn't fit +help: you can convert an `i16` to `u32` and panic if the converted value wouldn't fit | LL | foo::(x_i16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -435,7 +435,7 @@ error[E0308]: mismatched types | LL | foo::(x_i8); | ^^^^ expected u32, found i8 -help: you can convert an `i8` to `u32` or panic if it the converted value wouldn't fit +help: you can convert an `i8` to `u32` and panic if the converted value wouldn't fit | LL | foo::(x_i8.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -445,7 +445,7 @@ error[E0308]: mismatched types | LL | foo::(x_usize); | ^^^^^^^ expected i32, found usize -help: you can convert an `usize` to `i32` or panic if it the converted value wouldn't fit +help: you can convert an `usize` to `i32` and panic if the converted value wouldn't fit | LL | foo::(x_usize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -455,7 +455,7 @@ error[E0308]: mismatched types | LL | foo::(x_u64); | ^^^^^ expected i32, found u64 -help: you can convert an `u64` to `i32` or panic if it the converted value wouldn't fit +help: you can convert an `u64` to `i32` and panic if the converted value wouldn't fit | LL | foo::(x_u64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -465,7 +465,7 @@ error[E0308]: mismatched types | LL | foo::(x_u32); | ^^^^^ expected i32, found u32 -help: you can convert an `u32` to `i32` or panic if it the converted value wouldn't fit +help: you can convert an `u32` to `i32` and panic if the converted value wouldn't fit | LL | foo::(x_u32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -475,7 +475,7 @@ error[E0308]: mismatched types | LL | foo::(x_u16); | ^^^^^ expected i32, found u16 -help: you can convert an `u16` to `i32` or panic if it the converted value wouldn't fit +help: you can convert an `u16` to `i32` and panic if the converted value wouldn't fit | LL | foo::(x_u16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -485,7 +485,7 @@ error[E0308]: mismatched types | LL | foo::(x_u8); | ^^^^ expected i32, found u8 -help: you can convert an `u8` to `i32` or panic if it the converted value wouldn't fit +help: you can convert an `u8` to `i32` and panic if the converted value wouldn't fit | LL | foo::(x_u8.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -495,7 +495,7 @@ error[E0308]: mismatched types | LL | foo::(x_isize); | ^^^^^^^ expected i32, found isize -help: you can convert an `isize` to `i32` or panic if it the converted value wouldn't fit +help: you can convert an `isize` to `i32` and panic if the converted value wouldn't fit | LL | foo::(x_isize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -505,7 +505,7 @@ error[E0308]: mismatched types | LL | foo::(x_i64); | ^^^^^ expected i32, found i64 -help: you can convert an `i64` to `i32` or panic if it the converted value wouldn't fit +help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit | LL | foo::(x_i64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -533,7 +533,7 @@ error[E0308]: mismatched types | LL | foo::(x_usize); | ^^^^^^^ expected u16, found usize -help: you can convert an `usize` to `u16` or panic if it the converted value wouldn't fit +help: you can convert an `usize` to `u16` and panic if the converted value wouldn't fit | LL | foo::(x_usize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -543,7 +543,7 @@ error[E0308]: mismatched types | LL | foo::(x_u64); | ^^^^^ expected u16, found u64 -help: you can convert an `u64` to `u16` or panic if it the converted value wouldn't fit +help: you can convert an `u64` to `u16` and panic if the converted value wouldn't fit | LL | foo::(x_u64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -553,7 +553,7 @@ error[E0308]: mismatched types | LL | foo::(x_u32); | ^^^^^ expected u16, found u32 -help: you can convert an `u32` to `u16` or panic if it the converted value wouldn't fit +help: you can convert an `u32` to `u16` and panic if the converted value wouldn't fit | LL | foo::(x_u32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -572,7 +572,7 @@ error[E0308]: mismatched types | LL | foo::(x_isize); | ^^^^^^^ expected u16, found isize -help: you can convert an `isize` to `u16` or panic if it the converted value wouldn't fit +help: you can convert an `isize` to `u16` and panic if the converted value wouldn't fit | LL | foo::(x_isize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -582,7 +582,7 @@ error[E0308]: mismatched types | LL | foo::(x_i64); | ^^^^^ expected u16, found i64 -help: you can convert an `i64` to `u16` or panic if it the converted value wouldn't fit +help: you can convert an `i64` to `u16` and panic if the converted value wouldn't fit | LL | foo::(x_i64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -592,7 +592,7 @@ error[E0308]: mismatched types | LL | foo::(x_i32); | ^^^^^ expected u16, found i32 -help: you can convert an `i32` to `u16` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit | LL | foo::(x_i32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -602,7 +602,7 @@ error[E0308]: mismatched types | LL | foo::(x_i16); | ^^^^^ expected u16, found i16 -help: you can convert an `i16` to `u16` or panic if it the converted value wouldn't fit +help: you can convert an `i16` to `u16` and panic if the converted value wouldn't fit | LL | foo::(x_i16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -612,7 +612,7 @@ error[E0308]: mismatched types | LL | foo::(x_i8); | ^^^^ expected u16, found i8 -help: you can convert an `i8` to `u16` or panic if it the converted value wouldn't fit +help: you can convert an `i8` to `u16` and panic if the converted value wouldn't fit | LL | foo::(x_i8.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -622,7 +622,7 @@ error[E0308]: mismatched types | LL | foo::(x_usize); | ^^^^^^^ expected i16, found usize -help: you can convert an `usize` to `i16` or panic if it the converted value wouldn't fit +help: you can convert an `usize` to `i16` and panic if the converted value wouldn't fit | LL | foo::(x_usize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -632,7 +632,7 @@ error[E0308]: mismatched types | LL | foo::(x_u64); | ^^^^^ expected i16, found u64 -help: you can convert an `u64` to `i16` or panic if it the converted value wouldn't fit +help: you can convert an `u64` to `i16` and panic if the converted value wouldn't fit | LL | foo::(x_u64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -642,7 +642,7 @@ error[E0308]: mismatched types | LL | foo::(x_u32); | ^^^^^ expected i16, found u32 -help: you can convert an `u32` to `i16` or panic if it the converted value wouldn't fit +help: you can convert an `u32` to `i16` and panic if the converted value wouldn't fit | LL | foo::(x_u32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -652,7 +652,7 @@ error[E0308]: mismatched types | LL | foo::(x_u16); | ^^^^^ expected i16, found u16 -help: you can convert an `u16` to `i16` or panic if it the converted value wouldn't fit +help: you can convert an `u16` to `i16` and panic if the converted value wouldn't fit | LL | foo::(x_u16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -662,7 +662,7 @@ error[E0308]: mismatched types | LL | foo::(x_u8); | ^^^^ expected i16, found u8 -help: you can convert an `u8` to `i16` or panic if it the converted value wouldn't fit +help: you can convert an `u8` to `i16` and panic if the converted value wouldn't fit | LL | foo::(x_u8.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -672,7 +672,7 @@ error[E0308]: mismatched types | LL | foo::(x_isize); | ^^^^^^^ expected i16, found isize -help: you can convert an `isize` to `i16` or panic if it the converted value wouldn't fit +help: you can convert an `isize` to `i16` and panic if the converted value wouldn't fit | LL | foo::(x_isize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -682,7 +682,7 @@ error[E0308]: mismatched types | LL | foo::(x_i64); | ^^^^^ expected i16, found i64 -help: you can convert an `i64` to `i16` or panic if it the converted value wouldn't fit +help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit | LL | foo::(x_i64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -692,7 +692,7 @@ error[E0308]: mismatched types | LL | foo::(x_i32); | ^^^^^ expected i16, found i32 -help: you can convert an `i32` to `i16` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit | LL | foo::(x_i32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -711,7 +711,7 @@ error[E0308]: mismatched types | LL | foo::(x_usize); | ^^^^^^^ expected u8, found usize -help: you can convert an `usize` to `u8` or panic if it the converted value wouldn't fit +help: you can convert an `usize` to `u8` and panic if the converted value wouldn't fit | LL | foo::(x_usize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -721,7 +721,7 @@ error[E0308]: mismatched types | LL | foo::(x_u64); | ^^^^^ expected u8, found u64 -help: you can convert an `u64` to `u8` or panic if it the converted value wouldn't fit +help: you can convert an `u64` to `u8` and panic if the converted value wouldn't fit | LL | foo::(x_u64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -731,7 +731,7 @@ error[E0308]: mismatched types | LL | foo::(x_u32); | ^^^^^ expected u8, found u32 -help: you can convert an `u32` to `u8` or panic if it the converted value wouldn't fit +help: you can convert an `u32` to `u8` and panic if the converted value wouldn't fit | LL | foo::(x_u32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -741,7 +741,7 @@ error[E0308]: mismatched types | LL | foo::(x_u16); | ^^^^^ expected u8, found u16 -help: you can convert an `u16` to `u8` or panic if it the converted value wouldn't fit +help: you can convert an `u16` to `u8` and panic if the converted value wouldn't fit | LL | foo::(x_u16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -751,7 +751,7 @@ error[E0308]: mismatched types | LL | foo::(x_isize); | ^^^^^^^ expected u8, found isize -help: you can convert an `isize` to `u8` or panic if it the converted value wouldn't fit +help: you can convert an `isize` to `u8` and panic if the converted value wouldn't fit | LL | foo::(x_isize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -761,7 +761,7 @@ error[E0308]: mismatched types | LL | foo::(x_i64); | ^^^^^ expected u8, found i64 -help: you can convert an `i64` to `u8` or panic if it the converted value wouldn't fit +help: you can convert an `i64` to `u8` and panic if the converted value wouldn't fit | LL | foo::(x_i64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -771,7 +771,7 @@ error[E0308]: mismatched types | LL | foo::(x_i32); | ^^^^^ expected u8, found i32 -help: you can convert an `i32` to `u8` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `u8` and panic if the converted value wouldn't fit | LL | foo::(x_i32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -781,7 +781,7 @@ error[E0308]: mismatched types | LL | foo::(x_i16); | ^^^^^ expected u8, found i16 -help: you can convert an `i16` to `u8` or panic if it the converted value wouldn't fit +help: you can convert an `i16` to `u8` and panic if the converted value wouldn't fit | LL | foo::(x_i16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -791,7 +791,7 @@ error[E0308]: mismatched types | LL | foo::(x_i8); | ^^^^ expected u8, found i8 -help: you can convert an `i8` to `u8` or panic if it the converted value wouldn't fit +help: you can convert an `i8` to `u8` and panic if the converted value wouldn't fit | LL | foo::(x_i8.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -801,7 +801,7 @@ error[E0308]: mismatched types | LL | foo::(x_usize); | ^^^^^^^ expected i8, found usize -help: you can convert an `usize` to `i8` or panic if it the converted value wouldn't fit +help: you can convert an `usize` to `i8` and panic if the converted value wouldn't fit | LL | foo::(x_usize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -811,7 +811,7 @@ error[E0308]: mismatched types | LL | foo::(x_u64); | ^^^^^ expected i8, found u64 -help: you can convert an `u64` to `i8` or panic if it the converted value wouldn't fit +help: you can convert an `u64` to `i8` and panic if the converted value wouldn't fit | LL | foo::(x_u64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -821,7 +821,7 @@ error[E0308]: mismatched types | LL | foo::(x_u32); | ^^^^^ expected i8, found u32 -help: you can convert an `u32` to `i8` or panic if it the converted value wouldn't fit +help: you can convert an `u32` to `i8` and panic if the converted value wouldn't fit | LL | foo::(x_u32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -831,7 +831,7 @@ error[E0308]: mismatched types | LL | foo::(x_u16); | ^^^^^ expected i8, found u16 -help: you can convert an `u16` to `i8` or panic if it the converted value wouldn't fit +help: you can convert an `u16` to `i8` and panic if the converted value wouldn't fit | LL | foo::(x_u16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -841,7 +841,7 @@ error[E0308]: mismatched types | LL | foo::(x_u8); | ^^^^ expected i8, found u8 -help: you can convert an `u8` to `i8` or panic if it the converted value wouldn't fit +help: you can convert an `u8` to `i8` and panic if the converted value wouldn't fit | LL | foo::(x_u8.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -851,7 +851,7 @@ error[E0308]: mismatched types | LL | foo::(x_isize); | ^^^^^^^ expected i8, found isize -help: you can convert an `isize` to `i8` or panic if it the converted value wouldn't fit +help: you can convert an `isize` to `i8` and panic if the converted value wouldn't fit | LL | foo::(x_isize.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -861,7 +861,7 @@ error[E0308]: mismatched types | LL | foo::(x_i64); | ^^^^^ expected i8, found i64 -help: you can convert an `i64` to `i8` or panic if it the converted value wouldn't fit +help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit | LL | foo::(x_i64.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -871,7 +871,7 @@ error[E0308]: mismatched types | LL | foo::(x_i32); | ^^^^^ expected i8, found i32 -help: you can convert an `i32` to `i8` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit | LL | foo::(x_i32.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -881,7 +881,7 @@ error[E0308]: mismatched types | LL | foo::(x_i16); | ^^^^^ expected i8, found i16 -help: you can convert an `i16` to `i8` or panic if it the converted value wouldn't fit +help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit | LL | foo::(x_i16.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/repeat_count.stderr b/src/test/ui/repeat_count.stderr index 6772aa1c38d2c..df73ac0b182f0 100644 --- a/src/test/ui/repeat_count.stderr +++ b/src/test/ui/repeat_count.stderr @@ -42,7 +42,7 @@ error[E0308]: mismatched types | LL | let f = [0; -4_isize]; | ^^^^^^^^ expected usize, found isize -help: you can convert an `isize` to `usize` or panic if it the converted value wouldn't fit +help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit | LL | let f = [0; (-4_isize).try_into().unwrap()]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -52,7 +52,7 @@ error[E0308]: mismatched types | LL | let f = [0_usize; -1_isize]; | ^^^^^^^^ expected usize, found isize -help: you can convert an `isize` to `usize` or panic if it the converted value wouldn't fit +help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit | LL | let f = [0_usize; (-1_isize).try_into().unwrap()]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/shift-various-bad-types.stderr b/src/test/ui/shift-various-bad-types.stderr index 97523fe82cd4e..409fabb951adc 100644 --- a/src/test/ui/shift-various-bad-types.stderr +++ b/src/test/ui/shift-various-bad-types.stderr @@ -27,7 +27,7 @@ error[E0308]: mismatched types | LL | let _: i32 = 22_i64 >> 1_i32; | ^^^^^^^^^^^^^^^ expected i32, found i64 -help: you can convert an `i64` to `i32` or panic if it the converted value wouldn't fit +help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit | LL | let _: i32 = (22_i64 >> 1_i32).try_into().unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr index 9acd63c2c25f1..e9c28248044f9 100644 --- a/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr +++ b/src/test/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr @@ -6,7 +6,7 @@ LL | fn global_bound_is_hidden() -> u8 ... LL | B::get_x() | ^^^^^^^^^^ expected u8, found i32 -help: you can convert an `i32` to `u8` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `u8` and panic if the converted value wouldn't fit | LL | B::get_x().try_into().unwrap() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/tutorial-suffix-inference-test.stderr b/src/test/ui/tutorial-suffix-inference-test.stderr index f51f2defd4759..f3e1cc41cada2 100644 --- a/src/test/ui/tutorial-suffix-inference-test.stderr +++ b/src/test/ui/tutorial-suffix-inference-test.stderr @@ -12,7 +12,7 @@ error[E0308]: mismatched types | LL | identity_u16(y); | ^ expected u16, found i32 -help: you can convert an `i32` to `u16` or panic if it the converted value wouldn't fit +help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit | LL | identity_u16(y.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^ @@ -22,7 +22,7 @@ error[E0308]: mismatched types | LL | identity_u16(a); | ^ expected u16, found isize -help: you can convert an `isize` to `u16` or panic if it the converted value wouldn't fit +help: you can convert an `isize` to `u16` and panic if the converted value wouldn't fit | LL | identity_u16(a.try_into().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^