]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unsafe/unsafe-subtyping.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / unsafe / unsafe-subtyping.stderr
1 error[E0308]: mismatched types
2   --> $DIR/unsafe-subtyping.rs:14:5
3    |
4 LL | fn foo(x: Option<fn(i32)>) -> Option<unsafe fn(i32)> {
5    |                               ---------------------- expected `std::option::Option<unsafe fn(i32)>` because of return type
6 LL |     x //~ ERROR mismatched types
7    |     ^ expected unsafe fn, found normal fn
8    |
9    = note: expected type `std::option::Option<unsafe fn(i32)>`
10               found type `std::option::Option<fn(i32)>`
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0308`.