Skip to content
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

Merged
merged 3 commits into from
Jan 19, 2017
Merged

Conversation

frewsxcv
Copy link
Member

No description provided.

@frewsxcv
Copy link
Member Author

frewsxcv commented Dec 18, 2016

I'm open to a different example if someone has a better idea.

@frewsxcv
Copy link
Member Author

@bors delegate=kmcallister

@bors
Copy link
Contributor

bors commented Dec 18, 2016

✌️ @kmcallister can now approve this pull request

Copy link
Contributor

@durka durka left a 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".
Copy link
Contributor

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
Copy link
Contributor

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")

@frewsxcv
Copy link
Member Author

@durka Thanks for the feedback! Comments have been addressed.

@frewsxcv
Copy link
Member Author

r? @GuillaumeGomez

@GuillaumeGomez
Copy link
Member

Thanks for the examples and the fixes!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Jan 17, 2017

📌 Commit 4a354ab has been approved by GuillaumeGomez

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jan 19, 2017
Improvements to 'include' macro documentation.

None
bors added a commit that referenced this pull request Jan 19, 2017
Rollup of 11 pull requests

- Successful merges: #38457, #38922, #38970, #39039, #39091, #39115, #39121, #39149, #39150, #39151, #39165
- Failed merges:
@bors bors merged commit 4a354ab into rust-lang:master Jan 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants