rust/src/test/ui/integer-literal-suffix-inference.stderr

292 lines
8.0 KiB
Plaintext

error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:42:11
|
LL | id_i8(a16);
| ^^^ expected i8, found i16
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:45:11
|
LL | id_i8(a32);
| ^^^ expected i8, found i32
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:48:11
|
LL | id_i8(a64);
| ^^^ expected i8, found i64
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:52:12
|
LL | id_i16(a8);
| ^^ expected i16, found i8
help: you can cast an `i8` to `i16`, which will sign-extend the source value
|
LL | id_i16(a8.into());
| ^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:56:12
|
LL | id_i16(a32);
| ^^^ expected i16, found i32
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:59:12
|
LL | id_i16(a64);
| ^^^ expected i16, found i64
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:63:12
|
LL | id_i32(a8);
| ^^ expected i32, found i8
help: you can cast an `i8` to `i32`, which will sign-extend the source value
|
LL | id_i32(a8.into());
| ^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:66:12
|
LL | id_i32(a16);
| ^^^ expected i32, found i16
help: you can cast an `i16` to `i32`, which will sign-extend the source value
|
LL | id_i32(a16.into());
| ^^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:70:12
|
LL | id_i32(a64);
| ^^^ expected i32, found i64
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:74:12
|
LL | id_i64(a8);
| ^^ expected i64, found i8
help: you can cast an `i8` to `i64`, which will sign-extend the source value
|
LL | id_i64(a8.into());
| ^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:77:12
|
LL | id_i64(a16);
| ^^^ expected i64, found i16
help: you can cast an `i16` to `i64`, which will sign-extend the source value
|
LL | id_i64(a16.into());
| ^^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:80:12
|
LL | id_i64(a32);
| ^^^ expected i64, found i32
help: you can cast an `i32` to `i64`, which will sign-extend the source value
|
LL | id_i64(a32.into());
| ^^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:86:11
|
LL | id_i8(c16);
| ^^^ expected i8, found i16
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:89:11
|
LL | id_i8(c32);
| ^^^ expected i8, found i32
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:92:11
|
LL | id_i8(c64);
| ^^^ expected i8, found i64
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:96:12
|
LL | id_i16(c8);
| ^^ expected i16, found i8
help: you can cast an `i8` to `i16`, which will sign-extend the source value
|
LL | id_i16(c8.into());
| ^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:100:12
|
LL | id_i16(c32);
| ^^^ expected i16, found i32
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:103:12
|
LL | id_i16(c64);
| ^^^ expected i16, found i64
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:107:12
|
LL | id_i32(c8);
| ^^ expected i32, found i8
help: you can cast an `i8` to `i32`, which will sign-extend the source value
|
LL | id_i32(c8.into());
| ^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:110:12
|
LL | id_i32(c16);
| ^^^ expected i32, found i16
help: you can cast an `i16` to `i32`, which will sign-extend the source value
|
LL | id_i32(c16.into());
| ^^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:114:12
|
LL | id_i32(c64);
| ^^^ expected i32, found i64
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:118:12
|
LL | id_i64(a8);
| ^^ expected i64, found i8
help: you can cast an `i8` to `i64`, which will sign-extend the source value
|
LL | id_i64(a8.into());
| ^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:121:12
|
LL | id_i64(a16);
| ^^^ expected i64, found i16
help: you can cast an `i16` to `i64`, which will sign-extend the source value
|
LL | id_i64(a16.into());
| ^^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:124:12
|
LL | id_i64(a32);
| ^^^ expected i64, found i32
help: you can cast an `i32` to `i64`, which will sign-extend the source value
|
LL | id_i64(a32.into());
| ^^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:130:11
|
LL | id_u8(b16);
| ^^^ expected u8, found u16
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:133:11
|
LL | id_u8(b32);
| ^^^ expected u8, found u32
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:136:11
|
LL | id_u8(b64);
| ^^^ expected u8, found u64
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:140:12
|
LL | id_u16(b8);
| ^^ expected u16, found u8
help: you can cast an `u8` to `u16`, which will zero-extend the source value
|
LL | id_u16(b8.into());
| ^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:144:12
|
LL | id_u16(b32);
| ^^^ expected u16, found u32
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:147:12
|
LL | id_u16(b64);
| ^^^ expected u16, found u64
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:151:12
|
LL | id_u32(b8);
| ^^ expected u32, found u8
help: you can cast an `u8` to `u32`, which will zero-extend the source value
|
LL | id_u32(b8.into());
| ^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:154:12
|
LL | id_u32(b16);
| ^^^ expected u32, found u16
help: you can cast an `u16` to `u32`, which will zero-extend the source value
|
LL | id_u32(b16.into());
| ^^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:158:12
|
LL | id_u32(b64);
| ^^^ expected u32, found u64
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:162:12
|
LL | id_u64(b8);
| ^^ expected u64, found u8
help: you can cast an `u8` to `u64`, which will zero-extend the source value
|
LL | id_u64(b8.into());
| ^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:165:12
|
LL | id_u64(b16);
| ^^^ expected u64, found u16
help: you can cast an `u16` to `u64`, which will zero-extend the source value
|
LL | id_u64(b16.into());
| ^^^^^^^^^^
error[E0308]: mismatched types
--> $DIR/integer-literal-suffix-inference.rs:168:12
|
LL | id_u64(b32);
| ^^^ expected u64, found u32
help: you can cast an `u32` to `u64`, which will zero-extend the source value
|
LL | id_u64(b32.into());
| ^^^^^^^^^^
error: aborting due to 36 previous errors
For more information about this error, try `rustc --explain E0308`.