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

enum type instead of variant suggestion unification #56188

Merged
merged 2 commits into from
Dec 24, 2018

Conversation

zackmdavis
Copy link
Member

@zackmdavis zackmdavis commented Nov 23, 2018

Fixes #56028.

Weirdly, we were deciding between a help note and a structured suggestion based on whether the import candidate span was a dummy—but we weren't using that span in any case! The dummy-ness of the span (which appears to be a matter of this-crate vs. other-crate definition) isn't the right criterion by which we should decide whether it's germane to mention that "there is an enum variant"; instead, let's use the someness of def (which is used as the has_unexpected_resolution argument to error_code).

Since import_candidate_to_paths has no other callers, we are free to stop returning the span and rename the function. By using span_suggestions_, we leverage the max-suggestions output limit already built in to the emitter, thus resolving #56028.

In the matter of message wording, "you can" is redundant (and perhaps too informal); prefer the imperative.

In a second commit, we do some unprincipled special-casing to correct and beautify suggestions for Option and Result (where the existing code was being confused by their being reexported in the prelude).

r? @davidtwco

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

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

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

Overall, this looks good to me, a few small nits.

src/librustc_resolve/lib.rs Show resolved Hide resolved
src/librustc_resolve/lib.rs Outdated Show resolved Hide resolved
@zackmdavis
Copy link
Member Author

(tight schedule this week; expect revision and/or reply Saturday the first)

@Dylan-DPC-zz Dylan-DPC-zz 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 Dec 3, 2018
@bors

This comment has been minimized.

@zackmdavis
Copy link
Member Author

expect revision and/or reply Saturday the first

Unfortunately, I fear that my estimates are systemically biased. 😰 Rebased and replied to comments above @davidtwco

@zackmdavis zackmdavis added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 15, 2018
@rust-highfive

This comment has been minimized.

@zackmdavis
Copy link
Member Author

(force-pushed again to cope with trim_left_matches deprecation having hit the beta compiler)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.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:257ea7f7:start=1544910026187639262,finish=1544910027244849955,duration=1057210693
$ 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
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-5.0
---
[00:43:45] .................................................................................................... 500/5177
[00:43:48] ..............................i..................................................................... 600/5177
[00:43:52] .................................................................................................... 700/5177
[00:43:57] .................................................................................................... 800/5177
[00:44:01] .i...............i.................................................................................. 900/5177
[00:44:04] ....................F....iiiii...................................................................... 1000/5177
[00:44:09] .................................................................................................... 1200/5177
[00:44:12] .................................................................................................... 1300/5177
[00:44:14] .................................................................................................... 1400/5177
[00:44:16] .................................................................................................... 1500/5177
---
[00:46:09] ................................i................................................................... 4800/5177
[00:46:12] .................................................................................................... 4900/5177
[00:46:15] .................................................................................................... 5000/5177
[00:46:17] .................................................................................................... 5100/5177
rc/test/ui/did_you_mean/issue-56028-there-is-an-enum-variant.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/did_you_mean/issue-56028-there-is-an-enum-variant/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/did_you_mean/issue-56028-there-is-an-enum-variant/auxiliary" "-A" "unused"
[00:46:19]     Error {
[00:46:19]         line_num: 9,
[00:46:19]         kind: Some(
[00:46:19]             Error
[00:46:19]             Error
[00:46:19]         ),
[00:46:19]         msg: "9:15: 9:18: cannot find type `Set` in this scope [E0412]"
[00:46:19]     Error {
[00:46:19]         line_num: 9,
[00:46:19]         kind: Some(
[00:46:19]             Error
[00:46:19]             Error
[00:46:19]         ),
[00:46:19]         msg: "9:21: 9:24: cannot find value `Set` in this scope [E0425]"
[00:46:19] ]
[00:46:19] 
[00:46:19] thread '[ui] ui/did_you_mean/issue-56028-there-is-an-enum-variant.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1349:13
[00:46:19] note: Run with `RUST_BACKTRACE=1` for a backtrace.
---
[00:46:19] 
[00:46:19] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:503:22
[00:46:19] 
[00:46:19] 
[00:46: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/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-5.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" "5.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"
[00:46:19] 
[00:46:19] 
[00:46:19] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:46:19] Build completed unsuccessfully in 0:03:46
[00:46:19] Build completed unsuccessfully in 0:03:46
[00:46:19] make: *** [check] Error 1
[00:46:19] Makefile:58: recipe for target 'check' failed
124332 ./obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release
118648 ./obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps
115352 ./src/llvm/test/CodeGen
111164 ./obj/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends

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)

