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

Ensure StorageDead is created even if variable initialization fails #51109

Closed
wants to merge 1 commit into from

Conversation

manuels
Copy link

@manuels manuels commented May 27, 2018

This patch fixes a bug where the compiler does not create a StorageDead for a variable that fails to initialize due to break.

@eddyb has suggested to flip Builder::schedule_drop_for_binding() and the call to Builder::into() on IRC.

Fixes #49232

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @eddyb (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 27, 2018
@eddyb
Copy link
Member

eddyb commented May 27, 2018

r? @nikomatsakis cc @arielb1 Will this do the right thing in terms of drops, too?

@rust-highfive rust-highfive assigned nikomatsakis and unassigned eddyb May 27, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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.
[00:47:27] ..............................................................i.....................................
[00:47:31] ....................................................................................................
[00:47:37] ....................................................................................................
[00:47:43] ...........................................................................................i........
[00:47:46] .........iiiiiiiii...................................................
[00:47:46] 
[00:47:46] travis_fold:start:test_ui_nll
travis_time:start:test_ui_nll
Check compiletest suite=ui mode=ui compare_mode=nll (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
[00:48:34] ..............................................................i.....................................
[00:48:38] ....................................................................................................
[00:48:43] ....................................................................................................
[00:48:49] ...........................................................................................i........
[00:48:51] .........iiiiiiiii...................................................
[00:48:51] 
[00:48:51]  finished in 65.666
[00:48:51] travis_fold:end:test_ui_nll

---
[00:53:09] ....................................................................test [run-pass] run-pass/issue-29227.rs has been running for over 60 seconds
[00:53:17] ................................
[00:53:39] ....................................................................................................
[00:53:51] ....................................................................................................
[00:54:08] ............................F...................i...................................................
[00:54:55] .............................................................................................test [run-pass] run-pass/mir_heavy_promoted.rs has been running for over 60 seconds
[00:54:57] .......
[00:55:10] ....................................................................................................
[00:55:50] ...............ii..............................................................i....................
---
149124 ./src/llvm-emscripten/test
142644 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu
142640 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release
122540 ./obj/build/bootstrap/debug/incremental/bootstrap-1r3bppl29tbrj
122536 ./obj/build/bootstrap/debug/incremental/bootstrap-1r3bppl29tbrj/s-f1filyhz7m-rjte40-33jenrrxh1gwm
107248 ./obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release
104172 865,finish=1527439764735063183,duration=6617318
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4

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)

@manuels
Copy link
Author

manuels commented May 27, 2018

Looks like this flips the drop order:

fn main() {
    let log = panic::AssertUnwindSafe(RefCell::new(vec![]));
    let d = |id| DropLogger { id: id, log: &log };
    let get = || -> Vec<_> {
        let mut m = log.0.borrow_mut();
        let n = m.drain(..);
        n.collect()
    };

    {
        let _x = (d(0), &d(1), d(2), &d(3));
        // all borrows are extended - nothing has been dropped yet
        assert_eq!(get(), vec![]);
    }
    // in a let-statement, extended places are dropped
    // *after* the let result (tho they have the same scope
    // as far as scope-based borrowck goes).
    assert_eq!(get(), vec![0, 2, 3, 1]);

    let _ = std::panic::catch_unwind(|| {
        (d(4), &d(5), d(6), &d(7), panic!(InjectedFailure));
    });

    // here, the temporaries (5/7) live until the end of the
    // containing statement, which is destroyed after the operands
    // (4/6) on a panic.
    assert_eq!(get(), vec![6, 4, 7, 5]);
}
thread 'main' panicked at 'assertion failed: `(left == right)`
   left: `[3, 1, 0, 2]`,
   right: `[0, 2, 3, 1]`', /checkout/src/test/run-pass/mir_drop_order.rs:47:5

Is this critical or can it be ignored?

@eddyb
Copy link
Member

eddyb commented May 27, 2018

@manuels Looks like we have to schedule the StorageDead before and the drop after.
Which means DropKind::Value can't imply DropKind::Storage, they instead have to be separate.

@nikomatsakis
Copy link
Contributor

If this passed all tests, but still changes the drop order, can we add the test listed here, or some simplified variant of it?

@manuels
Copy link
Author

manuels commented May 30, 2018

Sorry, I think my comment was misleading: this is a test that alreay exists. I just quoted it here. I will have a long weekend starting this afternoon to work on this issue and implement @eddyb's suggestion.

@nikomatsakis nikomatsakis 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 May 31, 2018
@manuels
Copy link
Author

manuels commented Jun 4, 2018

I'm afraid, I am not able to find the time working on this issue, so if anybody wants to fix it, please go ahead!

@eddyb
Copy link
Member

eddyb commented Jun 4, 2018

@manuels Did you get anywhere with splitting the two drop kinds? Do you have an in-progress branch?

@manuels
Copy link
Author

manuels commented Jun 5, 2018

Not really, also because I did not really know where to insert DropKind::Storage and where DropKind::Value would be needed.

@eddyb
Copy link
Member

eddyb commented Jun 5, 2018

@manuels I would say call for both when previously only a single call existed, and instead of there being logic to decide which is needed, it would check if the DropKind given applies at all.

@manuels
Copy link
Author

manuels commented Jun 6, 2018 via email

@eddyb
Copy link
Member

eddyb commented Jun 6, 2018

@manuels Do you have what you tried anywhere? Or can you just push it to this PR?
If it's not an additional complication that's causing the failures, we could push this through quickly.

@manuels
Copy link
Author

manuels commented Jun 6, 2018

@eddyb I pushed a WIP commit.

@@ -188,8 +189,17 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
self.user_assert_ty(block, ty, var, irrefutable_pat.span);
}

