2018-08-08 14:28:26 +02:00
|
|
|
error[E0308]: mismatched types
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/unsafe-subtyping.rs:4:5
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
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`.
|