Closed
Description
The following suggestion is incorrect:
error[E0308]: mismatched types
-->
|
793 | Condition::Function { function, description, expressions: exprs? }
| ^^^^^^^^
| |
| expected enum `policy::MatchFunction`, found reference
| help: consider dereferencing the borrow: `*function`
|
= note: expected type `policy::MatchFunction`
found type `&policy::MatchFunction`
As the code is using the init shorthand syntax to create the Function
variant, the suggestion should instead be:
error[E0308]: mismatched types
-->
|
793 | Condition::Function { function, description, expressions: exprs? }
| ^^^^^^^^
| |
| expected enum `policy::MatchFunction`, found reference
| help: consider dereferencing the borrow: `function: *function`
|
= note: expected type `policy::MatchFunction`
found type `&policy::MatchFunction`