@zackmdavis
Copy link
Member Author

(most recent Travis error) Ugh, I don't know how that E0412 changed to a E0425: almost certainly just recent development on master (and really, the E0425 is probably better); can't cope with task-switching now but will cursorily investigate and re-bless soon

@davidtwco
Copy link
Member

davidtwco commented Dec 17, 2018

r=me when Travis is happy.
Update: Added another small nit.

Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

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

One last nit then r=me.

src/librustc_resolve/lib.rs Show resolved Hide resolved
Weirdly, we were deciding between a help note and a structured
suggestion based on whether the import candidate span was a dummy—but
we weren't using that span in any case! The dummy-ness of the span
(which appears to be a matter of this-crate vs. other-crate
definition) isn't the right criterion by which we should decide
whether it's germane to mention that "there is an enum variant";
instead, let's use the someness of `def` (which is used as the
`has_unexpected_resolution` argument to `error_code`).

Since `import_candidate_to_paths` has no other callers, we are free to
stop returning the span and rename the function. By using
`span_suggestions_`, we leverage the max-suggestions output limit
already built in to the emitter, thus resolving rust-lang#56028.

In the matter of message wording, "you can" is redundant (and perhaps
too informal); prefer the imperative.
The present author regrets not thinking of a more eloquent way to do
this.
@zackmdavis
Copy link
Member Author

@davidtwco thanks for reviewing!

@bors r=davidtwco

@bors
Copy link
Contributor

bors commented Dec 23, 2018

📌 Commit 64ad3e2 has been approved by davidtwco

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 23, 2018
@bors
Copy link
Contributor

bors commented Dec 23, 2018

⌛ Testing commit 64ad3e2 with merge ff677d5a829cd4972f7fb9f4fae6cd95a7afef86...

@bors
Copy link
Contributor

bors commented Dec 23, 2018