self.schedule_drop_for_binding(var, irrefutable_pat.span, OutsideGuard);
self.into(&place, block, initializer)
let block = self.into(&place, block, initializer);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be in between the storage and the value drop.

Copy link
Author

@manuels manuels Jun 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I remember I was playing around in the end and this is what I tried last.

let local_id = self.var_local_id(var, for_guard);
let var_ty = self.local_decls[local_id].ty;
let hir_id = self.hir.tcx().hir.node_to_hir_id(var);
let region_scope = self.hir.region_scope_tree.var_scope(hir_id.local_id);
self.schedule_drop(span, region_scope, &Place::Local(local_id), var_ty);
// where is the DropKind?
// region_scope.drops[].kind
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if the comment is relevant still.

argument_scope, &place, ty);
argument_scope, &place, ty, drop_kind);

//let drop_kind = DropKind::Value { cached_block: CachedBlock::default() };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For arguments only DropKind::Value is needed.

} else {
// Only temps and vars need their storage dead.

if let DropKind::Storage = drop_kind {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest using a match and making both variants explicit, with Value first (just to make the diff more readable).

@eddyb
Copy link
Member

eddyb commented Jun 6, 2018

@manuels Left a few comments. Most of it seems good! You also need to rebase on master.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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.

[00:04:33] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:34] tidy error: /checkout/src/librustc_mir/build/expr/as_rvalue.rs:107: line longer than 100 chars
[00:04:34] tidy error: /checkout/src/librustc_mir/build/expr/as_rvalue.rs:110: line longer than 100 chars
[00:04:34] tidy error: /checkout/src/librustc_mir/build/matches/mod.rs:1057: line longer than 100 chars
[00:04:34] tidy error: /checkout/src/librustc_mir/build/matches/mod.rs:1059: line longer than 100 chars
[00:04:34] tidy error: /checkout/src/librustc_mir/build/matches/mod.rs:1084: line longer than 100 chars
[00:04:34] tidy error: /checkout/src/librustc_mir/build/matches/mod.rs:1087: line longer than 100 chars
[00:04:34] tidy error: /checkout/src/librustc_mir/build/block.rs:147: line longer than 100 chars
[00:04:35] some tidy checks failed
[00:04:35] 
[00:04:35] 
[00:04:35] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:04:35] 
[00:04:35] 
[00:04:35] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:35] Build completed unsuccessfully in 0:01:39
[00:04:35] Build completed unsuccessfully in 0:01:39
[00:04:35] make: *** [tidy] Error 1
[00:04:35] Makefile:79: recipe for target 'tidy' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0d9bfb13
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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.
[00:01:12] extracting /checkout/obj/build/cache/2018-05-10/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
[00:01:12] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:12] 
[00:01:12] Caused by:
[00:01:12]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:12] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:12] Build completed unsuccessfully in 0:00:22
[00:01:12] make: *** [prepare] Error 1
[00:01:12] Makefile:81: recipe for target 'prepare' failed
[00:01:13] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:13] 
[00:01:13] Caused by:
[00:01:13] Caused by:
[00:01:13]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:13] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:13] Build completed unsuccessfully in 0:00:00
[00:01:13] Makefile:81: recipe for target 'prepare' failed
[00:01:13] make: *** [prepare] Error 1
[00:01:15] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:15] 
[00:01:15] Caused by:
[00:01:15] Caused by:
[00:01:15]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:15] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:15] Build completed unsuccessfully in 0:00:00
[00:01:15] Makefile:81: recipe for target 'prepare' failed
[00:01:15] make: *** [prepare] Error 1
[00:01:18] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:18] 
[00:01:18] Caused by:
[00:01:18] Caused by:
[00:01:18]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:18] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:18] Build completed unsuccessfully in 0:00:00
[00:01:18] Makefile:81: recipe for target 'prepare' failed
[00:01:18] make: *** [prepare] Error 1
[00:01:22] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:22] 
[00:01:22] Caused by:
[00:01:22] Caused by:
[00:01:22]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:22] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:22] Build completed unsuccessfully in 0:00:00
[00:01:22] make: *** [prepare] Error 1
[00:01:22] Makefile:81: recipe for target 'prepare' failed
[00:01:22] The command has failed after 5 attempts.

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 1.
travis_time:start:02e95d20
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)


