Loading tutorials
let bindings, and that you can use println! and run a project with Cargo. I also assume you know w6 min readmacro_rules! macro. It also assumes you know what an expression, an identifier, and a type are in Rust. Here you will learn how a macro with several rules chooses between them, how literal tokens and delimiters in a matcher behave, and why the o6 min readmacro_rules! macro with several arms, and that you know Rust expressions, types, patterns, and items. It covers what each fragment specifier matches, what it does to the tokens it captures, and which errors come from choosing the wrong one.5 min readmacro_rules! macro and know the basic fragment specifiers (expr, ident, ty, tt). It covers the right-hand side of a rule, the transcriber, and how the compiler turns it into code.5 min readmacro_rules! macro with several arms and that you know the fragment specifiers expr, ident, and ty. Here you learn how a macro accepts input of variable length.5 min readmacro_rules! macros with several arms, use fragment specifiers such as expr, ident, and ty, and use repetitions with separators. It explains two families of compile errors that come from how the macro parser works: follow-set errors and ambiguity errors.6 min readmacro_rules! macro with expr and ident fragments and read a transcriber. The goal is to predict which names a macro can see and which names it can't. You will also learn how to make a macro introduce a binding that the caller can use.5 min readmacro_rules! rules with fragment specifiers and repetitions, and that you know how a transcriber builds output. Here you will use those tools to generate items: structs, functions, and impl blocks. Item-generating macros remove repetitive boilerplate that gener5 min readmacro_rules! macro can be called, how to share it across modules and crates, and how an exported macro refers to its own crate's items. It assumes you can write a basic macro_rules! macro with matchers and transcribers, and that you know Rust modules, pub, and how a5 min readmacro_rules! macro with several arms, use fragment specifiers such as expr, ident, and tt, and write repetitions with $(...). You should also know that a macro arm is chosen by matching the invocation against each matcher in order.6 min readmacro_rules! macro with several rules, fragment specifiers such as expr and ident, and repetitions like $( ... ),*. You should also be able to build and run a Cargo project. Some tools below need a nightly toolchain, and the text says so where that applie5 min readmacro_rules! macros, use $(...) repetitions, and read a recursive macro that consumes token trees (tt). Here you will learn how to hide a macro's helper logic inside the same macro. You will also learn where those helper arms must go and what breaks5 min readmacro_rules! macros with fragment specifiers and repetitions. It also assumes you know hygiene, recursion, and #[macro_export] from the earlier chapters. Here you will learn what declarative macros cannot do, what each limit costs you in practice, an6 min read