Skip to main content

option_scalar_in_variant_error

Function option_scalar_in_variant_error 

Source
fn option_scalar_in_variant_error(ty: &Type) -> Error
Expand description

Error for an Option<scalar> field inside an enum variant (#1437).

Enum variant fields are stored as Vec<Option<T>> (absent for the other variants), so Option<T> here would need Vec<Option<Option<T>>>. Point at the bare scalar rather than letting the missing conversion surface later.