fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
545 B14 linesraw
1error[E0308]: mismatched types
2  --> $DIR/unsafe-subtyping.rs:4:5
3   |
4LL | fn foo(x: Option<fn(i32)>) -> Option<unsafe fn(i32)> {
5   |                               ---------------------- expected `std::option::Option<unsafe fn(i32)>` because of return type
6LL |     x
7   |     ^ expected unsafe fn, found normal fn
8   |
9   = note: expected enum `std::option::Option<unsafe fn(_)>`
10              found enum `std::option::Option<fn(_)>`
11
12error: aborting due to previous error
13
14For more information about this error, try `rustc --explain E0308`.