-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Removing '15.3 Do syntax' in tutorial since it is deprecated. #12367
Conversation
}); | ||
~~~~ | ||
|
||
Closures could be used with task spawning |
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.
Shouldn't there be a period separating these two sentences?
Can you squash your commits? |
@adridu59 How? I am not git-ninja yet. ;o |
}); | ||
~~~~ | ||
|
||
Closures could be used with task spawning. |
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.
Ugh, sorry, I should have caught this before:
There are two problems, one minor and one major:
The minor problem: I think this is better phrased with "can" instead of "could." E.g. "Closures can be used with task spawning", or really, "Closures can be used to spawn tasks."
The major problem: This whole section is about "Closure compatibility": the property that you can pass any kind of closure to functions that expect a ||
.
But a function like call_it
is expecting a proc
; it is not as general as a function that is expecting a ||
closure. So realty this text and the spawn
example below does not belong here any more (this whole section made a lot more sense back when the do
syntax actually accepted ||
-closures; we should have deleted this part of it back when we changed do
to only accept proc
).
Anyway, in my opinion, you should either delete the spawn
example from below, or you should move the spawn
example up into the "Owned closures" section above.
Sorry I dd not catch this before.
Since there's no rebase involved this should do it:
Or simply:
|
@pnkfelix I will rework it thanks no problem. :) |
Oups... rebase fail. I will correct it. :o |
The 'do' keyword was deprecated in 0.10 #11868 , and is keep as reserved keyword #12157 . So the tutorial part about it doesn't make sense. The spawning explanation was move into '15.2 Closure compatibility'. Fixing misspelling. Thanks for precisions. Moved from 15.2 to 15.1. Fixed typo, and apply pnkfelix advices.
…s, r=Manishearth bug fix: lint numbered_fields message error fixes rust-lang#12367 changelog: [`numbered_fields`]: fix macro expand message error.
The 'do' keyword was deprecated in 0.10 #11868 , and is keep as
reserved keyword #12157 .
So the tutorial part about it doesn't make sense.
The spawning explanation was move into '15.2 Closure compatibility'.