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

Note when a mutable trait object is needed #65077

Merged
merged 6 commits into from
Oct 10, 2019

Conversation

estebank
Copy link
Contributor

@estebank estebank commented Oct 4, 2019

Fix #63619, fix #37914. CC #64068.

@rust-highfive
Copy link
Collaborator

r? @eddyb

(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 Oct 4, 2019
@eddyb
Copy link
Member

eddyb commented Oct 4, 2019

r? @nikomatsakis or @Centril

@rust-highfive rust-highfive assigned nikomatsakis and unassigned eddyb Oct 4, 2019
Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

r=me, modulo oli's nit

@rust-highfive

This comment has been minimized.

@estebank estebank force-pushed the mut-trait-expected branch from fdcf9ff to 8549dca Compare October 5, 2019 19:27
@rust-highfive

This comment has been minimized.

@estebank estebank force-pushed the mut-trait-expected branch from 8549dca to 169b040 Compare October 5, 2019 20:59
src/librustc/hir/mod.rs Outdated Show resolved Hide resolved
@estebank
Copy link
Contributor Author

estebank commented Oct 7, 2019

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Oct 7, 2019

📌 Commit 6efcb02 has been approved by nikomatsakis

@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 Oct 7, 2019
Centril added a commit to Centril/rust that referenced this pull request Oct 7, 2019
@bors
Copy link
Contributor

bors commented Oct 9, 2019

⌛ Testing commit 6efcb02 with merge c98595cfa169980a3a01aad1a5359947ae7d5d0f...

@bors
Copy link
Contributor

bors commented Oct 9, 2019

💔 Test failed - checks-azure

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu of your PR failed (pretty log, 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.
2019-10-09T08:54:11.8362428Z failures:
2019-10-09T08:54:11.8370550Z 
2019-10-09T08:54:11.8372261Z ---- [ui] ui/where-clauses/where-for-self-2.rs stdout ----
2019-10-09T08:54:11.8372852Z 
2019-10-09T08:54:11.8373106Z error: Error: expected failure status (Some(1)) but received status Some(101).
2019-10-09T08:54:11.8373789Z status: exit code: 101
2019-10-09T08:54:11.8375439Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/where-clauses/where-for-self-2.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/where-clauses/where-for-self-2" "-Crpath" "-O" "-Cdebuginfo=0" "-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/where-clauses/where-for-self-2/auxiliary" "-A" "unused"
2019-10-09T08:54:11.8376644Z ------------------------------------------
2019-10-09T08:54:11.8376840Z 
2019-10-09T08:54:11.8377256Z ------------------------------------------
2019-10-09T08:54:11.8377641Z stderr:
2019-10-09T08:54:11.8377641Z stderr:
2019-10-09T08:54:11.8378175Z ------------------------------------------
2019-10-09T08:54:11.8378847Z thread 'rustc' panicked at 'assertion failed: !value.has_escaping_bound_vars()', src/librustc/ty/sty.rs:896:9
2019-10-09T08:54:11.8379276Z 
2019-10-09T08:54:11.8379465Z error: internal compiler error: unexpected panic
2019-10-09T08:54:11.8379606Z 
2019-10-09T08:54:11.8379772Z note: the compiler unexpectedly panicked. this is a bug.
2019-10-09T08:54:11.8379772Z note: the compiler unexpectedly panicked. this is a bug.
2019-10-09T08:54:11.8379932Z 
2019-10-09T08:54:11.8380372Z note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
2019-10-09T08:54:11.8380598Z 
2019-10-09T08:54:11.8381652Z note: rustc 1.40.0-dev running on x86_64-unknown-linux-gnu
2019-10-09T08:54:11.8382011Z 
2019-10-09T08:54:11.8382527Z note: compiler flags: -Z threads=1 -Z ui-testing -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0
2019-10-09T08:54:11.8382925Z 
2019-10-09T08:54:11.8383338Z ------------------------------------------
2019-10-09T08:54:11.8383538Z 
2019-10-09T08:54:11.8383704Z 
---
2019-10-09T08:54:11.8390658Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:537:22
2019-10-09T08:54:11.8391688Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-10-09T08:54:11.8405898Z 
2019-10-09T08:54:11.8406310Z 
2019-10-09T08:54:11.8408537Z 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" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/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" "--llvm-version" "9.0.0-rust-1.40.0-dev\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-10-09T08:54:11.8409462Z 
2019-10-09T08:54:11.8409618Z 
2019-10-09T08:54:11.8413758Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-10-09T08:54:11.8414085Z Build completed unsuccessfully in 1:36:57
2019-10-09T08:54:11.8414085Z Build completed unsuccessfully in 1:36:57
2019-10-09T08:54:11.8474476Z == clock drift check ==
2019-10-09T08:54:11.8490521Z   local time: Wed Oct  9 08:54:11 UTC 2019
2019-10-09T08:54:11.9809710Z   network time: Wed, 09 Oct 2019 08:54:11 GMT
2019-10-09T08:54:11.9812071Z == end clock drift check ==
2019-10-09T08:54:12.8084696Z ##[error]Bash exited with code '1'.
2019-10-09T08:54:12.8118748Z ##[section]Starting: Upload CPU usage statistics
2019-10-09T08:54:12.8132635Z ==============================================================================
2019-10-09T08:54:12.8132740Z Task         : Bash
2019-10-09T08:54:12.8132837Z Description  : Run a Bash script on macOS, Linux, or Windows

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 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 Oct 9, 2019
@estebank estebank 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 Oct 9, 2019
@estebank estebank force-pushed the mut-trait-expected branch from 6efcb02 to faf8a2a Compare October 9, 2019 19:17
@estebank
Copy link
Contributor Author

estebank commented Oct 9, 2019

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Oct 9, 2019

📌 Commit faf8a2a has been approved by nikomatsakis

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 9, 2019
@bors
Copy link
Contributor

bors commented Oct 10, 2019

⌛ Testing commit faf8a2a with merge 8ee24f6...

bors added a commit that referenced this pull request Oct 10, 2019
Note when a mutable trait object is needed

Fix #63619, fix #37914. CC #64068.
@bors
Copy link
Contributor

bors commented Oct 10, 2019

☀️ Test successful - checks-azure
Approved by: nikomatsakis
Pushing 8ee24f6 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 10, 2019
@bors bors merged commit faf8a2a into rust-lang:master Oct 10, 2019
@nnethercote
Copy link
Contributor

This caused a big perf regression, unfortunately. Quite a few benchmarks are affected, with the worst regression being 12%.

(#64939 is also in the commit range, but it's a very simple code clean-up and I just confirmed locally that it's not the cause.)

I suggest backing it out to allow time for investigation.

cc @rust-lang/wg-compiler-performance

@estebank
Copy link
Contributor Author

I am surprised because I thought all the code that I touched here was outside of the "happy path", only triggering if an error is already being emitted, but feel free to rollback this PR (and reopen the original tickets).

@estebank
Copy link
Contributor Author

Actually, I think I see it now. This code should be inside of the if result.illegal_sized_bound {}. I'm sure that the culprit.

Centril added a commit to Centril/rust that referenced this pull request Oct 13, 2019
Move diagnostics code out of the critical path

Follow up to rust-lang#65077.

r? @nnethercote
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.
Projects
None yet
8 participants