blob: cac5ee07089e896562e84a2b892f667334fdcbe7 [file] [log] [blame]
error[E0308]: mismatched types
--> $DIR/unsafe-subtyping.rs:4: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
| ^ 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`.