book
book copied to clipboard
Add hello_macro_derive to hello_macro dependencies ch19-06
trafficstars
-
I have searched open and closed issues and pull requests for duplicates, using these search terms:
- hello macro derive
- macro dependencies
- macro derive
-
I have checked the latest
mainbranch to see if this has already been fixed, in this file:- https://github.com/rust-lang/book/blob/main/src/ch19-06-macros.md
URL to the section(s) of the book with this problem:
- https://doc.rust-lang.org/book/ch19-06-macros.html
Description of the problem:
- hello_world_macro should be added to dependencies in hello_macro/Cargo.toml in order to import it into main.rs
Suggested fix: A description to add the line in Cargo.toml dependencies of hello_macro/Cargo.toml:
[dependencies]
hello-world-derive = { path = "hello-world-derive" }
You are correct! I think at this point in the book most people realize they need to add dependencies for things to work, but we might still want to be explicit about this. Flagging it up as a thing to consider!