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 #61507

Closed
wants to merge 46 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Jun 4, 2019

Successful merges:

Failed merges:

r? @ghost

tmandry and others added 30 commits May 30, 2019 13:28
Co-Authored-By: Ralf Jung <post@ralfj.de>
Like how to_lowercase has ὈΔΥΣΣΕΎΣ.
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Here follows the main reverts applied in order to make this commit:

Revert "Rollup merge of rust-lang#60676 - davidtwco:issue-60674, r=cramertj"

This reverts commit 45b0945, reversing
changes made to f6df1f6.

Revert "Rollup merge of rust-lang#60437 - davidtwco:issue-60236, r=nikomatsakis"

This reverts commit 16939a5, reversing
changes made to 12bf981.

Revert "Rollup merge of rust-lang#59823 - davidtwco:issue-54716, r=cramertj"

This reverts commit 62d1574, reversing
changes made to 4eff852.
This commit re-implements the async fn drop order lowering changes so
that it all takes place in HIR lowering, building atop the work done by
`@eddyb` to refactor `Res::Upvar`.

Previously, this types involved in the lowering were constructed in
libsyntax as they had to be used during name resolution and HIR
lowering. This was awful because none of that logic should have existed
in libsyntax.

This commit also changes `ArgSource` to keep a `HirId` to the original
argument pattern rather than a cloned copy of the pattern.
This commit removes the `HirId` from `ArgSource::AsyncFn`, relying on
the fact that only `simple_ident` is used in each of the locations that
previously took the original pattern from the `ArgSource::AsyncFn`.
This commit changes the lowering to stop creating HIR statements,
expressions and patterns directly and instead uses the pre-existing
helper functions.
This commit simplifies the previous logic to construct the statement
vector directly rather than constructing a `Vec` of
`(hir::Stmt, Option<hir::Stmt>)` first.
`ArgSource` is no longer used anywhere, so it can be removed.
This was accidentally regressed in rust-lang#60777 by accident, and we've stopped
printing out step timings on AppVeyor recently reducing the ability for
us to track build times over time!
varkor and others added 16 commits June 3, 2019 19:54
…nd, r=eddyb

Emit StorageDead along unwind paths for generators

Completion of the work done in rust-lang#60840. That PR made a change to implicitly consider a local `StorageDead` after Drop, but that was incorrect for DropAndReplace (see also rust-lang#61060 which tried to fix this in a different way).

This finally enables the optimization implemented in rust-lang#60187.

r? @eddyb
cc @Zoxc @cramertj @RalfJung
miri unsizing: fix projecting into a field of an operand

I don't know why this open-coded an operand field projection. Probably this code predates one or more of my refactorings.

Fixes rust-lang/miri#754

r? @oli-obk
…=oli-obk

Fix an ICE with a const argument in a trait

This goes some way towards fixing rust-lang#61383 (the reduced test case is fixed).
…-sane-way, r=eddyb

Re-implement async fn drop order lowering

This PR re-implements the async fn drop order lowering changes so
that it all takes place in HIR lowering, building atop the work done by
@eddyb to refactor `Res::Upvar`.

Previously, this types involved in the lowering were constructed in
libsyntax as they had to be used during name resolution and HIR
lowering. This was awful because none of that logic should have existed
in libsyntax.

This commit also changes `ArgSource` to keep a `HirId` to the original
argument pattern rather than a cloned copy of the pattern.

Only b7aa4ed and 71fb8fa should be reviewed, any other commits
are from rust-lang#61276 (though 447e336 might end up staying in this PR).

As a nice side effect, it also fixes rust-lang#61187 (cc rust-lang#61192).

r? @eddyb
cc @cramertj
…amertj

Add an unusual-conversion example to to_uppercase

Like how to_lowercase has ὈΔΥΣΣΕΎΣ.
…asper

On TerminatorKind::DropAndReplace still handle unused_mut correctly

Closes rust-lang#61424

- [x] Todo add regression test
…alexcrichton

azure: retry s3 upload if it fails

