Files
rust/tests/ui/cast/func-pointer-issue-140491.stderr
2025-10-02 05:45:16 -06:00

12 lines
519 B
Plaintext

error[E0605]: non-primitive cast: `&for<'a, 'b> fn(&'a Event<'b>) {my_fn}` as `&for<'a, 'b> fn(&'a Event<'b>)`
--> $DIR/func-pointer-issue-140491.rs:6:34
|
LL | ... = &my_fn as _;
| ^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
|
= note: casting reference expression `&my_fn` because `&` binds tighter than `as`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0605`.