let drop_kind = DropKind::Value { cached_block: CachedBlock::default() };
this.schedule_drop(expr_span, scope, &Place::Local(result), value.ty, drop_kind);
this.schedule_drop(expr_span, scope, &Place::Local(result), value.ty,
drop_kind);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this formatting, you can probably just put the value in the call itself, without having a drop_kind variable.

@eddyb
Copy link
Member

eddyb commented Jun 6, 2018

@manuels You need to run git pull --rebase upstream master to not have merge commits.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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.

[00:04:24] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:25] tidy error: /checkout/src/librustc_mir/build/matches/mod.rs:1056: line longer than 100 chars
[00:04:26] some tidy checks failed
[00:04:26] 
[00:04:26] 
[00:04:26] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:04:26] 
[00:04:26] 
[00:04:26] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:26] Build completed unsuccessfully in 0:01:40
[00:04:26] Build completed unsuccessfully in 0:01:40
[00:04:26] make: *** [tidy] Error 1
[00:04:26] Makefile:79: recipe for target 'tidy' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0b2127d2
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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.
[00:01:08] extracting /checkout/obj/build/cache/2018-05-10/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
[00:01:08] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:08] 
[00:01:08] Caused by:
[00:01:08]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:08] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:08] Build completed unsuccessfully in 0:00:19
[00:01:08] Makefile:81: recipe for target 'prepare' failed
[00:01:08] make: *** [prepare] Error 1
[00:01:09] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:09] 
[00:01:09] Caused by:
[00:01:09] Caused by:
[00:01:09]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:09] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:09] Build completed unsuccessfully in 0:00:00
[00:01:09] Makefile:81: recipe for target 'prepare' failed
[00:01:09] make: *** [prepare] Error 1
[00:01:12] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:12] 
[00:01:12] Caused by:
[00:01:12] Caused by:
[00:01:12]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:12] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:12] Build completed unsuccessfully in 0:00:00
[00:01:12] make: *** [prepare] Error 1
[00:01:12] Makefile:81: recipe for target 'prepare' failed
[00:01:15] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:15] 
[00:01:15] Caused by:
[00:01:15] Caused by:
[00:01:15]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:15] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:15] Build completed unsuccessfully in 0:00:00
[00:01:15] Makefile:81: recipe for target 'prepare' failed
[00:01:15] make: *** [prepare] Error 1
[00:01:19] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:19] 
[00:01:19] Caused by:
[00:01:19] Caused by:
[00:01:19]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:19] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:19] Build completed unsuccessfully in 0:00:00
[00:01:19] make: *** [prepare] Error 1
[00:01:19] Makefile:81: recipe for target 'prepare' failed
[00:01:19] The command has failed after 5 attempts.

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 1.
travis_time:start:07b41280
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

