rust/src/test/ui/unsafe/unsafe-subtyping.stderr

15 lines
577 B
Plaintext
Raw Normal View History

2018-08-08 14:28:26 +02:00
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`.