Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Why macro def needs to be located in the file above the line of first use
Title says it all. It came to me as a real surprise, that this is working "the old fashioned way", unlike everything else in rust with regards to definitions. For example the definition of fn may be at the end of file and yet we can call it from the definition of another function that is at the very beginning of the file.
What are the reasons, that this behavior doesn't work for macros?
1 post - 1 participant
🏷️ rust_feed