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

Fixes #31076 #55694

Merged
merged 5 commits into from
Nov 6, 2018
Merged

Fixes #31076 #55694

merged 5 commits into from
Nov 6, 2018

Conversation

jsirs
Copy link
Contributor

@jsirs jsirs commented Nov 5, 2018

No description provided.

Add test for incompleately implemented add trait, see issue rust-lang#31076
self.associated_item can return none, replace unwrap with '?' and bubble up None value instead of panicking
@rust-highfive
Copy link
Collaborator

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

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

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 5, 2018
@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:0e65d0aa:start=1541421750992236331,finish=1541421752119611812,duration=1127375481
$ 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:48:25] .................................................................................................... 2000/4990
[00:48:29] .................................................................................................... 2100/4990
[00:48:33] .................................................................................................... 2200/4990
[00:48:38] .................................................................................................... 2300/4990
[00:48:41] .................F.................................................................................. 2400/4990
[00:48:49] .................................................................................................... 2600/4990
[00:48:53] .................................................................................................... 2700/4990
[00:48:56] .................................................................................................... 2800/4990
[00:48:59] .................................................................................................... 2900/4990
---
[00:50:00] 
[00:50:00] ---- [ui] ui/issues/issue-31076.rs stdout ----
[00:50:00] diff of stderr:
[00:50:00] 
[00:50:00] 1 error[E0369]: binary operation `+` cannot be applied to type `{integer}`
[00:50:00] -   --> $DIR/typeck-issue-31076-correct-trait-impl.rs:13:13
[00:50:00] +   --> $DIR/issue-31076.rs:13:13
[00:50:00] 3    |
[00:50:00] 4 LL |     let x = 5 + 6;
[00:50:00] 
[00:50:00] 
[00:50:00] The actual stderr differed from the expected stderr.
[00:50:00] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-31076/issue-31076.stderr
[00:50:00] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-31076/issue-31076.stderr
[00:50:00] To update references, rerun the tests and pass the `--bless` flag
[00:50:00] To only update this specific test, also pass `--test-args issues/issue-31076.rs`
[00:50:00] error: 1 errors occurred comparing output.
[00:50:00] status: exit code: 1
[00:50:00] status: exit code: 1
[00:50:00] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-31076.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/issues/issue-31076/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/issues/issue-31076/auxiliary" "-A" "unused"
[00:50:00] ------------------------------------------
[00:50:00] 
[00:50:00] ------------------------------------------
[00:50:00] stderr:
[00:50:00] stderr:
[00:50:00] ------------------------------------------
[00:50:00] {"message":"binary operation `+` cannot be applied to type `{integer}`","code":{"code":"E0369","explanation":"\nA binary operation was attempted on a type which doesn't support it.\nErroneous code example:\n\n```compile_fail,E0369\nlet x = 12f32; // error: binary operation `<<` cannot be applied to\n               //        type `f32`\n\nx << 2;\n```\n\nTo fix this error, please check that this type implements this binary\noperation. Example:\n\n```\nlet x = 12u32; // the `u32` type does implement it:\n               // https:more information about this error, try `rustc --explain E0369`.\n"}
[00:50:00] ------------------------------------------
[00:50:00] 
[00:50:00] thread '[ui] ui/issues/issue-31076.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3284:9
[00:50:00] note: Run with `RUST_BACKTRACE=1` for a backtrace.
---
[00:50:00] 
[00:50:00] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:503:22
[00:50:00] 
[00:50:00] 
[00:50:00] 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 " "--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:50:00] 
[00:50:00] 
[00:50:00] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:50:00] Build completed unsuccessfully in 0:03:35
[00:50:00] Build completed unsuccessfully in 0:03:35
[00:50:00] Makefile:58: recipe for target 'check' failed
[00:50:00] make: *** [check] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0680ac32
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:009c126c:start=1541424763861289748,finish=1541424763866311907,duration=5022159
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:2c4d9ab2
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|

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)

add call to tcx.sess.delay_span_bug before returning none to make sure error is presented to user
@oli-obk
Copy link
Contributor

oli-obk commented Nov 5, 2018

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 5, 2018

📌 Commit 3063977 has been approved by oli-obk

@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 Nov 5, 2018
@oli-obk
Copy link
Contributor

oli-obk commented Nov 5, 2018

Thanks!

@jsirs
Copy link
Contributor Author

jsirs commented Nov 5, 2018

Thank you for the time and responsiveness

kennytm added a commit to kennytm/rust that referenced this pull request Nov 6, 2018
bors added a commit that referenced this pull request Nov 6, 2018
Rollup of 11 pull requests

Successful merges:

 - #55490 (resolve: Fix ICE in macro import error recovery)
 - #55597 (std: Enable usage of `thread_local!` through imports)
 - #55601 (Fix tracking issue numbers for some unstable features)
 - #55621 (Add precision for create_dir function)
 - #55644 (ci: Add Dockerfile for dist-powerpcspe-linux)
 - #55664 (Make "all possible cases" help message uniform with existing help messages)
 - #55689 (miri: binary_op_val -> binary_op_imm)
 - #55694 (Fixes #31076)
 - #55696 (NLL Diagnostic Review 3: Missing errors for borrows of union fields)
 - #55700 (Update ui tests with respect to NLL)
 - #55703 (Update `configure --help` (via configure.py) to reflect decoupling of debug+optimize)
@bors bors merged commit 3063977 into rust-lang:master Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants