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

Refactor Adjust and CastKind #59987

Merged
merged 6 commits into from
Apr 20, 2019

Conversation

saleemjaffer
Copy link
Contributor

@saleemjaffer saleemjaffer commented Apr 15, 2019

fixes #59588

@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 15, 2019
@saleemjaffer
Copy link
Contributor Author

r? @oli-obk

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 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.
travis_time:end:18021cbb:start=1555336490298707472,finish=1555336602194786422,duration=111896078950
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---

[00:03:23] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:03:23] tidy error: /checkout/src/librustc_mir/borrow_check/nll/explain_borrow/mod.rs:584: line longer than 100 chars
[00:03:23] tidy error: /checkout/src/librustc_mir/monomorphize/collector.rs:532: line longer than 100 chars
[00:03:25] some tidy checks failed
[00:03:25] 
[00:03:25] 
[00:03:25] 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:03:25] 
[00:03:25] 
[00:03:25] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:25] Build completed unsuccessfully in 0:00:46
[00:03:25] Build completed unsuccessfully in 0:00:46
[00:03:25] Makefile:67: recipe for target 'tidy' failed
[00:03:25] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:01968ed0
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Mon Apr 15 14:00:16 UTC 2019
---
travis_time:end:01027adc:start=1555336817305012439,finish=1555336817309712140,duration=4699701
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:140757dc
$ 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:07477398
travis_time:start:07477398
$ 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:1a6037b5
$ 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)

@jonas-schievink jonas-schievink added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 15, 2019
@saleemjaffer
Copy link
Contributor Author

