Function rustc_builtin_macros::asm::eat_operand_keyword

source ยท
fn eat_operand_keyword<'a>(
    p: &mut Parser<'a>,
    symbol: Symbol,
    expect: bool,
) -> 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