From 1d1424ba1c30b8efab636c911be0a215df305eea Mon Sep 17 00:00:00 2001 From: mianlang Date: Fri, 21 Mar 2025 01:05:58 +0800 Subject: [PATCH] Ch. 20: correct listing number --- src/ch20-05-macros.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ch20-05-macros.md b/src/ch20-05-macros.md index d39077c8c5..66e0edd7ef 100644 --- a/src/ch20-05-macros.md +++ b/src/ch20-05-macros.md @@ -323,10 +323,10 @@ The `hello_macro_derive` function first converts the `input` from a `TokenStream` to a data structure that we can then interpret and perform operations on. This is where `syn` comes into play. The `parse` function in `syn` takes a `TokenStream` and returns a `DeriveInput` struct representing the -parsed Rust code. Listing 20-40 shows the relevant parts of the `DeriveInput` +parsed Rust code. Listing 20-41 shows the relevant parts of the `DeriveInput` struct we get from parsing the `struct Pancakes;` string. -+ ```rust,ignore DeriveInput {