Intermediate Rust
Q76 / 100

What are proc macros in Rust?

Correct! Well done.

Incorrect.

The correct answer is B) Macros implemented as Rust functions that operate on token streams, enabling powerful code generation like #[derive(Serialize)]

B

Correct Answer

Macros implemented as Rust functions that operate on token streams, enabling powerful code generation like #[derive(Serialize)]

Explanation

Procedural macros are separate crates (proc-macro = true) that receive TokenStream and return TokenStream. Used by serde, tokio, thiserror, and async-trait.

Progress
76/100