]> git.lizzy.rs Git - rust.git/blob - src/test/ui/transmute/main.stderr
merge rustc history
[rust.git] / src / test / ui / transmute / main.stderr
1 error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
2   --> $DIR/main.rs:13:5
3    |
4 LL |     transmute(x)
5    |     ^^^^^^^^^
6    |
7    = note: `<C as TypeConstructor>::T` does not have a fixed size
8
9 error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
10   --> $DIR/main.rs:17:17
11    |
12 LL |     let x: u8 = transmute(10u16);
13    |                 ^^^^^^^^^
14    |
15    = note: source type: `u16` (16 bits)
16    = note: target type: `u8` (8 bits)
17
18 error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
19   --> $DIR/main.rs:21:17
20    |
21 LL |     let x: u8 = transmute("test");
22    |                 ^^^^^^^^^
23    |
24    = note: source type: `&str` ($STR bits)
25    = note: target type: `u8` (8 bits)
26
27 error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
28   --> $DIR/main.rs:26:18
29    |
30 LL |     let x: Foo = transmute(10);
31    |                  ^^^^^^^^^
32    |
33    = note: source type: `i32` (32 bits)
34    = note: target type: `Foo` (0 bits)
35
36 error: aborting due to 4 previous errors
37
38 For more information about this error, try `rustc --explain E0512`.