Skip to content

Fix a number of documentation bugs in libstd/iter.rs #10533

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

Merged
merged 2 commits into from
Nov 18, 2013
Merged

Fix a number of documentation bugs in libstd/iter.rs #10533

merged 2 commits into from
Nov 18, 2013

Conversation

tautologico
Copy link
Contributor

This fixes a number of bugs in the doc comments for a bunch of functions in libstd/iter.rs, mostly updating to use unwrap() instead of get() on options. Also fixes the docs for advance() (trait Iterator) which was not making sense, though if it is not useful anymore maybe it should be removed.

@emberian
Copy link
Member

@thestinger is there any reason to keep advance around?

@tautologico
Copy link
Contributor Author

Will @bors see the r+ in a comment to a specific commit?

@huonw
Copy link
Member

huonw commented Nov 17, 2013

That's the only thing bors will see. (Btw, the bors queue shows this PR is in the "approved" category.)

bors added a commit that referenced this pull request Nov 18, 2013
This fixes a number of bugs in the doc comments for a bunch of functions in libstd/iter.rs, mostly updating to use unwrap() instead of get() on options. Also fixes the docs for advance() (trait Iterator) which was not making sense, though if it is not useful anymore maybe it should be removed.
@bors bors closed this Nov 18, 2013
@bors bors merged commit 1f27512 into rust-lang:master Nov 18, 2013
@tautologico tautologico deleted the fixdocs branch November 18, 2013 15:20
flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 24, 2023
Significantly optimize `significant_drop_tightening`

The lint is very slow as it doesn't cache the deeply nested check for the attribute. If we cache it, we can reduce the time spent on checking `rustc_borrowck` from 28s to 9s, which is a nice improvement. In the profile, the time inside `has_sig_drop_attr` goes from 66% to 0.2%, which is a lot more reasonable.

<details>
<summary>Flame graphs</summary>

Before (all the tall `clippy` towers are `has_sig_drop_attr`):
![before](https://user-images.githubusercontent.com/48135649/227037243-bcd93bbe-a4ad-45c3-be25-2b021b12a5c0.svg)

After:
![after](https://user-images.githubusercontent.com/48135649/227040322-8d3f0448-18e3-4923-8187-c72df324a3fa.svg)
</details>

Fixes rust-lang#10532

changelog: [`significant_drop_tightening`]: significantly optimized
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