💔 Test failed - status-travis

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 23, 2018
@rust-highfive
Copy link
Collaborator

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:03:12] + cd ../clang-build
[00:03:12] + INC=/rustroot/include
[00:03:12] + INC=/rustroot/include:/rustroot/lib/gcc/x86_64-unknown-linux-gnu/4.8.5/include-fixed
[00:03:12] + INC=/rustroot/include:/rustroot/lib/gcc/x86_64-unknown-linux-gnu/4.8.5/include-fixed:/usr/include
[00:03:12] + hide_output cmake ../llvm-7.0.0.src -DCMAKE_C_COMPILER=/rustroot/bin/gcc -DCMAKE_CXX_COMPILER=/rustroot/bin/g++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/rustroot -DLLVM_TARGETS_TO_BUILD=X86 -DC_INCLUDE_DIRS=/rustroot/include:/rustroot/lib/gcc/x86_64-unknown-linux-gnu/4.8.5/include-fixed:/usr/include
[00:03:42] Sun Dec 23 05:50:03 UTC 2018 - building ...
[00:03:46] + hide_output make -j10
[00:03:46] + set +x
[00:04:16] Sun Dec 23 05:50:37 UTC 2018 - building ...
---
[01:04:20] ./build-clang.sh: line 70: 15990 Terminated              bash -c "while true; do sleep 30; echo \$(date) - building ...; done"  (wd: /tmp/clang/clang-build)
[01:04:36]  ---> d490a7a83e34
[01:04:36] Removing intermediate container a2046053867a
[01:04:36] Step 26/41 : ENV CC clang CXX clang++
[01:04:36]  ---> [Warning] IPv4 forwarding is disabled. Networking will not work.
[01:04:36]  ---> 071ef22121ac
[01:04:36] Removing intermediate container 42e5d6e94ffe
[01:04:36] Step 27/41 : COPY dist-x86_64-linux/build-git.sh /tmp/
[01:04:36]  ---> 7823ade6bee4
[01:04:36]  ---> 7823ade6bee4
[01:04:36] Step 28/41 : RUN ./build-git.sh
[01:04:36]  ---> [Warning] IPv4 forwarding is disabled. Networking will not work.
[01:04:37] + source shared.sh
[01:04:37] + tar xzf -
[01:04:37] + curl -L https://www.kernel.org/pub/software/scm/git/git-2.10.0.tar.gz
[01:05:17] curl: (6) Couldn't resolve host 'www.kernel.org'
---
[01:05:18] Step 27/41 : COPY dist-x86_64-linux/build-git.sh /tmp/
[01:05:18]  ---> Using cache
[01:05:18]  ---> 7823ade6bee4
[01:05:18] Step 28/41 : RUN ./build-git.sh
[01:05:18]  ---> [Warning] IPv4 forwarding is disabled. Networking will not work.
[01:05:18] + source shared.sh
[01:05:18] + curl -L https://www.kernel.org/pub/software/scm/git/git-2.10.0.tar.gz
[01:05:18] + tar xzf -
[01:05:58] curl: (6) Couldn't resolve host 'www.kernel.org'
---
[01:06:01] Step 27/41 : COPY dist-x86_64-linux/build-git.sh /tmp/
[01:06:01]  ---> Using cache
[01:06:01]  ---> 7823ade6bee4
[01:06:01] Step 28/41 : RUN ./build-git.sh
[01:06:01]  ---> [Warning] IPv4 forwarding is disabled. Networking will not work.
[01:06:01] + source shared.sh
[01:06:01] + curl -L https://www.kernel.org/pub/software/scm/git/git-2.10.0.tar.gz
[01:06:01] + tar xzf -
[01:06:41] curl: (6) Couldn't resolve host 'www.kernel.org'
---
[01:06:44] Step 27/41 : COPY dist-x86_64-linux/build-git.sh /tmp/
[01:06:44]  ---> Using cache
[01:06:44]  ---> 7823ade6bee4
[01:06:44] Step 28/41 : RUN ./build-git.sh
[01:06:45]  ---> [Warning] IPv4 forwarding is disabled. Networking will not work.
[01:06:45] + source shared.sh
[01:06:45] + curl -L https://www.kernel.org/pub/software/scm/git/git-2.10.0.tar.gz
[01:06:45] + tar xzf -
[01:07:25] curl: (6) Couldn't resolve host 'www.kernel.org'
---
[01:07:29] Step 27/41 : COPY dist-x86_64-linux/build-git.sh /tmp/
[01:07:29]  ---> Using cache
[01:07:29]  ---> 7823ade6bee4
[01:07:29] Step 28/41 : RUN ./build-git.sh
[01:07:29]  ---> [Warning] IPv4 forwarding is disabled. Networking will not work.
[01:07:29] + source shared.sh
[01:07:29] + curl -L https://www.kernel.org/pub/software/scm/git/git-2.10.0.tar.gz
[01:07:29] + tar xzf -
[01:08:09] curl: (6) Couldn't resolve host 'www.kernel.org'
---
travis_time:end:25f0dca8:start=1545548071565510232,finish=1545548071573308236,duration=7798004
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:08fe7718
$ 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:01d182ea
travis_time:start:01d182ea
$ 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:1710b4bc
$ 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)

@kennytm
Copy link
Member

kennytm commented Dec 23, 2018

@bors retry travis-ci/travis-ci#9696

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 23, 2018
Centril added a commit to Centril/rust that referenced this pull request Dec 23, 2018
…dtwco

enum type instead of variant suggestion unification

Fixes rust-lang#56028.

Weirdly, we were deciding between a help note and a structured suggestion based on whether the import candidate span was a dummy—but we weren't using that span in any case! The dummy-ness of the span (which appears to be a matter of this-crate vs. other-crate definition) isn't the right criterion by which we should decide whether it's germane to mention that "there is an enum variant"; instead, let's use the someness of `def` (which is used as the `has_unexpected_resolution` argument to `error_code`).

