Attributes on functions#387
Merged
matthewjasper merged 2 commits intorust-lang:masterfrom Sep 2, 2018
Merged
Conversation
6 tasks
steveklabnik
approved these changes
Aug 18, 2018
Contributor
steveklabnik
left a comment
There was a problem hiding this comment.
LGTM, though still blocked
matthewjasper
approved these changes
Sep 1, 2018
Contributor
matthewjasper
left a comment
There was a problem hiding this comment.
A couple of suggestions, but I'm OK with this as is.
src/items/functions.md
Outdated
|
|
||
| Inner [attributes] on the function's block apply to the function item as a whole. | ||
| Functions allow for [outer attributes][attributes] and for [inner | ||
| attributes][attributes] where inner attributes are allowed on its [block]. |
Contributor
There was a problem hiding this comment.
Make this two sentences?
"allowed on" => "written inside"?
|
|
||
| For example, this function will only be available while running tests. | ||
| For example of an inner attribute on a function, this function will only be | ||
| available while running tests. |
Contributor
There was a problem hiding this comment.
Maybe this is a result of reading this in raw markdown, but I wasn't expecting a code example after "For example of...". Perhaps "This example shows an ..., the function ..." would be clearer?
Contributor
Author
|
Both are good calls. I've improved the sentence flow around both. |
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is blocked on #381 and #382 for correct links.
must_useAttribute" section tomust_useto match the "derive" section further on in the page.cfgattribute to the new conditional compilation page. Probably should have done this when movingcfgto its own page. But doing it here where I'm adding a new link to it.