@eddyb
Copy link
Member

eddyb commented Jun 7, 2018

@manuels Can you use git rebase -i to squash all of the commits into one? And amend instead of adding new commits. And you need to amend out submodule changes (I'd do this with git gui).

@manuels
Copy link
Author

manuels commented Jun 7, 2018

Can you use git rebase -i to squash all of the commits into one? And amend instead of adding new commits.

Sure, I just did it like that because the @rust-highfive told me to:

If any changes to this PR are deemed necessary, please add them as extra commits.

And you need to amend out submodule changes (I'd do this with git gui).

Not sure what you mean by that.

@manuels
Copy link
Author

manuels commented Jun 7, 2018

I do not understand why I'm getting this error now:

[00:01:49] extracting /checkout/obj/build/cache/2018-05-10/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
[00:01:49] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:49] 
[00:01:49] Caused by:
[00:01:49]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:49] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:49] Build completed unsuccessfully in 0:00:12

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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.
[00:01:49] extracting /checkout/obj/build/cache/2018-05-10/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
[00:01:49] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:49] 
[00:01:49] Caused by:
[00:01:49]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:49] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:49] Build completed unsuccessfully in 0:00:12
[00:01:49] Makefile:81: recipe for target 'prepare' failed
[00:01:49] make: *** [prepare] Error 1
[00:01:50] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:50] 
[00:01:50] Caused by:
[00:01:50] Caused by:
[00:01:50]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:50] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:50] Build completed unsuccessfully in 0:00:00
[00:01:50] make: *** [prepare] Error 1
[00:01:50] Makefile:81: recipe for target 'prepare' failed
[00:01:52] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:52] 
[00:01:52] Caused by:
[00:01:52] Caused by:
[00:01:52]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:52] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:52] Build completed unsuccessfully in 0:00:00
[00:01:52] make: *** [prepare] Error 1
[00:01:52] Makefile:81: recipe for target 'prepare' failed
[00:01:55] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:55] 
[00:01:55] Caused by:
[00:01:55] Caused by:
[00:01:55]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:55] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:55] Build completed unsuccessfully in 0:00:00
[00:01:55] Makefile:81: recipe for target 'prepare' failed
[00:01:55] make: *** [prepare] Error 1
[00:01:59] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:59] 
[00:01:59] Caused by:
[00:01:59] Caused by:
[00:01:59]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:59] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:59] Build completed unsuccessfully in 0:00:00
[00:01:59] Makefile:81: recipe for target 'prepare' failed
[00:01:59] make: *** [prepare] Error 1
[00:01:59] The command has failed after 5 attempts.

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 1.
travis_time:start:0272695c
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

@eddyb
Copy link
Member

eddyb commented Jun 7, 2018

If any changes to this PR are deemed necessary, please add them as extra commits.

That's not that great of advice. GitHub handles amends and force pushes just as well as multiple commits. The only exception is when logically separated/stacked changes are made.

So fixing a previous commit should just be amending the commit, adding onto the PR (e.g. implementing another sub-feature) can be done in separate commits.

Not sure what you mean by that.

So as far as I can tell, you used git commit -a or git add . and it included the old state of the submodules, before you pulled the new master. If you look in "Files changed" on GitHub, you'll see 4 submodules (under src/tools), with changes (effectively a revert). This is causing the Travis error.

Run git gui, tick "Amend Last Commit", and on the bottom left, for each of the 4 entries under src/tools, click on the icon on their left, then press Commit.
After that, run git submodule update (x.py will also do it for you, if you do a build, I believe).

