rust/tests/ui/unsafe/unsafe-subtyping.stderr
Nilstrieb 41e8d152dc Show number in error message even for one error
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00

15 lines
508 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 normal 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`.