@oli-obk This is not yet ready. I have just made the changes to CastKind. Adjust is still pending.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 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.
travis_time:end:11aa6980:start=1555340456344902597,finish=1555340544012106544,duration=87667203947
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
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:13:55] 
[01:13:55] running 42 tests
[01:14:26] ERROR 2019-04-15T16:16:59Z: compiletest::runtest: Some("   bb0: {")
[01:14:28] .......................................F..
[01:14:28] failures:
[01:14:28] 
[01:14:28] ---- [mir-opt] mir-opt/storage_live_dead_in_statics.rs stdout ----
[01:14:28] ---- [mir-opt] mir-opt/storage_live_dead_in_statics.rs stdout ----
[01:14:28] thread '[mir-opt] mir-opt/storage_live_dead_in_statics.rs' panicked at 'Did not find expected line, error: Mismatch in lines
[01:14:28] Current block:    bb0: {
[01:14:28] Actual Line: "        _3 = move _4 as &\'static [(u32, u32)] (Pointer(Unsize));"
[01:14:28] Expected Line: "       _3 = move _4 as &\'static [(u32, u32)] (Unsize);"
[01:14:28] Test Name: rustc.XXX.mir_map.0.mir
[01:14:28] ... (elided)
[01:14:28]    let mut _0: &'static Foo;
[01:14:28]    let mut _1: &'static Foo;
[01:14:28]    let _2: Foo;
[01:14:28]    let _2: Foo;
[01:14:28]    let mut _3: &'static [(u32, u32)];
[01:14:28]    let mut _4: &'static [(u32, u32); 42];
[01:14:28]    let mut _5: &'static [(u32, u32); 42];
[01:14:28]    let _6: [(u32, u32); 42];
[01:14:28]    let mut _7: (u32, u32);
[01:14:28]    let mut _8: (u32, u32);
[01:14:28]    let mut _9: (u32, u32);
[01:14:28]    let mut _10: (u32, u32);
[01:14:28]    let mut _11: (u32, u32);
[01:14:28]    let mut _12: (u32, u32);
[01:14:28]    let mut _13: (u32, u32);
[01:14:28]    let mut _14: (u32, u32);
[01:14:28]    let mut _15: (u32, u32);
[01:14:28]    let mut _16: (u32, u32);
[01:14:28]    let mut _17: (u32, u32);
[01:14:28]    let mut _18: (u32, u32);
[01:14:28]    let mut _19: (u32, u32);
[01:14:28]    let mut _20: (u32, u32);
[01:14:28]    let mut _21: (u32, u32);
[01:14:28]    let mut _22: (u32, u32);
[01:14:28]    let mut _23: (u32, u32);
[01:14:28]    let mut _24: (u32, u32);
[01:14:28]    let mut _25: (u32, u32);
[01:14:28]    let mut _26: (u32, u32);
[01:14:28]    let mut _27: (u32, u32);
[01:14:28]    let mut _28: (u32, u32);
[01:14:28]    let mut _29: (u32, u32);
[01:14:28]    let mut _30: (u32, u32);
[01:14:28]    let mut _31: (u32, u32);
[01:14:28]    let mut _32: (u32, u32);
[01:14:28]    let mut _33: (u32, u32);
[01:14:28]    let mut _34: (u32, u32);
[01:14:28]    let mut _35: (u32, u32);
[01:14:28]    let mut _36: (u32, u32);
[01:14:28]    let mut _37: (u32, u32);
[01:14:28]    let mut _38: (u32, u32);
[01:14:28]    let mut _39: (u32, u32);
[01:14:28]    let mut _40: (u32, u32);
[01:14:28]    let mut _41: (u32, u32);
[01:14:28]    let mut _42: (u32, u32);
[01:14:28]    let mut _43: (u32, u32);
[01:14:28]    let mut _44: (u32, u32);
[01:14:28]    let mut _45: (u32, u32);
[01:14:28]    let mut _46: (u32, u32);
[01:14:28]    let mut _47: (u32, u32);
[01:14:28]    let mut _48: (u32, u32);
[01:14:28]    bb0: {
[01:14:28]        StorageLive(_1);
[01:14:28]        StorageLive(_2);
[01:14:28]        StorageLive(_3);
[01:14:28]        StorageLive(_4);
[01:14:28]        StorageLive(_5);
[01:14:28]        StorageLive(_6);
[01:14:28]        StorageLive(_7);
[01:14:28]        _7 = (const 0u32, const 1u32);
[01:14:28]        StorageLive(_8);
[01:14:28]        _8 = (const 0u32, const 2u32);
[01:14:28]        StorageLive(_9);
[01:14:28]        _9 = (const 0u32, const 3u32);
[01:14:28]        StorageLive(_10);
[01:14:28]        _10 = (const 0u32, const 1u32);
[01:14:28]        StorageLive(_11);
[01:14:28]        _11 = (const 0u32, const 2u32);
[01:14:28]        StorageLive(_12);
[01:14:28]        _12 = (const 0u32, const 3u32);
[01:14:28]        StorageLive(_13);
[01:14:28]        _13 = (const 0u32, const 1u32);
[01:14:28]        StorageLive(_14);
[01:14:28]        _14 = (const 0u32, const 2u32);
[01:14:28]        StorageLive(_15);
[01:14:28]        _15 = (const 0u32, const 3u32);
[01:14:28]        StorageLive(_16);
[01:14:28]        _16 = (const 0u32, const 1u32);
[01:14:28]        StorageLive(_17);
[01:14:28]        _17 = (const 0u32, const 2u32);
[01:14:28]        StorageLive(_18);
[01:14:28]        _18 = (const 0u32, const 3u32);
[01:14:28]        StorageLive(_19);
[01:14:28]        _19 = (const 0u32, const 1u32);
[01:14:28]        StorageLive(_20);
[01:14:28]        _20 = (const 0u32, const 2u32);
[01:14:28]        StorageLive(_21);
[01:14:28]        _21 = (const 0u32, const 3u32);
[01:14:28]        StorageLive(_22);
[01:14:28]        _22 = (const 0u32, const 1u32);
[01:14:28]        StorageLive(_23);
[01:14:28]        _23 = (const 0u32, const 2u32);
[01:14:28]        StorageLive(_24);
[01:14:28]        _24 = (const 0u32, const 3u32);
[01:14:28]        StorageLive(_25);
[01:14:28]        _25 = (const 0u32, const 1u32);
[01:14:28]        StorageLive(_26);
[01:14:28]        _26 = (const 0u32, const 2u32);
[01:14:28]        StorageLive(_27);
[01:14:28]        _27 = (const 0u32, const 3u32);
[01:14:28]        StorageLive(_28);
[01:14:28]        _28 = (const 0u32, const 1u32);
[01:14:28]        StorageLive(_29);
[01:14:28]        _29 = (const 0u32, const 2u32);
[01:14:28]        StorageLive(_30);
[01:14:28]        _30 = (const 0u32, const 3u32);
[01:14:28]        StorageLive(_31);
[01:14:28]        _31 = (const 0u32, const 1u32);
[01:14:28]        StorageLive(_32);
[01:14:28]        _32 = (const 0u32, const 2u32);
[01:14:28]        StorageLive(_33);
[01:14:28]        _33 = (const 0u32, const 3u32);
[01:14:28]        StorageLive(_34);
[01:14:28]        _34 = (const 0u32, const 1u32);
[01:14:28]        StorageLive(_35);
[01:14:28]        _35 = (const 0u32, const 2u32);
[01:14:28]        StorageLive(_36);
[01:14:28]        _36 = (const 0u32, const 3u32);
[01:14:28]        StorageLive(_37);
[01:14:28]        _37 = (const 0u32, const 1u32);
[01:14:28]        StorageLive(_38);
[01:14:28]        _38 = (const 0u32, const 2u32);
[01:14:28]        StorageLive(_39);
[01:14:28]        _39 = (const 0u32, const 3u32);
[01:14:28]        StorageLive(_40);
[01:14:28]        _40 = (const 0u32, const 1u32);
[01:14:28]        StorageLive(_41);
[01:14:28]        _41 = (const 0u32, const 2u32);
[01:14:28]        StorageLive(_42);
[01:14:28]        _42 = (const 0u32, const 3u32);
[01:14:28]        StorageLive(_43);
[01:14:28]        _43 = (const 0u32, const 1u32);
[01:14:28]        StorageLive(_44);
[01:14:28]        _44 = (const 0u32, const 2u32);
[01:14:28]        StorageLive(_45);
[01:14:28]        _45 = (const 0u32, const 3u32);
[01:14:28]        StorageLive(_46);
[01:14:28]        _46 = (const 0u32, const 1u32);
[01:14:28]        StorageLive(_47);
[01:14:28]        _47 = (const 0u32, const 2u32);
[01:14:28]        StorageLive(_48);
[01:14:28]        _48 = (const 0u32, const 3u32);
[01:14:28]        _6 = [move _7, move _8, move _9, move _10, move _11, move _12, move _13, move _14, move _15, move _16, move _17, move _18, move _19, move _20, move _21, move _22, move _23, move _24, move _25, move _26, move _27, move _28, move _29, move _30, move _31, move _32, move _33, move _34, move _35, move _36, move _37, move _38, move _39, move _40, move _41, move _42, move _43, move _44, move _45, move _46, move _47, move _48];
[01:14:28]        _5 = &_6;
[01:14:28]        _4 = &(*_5);
[01:14:28]        _3 = move _4 as &'static [(u32, u32)] (Unsize);
[01:14:28]        _2 = Foo { tup: const "hi", data: move _3 };
[01:14:28]        _1 = &_2;
[01:14:28]        _0 = &(*_1);
[01:14:28]        StorageDead(_1);
[01:14:28]        StorageDead(_5);
[01:14:28]        return;
[01:14:28] Actual:
[01:14:28] Actual:
[01:14:28] static  XXX: &'static Foo = {
[01:14:28]     let mut _0: &'static Foo;
[01:14:28]     let mut _1: &'static Foo;
[01:14:28]     let _2: Foo;
[01:14:28]     let mut _3: &'static [(u32, u32)];
[01:14:28]     let mut _4: &'static [(u32, u32); 42];
[01:14:28]     let mut _5: &'static [(u32, u32); 42];
[01:14:28]     let _6: [(u32, u32); 42];
[01:14:28]     let mut _7: (u32, u32);
[01:14:28]     let mut _8: (u32, u32);
[01:14:28]     let mut _9: (u32, u32);
[01:14:28]     let mut _10: (u32, u32);
[01:14:28]     let mut _11: (u32, u32);
[01:14:28]     let mut _12: (u32, u32);
[01:14:28]     let mut _13: (u32, u32);
[01:14:28]     let mut _14: (u32, u32);
[01:14:28]     let mut _15: (u32, u32);
[01:14:28]     let mut _16: (u32, u32);
[01:14:28]     let mut _17: (u32, u32);
[01:14:28]     let mut _18: (u32, u32);
[01:14:28]     let mut _19: (u32, u32);
[01:14:28]     let mut _20: (u32, u32);
[01:14:28]     let mut _21: (u32, u32);
[01:14:28]     let mut _22: (u32, u32);
[01:14:28]     let mut _23: (u32, u32);
[01:14:28]     let mut _24: (u32, u32);
[01:14:28]     let mut _25: (u32, u32);
[01:14:28]     let mut _26: (u32, u32);
[01:14:28]     let mut _27: (u32, u32);
[01:14:28]     let mut _28: (u32, u32);
[01:14:28]     let mut _29: (u32, u32);
[01:14:28]     let mut _30: (u32, u32);
[01:14:28]     let mut _31: (u32, u32);
[01:14:28]     let mut _32: (u32, u32);
[01:14:28]     let mut _33: (u32, u32);
[01:14:28]     let mut _34: (u32, u32);
[01:14:28]     let mut _35: (u32, u32);
[01:14:28]     let mut _36: (u32, u32);
[01:14:28]     let mut _37: (u32, u32);
[01:14:28]     let mut _38: (u32, u32);
[01:14:28]     let mut _39: (u32, u32);
[01:14:28]     let mut _40: (u32, u32);
[01:14:28]     let mut _41: (u32, u32);
[01:14:28]     let mut _42: (u32, u32);
[01:14:28]     let mut _43: (u32, u32);
[01:14:28]     let mut _44: (u32, u32);
[01:14:28]     let mut _45: (u32, u32);
[01:14:28]     let mut _46: (u32, u32);
[01:14:28]     let mut _47: (u32, u32);
[01:14:28]     let mut _48: (u32, u32);
[01:14:28]     bb0: {
[01:14:28]         StorageLive(_1);
[01:14:28]         StorageLive(_2);
[01:14:28]         StorageLive(_3);
[01:14:28]         StorageLive(_4);
[01:14:28]         StorageLive(_5);
[01:14:28]         StorageLive(_6);
[01:14:28]         StorageLive(_7);
[01:14:28]         _7 = (const 0u32, const 1u32);
[01:14:28]         StorageLive(_8);
[01:14:28]         _8 = (const 0u32, const 2u32);
[01:14:28]         StorageLive(_9);
[01:14:28]         _9 = (const 0u32, const 3u32);
[01:14:28]         StorageLive(_10);
[01:14:28]         _10 = (const 0u32, const 1u32);
[01:14:28]         StorageLive(_11);
[01:14:28]         _11 = (const 0u32, const 2u32);
[01:14:28]         StorageLive(_12);
[01:14:28]         _12 = (const 0u32, const 3u32);
[01:14:28]         StorageLive(_13);
[01:14:28]         _13 = (const 0u32, const 1u32);
[01:14:28]         StorageLive(_14);
[01:14:28]         _14 = (const 0u32, const 2u32);
[01:14:28]         StorageLive(_15);
[01:14:28]         _15 = (const 0u32, const 3u32);
[01:14:28]         StorageLive(_16);
[01:14:28]         _16 = (const 0u32, const 1u32);
[01:14:28]         StorageLive(_17);
[01:14:28]         _17 = (const 0u32, const 2u32);
[01:14:28]         StorageLive(_18);
[01:14:28]         _18 = (const 0u32, const 3u32);
[01:14:28]         StorageLive(_19);
[01:14:28]         _19 = (const 0u32, const 1u32);
[01:14:28]         StorageLive(_20);
[01:14:28]         _20 = (const 0u32, const 2u32);
[01:14:28]         StorageLive(_21);
[01:14:28]         _21 = (const 0u32, const 3u32);
[01:14:28]         StorageLive(_22);
[01:14:28]         _22 = (const 0u32, const 1u32);
[01:14:28]         StorageLive(_23);
[01:14:28]         _23 = (const 0u32, const 2u32);
[01:14:28]         StorageLive(_24);
[01:14:28]         _24 = (const 0u32, const 3u32);
[01:14:28]         StorageLive(_25);
[01:14:28]         _25 = (const 0u32, const 1u32);
[01:14:28]         StorageLive(_26);
[01:14:28]         _26 = (const 0u32, const 2u32);
[01:14:28]         StorageLive(_27);
[01:14:28]         _27 = (const 0u32, const 3u32);
[01:14:28]         StorageLive(_28);
[01:14:28]         _28 = (const 0u32, const 1u32);
[01:14:28]         StorageLive(_29);
[01:14:28]         _29 = (const 0u32, const 2u32);
[01:14:28]         StorageLive(_30);
[01:14:28]         _30 = (const 0u32, const 3u32);
[01:14:28]         StorageLive(_31);
[01:14:28]         _31 = (const 0u32, const 1u32);
[01:14:28]         StorageLive(_32);
[01:14:28]         _32 = (const 0u32, const 2u32);
[01:14:28]         StorageLive(_33);
[01:14:28]         _33 = (const 0u32, const 3u32);
[01:14:28]         StorageLive(_34);
[01:14:28]         _34 = (const 0u32, const 1u32);
[01:14:28]         StorageLive(_35);
[01:14:28]         _35 = (const 0u32, const 2u32);
[01:14:28]         StorageLive(_36);
[01:14:28]         _36 = (const 0u32, const 3u32);
[01:14:28]         StorageLive(_37);
[01:14:28]         _37 = (const 0u32, const 1u32);
[01:14:28]         StorageLive(_38);
[01:14:28]         _38 = (const 0u32, const 2u32);
[01:14:28]         StorageLive(_39);
[01:14:28]         _39 = (const 0u32, const 3u32);
[01:14:28]         StorageLive(_40);
[01:14:28]         _40 = (const 0u32, const 1u32);
[01:14:28]         StorageLive(_41);
[01:14:28]         _41 = (const 0u32, const 2u32);
[01:14:28]         StorageLive(_42);
[01:14:28]         _42 = (const 0u32, const 3u32);
[01:14:28]         StorageLive(_43);
[01:14:28]         _43 = (const 0u32, const 1u32);
[01:14:28]         StorageLive(_44);
[01:14:28]         _44 = (const 0u32, const 2u32);
[01:14:28]         StorageLive(_45);
[01:14:28]         _45 = (const 0u32, const 3u32);
[01:14:28]         StorageLive(_46);
[01:14:28]         _46 = (const 0u32, const 1u32);
[01:14:28]         StorageLive(_47);
[01:14:28]         _47 = (const 0u32, const 2u32);
[01:14:28]         StorageLive(_48);
[01:14:28]         _48 = (const 0u32, const 3u32);
[01:14:28]         _6 = [move _7, move _8, move _9, move _10, move _11, move _12, move _13, move _14, move _15, move _16, move _17, move _18, move _19, move _20, move _21, move _22, move _23, move _24, move _25, move _26, move _27, move _28, move _29, move _30, move _31, move _32, move _33, move _34, move _35, move _36, move _37, move _38, move _39, move _40, move _41, move _42, move _43, move _44, move _45, move _46, move _47, move _48];
[01:14:28]         _5 = &_6;
[01:14:28]         _4 = &(*_5);
[01:14:28]         _3 = move _4 as &'static [(u32, u32)] (Pointer(Unsize));
[01:14:28]         _2 = Foo { tup: const "hi", data: move _3 };
[01:14:28]         _1 = &_2;
[01:14:28]         _0 = &(*_1);
[01:14:28]         StorageDead(_1);
[01:14:28]         StorageDead(_5);
[01:14:28]         return;
[01:14:28]     }
[01:14:28]     bb1 (cleanup): {
[01:14:28]         resume;
[01:14:28] }', src/tools/compiletest/src/runtest.rs:3100:13
[01:14:28] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:14:28] 
[01:14:28] 
[01:14:28] 
[01:14:28] failures:
[01:14:28]     [mir-opt] mir-opt/storage_live_dead_in_statics.rs
[01:14:28] 
[01:14:28] test result: FAILED. 41 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
[01:14:28] 
[01:14:28] 
[01:14:28] 
[01:14:28] 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-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--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" "6.0.0\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:14:28] 
[01:14:28] 
[01:14:28] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:14:28] Build completed unsuccessfully in 0:12:27
[01:14:28] Build completed unsuccessfully in 0:12:27
[01:14:28] Makefile:48: recipe for target 'check' failed
[01:14:28] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:06ccc76b
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Mon Apr 15 16:17:02 UTC 2019

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)

