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 17 pull requests #64452

Closed
wants to merge 49 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Sep 14, 2019

Successful merges:

Failed merges:

r? @ghost

Christian and others added 30 commits August 24, 2019 14:49
Co-Authored-By: lzutao <taolzu@gmail.com>
Value was renamed to Operand in rust-lang@ad2de8b
ScalarPair to Slice in rust-lang@fe50b4e

Not familiar enough with rustc's source to know if the comment is even still applicable.
These are types that get memcpy'd a lot.
The reduction in `memcpy` calls greatly outweighs the cost of the extra
allocations, for a net performance win.
The reduction in `memcpy` calls outweighs the cost of the extra
allocations, for a net performance win.
Sync with rust-lang/rust master branch
It's a large type -- 176 bytes on 64-bit. And it's passed around and
returned from a lot of functions, including within PResult.

This commit boxes it, which reduces memory traffic. In particular,
`PResult` shrinks to 16 bytes in the best case; this reduces instruction
counts by up to 2% on various workloads.
declare EnvKey before use to fix build error
Unfortunately, the diagnotic machinery does not cope well with an empty
span which can happen if the crate is empty, in which case we merely set
a spanless note.
This function is very hot, doesn't get inlined because it's recursive,
and the function calls are significant.

This commit splits it into inlined and uninlined variants, and uses the
inlined variant for the hot call site. This wins several percent on a
few benchmarks.
Co-Authored-By: Robin Kruppe <robin.kruppe@gmail.com>
…alls, r=rkruppe

Added table containing the system calls used by Instant and SystemTime.

# Description
See rust-lang#32626 for a discussion on documenting system calls used by Instant and SystemTime.

## Changes
- Added a table containing the system calls used by each platform.

EDIT: If I can format this table better (due to the large links) please let me know.
I'd also be happy to learn a quick command to generate the docs on my host machine! Currently I am using: `python x.py doc --stage 0 src/libstd` but that gives me some `unrecognized intrinsic` errors. Advice is always welcome :)

closes rust-lang#32626
Fix minor typo in docs.

