fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.3 KiB37 linesraw
1error[E0080]: evaluation of constant value failed
2  --> $DIR/transmute-size-mismatch.rs:12:13
3   |
4LL |             RET = CastTransmute(x);
5   |             ^^^^^^^^^^^^^^^^^^^^^^ transmuting from 4-byte type to 2-byte type: `i32` -> `u16`
6   |
7note: inside `mir_transmute::<i32, u16>`
8  --> $DIR/transmute-size-mismatch.rs:12:13
9   |
10LL |             RET = CastTransmute(x);
11   |             ^^^^^^^^^^^^^^^^^^^^^^
12note: inside `FROM_BIGGER`
13  --> $DIR/transmute-size-mismatch.rs:20:35
14   |
15LL | const FROM_BIGGER: u16 = unsafe { mir_transmute(123_i32) };
16   |                                   ^^^^^^^^^^^^^^^^^^^^^^
17
18error[E0080]: evaluation of constant value failed
19  --> $DIR/transmute-size-mismatch.rs:12:13
20   |
21LL |             RET = CastTransmute(x);
22   |             ^^^^^^^^^^^^^^^^^^^^^^ transmuting from 2-byte type to 4-byte type: `i16` -> `u32`
23   |
24note: inside `mir_transmute::<i16, u32>`
25  --> $DIR/transmute-size-mismatch.rs:12:13
26   |
27LL |             RET = CastTransmute(x);
28   |             ^^^^^^^^^^^^^^^^^^^^^^
29note: inside `FROM_SMALLER`
30  --> $DIR/transmute-size-mismatch.rs:22:36
31   |
32LL | const FROM_SMALLER: u32 = unsafe { mir_transmute(123_i16) };
33   |                                    ^^^^^^^^^^^^^^^^^^^^^^
34
35error: aborting due to 2 previous errors
36
37For more information about this error, try `rustc --explain E0080`.