@saleemjaffer
Copy link
Contributor Author

@oli-obk I have done a basic refactor of Adjust and CastKind. How does it look?

src/librustc/ty/structural_impls.rs Outdated Show resolved Hide resolved
src/librustc/ty/structural_impls.rs Outdated Show resolved Hide resolved
src/librustc_mir/hair/cx/expr.rs Outdated Show resolved Hide resolved
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 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.
travis_time:end:01ae947c:start=1555402306683683821,finish=1555402396381995890,duration=89698312069
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
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:12:52] 
[01:12:52] running 42 tests
[01:13:10] ERROR 2019-04-16T09:26:35Z: compiletest::runtest: Some("   bb0: {")
[01:13:10] .......................................F..
[01:13:10] failures:
[01:13:10] 
[01:13:10] ---- [mir-opt] mir-opt/storage_live_dead_in_statics.rs stdout ----
[01:13:10] ---- [mir-opt] mir-opt/storage_live_dead_in_statics.rs stdout ----
[01:13:10] thread '[mir-opt] mir-opt/storage_live_dead_in_statics.rs' panicked at 'Did not find expected line, error: Mismatch in lines
[01:13:10] Current block:    bb0: {
[01:13:10] Actual Line: "        _3 = move _4 as &\'static [(u32, u32)] (Pointer(Unsize));"
[01:13:10] Expected Line: "       _3 = move _4 as &\'static [(u32, u32)] (Unsize);"
[01:13:10] Test Name: rustc.XXX.mir_map.0.mir
[01:13:10] ... (elided)
[01:13:10]    let mut _0: &'static Foo;
[01:13:10]    let mut _1: &'static Foo;
[01:13:10]    let _2: Foo;
[01:13:10]    let _2: Foo;
[01:13:10]    let mut _3: &'static [(u32, u32)];
[01:13:10]    let mut _4: &'static [(u32, u32); 42];
[01:13:10]    let mut _5: &'static [(u32, u32); 42];
[01:13:10]    let _6: [(u32, u32); 42];
[01:13:10]    let mut _7: (u32, u32);
[01:13:10]    let mut _8: (u32, u32);
[01:13:10]    let mut _9: (u32, u32);
[01:13:10]    let mut _10: (u32, u32);
[01:13:10]    let mut _11: (u32, u32);
[01:13:10]    let mut _12: (u32, u32);
[01:13:10]    let mut _13: (u32, u32);
[01:13:10]    let mut _14: (u32, u32);
[01:13:10]    let mut _15: (u32, u32);
[01:13:10]    let mut _16: (u32, u32);
[01:13:10]    let mut _17: (u32, u32);
[01:13:10]    let mut _18: (u32, u32);
[01:13:10]    let mut _19: (u32, u32);
[01:13:10]    let mut _20: (u32, u32);
[01:13:10]    let mut _21: (u32, u32);
[01:13:10]    let mut _22: (u32, u32);
[01:13:10]    let mut _23: (u32, u32);
[01:13:10]    let mut _24: (u32, u32);
[01:13:10]    let mut _25: (u32, u32);
[01:13:10]    let mut _26: (u32, u32);
[01:13:10]    let mut _27: (u32, u32);
[01:13:10]    let mut _28: (u32, u32);
[01:13:10]    let mut _29: (u32, u32);
[01:13:10]    let mut _30: (u32, u32);
[01:13:10]    let mut _31: (u32, u32);
[01:13:10]    let mut _32: (u32, u32);
[01:13:10]    let mut _33: (u32, u32);
[01:13:10]    let mut _34: (u32, u32);
[01:13:10]    let mut _35: (u32, u32);
[01:13:10]    let mut _36: (u32, u32);
[01:13:10]    let mut _37: (u32, u32);
[01:13:10]    let mut _38: (u32, u32);
[01:13:10]    let mut _39: (u32, u32);
[01:13:10]    let mut _40: (u32, u32);
[01:13:10]    let mut _41: (u32, u32);
[01:13:10]    let mut _42: (u32, u32);
[01:13:10]    let mut _43: (u32, u32);
[01:13:10]    let mut _44: (u32, u32);
[01:13:10]    let mut _45: (u32, u32);
[01:13:10]    let mut _46: (u32, u32);
[01:13:10]    let mut _47: (u32, u32);
[01:13:10]    let mut _48: (u32, u32);
[01:13:10]    bb0: {
[01:13:10]        StorageLive(_1);
[01:13:10]        StorageLive(_2);
[01:13:10]        StorageLive(_3);
[01:13:10]        StorageLive(_4);
[01:13:10]        StorageLive(_5);
[01:13:10]        StorageLive(_6);
[01:13:10]        StorageLive(_7);
[01:13:10]        _7 = (const 0u32, const 1u32);
[01:13:10]        StorageLive(_8);
[01:13:10]        _8 = (const 0u32, const 2u32);
[01:13:10]        StorageLive(_9);
[01:13:10]        _9 = (const 0u32, const 3u32);
[01:13:10]        StorageLive(_10);
[01:13:10]        _10 = (const 0u32, const 1u32);
[01:13:10]        StorageLive(_11);
[01:13:10]        _11 = (const 0u32, const 2u32);
[01:13:10]        StorageLive(_12);
[01:13:10]        _12 = (const 0u32, const 3u32);
[01:13:10]        StorageLive(_13);
[01:13:10]        _13 = (const 0u32, const 1u32);
[01:13:10]        StorageLive(_14);
[01:13:10]        _14 = (const 0u32, const 2u32);
[01:13:10]        StorageLive(_15);
[01:13:10]        _15 = (const 0u32, const 3u32);
[01:13:10]        StorageLive(_16);
[01:13:10]        _16 = (const 0u32, const 1u32);
[01:13:10]        StorageLive(_17);
[01:13:10]        _17 = (const 0u32, const 2u32);
[01:13:10]        StorageLive(_18);
[01:13:10]        _18 = (const 0u32, const 3u32);
[01:13:10]        StorageLive(_19);
[01:13:10]        _19 = (const 0u32, const 1u32);
[01:13:10]        StorageLive(_20);
[01:13:10]        _20 = (const 0u32, const 2u32);
[01:13:10]        StorageLive(_21);
[01:13:10]        _21 = (const 0u32, const 3u32);
[01:13:10]        StorageLive(_22);
[01:13:10]        _22 = (const 0u32, const 1u32);
[01:13:10]        StorageLive(_23);
[01:13:10]        _23 = (const 0u32, const 2u32);
[01:13:10]        StorageLive(_24);
[01:13:10]        _24 = (const 0u32, const 3u32);
[01:13:10]        StorageLive(_25);
[01:13:10]        _25 = (const 0u32, const 1u32);
[01:13:10]        StorageLive(_26);
[01:13:10]        _26 = (const 0u32, const 2u32);
[01:13:10]        StorageLive(_27);
[01:13:10]        _27 = (const 0u32, const 3u32);
[01:13:10]        StorageLive(_28);
[01:13:10]        _28 = (const 0u32, const 1u32);
[01:13:10]        StorageLive(_29);
[01:13:10]        _29 = (const 0u32, const 2u32);
[01:13:10]        StorageLive(_30);
[01:13:10]        _30 = (const 0u32, const 3u32);
[01:13:10]        StorageLive(_31);
[01:13:10]        _31 = (const 0u32, const 1u32);
[01:13:10]        StorageLive(_32);
[01:13:10]        _32 = (const 0u32, const 2u32);
[01:13:10]        StorageLive(_33);
[01:13:10]        _33 = (const 0u32, const 3u32);
[01:13:10]        StorageLive(_34);
[01:13:10]        _34 = (const 0u32, const 1u32);
[01:13:10]        StorageLive(_35);
[01:13:10]        _35 = (const 0u32, const 2u32);
[01:13:10]        StorageLive(_36);
[01:13:10]        _36 = (const 0u32, const 3u32);
[01:13:10]        StorageLive(_37);
[01:13:10]        _37 = (const 0u32, const 1u32);
[01:13:10]        StorageLive(_38);
[01:13:10]        _38 = (const 0u32, const 2u32);
[01:13:10]        StorageLive(_39);
[01:13:10]        _39 = (const 0u32, const 3u32);
[01:13:10]        StorageLive(_40);
[01:13:10]        _40 = (const 0u32, const 1u32);
[01:13:10]        StorageLive(_41);
[01:13:10]        _41 = (const 0u32, const 2u32);
[01:13:10]        StorageLive(_42);
[01:13:10]        _42 = (const 0u32, const 3u32);
[01:13:10]        StorageLive(_43);
[01:13:10]        _43 = (const 0u32, const 1u32);
[01:13:10]        StorageLive(_44);
[01:13:10]        _44 = (const 0u32, const 2u32);
[01:13:10]        StorageLive(_45);
[01:13:10]        _45 = (const 0u32, const 3u32);
[01:13:10]        StorageLive(_46);
[01:13:10]        _46 = (const 0u32, const 1u32);
[01:13:10]        StorageLive(_47);
[01:13:10]        _47 = (const 0u32, const 2u32);
[01:13:10]        StorageLive(_48);
[01:13:10]        _48 = (const 0u32, const 3u32);
[01:13:10]        _6 = [move _7, move _8, move _9, move _10, move _11, move _12, move _13, move _14, move _15, move _16, move _17, move _18, move _19, move _20, move _21, move _22, move _23, move _24, move _25, move _26, move _27, move _28, move _29, move _30, move _31, move _32, move _33, move _34, move _35, move _36, move _37, move _38, move _39, move _40, move _41, move _42, move _43, move _44, move _45, move _46, move _47, move _48];
[01:13:10]        _5 = &_6;
[01:13:10]        _4 = &(*_5);
[01:13:10]        _3 = move _4 as &'static [(u32, u32)] (Unsize);
[01:13:10]        _2 = Foo { tup: const "hi", data: move _3 };
[01:13:10]        _1 = &_2;
[01:13:10]        _0 = &(*_1);
[01:13:10]        StorageDead(_1);
[01:13:10]        StorageDead(_5);
[01:13:10]        return;
[01:13:10] Actual:
[01:13:10] Actual:
[01:13:10] static  XXX: &'static Foo = {
[01:13:10]     let mut _0: &'static Foo;
[01:13:10]     let mut _1: &'static Foo;
[01:13:10]     let _2: Foo;
[01:13:10]     let mut _3: &'static [(u32, u32)];
[01:13:10]     let mut _4: &'static [(u32, u32); 42];
[01:13:10]     let mut _5: &'static [(u32, u32); 42];
[01:13:10]     let _6: [(u32, u32); 42];
[01:13:10]     let mut _7: (u32, u32);
[01:13:10]     let mut _8: (u32, u32);
[01:13:10]     let mut _9: (u32, u32);
[01:13:10]     let mut _10: (u32, u32);
[01:13:10]     let mut _11: (u32, u32);
[01:13:10]     let mut _12: (u32, u32);
[01:13:10]     let mut _13: (u32, u32);
[01:13:10]     let mut _14: (u32, u32);
[01:13:10]     let mut _15: (u32, u32);
[01:13:10]     let mut _16: (u32, u32);
[01:13:10]     let mut _17: (u32, u32);
[01:13:10]     let mut _18: (u32, u32);
[01:13:10]     let mut _19: (u32, u32);
[01:13:10]     let mut _20: (u32, u32);
[01:13:10]     let mut _21: (u32, u32);
[01:13:10]     let mut _22: (u32, u32);
[01:13:10]     let mut _23: (u32, u32);
[01:13:10]     let mut _24: (u32, u32);
[01:13:10]     let mut _25: (u32, u32);
[01:13:10]     let mut _26: (u32, u32);
[01:13:10]     let mut _27: (u32, u32);
[01:13:10]     let mut _28: (u32, u32);
[01:13:10]     let mut _29: (u32, u32);
[01:13:10]     let mut _30: (u32, u32);
[01:13:10]     let mut _31: (u32, u32);
[01:13:10]     let mut _32: (u32, u32);
[01:13:10]     let mut _33: (u32, u32);
[01:13:10]     let mut _34: (u32, u32);
[01:13:10]     let mut _35: (u32, u32);
[01:13:10]     let mut _36: (u32, u32);
[01:13:10]     let mut _37: (u32, u32);
[01:13:10]     let mut _38: (u32, u32);
[01:13:10]     let mut _39: (u32, u32);
[01:13:10]     let mut _40: (u32, u32);
[01:13:10]     let mut _41: (u32, u32);
[01:13:10]     let mut _42: (u32, u32);
[01:13:10]     let mut _43: (u32, u32);
[01:13:10]     let mut _44: (u32, u32);
[01:13:10]     let mut _45: (u32, u32);
[01:13:10]     let mut _46: (u32, u32);
[01:13:10]     let mut _47: (u32, u32);
[01:13:10]     let mut _48: (u32, u32);
[01:13:10]     bb0: {
[01:13:10]         StorageLive(_1);
[01:13:10]         StorageLive(_2);
[01:13:10]         StorageLive(_3);
[01:13:10]         StorageLive(_4);
[01:13:10]         StorageLive(_5);
[01:13:10]         StorageLive(_6);
[01:13:10]         StorageLive(_7);
[01:13:10]         _7 = (const 0u32, const 1u32);
[01:13:10]         StorageLive(_8);
[01:13:10]         _8 = (const 0u32, const 2u32);
[01:13:10]         StorageLive(_9);
[01:13:10]         _9 = (const 0u32, const 3u32);
[01:13:10]         StorageLive(_10);
[01:13:10]         _10 = (const 0u32, const 1u32);
[01:13:10]         StorageLive(_11);
[01:13:10]         _11 = (const 0u32, const 2u32);
[01:13:10]         StorageLive(_12);
[01:13:10]         _12 = (const 0u32, const 3u32);
[01:13:10]         StorageLive(_13);
[01:13:10]         _13 = (const 0u32, const 1u32);
[01:13:10]         StorageLive(_14);
[01:13:10]         _14 = (const 0u32, const 2u32);
[01:13:10]         StorageLive(_15);
[01:13:10]         _15 = (const 0u32, const 3u32);
[01:13:10]         StorageLive(_16);
[01:13:10]         _16 = (const 0u32, const 1u32);
[01:13:10]         StorageLive(_17);
[01:13:10]         _17 = (const 0u32, const 2u32);
[01:13:10]         StorageLive(_18);
[01:13:10]         _18 = (const 0u32, const 3u32);
[01:13:10]         StorageLive(_19);
[01:13:10]         _19 = (const 0u32, const 1u32);
[01:13:10]         StorageLive(_20);
[01:13:10]         _20 = (const 0u32, const 2u32);
[01:13:10]         StorageLive(_21);
[01:13:10]         _21 = (const 0u32, const 3u32);
[01:13:10]         StorageLive(_22);
[01:13:10]         _22 = (const 0u32, const 1u32);
[01:13:10]         StorageLive(_23);
[01:13:10]         _23 = (const 0u32, const 2u32);
[01:13:10]         StorageLive(_24);
[01:13:10]         _24 = (const 0u32, const 3u32);
[01:13:10]         StorageLive(_25);
[01:13:10]         _25 = (const 0u32, const 1u32);
[01:13:10]         StorageLive(_26);
[01:13:10]         _26 = (const 0u32, const 2u32);
[01:13:10]         StorageLive(_27);
[01:13:10]         _27 = (const 0u32, const 3u32);
[01:13:10]         StorageLive(_28);
[01:13:10]         _28 = (const 0u32, const 1u32);
[01:13:10]         StorageLive(_29);
[01:13:10]         _29 = (const 0u32, const 2u32);
[01:13:10]         StorageLive(_30);
[01:13:10]         _30 = (const 0u32, const 3u32);
[01:13:10]         StorageLive(_31);
[01:13:10]         _31 = (const 0u32, const 1u32);
[01:13:10]         StorageLive(_32);
[01:13:10]         _32 = (const 0u32, const 2u32);
[01:13:10]         StorageLive(_33);
[01:13:10]         _33 = (const 0u32, const 3u32);
[01:13:10]         StorageLive(_34);
[01:13:10]         _34 = (const 0u32, const 1u32);
[01:13:10]         StorageLive(_35);
[01:13:10]         _35 = (const 0u32, const 2u32);
[01:13:10]         StorageLive(_36);
[01:13:10]         _36 = (const 0u32, const 3u32);
[01:13:10]         StorageLive(_37);
[01:13:10]         _37 = (const 0u32, const 1u32);
[01:13:10]         StorageLive(_38);
[01:13:10]         _38 = (const 0u32, const 2u32);
[01:13:10]         StorageLive(_39);
[01:13:10]         _39 = (const 0u32, const 3u32);
[01:13:10]         StorageLive(_40);
[01:13:10]         _40 = (const 0u32, const 1u32);
[01:13:10]         StorageLive(_41);
[01:13:10]         _41 = (const 0u32, const 2u32);
[01:13:10]         StorageLive(_42);
[01:13:10]         _42 = (const 0u32, const 3u32);
[01:13:10]         StorageLive(_43);
[01:13:10]         _43 = (const 0u32, const 1u32);
[01:13:10]         StorageLive(_44);
[01:13:10]         _44 = (const 0u32, const 2u32);
[01:13:10]         StorageLive(_45);
[01:13:10]         _45 = (const 0u32, const 3u32);
[01:13:10]         StorageLive(_46);
[01:13:10]         _46 = (const 0u32, const 1u32);
[01:13:10]         StorageLive(_47);
[01:13:10]         _47 = (const 0u32, const 2u32);
[01:13:10]         StorageLive(_48);
[01:13:10]         _48 = (const 0u32, const 3u32);
[01:13:10]         _6 = [move _7, move _8, move _9, move _10, move _11, move _12, move _13, move _14, move _15, move _16, move _17, move _18, move _19, move _20, move _21, move _22, move _23, move _24, move _25, move _26, move _27, move _28, move _29, move _30, move _31, move _32, move _33, move _34, move _35, move _36, move _37, move _38, move _39, move _40, move _41, move _42, move _43, move _44, move _45, move _46, move _47, move _48];
[01:13:10]         _5 = &_6;
[01:13:10]         _4 = &(*_5);
[01:13:10]         _3 = move _4 as &'static [(u32, u32)] (Pointer(Unsize));
[01:13:10]         _2 = Foo { tup: const "hi", data: move _3 };
[01:13:10]         _1 = &_2;
[01:13:10]         _0 = &(*_1);
[01:13:10]         StorageDead(_1);
[01:13:10]         StorageDead(_5);
[01:13:10]         return;
[01:13:10]     }
[01:13:10]     bb1 (cleanup): {
[01:13:10]         resume;
[01:13:10] }', src/tools/compiletest/src/runtest.rs:3100:13
[01:13:10] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:13:10] 
[01:13:10] 
[01:13:10] 
[01:13:10] failures:
[01:13:10]     [mir-opt] mir-opt/storage_live_dead_in_statics.rs
[01:13:10] 
[01:13:10] test result: FAILED. 41 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
[01:13:10] 
[01:13:10] 
[01:13:10] 
[01:13:10] 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-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--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" "6.0.0\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:13:10] 
[01:13:10] 
[01:13:10] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:13:10] Build completed unsuccessfully in 0:11:09
[01:13:10] Build completed unsuccessfully in 0:11:09
[01:13:10] make: *** [check] Error 1
[01:13:10] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:00837030
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue Apr 16 09:26:36 UTC 2019
---
travis_time:end:01e8d202:start=1555406798324812584,finish=1555406798329222534,duration=4409950
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0919e200
$ 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:25a343c5
travis_time:start:25a343c5
$ 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:2878254f
$ 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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 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.
travis_time:end:0518bc26:start=1555416613404930173,finish=1555416718221370435,duration=104816440262
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
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:12:48] 
[01:12:48] running 42 tests
[01:13:15] ERROR 2019-04-16T13:25:23Z: compiletest::runtest: Some("   bb0: {")
[01:13:19] .......................................F..
[01:13:19] failures:
[01:13:19] 
[01:13:19] ---- [mir-opt] mir-opt/storage_live_dead_in_statics.rs stdout ----
[01:13:19] ---- [mir-opt] mir-opt/storage_live_dead_in_statics.rs stdout ----
[01:13:19] thread '[mir-opt] mir-opt/storage_live_dead_in_statics.rs' panicked at 'Did not find expected line, error: Mismatch in lines
[01:13:19] Current block:    bb0: {
[01:13:19] Actual Line: "        _3 = move _4 as &\'static [(u32, u32)] (Pointer(Unsize));"
[01:13:19] Expected Line: "       _3 = move _4 as &\'static [(u32, u32)] (Unsize);"
[01:13:19] Test Name: rustc.XXX.mir_map.0.mir
[01:13:19] ... (elided)
[01:13:19]    let mut _0: &'static Foo;
[01:13:19]    let mut _1: &'static Foo;
[01:13:19]    let _2: Foo;
[01:13:19]    let _2: Foo;
[01:13:19]    let mut _3: &'static [(u32, u32)];
[01:13:19]    let mut _4: &'static [(u32, u32); 42];
[01:13:19]    let mut _5: &'static [(u32, u32); 42];
[01:13:19]    let _6: [(u32, u32); 42];
[01:13:19]    let mut _7: (u32, u32);
[01:13:19]    let mut _8: (u32, u32);
[01:13:19]    let mut _9: (u32, u32);
[01:13:19]    let mut _10: (u32, u32);
[01:13:19]    let mut _11: (u32, u32);
[01:13:19]    let mut _12: (u32, u32);
[01:13:19]    let mut _13: (u32, u32);
[01:13:19]    let mut _14: (u32, u32);
[01:13:19]    let mut _15: (u32, u32);
[01:13:19]    let mut _16: (u32, u32);
[01:13:19]    let mut _17: (u32, u32);
[01:13:19]    let mut _18: (u32, u32);
[01:13:19]    let mut _19: (u32, u32);
[01:13:19]    let mut _20: (u32, u32);
[01:13:19]    let mut _21: (u32, u32);
[01:13:19]    let mut _22: (u32, u32);
[01:13:19]    let mut _23: (u32, u32);
[01:13:19]    let mut _24: (u32, u32);
[01:13:19]    let mut _25: (u32, u32);
[01:13:19]    let mut _26: (u32, u32);
[01:13:19]    let mut _27: (u32, u32);
[01:13:19]    let mut _28: (u32, u32);
[01:13:19]    let mut _29: (u32, u32);
[01:13:19]    let mut _30: (u32, u32);
[01:13:19]    let mut _31: (u32, u32);
[01:13:19]    let mut _32: (u32, u32);
[01:13:19]    let mut _33: (u32, u32);
[01:13:19]    let mut _34: (u32, u32);
[01:13:19]    let mut _35: (u32, u32);
[01:13:19]    let mut _36: (u32, u32);
[01:13:19]    let mut _37: (u32, u32);
[01:13:19]    let mut _38: (u32, u32);
[01:13:19]    let mut _39: (u32, u32);
[01:13:19]    let mut _40: (u32, u32);
[01:13:19]    let mut _41: (u32, u32);
[01:13:19]    let mut _42: (u32, u32);
[01:13:19]    let mut _43: (u32, u32);
[01:13:19]    let mut _44: (u32, u32);
[01:13:19]    let mut _45: (u32, u32);
[01:13:19]    let mut _46: (u32, u32);
[01:13:19]    let mut _47: (u32, u32);
[01:13:19]    let mut _48: (u32, u32);
[01:13:19]    bb0: {
[01:13:19]        StorageLive(_1);
[01:13:19]        StorageLive(_2);
[01:13:19]        StorageLive(_3);
[01:13:19]        StorageLive(_4);
[01:13:19]        StorageLive(_5);
[01:13:19]        StorageLive(_6);
[01:13:19]        StorageLive(_7);
[01:13:19]        _7 = (const 0u32, const 1u32);
[01:13:19]        StorageLive(_8);
[01:13:19]        _8 = (const 0u32, const 2u32);
[01:13:19]        StorageLive(_9);
[01:13:19]        _9 = (const 0u32, const 3u32);
[01:13:19]        StorageLive(_10);
[01:13:19]        _10 = (const 0u32, const 1u32);
[01:13:19]        StorageLive(_11);
[01:13:19]        _11 = (const 0u32, const 2u32);
[01:13:19]        StorageLive(_12);
[01:13:19]        _12 = (const 0u32, const 3u32);
[01:13:19]        StorageLive(_13);
[01:13:19]        _13 = (const 0u32, const 1u32);
[01:13:19]        StorageLive(_14);
[01:13:19]        _14 = (const 0u32, const 2u32);
[01:13:19]        StorageLive(_15);
[01:13:19]        _15 = (const 0u32, const 3u32);
[01:13:19]        StorageLive(_16);
[01:13:19]        _16 = (const 0u32, const 1u32);
[01:13:19]        StorageLive(_17);
[01:13:19]        _17 = (const 0u32, const 2u32);
[01:13:19]        StorageLive(_18);
[01:13:19]        _18 = (const 0u32, const 3u32);
[01:13:19]        StorageLive(_19);
[01:13:19]        _19 = (const 0u32, const 1u32);
[01:13:19]        StorageLive(_20);
[01:13:19]        _20 = (const 0u32, const 2u32);
[01:13:19]        StorageLive(_21);
[01:13:19]        _21 = (const 0u32, const 3u32);
[01:13:19]        StorageLive(_22);
[01:13:19]        _22 = (const 0u32, const 1u32);
[01:13:19]        StorageLive(_23);
[01:13:19]        _23 = (const 0u32, const 2u32);
[01:13:19]        StorageLive(_24);
[01:13:19]        _24 = (const 0u32, const 3u32);
[01:13:19]        StorageLive(_25);
[01:13:19]        _25 = (const 0u32, const 1u32);
[01:13:19]        StorageLive(_26);
[01:13:19]        _26 = (const 0u32, const 2u32);
[01:13:19]        StorageLive(_27);
[01:13:19]        _27 = (const 0u32, const 3u32);
[01:13:19]        StorageLive(_28);
[01:13:19]        _28 = (const 0u32, const 1u32);
[01:13:19]        StorageLive(_29);
[01:13:19]        _29 = (const 0u32, const 2u32);
[01:13:19]        StorageLive(_30);
[01:13:19]        _30 = (const 0u32, const 3u32);
[01:13:19]        StorageLive(_31);
[01:13:19]        _31 = (const 0u32, const 1u32);
[01:13:19]        StorageLive(_32);
[01:13:19]        _32 = (const 0u32, const 2u32);
[01:13:19]        StorageLive(_33);
[01:13:19]        _33 = (const 0u32, const 3u32);
[01:13:19]        StorageLive(_34);
[01:13:19]        _34 = (const 0u32, const 1u32);
[01:13:19]        StorageLive(_35);
[01:13:19]        _35 = (const 0u32, const 2u32);
[01:13:19]        StorageLive(_36);
[01:13:19]        _36 = (const 0u32, const 3u32);
[01:13:19]        StorageLive(_37);
[01:13:19]        _37 = (const 0u32, const 1u32);
[01:13:19]        StorageLive(_38);
[01:13:19]        _38 = (const 0u32, const 2u32);
[01:13:19]        StorageLive(_39);
[01:13:19]        _39 = (const 0u32, const 3u32);
[01:13:19]        StorageLive(_40);
[01:13:19]        _40 = (const 0u32, const 1u32);
[01:13:19]        StorageLive(_41);
[01:13:19]        _41 = (const 0u32, const 2u32);
[01:13:19]        StorageLive(_42);
[01:13:19]        _42 = (const 0u32, const 3u32);
[01:13:19]        StorageLive(_43);
[01:13:19]        _43 = (const 0u32, const 1u32);
[01:13:19]        StorageLive(_44);
[01:13:19]        _44 = (const 0u32, const 2u32);
[01:13:19]        StorageLive(_45);
[01:13:19]        _45 = (const 0u32, const 3u32);
[01:13:19]        StorageLive(_46);
[01:13:19]        _46 = (const 0u32, const 1u32);
[01:13:19]        StorageLive(_47);
[01:13:19]        _47 = (const 0u32, const 2u32);
[01:13:19]        StorageLive(_48);
[01:13:19]        _48 = (const 0u32, const 3u32);
[01:13:19]        _6 = [move _7, move _8, move _9, move _10, move _11, move _12, move _13, move _14, move _15, move _16, move _17, move _18, move _19, move _20, move _21, move _22, move _23, move _24, move _25, move _26, move _27, move _28, move _29, move _30, move _31, move _32, move _33, move _34, move _35, move _36, move _37, move _38, move _39, move _40, move _41, move _42, move _43, move _44, move _45, move _46, move _47, move _48];
[01:13:19]        _5 = &_6;
[01:13:19]        _4 = &(*_5);
[01:13:19]        _3 = move _4 as &'static [(u32, u32)] (Unsize);
[01:13:19]        _2 = Foo { tup: const "hi", data: move _3 };
[01:13:19]        _1 = &_2;
[01:13:19]        _0 = &(*_1);
[01:13:19]        StorageDead(_1);
[01:13:19]        StorageDead(_5);
[01:13:19]        return;
[01:13:19] Actual:
[01:13:19] Actual:
[01:13:19] static  XXX: &'static Foo = {
[01:13:19]     let mut _0: &'static Foo;
[01:13:19]     let mut _1: &'static Foo;
[01:13:19]     let _2: Foo;
[01:13:19]     let mut _3: &'static [(u32, u32)];
[01:13:19]     let mut _4: &'static [(u32, u32); 42];
[01:13:19]     let mut _5: &'static [(u32, u32); 42];
[01:13:19]     let _6: [(u32, u32); 42];
[01:13:19]     let mut _7: (u32, u32);
[01:13:19]     let mut _8: (u32, u32);
[01:13:19]     let mut _9: (u32, u32);
[01:13:19]     let mut _10: (u32, u32);
[01:13:19]     let mut _11: (u32, u32);
[01:13:19]     let mut _12: (u32, u32);
[01:13:19]     let mut _13: (u32, u32);
[01:13:19]     let mut _14: (u32, u32);
[01:13:19]     let mut _15: (u32, u32);
[01:13:19]     let mut _16: (u32, u32);
[01:13:19]     let mut _17: (u32, u32);
[01:13:19]     let mut _18: (u32, u32);
[01:13:19]     let mut _19: (u32, u32);
[01:13:19]     let mut _20: (u32, u32);
[01:13:19]     let mut _21: (u32, u32);
[01:13:19]     let mut _22: (u32, u32);
[01:13:19]     let mut _23: (u32, u32);
[01:13:19]     let mut _24: (u32, u32);
[01:13:19]     let mut _25: (u32, u32);
[01:13:19]     let mut _26: (u32, u32);
[01:13:19]     let mut _27: (u32, u32);
[01:13:19]     let mut _28: (u32, u32);
[01:13:19]     let mut _29: (u32, u32);
[01:13:19]     let mut _30: (u32, u32);
[01:13:19]     let mut _31: (u32, u32);
[01:13:19]     let mut _32: (u32, u32);
[01:13:19]     let mut _33: (u32, u32);
[01:13:19]     let mut _34: (u32, u32);
[01:13:19]     let mut _35: (u32, u32);
[01:13:19]     let mut _36: (u32, u32);
[01:13:19]     let mut _37: (u32, u32);
[01:13:19]     let mut _38: (u32, u32);
[01:13:19]     let mut _39: (u32, u32);
[01:13:19]     let mut _40: (u32, u32);
[01:13:19]     let mut _41: (u32, u32);
[01:13:19]     let mut _42: (u32, u32);
[01:13:19]     let mut _43: (u32, u32);
[01:13:19]     let mut _44: (u32, u32);
[01:13:19]     let mut _45: (u32, u32);
[01:13:19]     let mut _46: (u32, u32);
[01:13:19]     let mut _47: (u32, u32);
[01:13:19]     let mut _48: (u32, u32);
[01:13:19]     bb0: {
[01:13:19]         StorageLive(_1);
[01:13:19]         StorageLive(_2);
[01:13:19]         StorageLive(_3);
[01:13:19]         StorageLive(_4);
[01:13:19]         StorageLive(_5);
[01:13:19]         StorageLive(_6);
[01:13:19]         StorageLive(_7);
[01:13:19]         _7 = (const 0u32, const 1u32);
[01:13:19]         StorageLive(_8);
[01:13:19]         _8 = (const 0u32, const 2u32);
[01:13:19]         StorageLive(_9);
[01:13:19]         _9 = (const 0u32, const 3u32);
[01:13:19]         StorageLive(_10);
[01:13:19]         _10 = (const 0u32, const 1u32);
[01:13:19]         StorageLive(_11);
[01:13:19]         _11 = (const 0u32, const 2u32);
[01:13:19]         StorageLive(_12);
[01:13:19]         _12 = (const 0u32, const 3u32);
[01:13:19]         StorageLive(_13);
[01:13:19]         _13 = (const 0u32, const 1u32);
[01:13:19]         StorageLive(_14);
[01:13:19]         _14 = (const 0u32, const 2u32);
[01:13:19]         StorageLive(_15);
[01:13:19]         _15 = (const 0u32, const 3u32);
[01:13:19]         StorageLive(_16);
[01:13:19]         _16 = (const 0u32, const 1u32);
[01:13:19]         StorageLive(_17);
[01:13:19]         _17 = (const 0u32, const 2u32);
[01:13:19]         StorageLive(_18);
[01:13:19]         _18 = (const 0u32, const 3u32);
[01:13:19]         StorageLive(_19);
[01:13:19]         _19 = (const 0u32, const 1u32);
[01:13:19]         StorageLive(_20);
[01:13:19]         _20 = (const 0u32, const 2u32);
[01:13:19]         StorageLive(_21);
[01:13:19]         _21 = (const 0u32, const 3u32);
[01:13:19]         StorageLive(_22);
[01:13:19]         _22 = (const 0u32, const 1u32);
[01:13:19]         StorageLive(_23);
[01:13:19]         _23 = (const 0u32, const 2u32);
[01:13:19]         StorageLive(_24);
[01:13:19]         _24 = (const 0u32, const 3u32);
[01:13:19]         StorageLive(_25);
[01:13:19]         _25 = (const 0u32, const 1u32);
[01:13:19]         StorageLive(_26);
[01:13:19]         _26 = (const 0u32, const 2u32);
[01:13:19]         StorageLive(_27);
[01:13:19]         _27 = (const 0u32, const 3u32);
[01:13:19]         StorageLive(_28);
[01:13:19]         _28 = (const 0u32, const 1u32);
[01:13:19]         StorageLive(_29);
[01:13:19]         _29 = (const 0u32, const 2u32);
[01:13:19]         StorageLive(_30);
[01:13:19]         _30 = (const 0u32, const 3u32);
[01:13:19]         StorageLive(_31);
[01:13:19]         _31 = (const 0u32, const 1u32);
[01:13:19]         StorageLive(_32);
[01:13:19]         _32 = (const 0u32, const 2u32);
[01:13:19]         StorageLive(_33);
[01:13:19]         _33 = (const 0u32, const 3u32);
[01:13:19]         StorageLive(_34);
[01:13:19]         _34 = (const 0u32, const 1u32);
[01:13:19]         StorageLive(_35);
[01:13:19]         _35 = (const 0u32, const 2u32);
[01:13:19]         StorageLive(_36);
[01:13:19]         _36 = (const 0u32, const 3u32);
[01:13:19]         StorageLive(_37);
[01:13:19]         _37 = (const 0u32, const 1u32);
[01:13:19]         StorageLive(_38);
[01:13:19]         _38 = (const 0u32, const 2u32);
[01:13:19]         StorageLive(_39);
[01:13:19]         _39 = (const 0u32, const 3u32);
[01:13:19]         StorageLive(_40);
[01:13:19]         _40 = (const 0u32, const 1u32);
[01:13:19]         StorageLive(_41);
[01:13:19]         _41 = (const 0u32, const 2u32);
[01:13:19]         StorageLive(_42);
[01:13:19]         _42 = (const 0u32, const 3u32);
[01:13:19]         StorageLive(_43);
[01:13:19]         _43 = (const 0u32, const 1u32);
[01:13:19]         StorageLive(_44);
[01:13:19]         _44 = (const 0u32, const 2u32);
[01:13:19]         StorageLive(_45);
[01:13:19]         _45 = (const 0u32, const 3u32);
[01:13:19]         StorageLive(_46);
[01:13:19]         _46 = (const 0u32, const 1u32);
[01:13:19]         StorageLive(_47);
[01:13:19]         _47 = (const 0u32, const 2u32);
[01:13:19]         StorageLive(_48);
[01:13:19]         _48 = (const 0u32, const 3u32);
[01:13:19]         _6 = [move _7, move _8, move _9, move _10, move _11, move _12, move _13, move _14, move _15, move _16, move _17, move _18, move _19, move _20, move _21, move _22, move _23, move _24, move _25, move _26, move _27, move _28, move _29, move _30, move _31, move _32, move _33, move _34, move _35, move _36, move _37, move _38, move _39, move _40, move _41, move _42, move _43, move _44, move _45, move _46, move _47, move _48];
[01:13:19]         _5 = &_6;
[01:13:19]         _4 = &(*_5);
[01:13:19]         _3 = move _4 as &'static [(u32, u32)] (Pointer(Unsize));
[01:13:19]         _2 = Foo { tup: const "hi", data: move _3 };
[01:13:19]         _1 = &_2;
[01:13:19]         _0 = &(*_1);
[01:13:19]         StorageDead(_1);
[01:13:19]         StorageDead(_5);
[01:13:19]         return;
[01:13:19]     }
[01:13:19]     bb1 (cleanup): {
[01:13:19]         resume;
[01:13:19] }', src/tools/compiletest/src/runtest.rs:3100:13
[01:13:19] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:13:19] 
[01:13:19] 
[01:13:19] 
[01:13:19] failures:
[01:13:19]     [mir-opt] mir-opt/storage_live_dead_in_statics.rs
[01:13:19] 
[01:13:19] test result: FAILED. 41 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
[01:13:19] 
[01:13:19] 
[01:13:19] 
[01:13: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/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-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--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" "6.0.0\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:13:19] 
[01:13:19] 
[01:13:19] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:13:19] Build completed unsuccessfully in 0:12:12
[01:13:19] Build completed unsuccessfully in 0:12:12
[01:13:19] make: *** [check] Error 1
[01:13:19] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:1b30c6b7
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue Apr 16 13:25:27 UTC 2019
---
travis_time:end:02586c34:start=1555421129971668264,finish=1555421129976716753,duration=5048489
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:01069740
$ 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:06edd1f8
travis_time:start:06edd1f8
$ 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:0940c262
$ 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)