Since `import_candidate_to_paths` has no other callers, we are free to stop returning the span and rename the function. By using `span_suggestions_`, we leverage the max-suggestions output limit already built in to the emitter, thus resolving rust-lang#56028.

In the matter of message wording, "you can" is redundant (and perhaps too informal); prefer the imperative.

In a second commit, we do some unprincipled special-casing to correct and beautify suggestions for `Option` and `Result` (where the existing code was being confused by their being reexported in the prelude).

r? @davidtwco
bors added a commit that referenced this pull request Dec 23, 2018
Rollup of 10 pull requests

Successful merges:

 - #56188 (enum type instead of variant suggestion unification )
 - #56916 (Fix mutable references in `static mut`)
 - #56917 (Simplify MIR generation for logical operations)
 - #56953 (Mark tuple structs as live if their constructors are used)
 - #56964 (Remove `TokenStream::JointTree`.)
 - #56966 (Correct strings for raw pointer deref and array access suggestions)
 - #56999 (AST/HIR: Introduce `ExprKind::Err` for better error recovery in the front-end)
 - #57020 (Point to cause of `fn` expected return type)
 - #57032 (fix deprecation warnings in liballoc benches)
 - #57053 (Fix alignment for array indexing)

Failed merges:

r? @ghost
Centril added a commit to Centril/rust that referenced this pull request Dec 23, 2018
…dtwco

enum type instead of variant suggestion unification

Fixes rust-lang#56028.

Weirdly, we were deciding between a help note and a structured suggestion based on whether the import candidate span was a dummy—but we weren't using that span in any case! The dummy-ness of the span (which appears to be a matter of this-crate vs. other-crate definition) isn't the right criterion by which we should decide whether it's germane to mention that "there is an enum variant"; instead, let's use the someness of `def` (which is used as the `has_unexpected_resolution` argument to `error_code`).

Since `import_candidate_to_paths` has no other callers, we are free to stop returning the span and rename the function. By using `span_suggestions_`, we leverage the max-suggestions output limit already built in to the emitter, thus resolving rust-lang#56028.

In the matter of message wording, "you can" is redundant (and perhaps too informal); prefer the imperative.

In a second commit, we do some unprincipled special-casing to correct and beautify suggestions for `Option` and `Result` (where the existing code was being confused by their being reexported in the prelude).

r? @davidtwco
Centril added a commit to Centril/rust that referenced this pull request Dec 23, 2018
…dtwco

enum type instead of variant suggestion unification

Fixes rust-lang#56028.

Weirdly, we were deciding between a help note and a structured suggestion based on whether the import candidate span was a dummy—but we weren't using that span in any case! The dummy-ness of the span (which appears to be a matter of this-crate vs. other-crate definition) isn't the right criterion by which we should decide whether it's germane to mention that "there is an enum variant"; instead, let's use the someness of `def` (which is used as the `has_unexpected_resolution` argument to `error_code`).

Since `import_candidate_to_paths` has no other callers, we are free to stop returning the span and rename the function. By using `span_suggestions_`, we leverage the max-suggestions output limit already built in to the emitter, thus resolving rust-lang#56028.

In the matter of message wording, "you can" is redundant (and perhaps too informal); prefer the imperative.

In a second commit, we do some unprincipled special-casing to correct and beautify suggestions for `Option` and `Result` (where the existing code was being confused by their being reexported in the prelude).

r? @davidtwco
@bors
Copy link
Contributor

bors commented Dec 24, 2018

⌛ Testing commit 64ad3e2 with merge 7af2108c65678702fff2a9646b999d1a3e7afa21...

@bors
Copy link
Contributor

bors commented Dec 24, 2018

💔 Test failed - status-travis

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 24, 2018
@rust-highfive
Copy link
Collaborator

