eat_operand_keyword in rustc_parse::parser::asm - Rust
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!`)

Skip to main content

## eat_operand_keyword

# Function eat_operand_keyword

Source

    fn eat_operand_keyword<'a>(
        p: &mut Parser<'a>,
        exp: ExpKeywordPair,
        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