fork/rust

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

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

master
942 B30 linesraw
1error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2  --> $DIR/main.rs:17:17
3   |
4LL |     let x: u8 = transmute(10u16);
5   |                 ^^^^^^^^^
6   |
7   = note: source type: `u16` (16 bits)
8   = note: target type: `u8` (8 bits)
9
10error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
11  --> $DIR/main.rs:21:17
12   |
13LL |     let x: u8 = transmute("test");
14   |                 ^^^^^^^^^
15   |
16   = note: source type: `&str` ($STR bits)
17   = note: target type: `u8` (8 bits)
18
19error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
20  --> $DIR/main.rs:26:18
21   |
22LL |     let x: Foo = transmute(10);
23   |                  ^^^^^^^^^
24   |
25   = note: source type: `i32` (32 bits)
26   = note: target type: `Foo` (0 bits)
27
28error: aborting due to 3 previous errors
29
30For more information about this error, try `rustc --explain E0512`.