15 lines
577 B
Plaintext
15 lines
577 B
Plaintext
|
error[E0308]: mismatched types
|
||
|
--> $DIR/unsafe-subtyping.rs:14:5
|
||
|
|
|
||
|
LL | fn foo(x: Option<fn(i32)>) -> Option<unsafe fn(i32)> {
|
||
|
| ---------------------- expected `std::option::Option<unsafe fn(i32)>` because of return type
|
||
|
LL | x //~ ERROR mismatched types
|
||
|
| ^ expected unsafe fn, found normal fn
|
||
|
|
|
||
|
= note: expected type `std::option::Option<unsafe fn(i32)>`
|
||
|
found type `std::option::Option<fn(i32)>`
|
||
|
|
||
|
error: aborting due to previous error
|
||
|
|
||
|
For more information about this error, try `rustc --explain E0308`.
|