The job dist-various-1 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[01:06:30] CC_armebv7r_none_eabi=arm-none-eabi-gcc
[01:06:30] S=/checkout
[01:06:30] _=/bin/sh
[01:06:30] TOOLSTATE_REPO_ACCESS_TOKEN=[secure]
[01:06:30] TRAVIS=true
[01:06:30] RUST_RELEASE_CHANNEL=nightly
[01:06:30] RUN_MAKE_TARGETS=thumbv6m-none-eabi,thumbv7m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf
[01:06:30] RUSTC=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc
[01:06:30] RUSTC=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc
[01:06:30] RUST_BUILD_STAGE=stage2-thumbv6m-none-eabi
[01:06:30] BOOTSTRAP_PYTHON=/usr/bin/python2.7
[01:06:30] SCRIPT=python2.7 ../x.py test --target thumbv6m-none-eabi,thumbv7m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf src/test/run-make &&       python2.7 ../x.py dist --target asmjs-unknown-emscripten,wasm32-unknown-emscripten,x86_64-rumprun-netbsd,mips-unknown-linux-musl,mipsel-unknown-linux-musl,arm-unknown-linux-musleabi,arm-unknown-linux-musleabihf,armv5te-unknown-linux-gnueabi,armv5te-unknown-linux-musleabi,armv7-unknown-linux-musleabihf,aarch64-unknown-linux-musl,sparc64-unknown-linux-gnu,x86_64-unknown-redox,thumbv6m-none-eabi,thumbv7m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf,riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf,armebv7r-none-eabi,armebv7r-none-eabihf,armv7r-none-eabi,armv7r-none-eabihf
[01:06:30] AR=ar
[01:06:30] TRAVIS_BRANCH=auto
[01:06:30] RUSTC_BOOTSTRAP=1
[01:06:30] HOST_RPATH_DIR=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib
[01:06:30] SCCACHE_BUCKET=rust-lang-ci-sccache2
[01:06:30] PWD=/checkout/obj
[01:06:30] CI_JOB_NAME=dist-various-1
[01:06:30] TARGET_RPATH_DIR=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/thumbv6m-none-eabi/lib
[01:06:30] LD_LIB_PATH_ENVVAR=LD_LIBRARY_PATH
[01:06:30] PYTHON=/usr/bin/python2.7
[01:06:30] HOME=/home/user
[01:06:30] LD_LIBRARY_PATH=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib
[01:06:30] HOSTNAME=46334e55e1b7
[01:06:30] CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc
[01:06:30] SHLVL=2
[01:06:30] CC= 
[01:06:30] BUILD_DIR=/checkout/obj/build
[01:06:30] BUILD_DIR=/checkout/obj/build
[01:06:30] RUST_TEST_TMPDIR=/checkout/obj/build/tmp
[01:06:30] LLVM_CXXFLAGS=
[01:06:30] RUSTFLAGS=--cap-lints=allow
[01:06:30] STAGING_DIR=/tmp
[01:06:30] TMPDIR=/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-cortex-m/thumb-none-cortex-m
[01:06:30] TARGETS=asmjs-unknown-emscripten,wasm32-unknown-emscripten,x86_64-rumprun-netbsd,mips-unknown-linux-musl,mipsel-unknown-linux-musl,arm-unknown-linux-musleabi,arm-unknown-linux-musleabihf,armv5te-unknown-linux-gnueabi,armv5te-unknown-linux-musleabi,armv7-unknown-linux-musleabihf,aarch64-unknown-linux-musl,sparc64-unknown-linux-gnu,x86_64-unknown-redox,thumbv6m-none-eabi,thumbv7m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf,riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf,armebv7r-none-eabi,armebv7r-none-eabihf,armv7r-none-eabi,armv7r-none-eabihf
[01:06:30] RUST_CONFIGURE_ARGS=--musl-root-armv5te=/musl-armv5te       --musl-root-arm=/musl-arm       --musl-root-armhf=/musl-armhf       --musl-root-armv7=/musl-armv7       --musl-root-aarch64=/musl-aarch64       --musl-root-mips=/musl-mips       --musl-root-mipsel=/musl-mipsel       --enable-emscripten       --disable-docs --set build.print-step-timings --enable-verbose-tests --enable-sccache --disable-manage-submodules --enable-locked-deps --enable-cargo-native-static --set rust.codegen-units-std=1 --disable-dist-src --release-channel=nightly --enable-llvm-static-stdcpp --set rust.remap-debuginfo --enable-missing-tools
[01:06:30] MAKEFLAGS=
[01:06:30] MFLAGS=
[01:06:30] BOOTSTRAP_PARENT_ID=1084
[01:06:30] BOOTSTRAP_PARENT_ID=1084
[01:06:30] __COMPAT_LAYER=RunAsInvoker
[01:06:30] CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc
[01:06:30] BUILD=x86_64-unknown-linux-gnu
[01:06:30] CXX= 
[01:06:30] AWS_ACCESS_KEY_ID=[secure]
[01:06:30] CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc
[01:06:30] CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc
[01:06:30] CARGO_HOME=/cargo
[01:06:30] RUSTC_LINKER=arm-none-eabi-gcc
[01:06:30] SCCACHE_REGION=us-west-1
[01:06:30] CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc
[01:06:30] LLVM_COMPONENTS=
[01:06:30] TERM=xterm
[01:06:30] MAKELEVEL=1
[01:06:30] mkdir -p /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-cortex-m/thumb-none-cortex-m
[01:06:30] cd /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-cortex-m/thumb-none-cortex-m && rm -rf cortex-m
[01:06:30] cd /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-cortex-m/thumb-none-cortex-m && bash -x /checkout/src/test/run-make/thumb-none-cortex-m/../git_clone_sha1.sh cortex-m https://github.com/rust-embedded/cortex-m a448e9156e2cb1e556e5441fd65426952ef4b927 
[01:06:30] Makefile:31: recipe for target 'all' failed
[01:06:30] 
[01:06:30] ------------------------------------------
[01:06:30] stderr:
[01:06:30] stderr:
[01:06:30] ------------------------------------------
[01:06:30] + PROJECT_NAME=cortex-m
[01:06:30] + URL=https://github.com/rust-embedded/cortex-m
[01:06:30] + SHA1=a448e9156e2cb1e556e5441fd65426952ef4b927
[01:06:30] + git clone https://github.com/rust-embedded/cortex-m cortex-m
[01:06:30] Cloning into 'cortex-m'...
[01:06:30] fatal: unable to access 'https://github.com/rust-embedded/cortex-m/': Could not resolve host: github.com
[01:06:30] + err_exit
[01:06:30] + echo ERROR:
[01:06:30] + exit 1
[01:06:30] make: *** [all] Error 1
[01:06:30] ------------------------------------------
[01:06:30] 
[01:06:30] thread '[run-make] run-make/thumb-none-cortex-m' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3255:9
[01:06:30] note: Run with `RUST_BACKTRACE=1` for a backtrace.
---
[01:06:30] status: exit code: 2
[01:06:30] command: "make"
[01:06:30] stdout:
[01:06:30] ------------------------------------------
[01:06:30] bash script.sh
[01:06:30] AWS_ACCESS_KEY_ID=[secure]
[01:06:30] AWS_SECRET_ACCESS_KEY=[secure]
[01:06:30] BOOTSTRAP_PARENT_ID=1084
[01:06:30] BOOTSTRAP_PYTHON=/usr/bin/python2.7
[01:06:30] BUILD_DIR=/checkout/obj/build
[01:06:30] CARGO=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo
[01:06:30] CARGO_HOME=/cargo
[01:06:30] CC_armebv7r_none_eabi=arm-none-eabi-gcc
[01:06:30] CC_armebv7r_none_eabi=arm-none-eabi-gcc
[01:06:30] CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc
[01:06:30] CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc
[01:06:30] CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc
[01:06:30] CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc
[01:06:30] CI_JOB_NAME=dist-various-1
[01:06:30] DEPLOY=1
[01:06:30] HERE=/checkout/src/test/run-make/thumb-none-qemu
[01:06:30] HOME=/home/user
[01:06:30] HOSTNAME=46334e55e1b7
[01:06:30] HOST_RPATH_DIR=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib
[01:06:30] LD_LIBRARY_PATH=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib
[01:06:30] LD_LIB_PATH_ENVVAR=LD_LIBRARY_PATH
[01:06:30] LLVM_CXXFLAGS=
[01:06:30] MAKEFLAGS=
[01:06:30] MAKELEVEL=1
[01:06:30] MFLAGS=
[01:06:30] MFLAGS=
[01:06:30] PATH=/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[01:06:30] PWD=/checkout/src/test/run-make/thumb-none-qemu
[01:06:30] PYTHON=/usr/bin/python2.7
[01:06:30] RUN_MAKE_TARGETS=thumbv6m-none-eabi,thumbv7m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf
[01:06:30] RUSTC=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc
[01:06:30] RUST_CONFIGURE_ARGS=--musl-root-armv5te=/musl-armv5te       --musl-root-arm=/musl-arm       --musl-root-armhf=/musl-armhf       --musl-root-armv7=/musl-armv7       --musl-root-aarch64=/musl-aarch64       --musl-root-mips=/musl-mips       --musl-root-mipsel=/musl-mipsel       --enable-emscripten       --disable-docs --set build.print-step-timings --enable-verbose-tests --enable-sccache --disable-manage-submodules --enable-locked-deps --enable-cargo-native-static --set rust.codegen-units-std=1 --disable-dist-src --release-channel=nightly --enable-llvm-static-stdcpp --set rust.remap-debuginfo --enable-missing-tools
[01:06:30] RUST_RELEASE_CHANNEL=nightly
[01:06:30] S=/checkout
[01:06:30] SCCACHE_BUCKET=rust-lang-ci-sccache2
[01:06:30] SCCACHE_REGION=us-west-1
[01:06:30] SCRIPT=python2.7 ../x.py test --target thumbv6m-none-eabi,thumbv7m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf src/test/run-make &&       python2.7 ../x.py dist --target asmjs-unknown-emscripten,wasm32-unknown-emscripten,x86_64-rumprun-netbsd,mips-unknown-linux-musl,mipsel-unknown-linux-musl,arm-unknown-linux-musleabi,arm-unknown-linux-musleabihf,armv5te-unknown-linux-gnueabi,armv5te-unknown-linux-musleabi,armv7-unknown-linux-musleabihf,aarch64-unknown-linux-musl,sparc64-unknown-linux-gnu,x86_64-unknown-redox,thumbv6m-none-eabi,thumbv7m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf,riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf,armebv7r-none-eabi,armebv7r-none-eabihf,armv7r-none-eabi,armv7r-none-eabihf
[01:06:30] SHLVL=3
[01:06:30] SRC=/checkout
[01:06:30] STAGING_DIR=/tmp
[01:06:30] TARGET=thumbv6m-none-eabi
[01:06:30] TARGETS=asmjs-unknown-emscripten,wasm32-unknown-emscripten,x86_64-rumprun-netbsd,mips-unknown-linux-musl,mipsel-unknown-linux-musl,arm-unknown-linux-musleabi,arm-unknown-linux-musleabihf,armv5te-unknown-linux-gnueabi,armv5te-unknown-linux-musleabi,armv7-unknown-linux-musleabihf,aarch64-unknown-linux-musl,sparc64-unknown-linux-gnu,x86_64-unknown-redox,thumbv6m-none-eabi,thumbv7m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf,riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf,armebv7r-none-eabi,armebv7r-none-eabihf,armv7r-none-eabi,armv7r-none-eabihf
[01:06:30] TARGET_RPATH_DIR=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/thumbv6m-none-eabi/lib
[01:06:30] TERM=xterm
[01:06:30] TMPDIR=/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-qemu/thumb-none-qemu
[01:06:30] TRAVIS=true
[01:06:30] TRAVIS_BRANCH=auto
[01:06:30] TRAVIS_BRANCH=auto
[01:06:30] WORK_DIR=/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-qemu/thumb-none-qemu
[01:06:30] _=/usr/bin/env
[01:06:30] __COMPAT_LAYER=RunAsInvoker
[01:06:30] /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-qemu/thumb-none-qemu /checkout/src/test/run-make/thumb-none-qemu
[01:06:30] /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-qemu/thumb-none-qemu/example /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-qemu/thumb-none-qemu /checkout/src/test/run-make/thumb-none-qemu
[01:06:30] Makefile:27: recipe for target 'all' failed
[01:06:30] ------------------------------------------
[01:06:30] stderr:
[01:06:30] ------------------------------------------
[01:06:30] ------------------------------------------
[01:06:30] + CRATE=example
[01:06:30] + env
[01:06:30] + sort
[01:06:30] + mkdir -p /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-qemu/thumb-none-qemu
[01:06:30] + pushd /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-qemu/thumb-none-qemu
[01:06:30] + rm -rf example
[01:06:30] + cp -a /checkout/src/test/run-make/thumb-none-qemu/example .
[01:06:30] + pushd example
[01:06:30] + env RUSTC_BOOTSTRAP=1 'RUSTFLAGS=-C linker=arm-none-eabi-ld -C link-arg=-Tlink.x' /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo run --target thumbv6m-none-eabi
[01:06:30] + grep 'x = 42'
[01:06:30] warning: spurious network error (2 tries remaining): curl error: Could not resolve host: github.com
[01:06:30] ; class=Net (12)
[01:06:30] warning: spurious network error (1 tries remaining): curl error: Could not resolve host: github.com
[01:06:30] ; class=Net (12)
[01:06:30] ; class=Net (12)
[01:06:30] error: failed to load source for a dependency on `cortex-m`
[01:06:30] Caused by:
[01:06:30]   Unable to update registry `https://github.com/rust-lang/crates.io-index`
[01:06:30] 
[01:06:30] Caused by:
[01:06:30] Caused by:
[01:06:30]   failed to fetch `https://github.com/rust-lang/crates.io-index`
[01:06:30] 
[01:06:30] Caused by:
[01:06:30]   curl error: Could not resolve host: github.com
[01:06:30] ; class=Net (12)
[01:06:30] make: *** [all] Error 1
[01:06:30] ------------------------------------------
[01:06:30] 
[01:06:30] thread '[run-make] run-make/thumb-none-qemu' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3255:9
[01:06:30] 
---
[01:06:30] test result: FAILED. 9 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out
[01:06:30] 
[01:06:30] 
[01:06:30] 
[01:06:30] 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/thumbv6m-none-eabi/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/run-make" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make" "--stage-id" "stage2-thumbv6m-none-eabi" "--mode" "run-make" "--target" "thumbv6m-none-eabi" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--linker" "arm-none-eabi-gcc" "--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/thumbv6m-none-eabi/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--llvm-version" "8.0.0svn\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:06:30] 
[01:06:30] 
[01:06:30] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:505:22
[01:06:30] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target thumbv6m-none-eabi,thumbv7m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf src/test/run-make
---
travis_time:end:3075e963:start=1545636310196896645,finish=1545636310204912365,duration=8015720
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:007ce528
$ 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:107aa8f3
travis_time:start:107aa8f3
$ 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:0bb6e701
$ 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)

bors added a commit that referenced this pull request Dec 24, 2018
Rollup of 14 pull requests

Successful merges:

 - #56188 (enum type instead of variant suggestion unification )
 - #56342 (Improve docs for collecting into `Option`s)
 - #56916 (Fix mutable references in `static mut`)
 - #56917 (Simplify MIR generation for logical operations)
 - #56939 (Pin stabilization)
 - #56953 (Mark tuple structs as live if their constructors are used)
 - #56964 (Remove `TokenStream::JointTree`.)
 - #56966 (Correct strings for raw pointer deref and array access suggestions)
 - #57020 (Point to cause of `fn` expected return type)
 - #57032 (fix deprecation warnings in liballoc benches)
 - #57053 (Fix alignment for array indexing)
 - #57062 (Fix a comment)
 - #57067 (Stabilize min_const_unsafe_fn in 1.33)
 - #57078 (Ignore two tests on s390x)

Failed merges:

r? @ghost
@bors bors merged commit 64ad3e2 into rust-lang:master Dec 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants