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

Rollup of 13 pull requests #52486

Merged
merged 29 commits into from
Jul 19, 2018
Merged

Rollup of 13 pull requests #52486

merged 29 commits into from
Jul 19, 2018

Conversation

kennytm
Copy link
Member

@kennytm kennytm commented Jul 18, 2018

Successful merges:

Failed merges:

r? @ghost

Pazzaz and others added 19 commits July 6, 2018 17:20
The original example didn't check the return value of `write()`, didn't
flush the writer, and didn't properly demonstrate the buffering.

Fixes rust-lang#51621.
It wasn't abundantly clear to me what `.take` returned. Perhaps this is a slightly frivolous change, but I think it's an improvement. =)

Apologies if I'm not following proper procedures.
This feature is stable, we shouldn't suggest it any more! Instead suggest the
real feature, `use_extern_macros`.
After rust-lang#51122 clippy is available as a component but don't install when building from source.

This PR allows to install clippy with extended tools.
This was previously enabled via `proc_macro`, but since `proc_macro` is now
stable this is no longer the case. Explicitly include it in the 2018 edition
here.
Handle array manually in str case conversion methods

Avoiding the overhead incurred from `String.extend(char.to_lowercase())` showed a notable performance improvement when I benchmarked it.

I tested on these strings:
```rust
ALL_LOWER:       "loremipsumdolorsitametduosensibusmnesarchumabcdefgh"
ALL_UPPER:       "LOREMIPSUMDOLORSITAMETDUOSENSIBUSMNESARCHUMABCDEFGH"
REALISTIC_UPPER: "LOREM IPSUM DOLOR SIT AMET, DUO SENSIBUS MNESARCHUM"
SIGMAS:          "ΣΣΣΣΣ ΣΣΣΣΣ ΣΣΣΣΣ ΣΣΣ ΣΣΣΣ, ΣΣΣ ΣΣΣΣΣΣΣΣ ΣΣΣΣΣΣΣΣΣΣ"
WORD_UPPER:      "Lorem Ipsum Dolor Sit Amet, Duo Sensibus Mnesarchum"
```
the performance improvements of `to_lowercase()` were
```
running 10 tests
test tests::all_lower           ... bench:       1,752 ns/iter (+/- 49)
test tests::all_lower_new       ... bench:       1,266 ns/iter (+/- 15)   -28%
test tests::all_upper           ... bench:       1,832 ns/iter (+/- 39)
test tests::all_upper_new       ... bench:       1,337 ns/iter (+/- 18)   -27%
test tests::realistic_upper     ... bench:       1,993 ns/iter (+/- 14)
test tests::realistic_upper_new ... bench:       1,445 ns/iter (+/- 22)   -27%
test tests::sigmas              ... bench:       1,342 ns/iter (+/- 39)
test tests::sigmas_new          ... bench:       1,226 ns/iter (+/- 16)    -9%
test tests::word_upper          ... bench:       1,899 ns/iter (+/- 12)
test tests::word_upper_new      ... bench:       1,381 ns/iter (+/- 26)   -27%
```
and of `to_uppercase()`
```
running 10 tests
test tests::all_lower           ... bench:       1,813 ns/iter (+/- 20)
test tests::all_lower_new       ... bench:       1,321 ns/iter (+/- 16)   -27%
test tests::all_upper           ... bench:       1,629 ns/iter (+/- 22)
test tests::all_upper_new       ... bench:       1,241 ns/iter (+/- 9)    -24%
test tests::realistic_upper     ... bench:       1,670 ns/iter (+/- 24)
test tests::realistic_upper_new ... bench:       1,241 ns/iter (+/- 17)   -26%
test tests::sigmas              ... bench:       2,053 ns/iter (+/- 20)
test tests::sigmas_new          ... bench:       1,753 ns/iter (+/- 23)   -15%
test tests::word_upper          ... bench:       1,873 ns/iter (+/- 30)
test tests::word_upper_new      ... bench:       1,412 ns/iter (+/- 25)   -25%
```
I gave up on the more advanced method from rust-lang#52061 as it wasn't always a clear improvement and would help in even less cases if this PR was merged.
Amend option.take examples

It wasn't abundantly clear to me what `.take` returned. Perhaps this is a slightly frivolous change, but I think it's an improvement. =)

Apologies if I'm not following proper procedures.
Revert some changes from rust-lang#51917 to fix custom libdir

Should fix rust-lang#52317 also adds `libdir` value to output.
Fix doc comment: use `?` instead of `.unwrap()`
…ochenkov

rustc: Fix a suggestion for the `proc_macro` feature

This feature is stable, we shouldn't suggest it any more! Instead suggest the
real feature, `use_extern_macros`.
Allow clippy to be installed with make install

After rust-lang#51122 clippy is available as a component but doesn't install when building from source.

This PR allows to install clippy with extended tools.
…=petrochenkov

rustc: Enable `use_extern_macros` in 2018 edition

This was previously enabled via `proc_macro`, but since `proc_macro` is now
stable this is no longer the case. Explicitly include it in the 2018 edition
here.
…xcrichton

