Skip to main content

erase_lifetimes

Function erase_lifetimes 

Source
pub(crate) fn erase_lifetimes(ty: &Type) -> Type
Expand description

ty with every lifetime replaced by '_, for a let binding annotation in generated code: &'a [f64] → &'_ [f64]. The binding then names the target type (so the error type of its conversion is known where the wrapper inspects it) without depending on the user’s lifetime parameters being in scope.