This comment is prolly refering to the comment in [const_eval_raw_provider](https://github.com/rust-lang/rust/pull/64116/files#diff-e0b58bb6712edaa8595ad7237542c958R616), not itself.
…ebank

Provide a span if main function is not present in crate

Unfortunately, the diagnostic machinery does not cope well with an empty
span which can happen if the crate is empty, in which case we merely set
a spanless note.

Tests are already updated for this change, so a dedicated test is not added.

Resolves rust-lang#36561.
…ode, r=zackmdavis

Shrink `ObligationCauseCode`

These commits reduce the size of `ObligationCauseCode` from 56 bytes to 32 bytes on 64-bit. This reduces instruction counts on various benchmarks by up to 1%, due to less `memcpy`ing.
…r=zackmdavis

Box `DiagnosticBuilder`.

It's a large type -- 176 bytes on 64-bit. And it's passed around and
returned from a lot of functions, including within `PResult`.

This commit boxes it, which reduces memory traffic. In particular,
`PResult` shrinks to 16 bytes in the best case; this reduces instruction
counts by up to 2% on various workloads. The commit touches a lot of
lines but it's almost all trivial plumbing changes.
Fast path for vec.clear/truncate

For trivial types like `u8`, `vec.truncate()`/`vec.clear()` relies on the optimizer to remove the loop. This means more work in debug builds, and more work for the optimizer.

Avoiding this busywork is exactly what `mem::needs_drop::<T>()` is for.
Trim rustc-workspace-hack

Those dependencies seem no longer necessary.
`./x.py test` and `x86_64-gnu-tools` container passed locally so I think this won't hurt.
…xcrichton

 declare EnvKey before use to fix build error

r? @alexcrichton
…as_waiting_from, r=Mark-Simulacrum

Inline `mark_neighbours_as_waiting_from`.

This function is very hot, doesn't get inlined because it's recursive,
and the function calls are significant.

This commit splits it into inlined and uninlined variants, and uses the
inlined variant for the hot call site. This wins several percent on a
few benchmarks.

r? @nikomatsakis
…gify, r=Mark-Simulacrum

Remove raw string literal quotes from error index descriptions

The error index has unnecessary `r##"` and `"##` around the descriptions from rust-lang#63721. Removing the `stringify` call removes them.

r? @Mark-Simulacrum
…tural-match, r=varkor

fn ptr is structural match

Make fn ptr always structural match, regardless of whether the formal parameter types or return type are.

Fix rust-lang#63479.
codegen: use "_N" (like for other locals) instead of "argN", for argument names.

Based on rust-lang#64408 (second commit is new), fixing something I mentioned in rust-lang#64408 (which turned to be an immediate blocker for unifying relevant codepaths).

Closes rust-lang#64408 (by containing it).

r? @rkruppe
fix rust-lang#64430, confusing `owned_box` error message in no_std build

Fixes rust-lang#64430
@Centril
Copy link
Contributor Author

Centril commented Sep 14, 2019

@bors r+ p=17 rollup=never

@bors
Copy link
Contributor

bors commented Sep 14, 2019

📌 Commit a5826ab has been approved by Centril

@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 Sep 14, 2019
@bors
Copy link
Contributor

bors commented Sep 14, 2019

⌛ Testing commit a5826ab with merge 042f00be90e803e4a9e7c536a0367c7216e96025...

@bors
Copy link
Contributor

bors commented Sep 14, 2019

💔 Test failed - checks-azure

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-nopt of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-09-14T14:36:43.3822091Z 
2019-09-14T14:36:43.3822925Z ---- [ui (nll)] ui/continue-after-missing-main.rs stdout ----
2019-09-14T14:36:43.3823289Z diff of stderr:
2019-09-14T14:36:43.3823506Z 
2019-09-14T14:36:43.3823763Z 1 error[E0601]: `main` function not found in crate `continue_after_missing_main`
2019-09-14T14:36:43.3824253Z +   --> $DIR/continue-after-missing-main.rs:1:1
2019-09-14T14:36:43.3824566Z 2    |
2019-09-14T14:36:43.3825044Z -    = note: consider adding a `main` function to `$DIR/continue-after-missing-main.rs`
2019-09-14T14:36:43.3831876Z + LL | / #![allow(dead_code)]
2019-09-14T14:36:43.3832141Z + LL | |
2019-09-14T14:36:43.3832681Z + LL | | // error-pattern:`main` function not found in crate
2019-09-14T14:36:43.3832903Z + LL | |
2019-09-14T14:36:43.3833084Z + ...  |
2019-09-14T14:36:43.3833278Z + LL | |
2019-09-14T14:36:43.3833437Z + LL | | }
2019-09-14T14:36:43.3833860Z +    | |_^ consider adding a `main` function to `$DIR/continue-after-missing-main.rs`
2019-09-14T14:36:43.3834268Z 5 error: aborting due to previous error
2019-09-14T14:36:43.3834432Z 6 
2019-09-14T14:36:43.3834582Z 
2019-09-14T14:36:43.3834715Z 
2019-09-14T14:36:43.3834715Z 
2019-09-14T14:36:43.3834895Z The actual stderr differed from the expected stderr.
2019-09-14T14:36:43.3835372Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/continue-after-missing-main.nll/continue-after-missing-main.nll.stderr
2019-09-14T14:36:43.3835835Z To update references, rerun the tests and pass the `--bless` flag
2019-09-14T14:36:43.3836277Z To only update this specific test, also pass `--test-args continue-after-missing-main.rs`
2019-09-14T14:36:43.3836648Z error: 1 errors occurred comparing output.
2019-09-14T14:36:43.3836830Z status: exit code: 1
2019-09-14T14:36:43.3836830Z status: exit code: 1
2019-09-14T14:36:43.3838689Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/continue-after-missing-main.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/continue-after-missing-main.nll" "-Zborrowck=mir" "-Crpath" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/continue-after-missing-main.nll/auxiliary" "-A" "unused"
2019-09-14T14:36:43.3839744Z ------------------------------------------
2019-09-14T14:36:43.3839965Z 
2019-09-14T14:36:43.3840430Z ------------------------------------------
2019-09-14T14:36:43.3840681Z stderr:
2019-09-14T14:36:43.3840681Z stderr:
2019-09-14T14:36:43.3841098Z ------------------------------------------
2019-09-14T14:36:43.3841491Z error[E0601]: `main` function not found in crate `continue_after_missing_main`
2019-09-14T14:36:43.3842354Z    |
2019-09-14T14:36:43.3842354Z    |
2019-09-14T14:36:43.3842522Z LL | / #![allow(dead_code)]
2019-09-14T14:36:43.3842707Z LL | |
2019-09-14T14:36:43.3843090Z LL | | // error-pattern:`main` function not found in crate
2019-09-14T14:36:43.3843460Z ...  |
2019-09-14T14:36:43.3843460Z ...  |
2019-09-14T14:36:43.3843616Z LL | |     //~^ ERROR lifetime mismatch
2019-09-14T14:36:43.3843793Z LL | | }
2019-09-14T14:36:43.3844197Z    | |_^ consider adding a `main` function to `/checkout/src/test/ui/continue-after-missing-main.rs`
2019-09-14T14:36:43.3844571Z error: aborting due to previous error
2019-09-14T14:36:43.3844904Z 
2019-09-14T14:36:43.3845452Z For more information about this error, try `rustc --explain E0601`.
2019-09-14T14:36:43.3845627Z 
---
2019-09-14T14:36:43.3870542Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:536:22
2019-09-14T14:36:43.3911939Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-09-14T14:36:43.3912767Z 
2019-09-14T14:36:43.3913175Z 
2019-09-14T14:36:43.3915317Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--host-rustcflags" "-Crpath -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--llvm-version" "9.0.0-rust-1.39.0-dev\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always" "--compare-mode" "nll"
2019-09-14T14:36:43.3916506Z 
2019-09-14T14:36:43.3916704Z 
2019-09-14T14:36:43.3916952Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-09-14T14:36:43.3917394Z Build completed unsuccessfully in 1:58:53
2019-09-14T14:36:43.3917394Z Build completed unsuccessfully in 1:58:53
2019-09-14T14:36:43.3960735Z == clock drift check ==
2019-09-14T14:36:43.3979566Z   local time: Sat Sep 14 14:36:43 UTC 2019
2019-09-14T14:36:43.5530033Z   network time: Sat, 14 Sep 2019 14:36:43 GMT
2019-09-14T14:36:43.5530379Z == end clock drift check ==
2019-09-14T14:36:44.6283260Z ##[error]Bash exited with code '1'.
2019-09-14T14:36:44.6323886Z ##[section]Starting: Upload CPU usage statistics
2019-09-14T14:36:44.6330921Z ==============================================================================
2019-09-14T14:36:44.6331016Z Task         : Bash
2019-09-14T14:36:44.6331262Z Description  : Run a Bash script on macOS, Linux, or Windows

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 14, 2019
@Centril Centril closed this Sep 14, 2019
@Centril Centril deleted the rollup-z101tu8 branch September 14, 2019 14:42
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 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-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confusing owned_box error message since nightly-2019-09-04