rust/src/test/ui/unsafe/unsafe-subtyping.stderr
2018-12-25 21:08:33 -07:00

15 lines
576 B
Plaintext

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 //~ 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`.