LL | let p = mem::transmute(foo);
| ^^^^^^^^^^^^^^
|
- = note: source type: unsafe fn() -> (i8, *const (), std::option::Option<fn()>) {foo}
+ = note: source type: unsafe fn() -> (i8, *const (), Option<fn()>) {foo}
= note: target type: *const ()
= help: cast with `as` to a pointer instead
| ^^^^^^^^^^^^^^
|
= note: source type: fn() {main}
- = note: target type: std::option::Option<fn()>
+ = note: target type: Option<fn()>
= help: cast with `as` to a pointer instead
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
LL | mem::transmute::<_, *mut ()>(foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: source type: unsafe fn() -> (i8, *const (), std::option::Option<fn()>) {foo}
+ = note: source type: unsafe fn() -> (i8, *const (), Option<fn()>) {foo}
= note: target type: *mut ()
= help: cast with `as` to a pointer instead
LL | mem::transmute::<_, *mut ()>(Some(foo));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
- = note: source type: unsafe fn() -> (i8, *const (), std::option::Option<fn()>) {foo}
+ = note: source type: unsafe fn() -> (i8, *const (), Option<fn()>) {foo}
= note: target type: *mut ()
= help: cast with `as` to a pointer instead
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: source type: unsafe fn() {baz}
- = note: target type: std::option::Option<fn()>
+ = note: target type: Option<fn()>
= help: cast with `as` to a pointer instead
error: aborting due to 9 previous errors