While there is a way to do this on the command-line, I'm not sure how to actually do it correctly, because you have to somehow do something like git submodule update to their state in upstream/master. So I instead use git gui, without having to worry about the commands.

In general, I recommend committing using git gui to everyone who doesn't already prefer git add -p (the command-line equivalent to git gui's granular commit features).
You get to pick the files you want to add the changes from, you can review the changes as you're adding them, you can choose to instead add only a hunk or a line at a time, it's really useful.

@manuels manuels force-pushed the issue-49232 branch 2 times, most recently from e9ec847 to 676d611 Compare June 7, 2018 17:42
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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.
[00:01:32] extracting /checkout/obj/build/cache/2018-05-10/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
[00:01:33] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:33] 
[00:01:33] Caused by:
[00:01:33]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:33] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:33] Build completed unsuccessfully in 0:00:12
[00:01:33] Makefile:81: recipe for target 'prepare' failed
[00:01:33] make: *** [prepare] Error 1
[00:01:34] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:34] 
[00:01:34] Caused by:
[00:01:34] Caused by:
[00:01:34]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:34] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:34] Build completed unsuccessfully in 0:00:00
[00:01:34] Makefile:81: recipe for target 'prepare' failed
[00:01:34] make: *** [prepare] Error 1
[00:01:36] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:36] 
[00:01:36] Caused by:
[00:01:36] Caused by:
[00:01:36]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:36] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:36] Build completed unsuccessfully in 0:00:00
[00:01:36] make: *** [prepare] Error 1
[00:01:36] Makefile:81: recipe for target 'prepare' failed
[00:01:39] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:39] 
[00:01:39] Caused by:
[00:01:39] Caused by:
[00:01:39]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:39] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:39] Build completed unsuccessfully in 0:00:00
[00:01:39] Makefile:81: recipe for target 'prepare' failed
[00:01:39] make: *** [prepare] Error 1
[00:01:43] error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
[00:01:43] 
[00:01:43] Caused by:
[00:01:43] Caused by:
[00:01:43]   patch for `rustfmt-nightly` in `https://github.com/rust-lang/crates.io-index` did not resolve to any crates. If this is unexpected, you may wish to consult: https://github.com/rust-lang/cargo/issues/4678
[00:01:43] failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
[00:01:43] Build completed unsuccessfully in 0:00:00
[00:01:43] make: *** [prepare] Error 1
[00:01:43] Makefile:81: recipe for target 'prepare' failed
[00:01:43] The command has failed after 5 attempts.

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 1.
travis_time:start:1643c3e7
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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
Copy link
Contributor

bors commented Jun 8, 2018