Clarify short-circuiting behvaior of Iterator::zip.

Fixes rust-lang#52279.
@kennytm
Copy link
Member Author

kennytm commented Jul 18, 2018

@bors r+ p=8

@bors
Copy link
Contributor

bors commented Jul 18, 2018

📌 Commit 091c9d2 has been approved by kennytm

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 18, 2018
alexcrichton and others added 7 commits July 18, 2018 07:44
This commit is an attempted fix at rust-lang#50887. It was noticed that on that issue
we're building both x86_64 and i386 versions of libraries, but we only actually
need the x86_64 versions! This hopes that the build race condition exhibited
in rust-lang#50887 is connected to building both architectures and/or building a lot of
libraries, so this should help us build precisely what we need and no more.
… r=kennytm

Don't build twice the sanitizers on Linux

This commit is an attempted fix at rust-lang#50887. It was noticed that on that issue
we're building both x86_64 and i386 versions of libraries, but we only actually
need the x86_64 versions! This hopes that the build race condition exhibited
in rust-lang#50887 is connected to building both architectures and/or building a lot of
libraries, so this should help us build precisely what we need and no more.
use checked write in `LineWriter` example

The example was wrong because it didn't check the return value of
`write()`, and it didn't flush the buffer before comparing the contents
of the file.

Fixes rust-lang#51621.
Cleanup rust-lang#24958

Since rust-lang#24958 was closed we might want to remove the workarounds it introduced for android, arm and aarch64.
@kennytm kennytm changed the title Rollup of 8 pull requests Rollup of 11 pull requests Jul 18, 2018
@kennytm
Copy link
Member Author

kennytm commented Jul 18, 2018

@bors r+

Added #52487, #51628, #52480.

@bors
Copy link
Contributor

bors commented Jul 18, 2018

📌 Commit b1c6b76 has been approved by kennytm

QuietMisdreavus and others added 3 commits July 18, 2018 15:41
Based on the discussion in rust-lang#35705, the rustdoc team has determined that macro redirects are here to stay.

Closes rust-lang#35705
…sakis

Do not use desugared ident when suggesting adding a type

Re rust-lang#51116.
… r=nrc

rustdoc: remove FIXME about macro redirects

Based on the discussion in rust-lang#35705, the rustdoc team has determined that macro redirects are here to stay.

Closes rust-lang#35705
@kennytm kennytm changed the title Rollup of 11 pull requests Rollup of 13 pull requests Jul 18, 2018
@kennytm
Copy link
Member Author

kennytm commented Jul 18, 2018

@bors r+

Added #52418, #52510.

@bors
Copy link
Contributor

bors commented Jul 18, 2018

📌 Commit ae9c550 has been approved by kennytm

@bors
Copy link
Contributor

bors commented Jul 19, 2018

⌛ Testing commit ae9c550 with merge 629d891...

bors added a commit that referenced this pull request Jul 19, 2018
Rollup of 13 pull requests

Successful merges:

 - #51628 (use checked write in `LineWriter` example)
 - #52116 (Handle array manually in str case conversion methods)
 - #52218 (Amend option.take examples)
 - #52418 (Do not use desugared ident when suggesting adding a type)
 - #52439 (Revert some changes from #51917 to fix custom libdir)
 - #52455 (Fix doc comment: use `?` instead of `.unwrap()`)
 - #52458 (rustc: Fix a suggestion for the `proc_macro` feature)
 - #52464 (Allow clippy to be installed with make install)
 - #52472 (rustc: Enable `use_extern_macros` in 2018 edition)
 - #52477 (Clarify short-circuiting behvaior of Iterator::zip.)
 - #52480 (Cleanup #24958)
 - #52487 (Don't build twice the sanitizers on Linux)
 - #52510 (rustdoc: remove FIXME about macro redirects)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Jul 19, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: kennytm
Pushing 629d891 to master...

@bors bors mentioned this pull request Jul 19, 2018
@bors bors merged commit ae9c550 into rust-lang:master Jul 19, 2018
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #52486!

Tested on commit 629d891.
Direct link to PR: #52486

💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra).
💔 clippy-driver on linux: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra).
💔 rls on windows: test-pass → build-fail (cc @nrc, @rust-lang/infra).
💔 rls on linux: test-pass → build-fail (cc @nrc, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jul 19, 2018
Tested on commit rust-lang/rust@629d891.
Direct link to PR: <rust-lang/rust#52486>

💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra).
💔 clippy-driver on linux: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra).
💔 rls on windows: test-pass → build-fail (cc @nrc, @rust-lang/infra).
💔 rls on linux: test-pass → build-fail (cc @nrc, @rust-lang/infra).
@kennytm
Copy link
Member Author

kennytm commented Jul 19, 2018

clippy_lints broken by #52472 because of -D warnings. rls suffers collateral damage.

deprecated `#[macro_use]` directive used to import macros should be replaced at use sites with a `use` statement to import the macro instead

@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup 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.