Copy link
Contributor

@oli-obk oli-obk left a comment

Choose a reason for hiding this comment

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

Just a nit, then this is ready to go!

Adjust::Pointer(PointerCast::UnsafeFnPointer) => {
ExprKind::UnsafeFnPointer { source: expr.to_ref() }
Adjust::Pointer(PointerCast::Unsize) => {
if let ExprKind::Block { body } = expr.kind {
Copy link
Contributor

Choose a reason for hiding this comment

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

you lost the comment about looking at the comment on Adjust::Deref

Copy link
Contributor Author

@saleemjaffer saleemjaffer Apr 16, 2019

Choose a reason for hiding this comment

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

// See the above comment for Adjust::Deref

I thought the comment was misplaced. Why do we mention about Adjust::Deref in Adjust::Unsize?

Also, it does not seem like the existing "above comment" spoke about Adjust::Deref.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's about the comment in line 94. This code exists solely to improve diagnostics. Maybe pull it out into a function instead of duplicating the logic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a new function adjust_span for this.

@oli-obk
Copy link
Contributor

oli-obk commented Apr 16, 2019

You also need to update src/tests/mir-opt/storage_live_dead_in_statics.rs to mention Pointer(Unsize) instead of just Unsize

@saleemjaffer
Copy link
Contributor Author

@oli-obk Made the fixes.

@oli-obk
Copy link
Contributor

oli-obk commented Apr 20, 2019

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Apr 20, 2019

📌 Commit a2f8269 has been approved by oli-obk

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 20, 2019
@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 Apr 20, 2019
@bors
Copy link
Contributor

bors commented Apr 20, 2019

⌛ Testing commit a2f8269 with merge 72bc620...

bors added a commit that referenced this pull request Apr 20, 2019
@bors
Copy link
Contributor

bors commented Apr 20, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: oli-obk
Pushing 72bc620 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 20, 2019
@bors bors merged commit a2f8269 into rust-lang:master Apr 20, 2019
@bors bors mentioned this pull request Apr 20, 2019
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 8, 2023
…casts-because-that-sounds-way-to-general-aaaa, r=oli-obk

Rename `adjustment::PointerCast` and variants using it to `PointerCoercion`

It makes it sounds like the `ExprKind` and `Rvalue` are supposed to represent all pointer related casts, when in reality their just used to share a little enum variants. Make it clear there these are only coercions and that people who see this and think "why are so many pointer related casts not in these variants" aren't insane.

This enum was added in rust-lang#59987. I'm not sure whether the variant sharing is actually worth it, but this at least makes it less confusing.

r? oli-obk
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 14, 2023
…casts-because-that-sounds-way-to-general-aaaa, r=oli-obk

Rename `adjustment::PointerCast` and variants using it to `PointerCoercion`

It makes it sounds like the `ExprKind` and `Rvalue` are supposed to represent all pointer related casts, when in reality their just used to share a little enum variants. Make it clear there these are only coercions and that people who see this and think "why are so many pointer related casts not in these variants" aren't insane.

This enum was added in rust-lang#59987. I'm not sure whether the variant sharing is actually worth it, but this at least makes it less confusing.

r? oli-obk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cast and Coercion enums duplicate a lot of structure
7 participants