summaryrefslogtreecommitdiffstats
path: root/tests/ui/numeric
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/numeric/const-scope.rs (renamed from src/test/ui/numeric/const-scope.rs)0
-rw-r--r--tests/ui/numeric/const-scope.stderr (renamed from src/test/ui/numeric/const-scope.stderr)0
-rw-r--r--tests/ui/numeric/integer-literal-suffix-inference.rs (renamed from src/test/ui/numeric/integer-literal-suffix-inference.rs)0
-rw-r--r--tests/ui/numeric/integer-literal-suffix-inference.stderr (renamed from src/test/ui/numeric/integer-literal-suffix-inference.stderr)0
-rw-r--r--tests/ui/numeric/len.rs (renamed from src/test/ui/numeric/len.rs)0
-rw-r--r--tests/ui/numeric/len.stderr (renamed from src/test/ui/numeric/len.stderr)0
-rw-r--r--tests/ui/numeric/numeric-cast-2.rs (renamed from src/test/ui/numeric/numeric-cast-2.rs)0
-rw-r--r--tests/ui/numeric/numeric-cast-2.stderr (renamed from src/test/ui/numeric/numeric-cast-2.stderr)0
-rw-r--r--tests/ui/numeric/numeric-cast-binop.fixed (renamed from src/test/ui/numeric/numeric-cast-binop.fixed)0
-rw-r--r--tests/ui/numeric/numeric-cast-binop.rs (renamed from src/test/ui/numeric/numeric-cast-binop.rs)0
-rw-r--r--tests/ui/numeric/numeric-cast-binop.stderr1719
-rw-r--r--tests/ui/numeric/numeric-cast-no-fix.rs (renamed from src/test/ui/numeric/numeric-cast-no-fix.rs)0
-rw-r--r--tests/ui/numeric/numeric-cast-no-fix.stderr396
-rw-r--r--tests/ui/numeric/numeric-cast-without-suggestion.rs (renamed from src/test/ui/numeric/numeric-cast-without-suggestion.rs)0
-rw-r--r--tests/ui/numeric/numeric-cast-without-suggestion.stderr (renamed from src/test/ui/numeric/numeric-cast-without-suggestion.stderr)0
-rw-r--r--tests/ui/numeric/numeric-cast.fixed (renamed from src/test/ui/numeric/numeric-cast.fixed)0
-rw-r--r--tests/ui/numeric/numeric-cast.rs (renamed from src/test/ui/numeric/numeric-cast.rs)0
-rw-r--r--tests/ui/numeric/numeric-cast.stderr (renamed from src/test/ui/numeric/numeric-cast.stderr)0
-rw-r--r--tests/ui/numeric/numeric-fields.rs (renamed from src/test/ui/numeric/numeric-fields.rs)0
-rw-r--r--tests/ui/numeric/numeric-fields.stderr (renamed from src/test/ui/numeric/numeric-fields.stderr)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-i32.fixed (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-i32.fixed)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-i32.rs (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-i32.rs)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-i32.stderr (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-i32.stderr)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-i64.fixed (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-i64.fixed)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-i64.rs (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-i64.rs)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-i64.stderr (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-i64.stderr)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-isize.fixed (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-isize.fixed)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-isize.rs (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-isize.rs)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-isize.stderr (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-isize.stderr)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-u32.fixed (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-u32.fixed)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-u32.rs (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-u32.rs)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-u32.stderr (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-u32.stderr)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-u64.fixed (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-u64.fixed)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-u64.rs (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-u64.rs)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-u64.stderr (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-u64.stderr)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-usize.fixed (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-usize.fixed)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-usize.rs (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-usize.rs)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix-usize.stderr (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix-usize.stderr)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix.fixed (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix.fixed)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix.rs (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix.rs)0
-rw-r--r--tests/ui/numeric/numeric-suffix/numeric-suffix.stderr (renamed from src/test/ui/numeric/numeric-suffix/numeric-suffix.stderr)0
-rw-r--r--tests/ui/numeric/uppercase-base-prefix-invalid-no-fix.rs34
-rw-r--r--tests/ui/numeric/uppercase-base-prefix-invalid-no-fix.stderr50
-rw-r--r--tests/ui/numeric/uppercase-base-prefix.fixed (renamed from src/test/ui/numeric/uppercase-base-prefix.fixed)0
-rw-r--r--tests/ui/numeric/uppercase-base-prefix.rs (renamed from src/test/ui/numeric/uppercase-base-prefix.rs)0
-rw-r--r--tests/ui/numeric/uppercase-base-prefix.stderr (renamed from src/test/ui/numeric/uppercase-base-prefix.stderr)0
46 files changed, 2199 insertions, 0 deletions
diff --git a/src/test/ui/numeric/const-scope.rs b/tests/ui/numeric/const-scope.rs
index 053599a9b..053599a9b 100644
--- a/src/test/ui/numeric/const-scope.rs
+++ b/tests/ui/numeric/const-scope.rs
diff --git a/src/test/ui/numeric/const-scope.stderr b/tests/ui/numeric/const-scope.stderr
index 4e4bcdf23..4e4bcdf23 100644
--- a/src/test/ui/numeric/const-scope.stderr
+++ b/tests/ui/numeric/const-scope.stderr
diff --git a/src/test/ui/numeric/integer-literal-suffix-inference.rs b/tests/ui/numeric/integer-literal-suffix-inference.rs
index c320f2bb7..c320f2bb7 100644
--- a/src/test/ui/numeric/integer-literal-suffix-inference.rs
+++ b/tests/ui/numeric/integer-literal-suffix-inference.rs
diff --git a/src/test/ui/numeric/integer-literal-suffix-inference.stderr b/tests/ui/numeric/integer-literal-suffix-inference.stderr
index 5045f584c..5045f584c 100644
--- a/src/test/ui/numeric/integer-literal-suffix-inference.stderr
+++ b/tests/ui/numeric/integer-literal-suffix-inference.stderr
diff --git a/src/test/ui/numeric/len.rs b/tests/ui/numeric/len.rs
index a72540988..a72540988 100644
--- a/src/test/ui/numeric/len.rs
+++ b/tests/ui/numeric/len.rs
diff --git a/src/test/ui/numeric/len.stderr b/tests/ui/numeric/len.stderr
index 55a61b5e4..55a61b5e4 100644
--- a/src/test/ui/numeric/len.stderr
+++ b/tests/ui/numeric/len.stderr
diff --git a/src/test/ui/numeric/numeric-cast-2.rs b/tests/ui/numeric/numeric-cast-2.rs
index ad2de5d2b..ad2de5d2b 100644
--- a/src/test/ui/numeric/numeric-cast-2.rs
+++ b/tests/ui/numeric/numeric-cast-2.rs
diff --git a/src/test/ui/numeric/numeric-cast-2.stderr b/tests/ui/numeric/numeric-cast-2.stderr
index a7b342739..a7b342739 100644
--- a/src/test/ui/numeric/numeric-cast-2.stderr
+++ b/tests/ui/numeric/numeric-cast-2.stderr
diff --git a/src/test/ui/numeric/numeric-cast-binop.fixed b/tests/ui/numeric/numeric-cast-binop.fixed
index edb085e71..edb085e71 100644
--- a/src/test/ui/numeric/numeric-cast-binop.fixed
+++ b/tests/ui/numeric/numeric-cast-binop.fixed
diff --git a/src/test/ui/numeric/numeric-cast-binop.rs b/tests/ui/numeric/numeric-cast-binop.rs
index c1ed8de8a..c1ed8de8a 100644
--- a/src/test/ui/numeric/numeric-cast-binop.rs
+++ b/tests/ui/numeric/numeric-cast-binop.rs
diff --git a/tests/ui/numeric/numeric-cast-binop.stderr b/tests/ui/numeric/numeric-cast-binop.stderr
new file mode 100644
index 000000000..d5213e3f5
--- /dev/null
+++ b/tests/ui/numeric/numeric-cast-binop.stderr
@@ -0,0 +1,1719 @@
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:23:16
+ |
+LL | x_u8 > x_u16;
+ | ---- ^^^^^ expected `u8`, found `u16`
+ | |
+ | expected because this is `u8`
+ |
+help: you can convert `x_u8` from `u8` to `u16`, matching the type of `x_u16`
+ |
+LL | u16::from(x_u8) > x_u16;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:25:16
+ |
+LL | x_u8 > x_u32;
+ | ---- ^^^^^ expected `u8`, found `u32`
+ | |
+ | expected because this is `u8`
+ |
+help: you can convert `x_u8` from `u8` to `u32`, matching the type of `x_u32`
+ |
+LL | u32::from(x_u8) > x_u32;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:27:16
+ |
+LL | x_u8 > x_u64;
+ | ---- ^^^^^ expected `u8`, found `u64`
+ | |
+ | expected because this is `u8`
+ |
+help: you can convert `x_u8` from `u8` to `u64`, matching the type of `x_u64`
+ |
+LL | u64::from(x_u8) > x_u64;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:29:16
+ |
+LL | x_u8 > x_u128;
+ | ---- ^^^^^^ expected `u8`, found `u128`
+ | |
+ | expected because this is `u8`
+ |
+help: you can convert `x_u8` from `u8` to `u128`, matching the type of `x_u128`
+ |
+LL | u128::from(x_u8) > x_u128;
+ | +++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:31:16
+ |
+LL | x_u8 > x_usize;
+ | ---- ^^^^^^^ expected `u8`, found `usize`
+ | |
+ | expected because this is `u8`
+ |
+help: you can convert `x_u8` from `u8` to `usize`, matching the type of `x_usize`
+ |
+LL | usize::from(x_u8) > x_usize;
+ | ++++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:34:17
+ |
+LL | x_u16 > x_u8;
+ | ----- ^^^^ expected `u16`, found `u8`
+ | |
+ | expected because this is `u16`
+ |
+help: you can convert a `u8` to a `u16`
+ |
+LL | x_u16 > x_u8.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:36:17
+ |
+LL | x_u16 > x_u32;
+ | ----- ^^^^^ expected `u16`, found `u32`
+ | |
+ | expected because this is `u16`
+ |
+help: you can convert `x_u16` from `u16` to `u32`, matching the type of `x_u32`
+ |
+LL | u32::from(x_u16) > x_u32;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:38:17
+ |
+LL | x_u16 > x_u64;
+ | ----- ^^^^^ expected `u16`, found `u64`
+ | |
+ | expected because this is `u16`
+ |
+help: you can convert `x_u16` from `u16` to `u64`, matching the type of `x_u64`
+ |
+LL | u64::from(x_u16) > x_u64;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:40:17
+ |
+LL | x_u16 > x_u128;
+ | ----- ^^^^^^ expected `u16`, found `u128`
+ | |
+ | expected because this is `u16`
+ |
+help: you can convert `x_u16` from `u16` to `u128`, matching the type of `x_u128`
+ |
+LL | u128::from(x_u16) > x_u128;
+ | +++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:42:17
+ |
+LL | x_u16 > x_usize;
+ | ----- ^^^^^^^ expected `u16`, found `usize`
+ | |
+ | expected because this is `u16`
+ |
+help: you can convert `x_u16` from `u16` to `usize`, matching the type of `x_usize`
+ |
+LL | usize::from(x_u16) > x_usize;
+ | ++++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:45:17
+ |
+LL | x_u32 > x_u8;
+ | ----- ^^^^ expected `u32`, found `u8`
+ | |
+ | expected because this is `u32`
+ |
+help: you can convert a `u8` to a `u32`
+ |
+LL | x_u32 > x_u8.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:47:17
+ |
+LL | x_u32 > x_u16;
+ | ----- ^^^^^ expected `u32`, found `u16`
+ | |
+ | expected because this is `u32`
+ |
+help: you can convert a `u16` to a `u32`
+ |
+LL | x_u32 > x_u16.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:49:17
+ |
+LL | x_u32 > x_u64;
+ | ----- ^^^^^ expected `u32`, found `u64`
+ | |
+ | expected because this is `u32`
+ |
+help: you can convert `x_u32` from `u32` to `u64`, matching the type of `x_u64`
+ |
+LL | u64::from(x_u32) > x_u64;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:51:17
+ |
+LL | x_u32 > x_u128;
+ | ----- ^^^^^^ expected `u32`, found `u128`
+ | |
+ | expected because this is `u32`
+ |
+help: you can convert `x_u32` from `u32` to `u128`, matching the type of `x_u128`
+ |
+LL | u128::from(x_u32) > x_u128;
+ | +++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:53:17
+ |
+LL | x_u32 > x_usize;
+ | ----- ^^^^^^^ expected `u32`, found `usize`
+ | |
+ | expected because this is `u32`
+ |
+help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
+ |
+LL | x_u32 > x_usize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:56:17
+ |
+LL | x_u64 > x_u8;
+ | ----- ^^^^ expected `u64`, found `u8`
+ | |
+ | expected because this is `u64`
+ |
+help: you can convert a `u8` to a `u64`
+ |
+LL | x_u64 > x_u8.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:58:17
+ |
+LL | x_u64 > x_u16;
+ | ----- ^^^^^ expected `u64`, found `u16`
+ | |
+ | expected because this is `u64`
+ |
+help: you can convert a `u16` to a `u64`
+ |
+LL | x_u64 > x_u16.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:60:17
+ |
+LL | x_u64 > x_u32;
+ | ----- ^^^^^ expected `u64`, found `u32`
+ | |
+ | expected because this is `u64`
+ |
+help: you can convert a `u32` to a `u64`
+ |
+LL | x_u64 > x_u32.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:62:17
+ |
+LL | x_u64 > x_u128;
+ | ----- ^^^^^^ expected `u64`, found `u128`
+ | |
+ | expected because this is `u64`
+ |
+help: you can convert `x_u64` from `u64` to `u128`, matching the type of `x_u128`
+ |
+LL | u128::from(x_u64) > x_u128;
+ | +++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:64:17
+ |
+LL | x_u64 > x_usize;
+ | ----- ^^^^^^^ expected `u64`, found `usize`
+ | |
+ | expected because this is `u64`
+ |
+help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
+ |
+LL | x_u64 > x_usize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:67:18
+ |
+LL | x_u128 > x_u8;
+ | ------ ^^^^ expected `u128`, found `u8`
+ | |
+ | expected because this is `u128`
+ |
+help: you can convert a `u8` to a `u128`
+ |
+LL | x_u128 > x_u8.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:69:18
+ |
+LL | x_u128 > x_u16;
+ | ------ ^^^^^ expected `u128`, found `u16`
+ | |
+ | expected because this is `u128`
+ |
+help: you can convert a `u16` to a `u128`
+ |
+LL | x_u128 > x_u16.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:71:18
+ |
+LL | x_u128 > x_u32;
+ | ------ ^^^^^ expected `u128`, found `u32`
+ | |
+ | expected because this is `u128`
+ |
+help: you can convert a `u32` to a `u128`
+ |
+LL | x_u128 > x_u32.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:73:18
+ |
+LL | x_u128 > x_u64;
+ | ------ ^^^^^ expected `u128`, found `u64`
+ | |
+ | expected because this is `u128`
+ |
+help: you can convert a `u64` to a `u128`
+ |
+LL | x_u128 > x_u64.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:75:18
+ |
+LL | x_u128 > x_usize;
+ | ------ ^^^^^^^ expected `u128`, found `usize`
+ | |
+ | expected because this is `u128`
+ |
+help: you can convert a `usize` to a `u128` and panic if the converted value doesn't fit
+ |
+LL | x_u128 > x_usize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:78:19
+ |
+LL | x_usize > x_u8;
+ | ------- ^^^^ expected `usize`, found `u8`
+ | |
+ | expected because this is `usize`
+ |
+help: you can convert a `u8` to a `usize`
+ |
+LL | x_usize > x_u8.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:80:19
+ |
+LL | x_usize > x_u16;
+ | ------- ^^^^^ expected `usize`, found `u16`
+ | |
+ | expected because this is `usize`
+ |
+help: you can convert a `u16` to a `usize`
+ |
+LL | x_usize > x_u16.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:82:19
+ |
+LL | x_usize > x_u32;
+ | ------- ^^^^^ expected `usize`, found `u32`
+ | |
+ | expected because this is `usize`
+ |
+help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
+ |
+LL | x_usize > x_u32.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:84:19
+ |
+LL | x_usize > x_u64;
+ | ------- ^^^^^ expected `usize`, found `u64`
+ | |
+ | expected because this is `usize`
+ |
+help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
+ |
+LL | x_usize > x_u64.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:86:19
+ |
+LL | x_usize > x_u128;
+ | ------- ^^^^^^ expected `usize`, found `u128`
+ | |
+ | expected because this is `usize`
+ |
+help: you can convert a `u128` to a `usize` and panic if the converted value doesn't fit
+ |
+LL | x_usize > x_u128.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:92:16
+ |
+LL | x_i8 > x_i16;
+ | ---- ^^^^^ expected `i8`, found `i16`
+ | |
+ | expected because this is `i8`
+ |
+help: you can convert `x_i8` from `i8` to `i16`, matching the type of `x_i16`
+ |
+LL | i16::from(x_i8) > x_i16;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:94:16
+ |
+LL | x_i8 > x_i32;
+ | ---- ^^^^^ expected `i8`, found `i32`
+ | |
+ | expected because this is `i8`
+ |
+help: you can convert `x_i8` from `i8` to `i32`, matching the type of `x_i32`
+ |
+LL | i32::from(x_i8) > x_i32;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:96:16
+ |
+LL | x_i8 > x_i64;
+ | ---- ^^^^^ expected `i8`, found `i64`
+ | |
+ | expected because this is `i8`
+ |
+help: you can convert `x_i8` from `i8` to `i64`, matching the type of `x_i64`
+ |
+LL | i64::from(x_i8) > x_i64;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:98:16
+ |
+LL | x_i8 > x_i128;
+ | ---- ^^^^^^ expected `i8`, found `i128`
+ | |
+ | expected because this is `i8`
+ |
+help: you can convert `x_i8` from `i8` to `i128`, matching the type of `x_i128`
+ |
+LL | i128::from(x_i8) > x_i128;
+ | +++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:100:16
+ |
+LL | x_i8 > x_isize;
+ | ---- ^^^^^^^ expected `i8`, found `isize`
+ | |
+ | expected because this is `i8`
+ |
+help: you can convert `x_i8` from `i8` to `isize`, matching the type of `x_isize`
+ |
+LL | isize::from(x_i8) > x_isize;
+ | ++++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:103:17
+ |
+LL | x_i16 > x_i8;
+ | ----- ^^^^ expected `i16`, found `i8`
+ | |
+ | expected because this is `i16`
+ |
+help: you can convert an `i8` to an `i16`
+ |
+LL | x_i16 > x_i8.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:105:17
+ |
+LL | x_i16 > x_i32;
+ | ----- ^^^^^ expected `i16`, found `i32`
+ | |
+ | expected because this is `i16`
+ |
+help: you can convert `x_i16` from `i16` to `i32`, matching the type of `x_i32`
+ |
+LL | i32::from(x_i16) > x_i32;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:107:17
+ |
+LL | x_i16 > x_i64;
+ | ----- ^^^^^ expected `i16`, found `i64`
+ | |
+ | expected because this is `i16`
+ |
+help: you can convert `x_i16` from `i16` to `i64`, matching the type of `x_i64`
+ |
+LL | i64::from(x_i16) > x_i64;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:109:17
+ |
+LL | x_i16 > x_i128;
+ | ----- ^^^^^^ expected `i16`, found `i128`
+ | |
+ | expected because this is `i16`
+ |
+help: you can convert `x_i16` from `i16` to `i128`, matching the type of `x_i128`
+ |
+LL | i128::from(x_i16) > x_i128;
+ | +++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:111:17
+ |
+LL | x_i16 > x_isize;
+ | ----- ^^^^^^^ expected `i16`, found `isize`
+ | |
+ | expected because this is `i16`
+ |
+help: you can convert `x_i16` from `i16` to `isize`, matching the type of `x_isize`
+ |
+LL | isize::from(x_i16) > x_isize;
+ | ++++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:114:17
+ |
+LL | x_i32 > x_i8;
+ | ----- ^^^^ expected `i32`, found `i8`
+ | |
+ | expected because this is `i32`
+ |
+help: you can convert an `i8` to an `i32`
+ |
+LL | x_i32 > x_i8.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:116:17
+ |
+LL | x_i32 > x_i16;
+ | ----- ^^^^^ expected `i32`, found `i16`
+ | |
+ | expected because this is `i32`
+ |
+help: you can convert an `i16` to an `i32`
+ |
+LL | x_i32 > x_i16.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:118:17
+ |
+LL | x_i32 > x_i64;
+ | ----- ^^^^^ expected `i32`, found `i64`
+ | |
+ | expected because this is `i32`
+ |
+help: you can convert `x_i32` from `i32` to `i64`, matching the type of `x_i64`
+ |
+LL | i64::from(x_i32) > x_i64;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:120:17
+ |
+LL | x_i32 > x_i128;
+ | ----- ^^^^^^ expected `i32`, found `i128`
+ | |
+ | expected because this is `i32`
+ |
+help: you can convert `x_i32` from `i32` to `i128`, matching the type of `x_i128`
+ |
+LL | i128::from(x_i32) > x_i128;
+ | +++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:122:17
+ |
+LL | x_i32 > x_isize;
+ | ----- ^^^^^^^ expected `i32`, found `isize`
+ | |
+ | expected because this is `i32`
+ |
+help: you can convert an `isize` to an `i32` and panic if the converted value doesn't fit
+ |
+LL | x_i32 > x_isize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:125:17
+ |
+LL | x_i64 > x_i8;
+ | ----- ^^^^ expected `i64`, found `i8`
+ | |
+ | expected because this is `i64`
+ |
+help: you can convert an `i8` to an `i64`
+ |
+LL | x_i64 > x_i8.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:127:17
+ |
+LL | x_i64 > x_i16;
+ | ----- ^^^^^ expected `i64`, found `i16`
+ | |
+ | expected because this is `i64`
+ |
+help: you can convert an `i16` to an `i64`
+ |
+LL | x_i64 > x_i16.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:129:17
+ |
+LL | x_i64 > x_i32;
+ | ----- ^^^^^ expected `i64`, found `i32`
+ | |
+ | expected because this is `i64`
+ |
+help: you can convert an `i32` to an `i64`
+ |
+LL | x_i64 > x_i32.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:131:17
+ |
+LL | x_i64 > x_i128;
+ | ----- ^^^^^^ expected `i64`, found `i128`
+ | |
+ | expected because this is `i64`
+ |
+help: you can convert `x_i64` from `i64` to `i128`, matching the type of `x_i128`
+ |
+LL | i128::from(x_i64) > x_i128;
+ | +++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:133:17
+ |
+LL | x_i64 > x_isize;
+ | ----- ^^^^^^^ expected `i64`, found `isize`
+ | |
+ | expected because this is `i64`
+ |
+help: you can convert an `isize` to an `i64` and panic if the converted value doesn't fit
+ |
+LL | x_i64 > x_isize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:136:18
+ |
+LL | x_i128 > x_i8;
+ | ------ ^^^^ expected `i128`, found `i8`
+ | |
+ | expected because this is `i128`
+ |
+help: you can convert an `i8` to an `i128`
+ |
+LL | x_i128 > x_i8.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:138:18
+ |
+LL | x_i128 > x_i16;
+ | ------ ^^^^^ expected `i128`, found `i16`
+ | |
+ | expected because this is `i128`
+ |
+help: you can convert an `i16` to an `i128`
+ |
+LL | x_i128 > x_i16.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:140:18
+ |
+LL | x_i128 > x_i32;
+ | ------ ^^^^^ expected `i128`, found `i32`
+ | |
+ | expected because this is `i128`
+ |
+help: you can convert an `i32` to an `i128`
+ |
+LL | x_i128 > x_i32.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:142:18
+ |
+LL | x_i128 > x_i64;
+ | ------ ^^^^^ expected `i128`, found `i64`
+ | |
+ | expected because this is `i128`
+ |
+help: you can convert an `i64` to an `i128`
+ |
+LL | x_i128 > x_i64.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:144:18
+ |
+LL | x_i128 > x_isize;
+ | ------ ^^^^^^^ expected `i128`, found `isize`
+ | |
+ | expected because this is `i128`
+ |
+help: you can convert an `isize` to an `i128` and panic if the converted value doesn't fit
+ |
+LL | x_i128 > x_isize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:147:19
+ |
+LL | x_isize > x_i8;
+ | ------- ^^^^ expected `isize`, found `i8`
+ | |
+ | expected because this is `isize`
+ |
+help: you can convert an `i8` to an `isize`
+ |
+LL | x_isize > x_i8.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:149:19
+ |
+LL | x_isize > x_i16;
+ | ------- ^^^^^ expected `isize`, found `i16`
+ | |
+ | expected because this is `isize`
+ |
+help: you can convert an `i16` to an `isize`
+ |
+LL | x_isize > x_i16.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:151:19
+ |
+LL | x_isize > x_i32;
+ | ------- ^^^^^ expected `isize`, found `i32`
+ | |
+ | expected because this is `isize`
+ |
+help: you can convert an `i32` to an `isize` and panic if the converted value doesn't fit
+ |
+LL | x_isize > x_i32.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:153:19
+ |
+LL | x_isize > x_i64;
+ | ------- ^^^^^ expected `isize`, found `i64`
+ | |
+ | expected because this is `isize`
+ |
+help: you can convert an `i64` to an `isize` and panic if the converted value doesn't fit
+ |
+LL | x_isize > x_i64.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:155:19
+ |
+LL | x_isize > x_i128;
+ | ------- ^^^^^^ expected `isize`, found `i128`
+ | |
+ | expected because this is `isize`
+ |
+help: you can convert an `i128` to an `isize` and panic if the converted value doesn't fit
+ |
+LL | x_isize > x_i128.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:161:16
+ |
+LL | x_u8 > x_i8;
+ | ---- ^^^^ expected `u8`, found `i8`
+ | |
+ | expected because this is `u8`
+ |
+help: you can convert an `i8` to a `u8` and panic if the converted value doesn't fit
+ |
+LL | x_u8 > x_i8.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:163:16
+ |
+LL | x_u8 > x_i16;
+ | ---- ^^^^^ expected `u8`, found `i16`
+ | |
+ | expected because this is `u8`
+ |
+help: you can convert `x_u8` from `u8` to `i16`, matching the type of `x_i16`
+ |
+LL | i16::from(x_u8) > x_i16;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:165:16
+ |
+LL | x_u8 > x_i32;
+ | ---- ^^^^^ expected `u8`, found `i32`
+ | |
+ | expected because this is `u8`
+ |
+help: you can convert `x_u8` from `u8` to `i32`, matching the type of `x_i32`
+ |
+LL | i32::from(x_u8) > x_i32;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:167:16
+ |
+LL | x_u8 > x_i64;
+ | ---- ^^^^^ expected `u8`, found `i64`
+ | |
+ | expected because this is `u8`
+ |
+help: you can convert `x_u8` from `u8` to `i64`, matching the type of `x_i64`
+ |
+LL | i64::from(x_u8) > x_i64;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:169:16
+ |
+LL | x_u8 > x_i128;
+ | ---- ^^^^^^ expected `u8`, found `i128`
+ | |
+ | expected because this is `u8`
+ |
+help: you can convert `x_u8` from `u8` to `i128`, matching the type of `x_i128`
+ |
+LL | i128::from(x_u8) > x_i128;
+ | +++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:171:16
+ |
+LL | x_u8 > x_isize;
+ | ---- ^^^^^^^ expected `u8`, found `isize`
+ | |
+ | expected because this is `u8`
+ |
+help: you can convert `x_u8` from `u8` to `isize`, matching the type of `x_isize`
+ |
+LL | isize::from(x_u8) > x_isize;
+ | ++++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:174:17
+ |
+LL | x_u16 > x_i8;
+ | ----- ^^^^ expected `u16`, found `i8`
+ | |
+ | expected because this is `u16`
+ |
+help: you can convert an `i8` to a `u16` and panic if the converted value doesn't fit
+ |
+LL | x_u16 > x_i8.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:176:17
+ |
+LL | x_u16 > x_i16;
+ | ----- ^^^^^ expected `u16`, found `i16`
+ | |
+ | expected because this is `u16`
+ |
+help: you can convert an `i16` to a `u16` and panic if the converted value doesn't fit
+ |
+LL | x_u16 > x_i16.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:178:17
+ |
+LL | x_u16 > x_i32;
+ | ----- ^^^^^ expected `u16`, found `i32`
+ | |
+ | expected because this is `u16`
+ |
+help: you can convert `x_u16` from `u16` to `i32`, matching the type of `x_i32`
+ |
+LL | i32::from(x_u16) > x_i32;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:180:17
+ |
+LL | x_u16 > x_i64;
+ | ----- ^^^^^ expected `u16`, found `i64`
+ | |
+ | expected because this is `u16`
+ |
+help: you can convert `x_u16` from `u16` to `i64`, matching the type of `x_i64`
+ |
+LL | i64::from(x_u16) > x_i64;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:182:17
+ |
+LL | x_u16 > x_i128;
+ | ----- ^^^^^^ expected `u16`, found `i128`
+ | |
+ | expected because this is `u16`
+ |
+help: you can convert `x_u16` from `u16` to `i128`, matching the type of `x_i128`
+ |
+LL | i128::from(x_u16) > x_i128;
+ | +++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:184:17
+ |
+LL | x_u16 > x_isize;
+ | ----- ^^^^^^^ expected `u16`, found `isize`
+ | |
+ | expected because this is `u16`
+ |
+help: you can convert an `isize` to a `u16` and panic if the converted value doesn't fit
+ |
+LL | x_u16 > x_isize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:187:17
+ |
+LL | x_u32 > x_i8;
+ | ----- ^^^^ expected `u32`, found `i8`
+ | |
+ | expected because this is `u32`
+ |
+help: you can convert an `i8` to a `u32` and panic if the converted value doesn't fit
+ |
+LL | x_u32 > x_i8.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:189:17
+ |
+LL | x_u32 > x_i16;
+ | ----- ^^^^^ expected `u32`, found `i16`
+ | |
+ | expected because this is `u32`
+ |
+help: you can convert an `i16` to a `u32` and panic if the converted value doesn't fit
+ |
+LL | x_u32 > x_i16.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:191:17
+ |
+LL | x_u32 > x_i32;
+ | ----- ^^^^^ expected `u32`, found `i32`
+ | |
+ | expected because this is `u32`
+ |
+help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit
+ |
+LL | x_u32 > x_i32.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:193:17
+ |
+LL | x_u32 > x_i64;
+ | ----- ^^^^^ expected `u32`, found `i64`
+ | |
+ | expected because this is `u32`
+ |
+help: you can convert `x_u32` from `u32` to `i64`, matching the type of `x_i64`
+ |
+LL | i64::from(x_u32) > x_i64;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:195:17
+ |
+LL | x_u32 > x_i128;
+ | ----- ^^^^^^ expected `u32`, found `i128`
+ | |
+ | expected because this is `u32`
+ |
+help: you can convert `x_u32` from `u32` to `i128`, matching the type of `x_i128`
+ |
+LL | i128::from(x_u32) > x_i128;
+ | +++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:197:17
+ |
+LL | x_u32 > x_isize;
+ | ----- ^^^^^^^ expected `u32`, found `isize`
+ | |
+ | expected because this is `u32`
+ |
+help: you can convert an `isize` to a `u32` and panic if the converted value doesn't fit
+ |
+LL | x_u32 > x_isize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:200:17
+ |
+LL | x_u64 > x_i8;
+ | ----- ^^^^ expected `u64`, found `i8`
+ | |
+ | expected because this is `u64`
+ |
+help: you can convert an `i8` to a `u64` and panic if the converted value doesn't fit
+ |
+LL | x_u64 > x_i8.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:202:17
+ |
+LL | x_u64 > x_i16;
+ | ----- ^^^^^ expected `u64`, found `i16`
+ | |
+ | expected because this is `u64`
+ |
+help: you can convert an `i16` to a `u64` and panic if the converted value doesn't fit
+ |
+LL | x_u64 > x_i16.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:204:17
+ |
+LL | x_u64 > x_i32;
+ | ----- ^^^^^ expected `u64`, found `i32`
+ | |
+ | expected because this is `u64`
+ |
+help: you can convert an `i32` to a `u64` and panic if the converted value doesn't fit
+ |
+LL | x_u64 > x_i32.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:206:17
+ |
+LL | x_u64 > x_i64;
+ | ----- ^^^^^ expected `u64`, found `i64`
+ | |
+ | expected because this is `u64`
+ |
+help: you can convert an `i64` to a `u64` and panic if the converted value doesn't fit
+ |
+LL | x_u64 > x_i64.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:208:17
+ |
+LL | x_u64 > x_i128;
+ | ----- ^^^^^^ expected `u64`, found `i128`
+ | |
+ | expected because this is `u64`
+ |
+help: you can convert `x_u64` from `u64` to `i128`, matching the type of `x_i128`
+ |
+LL | i128::from(x_u64) > x_i128;
+ | +++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:210:17
+ |
+LL | x_u64 > x_isize;
+ | ----- ^^^^^^^ expected `u64`, found `isize`
+ | |
+ | expected because this is `u64`
+ |
+help: you can convert an `isize` to a `u64` and panic if the converted value doesn't fit
+ |
+LL | x_u64 > x_isize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:213:18
+ |
+LL | x_u128 > x_i8;
+ | ------ ^^^^ expected `u128`, found `i8`
+ | |
+ | expected because this is `u128`
+ |
+help: you can convert an `i8` to a `u128` and panic if the converted value doesn't fit
+ |
+LL | x_u128 > x_i8.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:215:18
+ |
+LL | x_u128 > x_i16;
+ | ------ ^^^^^ expected `u128`, found `i16`
+ | |
+ | expected because this is `u128`
+ |
+help: you can convert an `i16` to a `u128` and panic if the converted value doesn't fit
+ |
+LL | x_u128 > x_i16.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:217:18
+ |
+LL | x_u128 > x_i32;
+ | ------ ^^^^^ expected `u128`, found `i32`
+ | |
+ | expected because this is `u128`
+ |
+help: you can convert an `i32` to a `u128` and panic if the converted value doesn't fit
+ |
+LL | x_u128 > x_i32.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:219:18
+ |
+LL | x_u128 > x_i64;
+ | ------ ^^^^^ expected `u128`, found `i64`
+ | |
+ | expected because this is `u128`
+ |
+help: you can convert an `i64` to a `u128` and panic if the converted value doesn't fit
+ |
+LL | x_u128 > x_i64.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:221:18
+ |
+LL | x_u128 > x_i128;
+ | ------ ^^^^^^ expected `u128`, found `i128`
+ | |
+ | expected because this is `u128`
+ |
+help: you can convert an `i128` to a `u128` and panic if the converted value doesn't fit
+ |
+LL | x_u128 > x_i128.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:223:18
+ |
+LL | x_u128 > x_isize;
+ | ------ ^^^^^^^ expected `u128`, found `isize`
+ | |
+ | expected because this is `u128`
+ |
+help: you can convert an `isize` to a `u128` and panic if the converted value doesn't fit
+ |
+LL | x_u128 > x_isize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:226:19
+ |
+LL | x_usize > x_i8;
+ | ------- ^^^^ expected `usize`, found `i8`
+ | |
+ | expected because this is `usize`
+ |
+help: you can convert an `i8` to a `usize` and panic if the converted value doesn't fit
+ |
+LL | x_usize > x_i8.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:228:19
+ |
+LL | x_usize > x_i16;
+ | ------- ^^^^^ expected `usize`, found `i16`
+ | |
+ | expected because this is `usize`
+ |
+help: you can convert an `i16` to a `usize` and panic if the converted value doesn't fit
+ |
+LL | x_usize > x_i16.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:230:19
+ |
+LL | x_usize > x_i32;
+ | ------- ^^^^^ expected `usize`, found `i32`
+ | |
+ | expected because this is `usize`
+ |
+help: you can convert an `i32` to a `usize` and panic if the converted value doesn't fit
+ |
+LL | x_usize > x_i32.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:232:19
+ |
+LL | x_usize > x_i64;
+ | ------- ^^^^^ expected `usize`, found `i64`
+ | |
+ | expected because this is `usize`
+ |
+help: you can convert an `i64` to a `usize` and panic if the converted value doesn't fit
+ |
+LL | x_usize > x_i64.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:234:19
+ |
+LL | x_usize > x_i128;
+ | ------- ^^^^^^ expected `usize`, found `i128`
+ | |
+ | expected because this is `usize`
+ |
+help: you can convert an `i128` to a `usize` and panic if the converted value doesn't fit
+ |
+LL | x_usize > x_i128.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:236:19
+ |
+LL | x_usize > x_isize;
+ | ------- ^^^^^^^ expected `usize`, found `isize`
+ | |
+ | expected because this is `usize`
+ |
+help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit
+ |
+LL | x_usize > x_isize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:242:16
+ |
+LL | x_i8 > x_u8;
+ | ---- ^^^^ expected `i8`, found `u8`
+ | |
+ | expected because this is `i8`
+ |
+help: you can convert a `u8` to an `i8` and panic if the converted value doesn't fit
+ |
+LL | x_i8 > x_u8.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:244:16
+ |
+LL | x_i8 > x_u16;
+ | ---- ^^^^^ expected `i8`, found `u16`
+ | |
+ | expected because this is `i8`
+ |
+help: you can convert a `u16` to an `i8` and panic if the converted value doesn't fit
+ |
+LL | x_i8 > x_u16.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:246:16
+ |
+LL | x_i8 > x_u32;
+ | ---- ^^^^^ expected `i8`, found `u32`
+ | |
+ | expected because this is `i8`
+ |
+help: you can convert a `u32` to an `i8` and panic if the converted value doesn't fit
+ |
+LL | x_i8 > x_u32.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:248:16
+ |
+LL | x_i8 > x_u64;
+ | ---- ^^^^^ expected `i8`, found `u64`
+ | |
+ | expected because this is `i8`
+ |
+help: you can convert a `u64` to an `i8` and panic if the converted value doesn't fit
+ |
+LL | x_i8 > x_u64.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:250:16
+ |
+LL | x_i8 > x_u128;
+ | ---- ^^^^^^ expected `i8`, found `u128`
+ | |
+ | expected because this is `i8`
+ |
+help: you can convert a `u128` to an `i8` and panic if the converted value doesn't fit
+ |
+LL | x_i8 > x_u128.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:252:16
+ |
+LL | x_i8 > x_usize;
+ | ---- ^^^^^^^ expected `i8`, found `usize`
+ | |
+ | expected because this is `i8`
+ |
+help: you can convert a `usize` to an `i8` and panic if the converted value doesn't fit
+ |
+LL | x_i8 > x_usize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:255:17
+ |
+LL | x_i16 > x_u8;
+ | ----- ^^^^ expected `i16`, found `u8`
+ | |
+ | expected because this is `i16`
+ |
+help: you can convert a `u8` to an `i16`
+ |
+LL | x_i16 > x_u8.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:257:17
+ |
+LL | x_i16 > x_u16;
+ | ----- ^^^^^ expected `i16`, found `u16`
+ | |
+ | expected because this is `i16`
+ |
+help: you can convert a `u16` to an `i16` and panic if the converted value doesn't fit
+ |
+LL | x_i16 > x_u16.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:259:17
+ |
+LL | x_i16 > x_u32;
+ | ----- ^^^^^ expected `i16`, found `u32`
+ | |
+ | expected because this is `i16`
+ |
+help: you can convert a `u32` to an `i16` and panic if the converted value doesn't fit
+ |
+LL | x_i16 > x_u32.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:261:17
+ |
+LL | x_i16 > x_u64;
+ | ----- ^^^^^ expected `i16`, found `u64`
+ | |
+ | expected because this is `i16`
+ |
+help: you can convert a `u64` to an `i16` and panic if the converted value doesn't fit
+ |
+LL | x_i16 > x_u64.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:263:17
+ |
+LL | x_i16 > x_u128;
+ | ----- ^^^^^^ expected `i16`, found `u128`
+ | |
+ | expected because this is `i16`
+ |
+help: you can convert a `u128` to an `i16` and panic if the converted value doesn't fit
+ |
+LL | x_i16 > x_u128.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:265:17
+ |
+LL | x_i16 > x_usize;
+ | ----- ^^^^^^^ expected `i16`, found `usize`
+ | |
+ | expected because this is `i16`
+ |
+help: you can convert a `usize` to an `i16` and panic if the converted value doesn't fit
+ |
+LL | x_i16 > x_usize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:268:17
+ |
+LL | x_i32 > x_u8;
+ | ----- ^^^^ expected `i32`, found `u8`
+ | |
+ | expected because this is `i32`
+ |
+help: you can convert a `u8` to an `i32`
+ |
+LL | x_i32 > x_u8.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:270:17
+ |
+LL | x_i32 > x_u16;
+ | ----- ^^^^^ expected `i32`, found `u16`
+ | |
+ | expected because this is `i32`
+ |
+help: you can convert a `u16` to an `i32`
+ |
+LL | x_i32 > x_u16.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:272:17
+ |
+LL | x_i32 > x_u32;
+ | ----- ^^^^^ expected `i32`, found `u32`
+ | |
+ | expected because this is `i32`
+ |
+help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit
+ |
+LL | x_i32 > x_u32.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:274:17
+ |
+LL | x_i32 > x_u64;
+ | ----- ^^^^^ expected `i32`, found `u64`
+ | |
+ | expected because this is `i32`
+ |
+help: you can convert a `u64` to an `i32` and panic if the converted value doesn't fit
+ |
+LL | x_i32 > x_u64.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:276:17
+ |
+LL | x_i32 > x_u128;
+ | ----- ^^^^^^ expected `i32`, found `u128`
+ | |
+ | expected because this is `i32`
+ |
+help: you can convert a `u128` to an `i32` and panic if the converted value doesn't fit
+ |
+LL | x_i32 > x_u128.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:278:17
+ |
+LL | x_i32 > x_usize;
+ | ----- ^^^^^^^ expected `i32`, found `usize`
+ | |
+ | expected because this is `i32`
+ |
+help: you can convert a `usize` to an `i32` and panic if the converted value doesn't fit
+ |
+LL | x_i32 > x_usize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:281:17
+ |
+LL | x_i64 > x_u8;
+ | ----- ^^^^ expected `i64`, found `u8`
+ | |
+ | expected because this is `i64`
+ |
+help: you can convert a `u8` to an `i64`
+ |
+LL | x_i64 > x_u8.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:283:17
+ |
+LL | x_i64 > x_u16;
+ | ----- ^^^^^ expected `i64`, found `u16`
+ | |
+ | expected because this is `i64`
+ |
+help: you can convert a `u16` to an `i64`
+ |
+LL | x_i64 > x_u16.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:285:17
+ |
+LL | x_i64 > x_u32;
+ | ----- ^^^^^ expected `i64`, found `u32`
+ | |
+ | expected because this is `i64`
+ |
+help: you can convert a `u32` to an `i64`
+ |
+LL | x_i64 > x_u32.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:287:17
+ |
+LL | x_i64 > x_u64;
+ | ----- ^^^^^ expected `i64`, found `u64`
+ | |
+ | expected because this is `i64`
+ |
+help: you can convert a `u64` to an `i64` and panic if the converted value doesn't fit
+ |
+LL | x_i64 > x_u64.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:289:17
+ |
+LL | x_i64 > x_u128;
+ | ----- ^^^^^^ expected `i64`, found `u128`
+ | |
+ | expected because this is `i64`
+ |
+help: you can convert a `u128` to an `i64` and panic if the converted value doesn't fit
+ |
+LL | x_i64 > x_u128.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:291:17
+ |
+LL | x_i64 > x_usize;
+ | ----- ^^^^^^^ expected `i64`, found `usize`
+ | |
+ | expected because this is `i64`
+ |
+help: you can convert a `usize` to an `i64` and panic if the converted value doesn't fit
+ |
+LL | x_i64 > x_usize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:294:18
+ |
+LL | x_i128 > x_u8;
+ | ------ ^^^^ expected `i128`, found `u8`
+ | |
+ | expected because this is `i128`
+ |
+help: you can convert a `u8` to an `i128`
+ |
+LL | x_i128 > x_u8.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:296:18
+ |
+LL | x_i128 > x_u16;
+ | ------ ^^^^^ expected `i128`, found `u16`
+ | |
+ | expected because this is `i128`
+ |
+help: you can convert a `u16` to an `i128`
+ |
+LL | x_i128 > x_u16.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:298:18
+ |
+LL | x_i128 > x_u32;
+ | ------ ^^^^^ expected `i128`, found `u32`
+ | |
+ | expected because this is `i128`
+ |
+help: you can convert a `u32` to an `i128`
+ |
+LL | x_i128 > x_u32.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:300:18
+ |
+LL | x_i128 > x_u64;
+ | ------ ^^^^^ expected `i128`, found `u64`
+ | |
+ | expected because this is `i128`
+ |
+help: you can convert a `u64` to an `i128`
+ |
+LL | x_i128 > x_u64.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:302:18
+ |
+LL | x_i128 > x_u128;
+ | ------ ^^^^^^ expected `i128`, found `u128`
+ | |
+ | expected because this is `i128`
+ |
+help: you can convert a `u128` to an `i128` and panic if the converted value doesn't fit
+ |
+LL | x_i128 > x_u128.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:304:18
+ |
+LL | x_i128 > x_usize;
+ | ------ ^^^^^^^ expected `i128`, found `usize`
+ | |
+ | expected because this is `i128`
+ |
+help: you can convert a `usize` to an `i128` and panic if the converted value doesn't fit
+ |
+LL | x_i128 > x_usize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:307:19
+ |
+LL | x_isize > x_u8;
+ | ------- ^^^^ expected `isize`, found `u8`
+ | |
+ | expected because this is `isize`
+ |
+help: you can convert a `u8` to an `isize`
+ |
+LL | x_isize > x_u8.into();
+ | +++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:309:19
+ |
+LL | x_isize > x_u16;
+ | ------- ^^^^^ expected `isize`, found `u16`
+ | |
+ | expected because this is `isize`
+ |
+help: you can convert a `u16` to an `isize` and panic if the converted value doesn't fit
+ |
+LL | x_isize > x_u16.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:311:19
+ |
+LL | x_isize > x_u32;
+ | ------- ^^^^^ expected `isize`, found `u32`
+ | |
+ | expected because this is `isize`
+ |
+help: you can convert a `u32` to an `isize` and panic if the converted value doesn't fit
+ |
+LL | x_isize > x_u32.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:313:19
+ |
+LL | x_isize > x_u64;
+ | ------- ^^^^^ expected `isize`, found `u64`
+ | |
+ | expected because this is `isize`
+ |
+help: you can convert a `u64` to an `isize` and panic if the converted value doesn't fit
+ |
+LL | x_isize > x_u64.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:315:19
+ |
+LL | x_isize > x_u128;
+ | ------- ^^^^^^ expected `isize`, found `u128`
+ | |
+ | expected because this is `isize`
+ |
+help: you can convert a `u128` to an `isize` and panic if the converted value doesn't fit
+ |
+LL | x_isize > x_u128.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-binop.rs:317:19
+ |
+LL | x_isize > x_usize;
+ | ------- ^^^^^^^ expected `isize`, found `usize`
+ | |
+ | expected because this is `isize`
+ |
+help: you can convert a `usize` to an `isize` and panic if the converted value doesn't fit
+ |
+LL | x_isize > x_usize.try_into().unwrap();
+ | ++++++++++++++++++++
+
+error: aborting due to 132 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/numeric/numeric-cast-no-fix.rs b/tests/ui/numeric/numeric-cast-no-fix.rs
index 63e5f098a..63e5f098a 100644
--- a/src/test/ui/numeric/numeric-cast-no-fix.rs
+++ b/tests/ui/numeric/numeric-cast-no-fix.rs
diff --git a/tests/ui/numeric/numeric-cast-no-fix.stderr b/tests/ui/numeric/numeric-cast-no-fix.stderr
new file mode 100644
index 000000000..c244e479d
--- /dev/null
+++ b/tests/ui/numeric/numeric-cast-no-fix.stderr
@@ -0,0 +1,396 @@
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:10:15
+ |
+LL | x_usize > -1_isize;
+ | ------- ^^^^^^^^ expected `usize`, found `isize`
+ | |
+ | expected because this is `usize`
+ |
+ = note: `-1_isize` cannot fit into type `usize`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:12:14
+ |
+LL | x_u128 > -1_isize;
+ | ------ ^^^^^^^^ expected `u128`, found `isize`
+ | |
+ | expected because this is `u128`
+ |
+ = note: `-1_isize` cannot fit into type `u128`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:14:13
+ |
+LL | x_u64 > -1_isize;
+ | ----- ^^^^^^^^ expected `u64`, found `isize`
+ | |
+ | expected because this is `u64`
+ |
+ = note: `-1_isize` cannot fit into type `u64`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:16:13
+ |
+LL | x_u32 > -1_isize;
+ | ----- ^^^^^^^^ expected `u32`, found `isize`
+ | |
+ | expected because this is `u32`
+ |
+ = note: `-1_isize` cannot fit into type `u32`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:18:13
+ |
+LL | x_u16 > -1_isize;
+ | ----- ^^^^^^^^ expected `u16`, found `isize`
+ | |
+ | expected because this is `u16`
+ |
+ = note: `-1_isize` cannot fit into type `u16`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:20:12
+ |
+LL | x_u8 > -1_isize;
+ | ---- ^^^^^^^^ expected `u8`, found `isize`
+ | |
+ | expected because this is `u8`
+ |
+help: you can convert `x_u8` from `u8` to `isize`, matching the type of `-1_isize`
+ |
+LL | isize::from(x_u8) > -1_isize;
+ | ++++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:23:15
+ |
+LL | x_usize > -1_i128;
+ | ------- ^^^^^^^ expected `usize`, found `i128`
+ | |
+ | expected because this is `usize`
+ |
+ = note: `-1_i128` cannot fit into type `usize`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:25:14
+ |
+LL | x_u128 > -1_i128;
+ | ------ ^^^^^^^ expected `u128`, found `i128`
+ | |
+ | expected because this is `u128`
+ |
+ = note: `-1_i128` cannot fit into type `u128`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:27:13
+ |
+LL | x_u64 > -1_i128;
+ | ----- ^^^^^^^ expected `u64`, found `i128`
+ | |
+ | expected because this is `u64`
+ |
+help: you can convert `x_u64` from `u64` to `i128`, matching the type of `-1_i128`
+ |
+LL | i128::from(x_u64) > -1_i128;
+ | +++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:29:13
+ |
+LL | x_u32 > -1_i128;
+ | ----- ^^^^^^^ expected `u32`, found `i128`
+ | |
+ | expected because this is `u32`
+ |
+help: you can convert `x_u32` from `u32` to `i128`, matching the type of `-1_i128`
+ |
+LL | i128::from(x_u32) > -1_i128;
+ | +++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:31:13
+ |
+LL | x_u16 > -1_i128;
+ | ----- ^^^^^^^ expected `u16`, found `i128`
+ | |
+ | expected because this is `u16`
+ |
+help: you can convert `x_u16` from `u16` to `i128`, matching the type of `-1_i128`
+ |
+LL | i128::from(x_u16) > -1_i128;
+ | +++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:33:12
+ |
+LL | x_u8 > -1_i128;
+ | ---- ^^^^^^^ expected `u8`, found `i128`
+ | |
+ | expected because this is `u8`
+ |
+help: you can convert `x_u8` from `u8` to `i128`, matching the type of `-1_i128`
+ |
+LL | i128::from(x_u8) > -1_i128;
+ | +++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:36:15
+ |
+LL | x_usize > -1_i64;
+ | ------- ^^^^^^ expected `usize`, found `i64`
+ | |
+ | expected because this is `usize`
+ |
+ = note: `-1_i64` cannot fit into type `usize`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:38:14
+ |
+LL | x_u128 > -1_i64;
+ | ------ ^^^^^^ expected `u128`, found `i64`
+ | |
+ | expected because this is `u128`
+ |
+ = note: `-1_i64` cannot fit into type `u128`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:40:13
+ |
+LL | x_u64 > -1_i64;
+ | ----- ^^^^^^ expected `u64`, found `i64`
+ | |
+ | expected because this is `u64`
+ |
+ = note: `-1_i64` cannot fit into type `u64`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:42:13
+ |
+LL | x_u32 > -1_i64;
+ | ----- ^^^^^^ expected `u32`, found `i64`
+ | |
+ | expected because this is `u32`
+ |
+help: you can convert `x_u32` from `u32` to `i64`, matching the type of `-1_i64`
+ |
+LL | i64::from(x_u32) > -1_i64;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:44:13
+ |
+LL | x_u16 > -1_i64;
+ | ----- ^^^^^^ expected `u16`, found `i64`
+ | |
+ | expected because this is `u16`
+ |
+help: you can convert `x_u16` from `u16` to `i64`, matching the type of `-1_i64`
+ |
+LL | i64::from(x_u16) > -1_i64;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:46:12
+ |
+LL | x_u8 > -1_i64;
+ | ---- ^^^^^^ expected `u8`, found `i64`
+ | |
+ | expected because this is `u8`
+ |
+help: you can convert `x_u8` from `u8` to `i64`, matching the type of `-1_i64`
+ |
+LL | i64::from(x_u8) > -1_i64;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:49:15
+ |
+LL | x_usize > -1_i32;
+ | ------- ^^^^^^ expected `usize`, found `i32`
+ | |
+ | expected because this is `usize`
+ |
+ = note: `-1_i32` cannot fit into type `usize`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:51:14
+ |
+LL | x_u128 > -1_i32;
+ | ------ ^^^^^^ expected `u128`, found `i32`
+ | |
+ | expected because this is `u128`
+ |
+ = note: `-1_i32` cannot fit into type `u128`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:53:13
+ |
+LL | x_u64 > -1_i32;
+ | ----- ^^^^^^ expected `u64`, found `i32`
+ | |
+ | expected because this is `u64`
+ |
+ = note: `-1_i32` cannot fit into type `u64`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:55:13
+ |
+LL | x_u32 > -1_i32;
+ | ----- ^^^^^^ expected `u32`, found `i32`
+ | |
+ | expected because this is `u32`
+ |
+ = note: `-1_i32` cannot fit into type `u32`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:57:13
+ |
+LL | x_u16 > -1_i32;
+ | ----- ^^^^^^ expected `u16`, found `i32`
+ | |
+ | expected because this is `u16`
+ |
+help: you can convert `x_u16` from `u16` to `i32`, matching the type of `-1_i32`
+ |
+LL | i32::from(x_u16) > -1_i32;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:59:12
+ |
+LL | x_u8 > -1_i32;
+ | ---- ^^^^^^ expected `u8`, found `i32`
+ | |
+ | expected because this is `u8`
+ |
+help: you can convert `x_u8` from `u8` to `i32`, matching the type of `-1_i32`
+ |
+LL | i32::from(x_u8) > -1_i32;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:62:15
+ |
+LL | x_usize > -1_i16;
+ | ------- ^^^^^^ expected `usize`, found `i16`
+ | |
+ | expected because this is `usize`
+ |
+ = note: `-1_i16` cannot fit into type `usize`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:64:14
+ |
+LL | x_u128 > -1_i16;
+ | ------ ^^^^^^ expected `u128`, found `i16`
+ | |
+ | expected because this is `u128`
+ |
+ = note: `-1_i16` cannot fit into type `u128`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:66:13
+ |
+LL | x_u64 > -1_i16;
+ | ----- ^^^^^^ expected `u64`, found `i16`
+ | |
+ | expected because this is `u64`
+ |
+ = note: `-1_i16` cannot fit into type `u64`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:68:13
+ |
+LL | x_u32 > -1_i16;
+ | ----- ^^^^^^ expected `u32`, found `i16`
+ | |
+ | expected because this is `u32`
+ |
+ = note: `-1_i16` cannot fit into type `u32`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:70:13
+ |
+LL | x_u16 > -1_i16;
+ | ----- ^^^^^^ expected `u16`, found `i16`
+ | |
+ | expected because this is `u16`
+ |
+ = note: `-1_i16` cannot fit into type `u16`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:72:12
+ |
+LL | x_u8 > -1_i16;
+ | ---- ^^^^^^ expected `u8`, found `i16`
+ | |
+ | expected because this is `u8`
+ |
+help: you can convert `x_u8` from `u8` to `i16`, matching the type of `-1_i16`
+ |
+LL | i16::from(x_u8) > -1_i16;
+ | ++++++++++ +
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:75:15
+ |
+LL | x_usize > -1_i8;
+ | ------- ^^^^^ expected `usize`, found `i8`
+ | |
+ | expected because this is `usize`
+ |
+ = note: `-1_i8` cannot fit into type `usize`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:77:14
+ |
+LL | x_u128 > -1_i8;
+ | ------ ^^^^^ expected `u128`, found `i8`
+ | |
+ | expected because this is `u128`
+ |
+ = note: `-1_i8` cannot fit into type `u128`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:79:13
+ |
+LL | x_u64 > -1_i8;
+ | ----- ^^^^^ expected `u64`, found `i8`
+ | |
+ | expected because this is `u64`
+ |
+ = note: `-1_i8` cannot fit into type `u64`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:81:13
+ |
+LL | x_u32 > -1_i8;
+ | ----- ^^^^^ expected `u32`, found `i8`
+ | |
+ | expected because this is `u32`
+ |
+ = note: `-1_i8` cannot fit into type `u32`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:83:13
+ |
+LL | x_u16 > -1_i8;
+ | ----- ^^^^^ expected `u16`, found `i8`
+ | |
+ | expected because this is `u16`
+ |
+ = note: `-1_i8` cannot fit into type `u16`
+
+error[E0308]: mismatched types
+ --> $DIR/numeric-cast-no-fix.rs:85:12
+ |
+LL | x_u8 > -1_i8;
+ | ---- ^^^^^ expected `u8`, found `i8`
+ | |
+ | expected because this is `u8`
+ |
+ = note: `-1_i8` cannot fit into type `u8`
+
+error: aborting due to 36 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/numeric/numeric-cast-without-suggestion.rs b/tests/ui/numeric/numeric-cast-without-suggestion.rs
index faf24a8c1..faf24a8c1 100644
--- a/src/test/ui/numeric/numeric-cast-without-suggestion.rs
+++ b/tests/ui/numeric/numeric-cast-without-suggestion.rs
diff --git a/src/test/ui/numeric/numeric-cast-without-suggestion.stderr b/tests/ui/numeric/numeric-cast-without-suggestion.stderr
index 581b548ab..581b548ab 100644
--- a/src/test/ui/numeric/numeric-cast-without-suggestion.stderr
+++ b/tests/ui/numeric/numeric-cast-without-suggestion.stderr
diff --git a/src/test/ui/numeric/numeric-cast.fixed b/tests/ui/numeric/numeric-cast.fixed
index cf0560a10..cf0560a10 100644
--- a/src/test/ui/numeric/numeric-cast.fixed
+++ b/tests/ui/numeric/numeric-cast.fixed
diff --git a/src/test/ui/numeric/numeric-cast.rs b/tests/ui/numeric/numeric-cast.rs
index 7bddfc509..7bddfc509 100644
--- a/src/test/ui/numeric/numeric-cast.rs
+++ b/tests/ui/numeric/numeric-cast.rs
diff --git a/src/test/ui/numeric/numeric-cast.stderr b/tests/ui/numeric/numeric-cast.stderr
index d347875d5..d347875d5 100644
--- a/src/test/ui/numeric/numeric-cast.stderr
+++ b/tests/ui/numeric/numeric-cast.stderr
diff --git a/src/test/ui/numeric/numeric-fields.rs b/tests/ui/numeric/numeric-fields.rs
index 28234bbdf..28234bbdf 100644
--- a/src/test/ui/numeric/numeric-fields.rs
+++ b/tests/ui/numeric/numeric-fields.rs
diff --git a/src/test/ui/numeric/numeric-fields.stderr b/tests/ui/numeric/numeric-fields.stderr
index 668405ed6..668405ed6 100644
--- a/src/test/ui/numeric/numeric-fields.stderr
+++ b/tests/ui/numeric/numeric-fields.stderr
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-i32.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.fixed
index 6e8c54df4..6e8c54df4 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-i32.fixed
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.fixed
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-i32.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.rs
index b47b0ed02..b47b0ed02 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-i32.rs
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.rs
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-i32.stderr b/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.stderr
index f4fb14e79..f4fb14e79 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-i32.stderr
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-i32.stderr
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-i64.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.fixed
index 03821cd44..03821cd44 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-i64.fixed
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.fixed
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-i64.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.rs
index 629fe7e74..629fe7e74 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-i64.rs
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.rs
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-i64.stderr b/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.stderr
index 47efe9f08..47efe9f08 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-i64.stderr
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-i64.stderr
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-isize.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.fixed
index faed65ca4..faed65ca4 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-isize.fixed
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.fixed
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-isize.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.rs
index df0b4cb62..df0b4cb62 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-isize.rs
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.rs
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-isize.stderr b/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.stderr
index 28b79413f..28b79413f 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-isize.stderr
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-isize.stderr
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-u32.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.fixed
index 5955829e7..5955829e7 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-u32.fixed
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.fixed
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-u32.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.rs
index 5c303036a..5c303036a 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-u32.rs
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.rs
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-u32.stderr b/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.stderr
index d966893a8..d966893a8 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-u32.stderr
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-u32.stderr
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-u64.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.fixed
index 4623c211c..4623c211c 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-u64.fixed
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.fixed
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-u64.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.rs
index 3e9995c74..3e9995c74 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-u64.rs
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.rs
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-u64.stderr b/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.stderr
index ff332fa91..ff332fa91 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-u64.stderr
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-u64.stderr
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-usize.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.fixed
index 6cb5243ca..6cb5243ca 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-usize.fixed
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.fixed
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-usize.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.rs
index a2304ba26..a2304ba26 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-usize.rs
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.rs
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix-usize.stderr b/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.stderr
index 4889abee6..4889abee6 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix-usize.stderr
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix-usize.stderr
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix.fixed b/tests/ui/numeric/numeric-suffix/numeric-suffix.fixed
index 69934db21..69934db21 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix.fixed
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix.fixed
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix.rs b/tests/ui/numeric/numeric-suffix/numeric-suffix.rs
index dabf43f82..dabf43f82 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix.rs
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix.rs
diff --git a/src/test/ui/numeric/numeric-suffix/numeric-suffix.stderr b/tests/ui/numeric/numeric-suffix/numeric-suffix.stderr
index e05913b9c..e05913b9c 100644
--- a/src/test/ui/numeric/numeric-suffix/numeric-suffix.stderr
+++ b/tests/ui/numeric/numeric-suffix/numeric-suffix.stderr
diff --git a/tests/ui/numeric/uppercase-base-prefix-invalid-no-fix.rs b/tests/ui/numeric/uppercase-base-prefix-invalid-no-fix.rs
new file mode 100644
index 000000000..f00cde4a7
--- /dev/null
+++ b/tests/ui/numeric/uppercase-base-prefix-invalid-no-fix.rs
@@ -0,0 +1,34 @@
+// Checks that integers with seeming uppercase base prefixes do not get bogus capitalization
+// suggestions.
+
+fn main() {
+ _ = 123X1a3;
+ //~^ ERROR invalid suffix `X1a3` for number literal
+ //~| NOTE invalid suffix `X1a3`
+ //~| HELP the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
+
+ _ = 456O123;
+ //~^ ERROR invalid suffix `O123` for number literal
+ //~| NOTE invalid suffix `O123`
+ //~| HELP the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
+
+ _ = 789B101;
+ //~^ ERROR invalid suffix `B101` for number literal
+ //~| NOTE invalid suffix `B101`
+ //~| HELP the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
+
+ _ = 0XYZ;
+ //~^ ERROR invalid suffix `XYZ` for number literal
+ //~| NOTE invalid suffix `XYZ`
+ //~| HELP the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
+
+ _ = 0OPQ;
+ //~^ ERROR invalid suffix `OPQ` for number literal
+ //~| NOTE invalid suffix `OPQ`
+ //~| HELP the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
+
+ _ = 0BCD;
+ //~^ ERROR invalid suffix `BCD` for number literal
+ //~| NOTE invalid suffix `BCD`
+ //~| HELP the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
+}
diff --git a/tests/ui/numeric/uppercase-base-prefix-invalid-no-fix.stderr b/tests/ui/numeric/uppercase-base-prefix-invalid-no-fix.stderr
new file mode 100644
index 000000000..380c16ca7
--- /dev/null
+++ b/tests/ui/numeric/uppercase-base-prefix-invalid-no-fix.stderr
@@ -0,0 +1,50 @@
+error: invalid suffix `X1a3` for number literal
+ --> $DIR/uppercase-base-prefix-invalid-no-fix.rs:5:9
+ |
+LL | _ = 123X1a3;
+ | ^^^^^^^ invalid suffix `X1a3`
+ |
+ = help: the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
+
+error: invalid suffix `O123` for number literal
+ --> $DIR/uppercase-base-prefix-invalid-no-fix.rs:10:9
+ |
+LL | _ = 456O123;
+ | ^^^^^^^ invalid suffix `O123`
+ |
+ = help: the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
+
+error: invalid suffix `B101` for number literal
+ --> $DIR/uppercase-base-prefix-invalid-no-fix.rs:15:9
+ |
+LL | _ = 789B101;
+ | ^^^^^^^ invalid suffix `B101`
+ |
+ = help: the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
+
+error: invalid suffix `XYZ` for number literal
+ --> $DIR/uppercase-base-prefix-invalid-no-fix.rs:20:9
+ |
+LL | _ = 0XYZ;
+ | ^^^^ invalid suffix `XYZ`
+ |
+ = help: the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
+
+error: invalid suffix `OPQ` for number literal
+ --> $DIR/uppercase-base-prefix-invalid-no-fix.rs:25:9
+ |
+LL | _ = 0OPQ;
+ | ^^^^ invalid suffix `OPQ`
+ |
+ = help: the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
+
+error: invalid suffix `BCD` for number literal
+ --> $DIR/uppercase-base-prefix-invalid-no-fix.rs:30:9
+ |
+LL | _ = 0BCD;
+ | ^^^^ invalid suffix `BCD`
+ |
+ = help: the suffix must be one of the numeric types (`u32`, `isize`, `f32`, etc.)
+
+error: aborting due to 6 previous errors
+
diff --git a/src/test/ui/numeric/uppercase-base-prefix.fixed b/tests/ui/numeric/uppercase-base-prefix.fixed
index 1b1c837ec..1b1c837ec 100644
--- a/src/test/ui/numeric/uppercase-base-prefix.fixed
+++ b/tests/ui/numeric/uppercase-base-prefix.fixed
diff --git a/src/test/ui/numeric/uppercase-base-prefix.rs b/tests/ui/numeric/uppercase-base-prefix.rs
index 233d553da..233d553da 100644
--- a/src/test/ui/numeric/uppercase-base-prefix.rs
+++ b/tests/ui/numeric/uppercase-base-prefix.rs
diff --git a/src/test/ui/numeric/uppercase-base-prefix.stderr b/tests/ui/numeric/uppercase-base-prefix.stderr
index 4ba8d5224..4ba8d5224 100644
--- a/src/test/ui/numeric/uppercase-base-prefix.stderr
+++ b/tests/ui/numeric/uppercase-base-prefix.stderr