☔ The latest upstream changes (presumably #51426) made this pull request unmergeable. Please resolve the merge conflicts.

@manuels
Copy link
Author

manuels commented Jun 8, 2018

Git is freaking me out!

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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.
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/1f/fe/70b051d7b8ff6c486ce223f690b85a8daf42edb09bb2237747469243c828/awscli-1.15.35-py2.py3-none-any.whl (1.3MB)
    0% |▎                               | 10kB 9.8MB/s eta 0:00:01
    1% |▌                               | 20kB 1.8MB/s eta 0:00:01
    2% |▉                               | 30kB 2.1MB/s eta 0:00:01/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/1f/fe/70b051d7b8ff6c486ce223f690b85a8daf42edb09bb2237747469243c828/awscli-1.15.35-py2.py3-none-any.whl (1.3MB)
    0% |▎                               | 10kB 12.0MB/s eta 0:00:01
    1% |▌                               | 20kB 1.8MB/s eta 0:00:01
    2% |▉                               | 30kB 2.1MB/s eta 0:00:01
    3% |█                               | 40kB 1.7MB/s eta 0:00:01
---
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/1b/b3/740d993c812453729ac06c41e210997dd94e37adb24dc4aee49eee96fca4/botocore-1.10.35-py2.py3-none-any.whl (4.3MB)
    0% |                                | 10kB 40.1MB/s eta 0:00:01
    0% |▏                               | 20kB 40.9MB/s eta 0:00:01
    0% |▎                               | 30kB 47.0MB/s eta 0:00:01
    0% |▎                               | 40kB 18.1MB/s eta 0:00:01
---
    9% |███                             | 409kB 9.8MB/s eta 0:00:01
    9% |███▏                            | 419kB 12.0MB/s eta 0:00:01
    9% |███▏            /usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/1b/b3/740d993c812453729ac06c41e210997dd94e37adb24dc4aee49eee96fca4/botocore-1.10.35-py2.py3-none-any.whl (4.3MB)
    0% |                                | 10kB 41.3MB/s eta 0:00:01
    0% |▏                               | 20kB 23.4MB/s eta 0:00:01
    0% |▎                               | 30kB 13.4MB/s eta 0:00:01
    0% |▎                               | 40kB 8.4MB/s eta 0:00:01
---
[00:48:25] ...i..............................................................................i.................
[00:48:30] ....................................................................................................
[00:48:36] ....................................................................................................
[00:48:42] ....................................................................................................
[00:48:47] ...............i.................iiiiiiiii...................................................
[00:48:47] 
[00:48:47] travis_fold:start:test_ui_nll
travis_time:start:test_ui_nll
Check compiletest suite=ui mode=ui compare_mode=nll (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
[00:49:38] ...i..............................................................................i.................
[00:49:43] ....................................................................................................
[00:49:48] ....................................................................................................
[00:49:54] ....................................................................................................
[00:49:59] ...............i.................iiiiiiiii...................................................
[00:49:59] 
[00:49:59]  finished in 72.122
[00:49:59] travis_fold:end:test_ui_nll

---
travis_time:start:test_mir-opt
Check compiletest suite=mir-opt mode=mir-opt (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:02:04] 
[01:02:04] running 51 tests
[01:02:26] ..........................F........................
[01:02:26] 
[01:02:26] ---- [mir-opt] mir-opt/issue-49232.rs stdout ----
[01:02:26] ---- [mir-opt] mir-opt/issue-49232.rs stdout ----
[01:02:26] thread '[mir-opt] mir-opt/issue-49232.rs' panicked at 'Did not find expected line, error: Mismatch in lines
[01:02:26] Current block: None
[01:02:26] Actual Line: "    }"
[01:02:26] Expected Line: "       let _2: i32;"
[01:02:26] Test Name: rustc.main.mir_map.0.mir
[01:02:26] Expected:
[01:02:26] ... (elided)
[01:02:26] ... (elided)
[01:02:26]    scope 1 {
[01:02:26]        let _2: i32;
[01:02:26]    }
[01:02:26] ... (elided)
[01:02:26]    bb3: {
[01:02:26]        StorageLive(_2);
[01:02:26]        StorageLive(_3);
[01:02:26]        _3 = const true;
[01:02:26]        EndRegion('3s);
[01:02:26]        _4 = discriminant(_3);
[01:02:26]        switchInt(_3) -> [false: bb11, otherwise: bb10];
[01:02:26]    }
[01:02:26] ... (elided)
[01:02:26]    bb22: {
[01:02:26]        EndRegion('20_0rs);
[01:02:26]        StorageDead(_2);
[01:02:26]        goto -> bb23;
[01:02:26]    }
[01:02:26] ... (elided)
[01:02:26]    bb28: {
[01:02:26]        EndRegion('18s);
[01:02:26]        StorageDead(_7);
[01:02:26]        EndRegion('19s);
[01:02:26]        EndRegion('19ds);
[01:02:26]        _1 = ();
[01:02:26]        EndRegion('20_0rs);
[01:02:26]        StorageDead(_2);
[01:02:26]        EndRegion('20s);
[01:02:26]        EndRegion('20ds);
[01:02:26]        goto -> bb1;
[01:02:26]    bb29: {
[01:02:26]        return;
[01:02:26]    }
[01:02:26] Actual:
[01:02:26] Actual:
[01:02:26] fn main() -> (){
[01:02:26]     let mut _0: ();
[01:02:26]     scope 1 {
[01:02:26]     scope 2 {
[01:02:26]         let _2: i32;
[01:02:26]     }
[01:02:26]     }
[01:02:26]     let mut _1: ();
[01:02:26]     let mut _3: bool;
[01:02:26]     let mut _4: u8;
[01:02:26]     let mut _5: !;
[01:02:26]     let mut _6: ();
[01:02:26]     let mut _7: &'18s i32;
[01:02:26]     bb0: {                              
[01:02:26]         goto -> bb1;
[01:02:26]     }
[01:02:26]     bb1: {                              
[01:02:26]         falseUnwind -> [real: bb3, cleanup: bb4];
[01:02:26]     }
[01:02:26]     bb2: {                              
[01:02:26]         EndRegion('9s);
[01:02:26]         EndRegion('21s);
[01:02:26]         EndRegion('22s);
[01:02:26]         EndRegion('22ds);
[01:02:26]         EndRegion('22as);
[01:02:26]         goto -> bb29;
[01:02:26]     }
[01:02:26]     bb3: {                              
[01:02:26]         StorageLive(_2);
[01:02:26]         StorageLive(_3);
[01:02:26]         _3 = const true;
[01:02:26]         EndRegion('3s);
[01:02:26]         _4 = discriminant(_3);
[01:02:26]         switchInt(_3) -> [false: bb11, otherwise: bb10];
[01:02:26]     bb4: {
[01:02:26]         resume;
[01:02:26]     }
[01:02:26]     }
[01:02:26]     bb5: {                              
[01:02:26]         _2 = const 4i32;
[01:02:26]         EndRegion('6s);
[01:02:26]         EndRegion('6ds);
[01:02:26]         goto -> bb14;
[01:02:26]     }
[01:02:26]     bb6: {                              
[01:02:26]         _0 = ();
[01:02:26]         goto -> bb15;
[01:02:26]     }
[01:02:26]     bb7: {                              
[01:02:26]         falseEdges -> [real: bb12, imaginary: bb8];
[01:02:26]     }
[01:02:26]     bb8: {                              
[01:02:26]         falseEdges -> [real: bb13, imaginary: bb9];
[01:02:26]     }
[01:02:26]     bb9: {                              
[01:02:26]         unreachable;
[01:02:26]     }
[01:02:26]     bb10: {                             
[01:02:26]         goto -> bb8;
[01:02:26]     }
[01:02:26]     bb11: {                             
[01:02:26]         goto -> bb7;
[01:02:26]     }
[01:02:26]     bb12: {                             
[01:02:26]         goto -> bb5;
[01:02:26]     }
[01:02:26]     bb13: {                             
[01:02:26]         goto -> bb6;
[01:02:26]     }
[01:02:26]     bb14: {                             
[01:02:26]         EndRegion('11s);
[01:02:26]         EndRegion('12s);
[01:02:26]         EndRegion('13s);
[01:02:26]         EndRegion('14s);
[01:02:26]         StorageDead(_3);
[01:02:26]         EndRegion('14ds);
[01:02:26]         EndRegion('15s);
[01:02:26]         StorageLive(_7);
[01:02:26]         EndRegion('16s);
[01:02:26]         _7 = &'18s _2;
[01:02:26]         EndRegion('17s);
[01:02:26]         _6 = const std::mem::drop(move _7) -> [return: bb28, unwind: bb4];
[01:02:26]     }
[01:02:26]     bb15: {                             
[01:02:26]         EndRegion('10s);
[01:02:26]         goto -> bb16;
[01:02:26]     }
[01:02:26]     bb16: {                             
[01:02:26]         EndRegion('10ds);
[01:02:26]         goto -> bb17;
[01:02:26]     }
[01:02:26]     bb17: {                             
[01:02:26]         EndRegion('11s);
[01:02:26]         goto -> bb18;
[01:02:26]     }
[01:02:26]     bb18: {                             
[01:02:26]         EndRegion('12s);
[01:02:26]         goto -> bb19;
[01:02:26]     }
[01:02:26]     bb19: {                             
[01:02:26]         EndRegion('13s);
[01:02:26]         goto -> bb20;
[01:02:26]     }
[01:02:26]     bb20: {                             
[01:02:26]         EndRegion('14s);
[01:02:26]         StorageDead(_3);
[01:02:26]         goto -> bb21;
[01:02:26]     }
[01:02:26]     bb21: {                             
[01:02:26]         EndRegion('14ds);
[01:02:26]         goto -> bb22;
[01:02:26]     }
[01:02:26]     bb22: {                             
[01:02:26]         EndRegion('20_0rs);
[01:02:26]         goto -> bb23;
[01:02:26]     }
[01:02:26]     bb23: {                             
[01:02:26]         EndRegion('20s);
[01:02:26]         goto -> bb24;
[01:02:26]     }
[01:02:26]     bb24: {                             
[01:02:26]         EndRegion('20ds);
[01:02:26]         goto -> bb25;
[01:02:26]     }
[01:02:26]     bb25: {                             
[01:02:26]         EndRegion('9s);
[01:02:26]         goto -> bb2;
[01:02:26]     }
[01:02:26]     bb26: {                             
[01:02:26]         _5 = ();
[01:02:26]         unreachable;
[01:02:26]     }
[01:02:26]     bb27: {                             
[01:02:26]         EndRegion('10s);
[01:02:26]         StorageDead(_5);
[01:02:26]         EndRegion('10ds);
[01:02:26]         goto -> bb14;
[01:02:26]     }
[01:02:26]     bb28: {                             
[01:02:26]         EndRegion('18s);
[01:02:26]         StorageDead(_7);
[01:02:26]         EndRegion('19s);
[01:02:26]         EndRegion('19ds);
[01:02:26]         _1 = ();
[01:02:26]         EndRegion('20_0rs);
[01:02:26]         StorageDead(_2);
[01:02:26]         EndRegion('20s);
[01:02:26]         EndRegion('20ds);
[01:02:26]         goto -> bb1;
[01:02:26]     }
[01:02:26]     bb29: {                             
[01:02:26]         return;
[01:02:26] }', tools/compiletest/src/runtest.rs:2812:13
[01:02:26] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:02:26] 
[01:02:26] 
---
[01:02:26] 
[01:02:26] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[01:02:26] 
[01:02:26] 
[01:02:26] 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/mir-opt" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/mir-opt" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "mir-opt" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -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" "--quiet" "--llvm-version" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:02:26] 
[01:02:26] 
[01:02:26] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:02:26] Build completed unsuccessfully in 0:16:23
[01:02:26] Build completed unsuccessfully in 0:16:23
[01:02:26] Makefile:58: recipe for target 'check' failed
[01:02:26] make: *** [check] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0d9755f6
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

@eddyb
Copy link
Member

eddyb commented Jun 8, 2018

@manuels Can you get on IRC? It'd be easier to discuss things in real-time.
About git... can you walk me through what you did? Somehow you removed most of the actual changes, too, not just the 4 submodules. Did you follow my instructions, and were they wrong?

@pietroalbini
Copy link
Member

Ping from triage @manuels! It's been a while since we heard from you, will you have time to work on this again?

@manuels
Copy link
Author

manuels commented Jun 18, 2018

Hey, @pietroalbini, sorry, I am quite busy with other stuff right now. So if anybody would like to work on this bug, feel free to do so!

@pietroalbini
Copy link
Member

Weekly ping from triage @manuels, just making sure you don't forget about this! (please reply so we don't close the PR next week)

@manuels
Copy link
Author

manuels commented Jun 25, 2018

Well, actually I think it would be fine if you close it. I won't have the time to fix it because it became more complicated than I thought and I won't have the time to start learning how the compiler handles all the lifetimes.

@pietroalbini
Copy link
Member

Sure, thank you for your work anyway! If you'll want to continue this PR in the future please reopen it!

@pietroalbini pietroalbini added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 25, 2018
bors added a commit that referenced this pull request Jul 13, 2018
Ensure StorageDead is created even if variable initialization fails

Rebase and slight cleanup of #51109
Fixes #49232

r? @eddyb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken MIR with immovable generators
6 participants