rustc_builtin_macros::asm

Function eat_operand_keyword

Source
fn eat_operand_keyword<'a>(
    p: &mut Parser<'a>,
    symbol: Symbol,
    asm_macro: AsmMacro,
) -> PResult<'a, bool>
Expand description

Used for better error messages when operand types are used that are not supported by the current macro (e.g. in or out for global_asm!)

returns

  • Ok(true) if the current token matches the keyword, and was expected
  • Ok(false) if the current token does not match the keyword
  • Err(_) if the current token matches the keyword, but was not expected