about summary refs log tree commit diff
path: root/tests/ui/cast/func-pointer-issue-140491.stderr
blob: e1c07010e691ce2279c0a88d0ccfb73d6429b9e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
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`.