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

Object safe for dispatch #57545

Open
wants to merge 9 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@bovinebuddha
Copy link

bovinebuddha commented Jan 12, 2019

cc #43561

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 12, 2019

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (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.

@bovinebuddha bovinebuddha force-pushed the bovinebuddha:object_safe_for_dispatch branch from 5c2fd5a to 18a3376 Jan 12, 2019

@bovinebuddha

This comment has been minimized.

Copy link
Author

bovinebuddha commented Jan 12, 2019

@withoutboats PR is up :)

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Jan 12, 2019

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:1282d748:start=1547302837816421733,finish=1547302916289343118,duration=78472921385
$ 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-6.0
---

[00:03:24] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:03:24] tidy error: /checkout/src/librustc_errors/diagnostic.rs:157: line longer than 100 chars
[00:03:25] tidy error: /checkout/src/librustc/ty/wf.rs:384: trailing whitespace
[00:03:25] tidy error: /checkout/src/test/ui/wf/wf-convert-unsafe-trait-obj-box.rs:1: trailing whitespace
[00:03:25] tidy error: /checkout/src/test/ui/wf/wf-convert-unsafe-trait-obj.rs:1: trailing whitespace
[00:03:25] tidy error: /checkout/src/test/ui/rfc-2027-object-safe-for-dispatch/static-dispatch-unsafe-object.rs:29: trailing whitespace
[00:03:26] some tidy checks failed
[00:03:26] 
[00:03:26] 
[00:03:26] 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:26] 
[00:03:26] 
[00:03:26] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:26] Build completed unsuccessfully in 0:00:49
[00:03:26] Build completed unsuccessfully in 0:00:49
[00:03:26] Makefile:69: recipe for target 'tidy' failed
[00:03:26] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:1e33db06
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sat Jan 12 14:25:33 UTC 2019
---
travis_time:end:03206151:start=1547303134021835351,finish=1547303134027035184,duration=5199833
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:007dadb1
$ 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:05200d64
travis_time:start:05200d64
$ 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:14069ac0
$ 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)

@bovinebuddha bovinebuddha force-pushed the bovinebuddha:object_safe_for_dispatch branch from 18a3376 to 90718ea Jan 12, 2019

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 15, 2019

☔️ The latest upstream changes (presumably #57630) made this pull request unmergeable. Please resolve the merge conflicts.

@bovinebuddha bovinebuddha force-pushed the bovinebuddha:object_safe_for_dispatch branch from 90718ea to c516035 Jan 15, 2019

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jan 24, 2019

@bovinebuddha I'm sorry for not getting back to you in all this time! It's been a very busy couple of weeks. I've added it to my calendar to review on Monday Jan 28, so hopefully that will help.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 26, 2019

☔️ The latest upstream changes (presumably #55641) made this pull request unmergeable. Please resolve the merge conflicts.

@bovinebuddha

This comment has been minimized.

Copy link
Author

bovinebuddha commented Jan 27, 2019

@nikomatsakis It's alright, I get gather you've got quite a full schedule. Just excited that its finally getting reviewed.

@bovinebuddha bovinebuddha force-pushed the bovinebuddha:object_safe_for_dispatch branch from c516035 to 667042e Jan 27, 2019

@nikomatsakis
Copy link
Contributor

nikomatsakis left a comment

OK, I did a first pass. The code seems very nice.

I left myself some notes for next time. I want to come back and re-read the RFC a bit. I also wanted to reconsider some potential interactions with other parts of the trait system.

(I've scheduled a slot in my calendar for this on this coming Friday.)

@@ -555,9 +555,19 @@ impl<'f, 'gcx, 'tcx> Coerce<'f, 'gcx, 'tcx> {
ty::Predicate::Trait(ref tr) if traits.contains(&tr.def_id()) => {

This comment has been minimized.

@nikomatsakis

nikomatsakis Jan 28, 2019

Contributor

Note to self: double check how these traits work, do we always want to apply this test here?

ty::Predicate::ObjectSafe(did)
))
);
let defer_to_coercion =

This comment has been minimized.

@nikomatsakis

nikomatsakis Jan 28, 2019

Contributor

Note to self: think over the interaction of implied bounds here

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 7, 2019

☔️ The latest upstream changes (presumably #57998) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment