summaryrefslogtreecommitdiffstats
path: root/src/test/ui/unsafe/unsafe-subtyping.stderr
blob: 2db7cc31280a3f955e5cb72b3cfbcf139009cf1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 normal fn
   |
   = note: expected enum `Option<unsafe fn(_)>`
              found enum `Option<fn(_)>`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.