mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
15 lines
506 B
Plaintext
15 lines
506 B
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/unsafe-subtyping.rs:4:5
|
|
|
|
|
LL | fn foo(x: Option<fn(i32)>) -> Option<unsafe fn(i32)> {
|
|
| ---------------------- expected `Option<unsafe fn(i32)>` because of return type
|
|
LL | x
|
|
| ^ expected unsafe fn, found safe fn
|
|
|
|
|
= note: expected enum `Option<unsafe fn(_)>`
|
|
found enum `Option<fn(_)>`
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|