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

DOC: fix hypothetical Rust code in step_by() docstring #87034

Merged
merged 1 commit into from
Jul 23, 2021

Conversation

mgeier
Copy link
Contributor

@mgeier mgeier commented Jul 10, 2021

I don't know how important that is, but if I'm not mistaken, the hypothetical code in the docstring of step_by() (see https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.step_by) isn't correct.

I guess writing next() instead of self.next() isn't a biggie, but this would also imply that advance_n_and_return_first() is a method, which AFAICT it isn't.

I've also done some re-formatting in a separate commit and a parameter renaming in yet another commit.

Feel free to take or leave any combination of those commits.

@rust-highfive
Copy link
Collaborator

r? @kennytm

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 10, 2021
@JohnTitor
Copy link
Member

I guess it's simplified but agree that the proposed change is more accurate. Could you squash commits into one? They're trivial.

@JohnTitor JohnTitor assigned JohnTitor and unassigned kennytm Jul 13, 2021
@JohnTitor JohnTitor added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 13, 2021
@mgeier
Copy link
Contributor Author

mgeier commented Jul 14, 2021

Could you squash commits into one?

Done.

@JohnTitor
Copy link
Member

Sorry for the delay, thanks for the PR!
@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 23, 2021

📌 Commit 46abc12 has been approved by JohnTitor

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 23, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 23, 2021
Rollup of 8 pull requests

Successful merges:

 - rust-lang#87034 (DOC: fix hypothetical Rust code in `step_by()` docstring)
 - rust-lang#87298 (memorialize Anna Harren in the bastion of the turbofish)
 - rust-lang#87332 (Don't hide fields of enum struct variants)
 - rust-lang#87362 (Make `x.py d` an alias for `x.py doc`)
 - rust-lang#87372 (Move calls to test_main into one function)
 - rust-lang#87373 (Extend HIR WF checking to fields)
 - rust-lang#87376 (Change rustdoc logo to use the full container size)
 - rust-lang#87383 (Add regression tests for the impl_trait_in_bindings ICEs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ba6957c into rust-lang:master Jul 23, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jul 23, 2021
@mgeier mgeier deleted the doc-step_by branch July 23, 2021 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants