-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to 'include' macro documentation. #38457
Conversation
I'm open to a different example if someone has a better idea. |
@bors delegate=kmcallister |
✌️ @kmcallister can now approve this pull request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if it's worth including a warning about #35560? (i.e. don't include!
a file with more than one statement in it)
/// } | ||
/// ``` | ||
/// | ||
/// Compiling 'main.rs' and running the resulting binary will print "Hello | ||
/// World". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pedantically, I guess it will actually print "Hello World!"
/// The file is located relative to the current file. (similarly to how | ||
/// modules are found) | ||
/// The file is located relative to the current file (similarly to how | ||
/// modules are found). | ||
/// | ||
/// Using this macro is often a bad idea, because if the file is | ||
/// parsed as an expression, it is going to be placed in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well fix the small typo on the next line (should be "unhygienically")
@durka Thanks for the feedback! Comments have been addressed. |
Thanks for the examples and the fixes! @bors: r+ rollup |
📌 Commit 4a354ab has been approved by |
Improvements to 'include' macro documentation. None
No description provided.