1 error[E0512]: transmute called with types of different sizes
2 --> $DIR/transmute-from-fn-item-types-error.rs:19:13
4 19 | let i = mem::transmute(bar);
7 = note: source type: unsafe fn() {bar} (0 bits)
8 = note: target type: i32 (32 bits)
10 error[E0591]: can't transmute zero-sized type
11 --> $DIR/transmute-from-fn-item-types-error.rs:23:13
13 23 | let p = mem::transmute(foo);
16 = note: source type: unsafe fn() -> (i32, *const (), std::option::Option<fn()>) {foo}
17 = note: target type: *const ()
18 = help: cast with `as` to a pointer instead
20 error[E0591]: can't transmute zero-sized type
21 --> $DIR/transmute-from-fn-item-types-error.rs:27:14
23 27 | let of = mem::transmute(main);
26 = note: source type: fn() {main}
27 = note: target type: std::option::Option<fn()>
28 = help: cast with `as` to a pointer instead
30 error[E0512]: transmute called with types of different sizes
31 --> $DIR/transmute-from-fn-item-types-error.rs:36:5
33 36 | mem::transmute::<_, u8>(main);
34 | ^^^^^^^^^^^^^^^^^^^^^^^
36 = note: source type: fn() {main} (0 bits)
37 = note: target type: u8 (8 bits)
39 error[E0591]: can't transmute zero-sized type
40 --> $DIR/transmute-from-fn-item-types-error.rs:40:5
42 40 | mem::transmute::<_, *mut ()>(foo);
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 = note: source type: unsafe fn() -> (i32, *const (), std::option::Option<fn()>) {foo}
46 = note: target type: *mut ()
47 = help: cast with `as` to a pointer instead
49 error[E0591]: can't transmute zero-sized type
50 --> $DIR/transmute-from-fn-item-types-error.rs:44:5
52 44 | mem::transmute::<_, fn()>(bar);
53 | ^^^^^^^^^^^^^^^^^^^^^^^^^
55 = note: source type: unsafe fn() {bar}
56 = note: target type: fn()
57 = help: cast with `as` to a pointer instead
59 error[E0512]: transmute called with types of different sizes
60 --> $DIR/transmute-from-fn-item-types-error.rs:49:5
62 49 | mem::transmute::<fn(), u32>(main);
63 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
65 = note: source type: fn() (64 bits)
66 = note: target type: u32 (32 bits)
68 error[E0591]: can't transmute zero-sized type
69 --> $DIR/transmute-from-fn-item-types-error.rs:53:5
71 53 | mem::transmute::<_, *mut ()>(Some(foo));
72 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74 = note: source type: unsafe fn() -> (i32, *const (), std::option::Option<fn()>) {foo}
75 = note: target type: *mut ()
76 = help: cast with `as` to a pointer instead
78 error[E0591]: can't transmute zero-sized type
79 --> $DIR/transmute-from-fn-item-types-error.rs:57:5
81 57 | mem::transmute::<_, fn()>(Some(bar));
82 | ^^^^^^^^^^^^^^^^^^^^^^^^^
84 = note: source type: unsafe fn() {bar}
85 = note: target type: fn()
86 = help: cast with `as` to a pointer instead
88 error[E0591]: can't transmute zero-sized type
89 --> $DIR/transmute-from-fn-item-types-error.rs:61:5
91 61 | mem::transmute::<_, Option<fn()>>(Some(baz));
92 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94 = note: source type: unsafe fn() {baz}
95 = note: target type: std::option::Option<fn()>
96 = help: cast with `as` to a pointer instead
98 error[E0512]: transmute called with types of different sizes
99 --> $DIR/transmute-from-fn-item-types-error.rs:66:5
101 66 | mem::transmute::<Option<fn()>, u32>(Some(main));
102 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104 = note: source type: std::option::Option<fn()> (64 bits)
105 = note: target type: u32 (32 bits)
107 error: aborting due to previous error(s)