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