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

Removing '15.3 Do syntax' in tutorial since it is deprecated. #12367

Closed
wants to merge 1 commit into from
Closed

Removing '15.3 Do syntax' in tutorial since it is deprecated. #12367

wants to merge 1 commit into from

Conversation

darnuria
Copy link
Contributor

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'.

});
~~~~

Closures could be used with task spawning
Copy link
Member

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?

@adrientetar
Copy link
Contributor

Can you squash your commits?

@darnuria
Copy link
Contributor Author

@adridu59 How? I am not git-ninja yet. ;o
-> git rebase (thanks the doc)

});
~~~~

Closures could be used with task spawning.
Copy link
Member

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.

@adrientetar
Copy link
Contributor

Since there's no rebase involved this should do it:

git reset b0ce960609d17823a24469249b1a8b4e6ad9f448
git add --all
git commit -c 8f7ade8000cf15f943ce3e27f0f1901a1ddaeac8

Or simply:

git rebase -i master

@darnuria
Copy link
Contributor Author

@pnkfelix I will rework it thanks no problem. :)

@darnuria
Copy link
Contributor Author

Oups... rebase fail. I will correct it. :o
Hum its done.

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.
bors added a commit that referenced this pull request Feb 19, 2014
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'.
@bors bors closed this Feb 19, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request May 30, 2024
…s, r=Manishearth

bug fix: lint numbered_fields message error

fixes rust-lang#12367

changelog: [`numbered_fields`]: fix macro expand message error.
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