with_maybe_enabled

Function with_maybe_enabled 

Source
pub fn with_maybe_enabled<R>(
    enabled: Result<Enabled, &'static (dyn Fn(Span) -> Error + 'static)>,
    f: impl FnOnce() -> R,
) -> R
Expand description

Call f with beta features enabled or not

Used by the parser for TopTemplate