Skip to main content

not_check

Function not_check 

Source
pub fn not_check<T, F>(
    input: ParseStream<'_>,
    ctx: &mut ParseContext,
    parser: F,
) -> Result<()>
where F: FnOnce(ParseStream<'_>, &mut ParseContext) -> Result<T>,
Expand description

Executes a parser on a fork. If it SUCCEEDS, returns Err(“unexpected match”). If it FAILS, returns Ok(()). Never advances input. Restores state.