A fragment specifier tells a Rust macro what syntactic category a metavariable may match. In `$input:expr`, `expr` accepts an expression; in `$input:stmt`, `stmt` accepts a statement. section 22.2
Expression versus statement
A macro expecting `$input:expr` rejects `let x = 9` with a “no rules expected” error. Changing the specifier to `$input:stmt` makes that input match. The compiler feedback identifies both the unexpected token and the metavariable pattern being matched. section 22.2
Browse the available fragment specifiers, including `expr`, `ident`, `stmt`, `tt`, `ty`, and others. section 22.2

