-error[E0591]: can't transmute zero-sized type
- --> $DIR/transmute-from-fn-item-types-error.rs:14:13
+error[E0512]: transmute called with types of different sizes
+ --> $DIR/transmute-from-fn-item-types-error.rs:19:13
|
-14 | let i = mem::transmute(bar);
+19 | let i = mem::transmute(bar);
| ^^^^^^^^^^^^^^
|
- = note: source type: unsafe fn() {bar}
- = note: target type: isize
- = help: cast with `as` to a pointer instead
+ = note: source type: unsafe fn() {bar} (0 bits)
+ = note: target type: i32 (32 bits)
error[E0591]: can't transmute zero-sized type
- --> $DIR/transmute-from-fn-item-types-error.rs:18:13
+ --> $DIR/transmute-from-fn-item-types-error.rs:23:13
|
-18 | let p = mem::transmute(foo);
+23 | let p = mem::transmute(foo);
| ^^^^^^^^^^^^^^
|
- = note: source type: unsafe fn() -> (isize, *const (), std::option::Option<fn()>) {foo}
+ = note: source type: unsafe fn() -> (i32, *const (), std::option::Option<fn()>) {foo}
= note: target type: *const ()
= help: cast with `as` to a pointer instead
error[E0591]: can't transmute zero-sized type
- --> $DIR/transmute-from-fn-item-types-error.rs:22:14
+ --> $DIR/transmute-from-fn-item-types-error.rs:27:14
|
-22 | let of = mem::transmute(main);
+27 | let of = mem::transmute(main);
| ^^^^^^^^^^^^^^
|
= note: source type: fn() {main}
= help: cast with `as` to a pointer instead
error[E0512]: transmute called with types of different sizes
- --> $DIR/transmute-from-fn-item-types-error.rs:31:5
+ --> $DIR/transmute-from-fn-item-types-error.rs:36:5
|
-31 | mem::transmute::<_, u8>(main);
+36 | mem::transmute::<_, u8>(main);
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: source type: fn() {main} (0 bits)
= note: target type: u8 (8 bits)
error[E0591]: can't transmute zero-sized type
- --> $DIR/transmute-from-fn-item-types-error.rs:35:5
+ --> $DIR/transmute-from-fn-item-types-error.rs:40:5
|
-35 | mem::transmute::<_, *mut ()>(foo);
+40 | mem::transmute::<_, *mut ()>(foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: source type: unsafe fn() -> (isize, *const (), std::option::Option<fn()>) {foo}
+ = note: source type: unsafe fn() -> (i32, *const (), std::option::Option<fn()>) {foo}
= note: target type: *mut ()
= help: cast with `as` to a pointer instead
error[E0591]: can't transmute zero-sized type
- --> $DIR/transmute-from-fn-item-types-error.rs:39:5
+ --> $DIR/transmute-from-fn-item-types-error.rs:44:5
|
-39 | mem::transmute::<_, fn()>(bar);
+44 | mem::transmute::<_, fn()>(bar);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: source type: unsafe fn() {bar}
= note: target type: fn()
= help: cast with `as` to a pointer instead
+error[E0512]: transmute called with types of different sizes
+ --> $DIR/transmute-from-fn-item-types-error.rs:49:5
+ |
+49 | mem::transmute::<fn(), u32>(main);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: source type: fn() (64 bits)
+ = note: target type: u32 (32 bits)
+
error[E0591]: can't transmute zero-sized type
- --> $DIR/transmute-from-fn-item-types-error.rs:48:5
+ --> $DIR/transmute-from-fn-item-types-error.rs:53:5
|
-48 | mem::transmute::<_, *mut ()>(Some(foo));
+53 | mem::transmute::<_, *mut ()>(Some(foo));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: source type: unsafe fn() -> (isize, *const (), std::option::Option<fn()>) {foo}
+ = note: source type: unsafe fn() -> (i32, *const (), std::option::Option<fn()>) {foo}
= note: target type: *mut ()
= help: cast with `as` to a pointer instead
error[E0591]: can't transmute zero-sized type
- --> $DIR/transmute-from-fn-item-types-error.rs:52:5
+ --> $DIR/transmute-from-fn-item-types-error.rs:57:5
|
-52 | mem::transmute::<_, fn()>(Some(bar));
+57 | mem::transmute::<_, fn()>(Some(bar));
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: source type: unsafe fn() {bar}
= help: cast with `as` to a pointer instead
error[E0591]: can't transmute zero-sized type
- --> $DIR/transmute-from-fn-item-types-error.rs:56:5
+ --> $DIR/transmute-from-fn-item-types-error.rs:61:5
|
-56 | mem::transmute::<_, Option<fn()>>(Some(baz));
+61 | mem::transmute::<_, Option<fn()>>(Some(baz));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: source type: unsafe fn() {baz}
= note: target type: std::option::Option<fn()>
= help: cast with `as` to a pointer instead
-error: aborting due to previous error(s)
+error[E0512]: transmute called with types of different sizes
+ --> $DIR/transmute-from-fn-item-types-error.rs:66:5
+ |
+66 | mem::transmute::<Option<fn()>, u32>(Some(main));
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: source type: std::option::Option<fn()> (64 bits)
+ = note: target type: u32 (32 bits)
+
+error: aborting due to 11 previous errors