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

Check the invariant for principal inside the method #55032

Merged
merged 2 commits into from
Oct 14, 2018

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Oct 13, 2018

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 13, 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.
[00:37:58]    Compiling rustdoc v0.0.0 (/checkout/src/librustdoc)
[00:38:01] error[E0308]: mismatched types
[00:38:01]     --> librustdoc/clean/mod.rs:2635:24
[00:38:01]      |
[00:38:01] 2635 |                 if let Some(principal) = obj.principal() {
[00:38:01]      |                        ^^^^^^^^^^^^^^^ expected struct `rustc::ty::Binder`, found enum `std::option::Option`
[00:38:01]      |
[00:38:01]      = note: expected type `rustc::ty::Binder<rustc::ty::ExistentialTraitRef<'_>>`
[00:38:01] 
4057816 .
1798488 ./obj
1798448 ./obj/build
---
151484 ./obj/build/bootstrap/debug/incremental
151412 ./src/tools/clang
149120 ./src/llvm-emscripten/test
136028 ./obj/build/bootstrap/debug/incremental/bootstrap-3ivyub3ic2113
136024 ./obj/build/bootstrap/debug/incremental/bootstrap-3ivyub3ic2113/s-f5ohiaivx9-11os506-1vqgtfjdeq8xj
120432 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release
118224 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps
111072 ./src/llvm/test/CodeGen
107656 ./obj/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends
---
41756 ./obj/build/x86_64-unknown-linux-gnu/stage0-rustc/rel425887465070062,duration=8750809
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1b3e6d38
$ 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:0ebc5d50
$ 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)

@Mark-Simulacrum
Copy link
Member

This looks reasonable to me, presuming I've understood. To clarify, this is fine because all Dynamic (i.e. trait objects) are currently required to have a principal, right? If so, then r=me once tests are passing

@oli-obk
Copy link
Contributor Author

oli-obk commented Oct 13, 2018

To clarify, this is fine because all Dynamic (i.e. trait objects) are currently required to have a principal, right?

yes, the way you create such objects is by giving them a principal (If I'm reading the code correctly)

Also, like 10% of the code calling principal was unwrapping, all the rest was using if let with varying levels of "do something useful when it is None". The way it is now we'll at least notice if we change this invariant.

@bors r=Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Oct 13, 2018

📌 Commit 585490d has been approved by Mark-Simulacrum

@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 13, 2018
@bors
Copy link
Contributor

bors commented Oct 14, 2018

⌛ Testing commit 585490d with merge 87fceb15a7b91e37fb7c3df06ecda090b6af01bb...

@bors
Copy link
Contributor

bors commented Oct 14, 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 Oct 14, 2018
@rust-highfive
Copy link
Collaborator

The job dist-mipsel-linux 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:02c4898c:start=1539499129794375056,finish=1539499129805258970,duration=10883914
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:1040bef0
$ 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:0934b7a4
travis_time:start:0934b7a4
$ 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:35329d23
$ 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 Oct 14, 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 Oct 14, 2018
@bors
Copy link
Contributor

bors commented Oct 14, 2018

⌛ Testing commit 585490d with merge 14f42a7...

bors added a commit that referenced this pull request Oct 14, 2018
…k-Simulacrum

Check the invariant for `principal` inside the method

r? @Mark-Simulacrum
@bors
Copy link
Contributor

bors commented Oct 14, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: Mark-Simulacrum
Pushing 14f42a7 to master...

@bors bors merged commit 585490d into rust-lang:master Oct 14, 2018
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #55032!

Tested on commit 14f42a7.
Direct link to PR: #55032

💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra).
💔 clippy-driver on linux: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra).
💔 rls on windows: test-pass → build-fail (cc @nrc, @rust-lang/infra).
💔 rls on linux: test-pass → build-fail (cc @nrc, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Oct 14, 2018
Tested on commit rust-lang/rust@14f42a7.
Direct link to PR: <rust-lang/rust#55032>

💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra).
💔 clippy-driver on linux: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra).
💔 rls on windows: test-pass → build-fail (cc @nrc, @rust-lang/infra).
💔 rls on linux: test-pass → build-fail (cc @nrc, @rust-lang/infra).
@oli-obk oli-obk deleted the the_early_unwrap_gets_the_panic branch June 15, 2020 15:29
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.

5 participants