We had some cases (like [this](https://dev.azure.com/rust-lang/e71b0ddf-dd27-435a-873c-e30f86eea377/_apis/build/builds/370/logs/734) a few hours ago) when uploading to S3 fails with a network error. This retries the upload if it fails.

r? @alexcrichton
…etroalbini

ci: Reenable step timings on AppVeyor

This was accidentally regressed in rust-lang#60777 by accident, and we've stopped
printing out step timings on AppVeyor recently reducing the ability for
us to track build times over time!
…ens, r=varkor

Do not panic in tidy on unbalanced parentheses in cfg's

Fixes rust-lang#60505
…um-cpus, r=alexcrichton

Treat 0 as special value for codegen-units-std

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

Centril commented Jun 4, 2019

@bors r+ p=13 rollup=never

@bors
Copy link
Contributor

bors commented Jun 4, 2019

📌 Commit c4a23ba 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 Jun 4, 2019
@bors
Copy link
Contributor

bors commented Jun 4, 2019

⌛ Testing commit c4a23ba with merge b51ea07319fb5b404604ac8521eea1c7ca2c5dfe...

@bors
Copy link
Contributor

bors commented Jun 4, 2019

💔 Test failed - checks-travis

@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 Jun 4, 2019
@rust-highfive
Copy link
Collaborator

The job test-various of your PR failed on Travis (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.
[01:22:19] failures:
[01:22:19] 
[01:22:19] ---- [mir-opt] mir-opt/generator-storage-dead-unwind.rs stdout ----
[01:22:19] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:521:22
[01:22:19] thread '[mir-opt] mir-opt/generator-storage-dead-unwind.rs' panicked at 'Did not find expected line, error: ran out of mir dump to match against
[01:22:19] Expected Line: "    _1 = suspend(move _5) -> [resume: bb2, drop: bb4];"
[01:22:19] Test Name: rustc.main-{{closure}}.StateTransform.before.mir
[01:22:19] ... (elided)
[01:22:19] ... (elided)
[01:22:19] let _2: Foo;
[01:22:19] ... (elided)
[01:22:19] ... (elided)
[01:22:19] let mut _7: Foo;
[01:22:19] ... (elided)
[01:22:19] let mut _9: Bar;
[01:22:19] scope 1 {
[01:22:19]     let _3: Bar;
[01:22:19]     scope 2 {
[01:22:19]     }
[01:22:19] }
[01:22:19] bb0: {
[01:22:19]     StorageLive(_2);
[01:22:19]     _2 = Foo(const 5i32,);
[01:22:19]     StorageLive(_3);
[01:22:19]     _3 = Bar(const 6i32,);
[01:22:19] ... (elided)
[01:22:19]     _1 = suspend(move _5) -> [resume: bb2, drop: bb4];
[01:22:19] }
[01:22:19] bb1 (cleanup): {
[01:22:19]     resume;
[01:22:19] }
[01:22:19] bb2: {
[01:22:19] ... (elided)
[01:22:19]     StorageLive(_7);
[01:22:19]     _7 = move _2;
[01:22:19]     _6 = const take::<Foo>(move _7) -> [return: bb9, unwind: bb8];
[01:22:19] }
[01:22:19] bb3 (cleanup): {
[01:22:19]     StorageDead(_2);
[01:22:19]     drop(_1) -> bb1;
[01:22:19] }
[01:22:19] bb4: {
[01:22:19] ... (elided)
[01:22:19]     StorageDead(_3);
[01:22:19]     drop(_2) -> [return: bb5, unwind: bb3];
[01:22:19] }
[01:22:19] bb5: {
[01:22:19]     StorageDead(_2);
[01:22:19]     drop(_1) -> [return: bb6, unwind: bb1];
[01:22:19] }
[01:22:19] bb6: {
[01:22:19]     generator_drop;
[01:22:19] }
[01:22:19] bb7 (cleanup): {
[01:22:19]     StorageDead(_3);
[01:22:19]     StorageDead(_2);
[01:22:19]     drop(_1) -> bb1;
[01:22:19] }
[01:22:19] bb8 (cleanup): {
[01:22:19]     StorageDead(_7);
[01:22:19]     goto -> bb7;
[01:22:19] }
[01:22:19] bb9: {
[01:22:19]     StorageDead(_7);
[01:22:19]     StorageLive(_9);
[01:22:19]     _9 = move _3;
[01:22:19]     _8 = const take::<Bar>(move _9) -> [return: bb10, unwind: bb11];
[01:22:19] }
[01:22:19] bb10: {
[01:22:19]     StorageDead(_9);
[01:22:19] ... (elided)
[01:22:19]     StorageDead(_3);
[01:22:19]     StorageDead(_2);
[01:22:19]     drop(_1) -> [return: bb12, unwind: bb1];
[01:22:19] }
[01:22:19] bb11 (cleanup): {
[01:22:19]     StorageDead(_9);
[01:22:19]     goto -> bb7;
[01:22:19] }
[01:22:19] bb12: {
[01:22:19]     return;
[01:22:19] }
[01:22:19] Actual:
[01:22:19] fn  main::{{closure}}#0(_1: [generator@/checkout/src/test/mir-opt/generator-storage-dead-unwind.rs:19:16: 25:6 {Foo, Bar, ()}]) -> ()
[01:22:19] yields ()
[01:22:19]  {
[01:22:19]     let mut _0: ();
[01:22:19]     let _2: Foo;
[01:22:19]     let mut _4: ();
[01:22:19]     let mut _5: ();
[01:22:19]     let mut _6: ();
[01:22:19]     let mut _7: Foo;
[01:22:19]     let mut _8: ();
[01:22:19]     let mut _9: Bar;
[01:22:19]     scope 1 {
[01:22:19]         let _3: Bar;
[01:22:19]         scope 2 {
[01:22:19]     }
[01:22:19]     bb0: {
[01:22:19]     bb0: {
[01:22:19]         StorageLive(_2);
[01:22:19]         _2 = Foo(const 5i32,);
[01:22:19]         StorageLive(_3);
[01:22:19]         _3 = Bar(const 6i32,);
[01:22:19]         StorageLive(_5);
[01:22:19]         _5 = ();
[01:22:19]         _1 = suspend(move _5) -> [resume: bb1, drop: bb2];
[01:22:19]     bb1: {
[01:22:19]         _4 = ();
[01:22:19]         _4 = ();
[01:22:19]         StorageDead(_5);
[01:22:19]         StorageLive(_7);
[01:22:19]         _7 = move _2;
[01:22:19]         _6 = const take::<Foo>(move _7) -> bb5;
[01:22:19]     bb2: {
[01:22:19]     bb2: {
[01:22:19]         StorageDead(_5);
[01:22:19]         StorageDead(_3);
[01:22:19]         drop(_2) -> bb3;
[01:22:19]     bb3: {
[01:22:19]     bb3: {
[01:22:19]         StorageDead(_2);
[01:22:19]         drop(_1) -> bb4;
[01:22:19]     bb4: {
[01:22:19]         generator_drop;
[01:22:19]     }
[01:22:19]     bb5: {
[01:22:19]     bb5: {
[01:22:19]         StorageDead(_7);
[01:22:19]         StorageLive(_9);
[01:22:19]         _9 = move _3;
[01:22:19]         _8 = const take::<Bar>(move _9) -> bb6;
[01:22:19]     bb6: {
[01:22:19]     bb6: {
[01:22:19]         StorageDead(_9);
[01:22:19]         _0 = ();
[01:22:19]         StorageDead(_3);
[01:22:19]         StorageDead(_2);
[01:22:19]         drop(_1) -> bb7;
[01:22:19]     bb7: {
[01:22:19]         return;
[01:22:19]     }
[01:22:19]     }
[01:22:19]     bb8 (cleanup): {
[01:22:19]         resume;
[01:22:19] }', src/tools/compiletest/src/runtest.rs:3196:13
[01:22:19] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:22:19] 
[01:22:19] 
[01:22:19] 
[01:22:19] failures:
[01:22:19]     [mir-opt] mir-opt/generator-storage-dead-unwind.rs
[01:22:19] 
[01:22:19] test result: FAILED. 44 passed; 1 failed; 6 ignored; 0 measured; 0 filtered out
[01:22:19] 
[01:22:19] 
[01:22:19] 
[01:22:19] 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/wasm32-unknown-unknown/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/mir-opt" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "--stage-id" "stage2-wasm32-unknown-unknown" "--mode" "mir-opt" "--target" "wasm32-unknown-unknown" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--nodejs" "/node-v9.2.0-linux-x64/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/wasm32-unknown-unknown/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--llvm-version" "8.0.0-rust-1.37.0-dev\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:22:19] 
[01:22:19] 
[01:22:19] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target wasm32-unknown-unknown src/test/run-make src/test/ui src/test/run-pass src/test/compile-fail src/test/mir-opt src/test/codegen-units src/libcore
[01:22:19] Build completed unsuccessfully in 1:11:27
---
travis_time:end:1e9b975a:start=1559615223197757109,finish=1559615223207392949,duration=9635840
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:10633660
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:0966c898
travis_time:start:0966c898
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:005e47a5
$ dmesg | grep -i kill

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)

@Centril Centril closed this Jun 4, 2019
@Centril Centril deleted the rollup-hdm781j branch June 4, 2019 02:31
@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.

None yet