]> git.lizzy.rs Git - rust.git/blob - tests/ui/unsafe/unsafe-subtyping.stderr
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / ui / unsafe / unsafe-subtyping.stderr
1 error[E0308]: mismatched types
2   --> $DIR/unsafe-subtyping.rs:4:5
3    |
4 LL | fn foo(x: Option<fn(i32)>) -> Option<unsafe fn(i32)> {
5    |                               ---------------------- expected `Option<unsafe fn(i32)>` because of return type
6 LL |     x
7    |     ^ expected unsafe fn, found normal fn
8    |
9    = note: expected enum `Option<unsafe fn(_)>`
10               found enum `Option<fn(_)>`
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0308`.