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

Enhance `Pin` impl applicability for `PartialEq` and `PartialOrd`. #57685

Merged
merged 2 commits into from Jan 18, 2019

Conversation

Projects
None yet
6 participants
@pthariensflame
Copy link
Contributor

pthariensflame commented Jan 17, 2019

This allows for comparing for equality or ordering a Pin<P> and a Pin<Q> as long as P and Q are correspondingly comparable themselves even when P and Q are different types.
An example might be comparing a Pin<&mut OsString> to a Pin<&mut PathBuf>, which might arise from pin projections from a pair of larger contexts that aren't Unpin.

@rust-highfive

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Jan 17, 2019

r? @kennytm

(rust_highfive has picked a reviewer for you, use r? to override)

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Jan 17, 2019

@withoutboats

This comment has been minimized.

Copy link
Contributor

withoutboats commented Jan 17, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 17, 2019

📌 Commit 22251a8 has been approved by withoutboats

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Jan 17, 2019

@bors rollup

Centril added a commit to Centril/rust that referenced this pull request Jan 17, 2019

Rollup merge of rust-lang#57685 - pthariensflame:enhancement/pin-impl…
…-applicability, r=withoutboats

Enhance `Pin` impl applicability for `PartialEq` and `PartialOrd`.

This allows for comparing for equality or ordering a `Pin<P>` and a `Pin<Q>` as long as `P` and `Q` are correspondingly comparable themselves *even when `P` and `Q` are different types*.
An example might be comparing a `Pin<&mut OsString>` to a `Pin<&mut PathBuf>`, which might arise from pin projections from a pair of larger contexts that aren't `Unpin`.
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 17, 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:0066eee4:start=1547692080936907462,finish=1547692082378653094,duration=1441745632
$ 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:32] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:03:32] tidy error: /checkout/src/libcore/pin.rs:132: trailing whitespace
[00:03:32] tidy error: /checkout/src/libcore/pin.rs:147: trailing whitespace
[00:03:34] some tidy checks failed
[00:03:34] 
[00:03:34] 
[00:03:34] 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:34] 
[00:03:34] 
[00:03:34] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:03:34] Build completed unsuccessfully in 0:00:47
[00:03:34] Build completed unsuccessfully in 0:00:47
[00:03:34] Makefile:69: recipe for target 'tidy' failed
[00:03:34] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:094e3674
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Thu Jan 17 02:31:48 UTC 2019
---
travis_time:end:2155442a:start=1547692308763340948,finish=1547692308767892582,duration=4551634
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:021f97ac
$ 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:036b24ff
travis_time:start:036b24ff
$ 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:1012a880
$ 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)

where
P: PartialEq<Q>,
{

This comment has been minimized.

@Centril

Centril Jan 17, 2019

Contributor

remove this line

where
P: PartialOrd<Q>,
{

This comment has been minimized.

@Centril

Centril Jan 17, 2019

Contributor

and here too.

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Jan 17, 2019

@bors r-

tidy errors

@pthariensflame

This comment has been minimized.

Copy link
Contributor Author

pthariensflame commented Jan 17, 2019

@Centril Fixed! Sorry about that; I can't run tidy on my local machine for some reason.

@Centril

This comment has been minimized.

Copy link
Contributor

Centril commented Jan 17, 2019

@bors r=withoutboats rollup

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 17, 2019

📌 Commit fefe1da has been approved by withoutboats

Centril added a commit to Centril/rust that referenced this pull request Jan 18, 2019

Rollup merge of rust-lang#57685 - pthariensflame:enhancement/pin-impl…
…-applicability, r=withoutboats

Enhance `Pin` impl applicability for `PartialEq` and `PartialOrd`.

This allows for comparing for equality or ordering a `Pin<P>` and a `Pin<Q>` as long as `P` and `Q` are correspondingly comparable themselves *even when `P` and `Q` are different types*.
An example might be comparing a `Pin<&mut OsString>` to a `Pin<&mut PathBuf>`, which might arise from pin projections from a pair of larger contexts that aren't `Unpin`.

bors added a commit that referenced this pull request Jan 18, 2019

Auto merge of #57727 - Centril:rollup, r=Centril
Rollup of 22 pull requests

Successful merges:

 - #56594 (Remove confusing comment about ideally using `!` for `c_void`)
 - #57107 (Add a regression test for mutating a non-mut #[thread_local])
 - #57340 (Use correct tracking issue for c_variadic)
 - #57357 (Cleanup PartialEq docs.)
 - #57370 (Support passing cflags/cxxflags/ldflags to LLVM build)
 - #57475 (Add signed num::NonZeroI* types)
 - #57501 (High priority resolutions for associated variants)
 - #57551 (resolve: Add a test for issue #57539)
 - #57610 (Fix nested `?` matchers)
 - #57634 (Remove an unused function argument)
 - #57635 (use structured macro and path resolve suggestions)
 - #57636 (Fix sources sidebar not showing up)
 - #57646 (Fixes text becoming invisible when element targetted)
 - #57649 (privacy: Account for associated existential types)
 - #57650 (librustc_metadata: Pass a default value when unwrapping a span)
 - #57654 (Add some links in std::fs.)
 - #57658 (Two HIR tweaks)
 - #57659 (Fix release manifest generation)
 - #57683 (Document Unpin in std::prelude documentation)
 - #57685 (Enhance `Pin` impl applicability for `PartialEq` and `PartialOrd`.)
 - #57698 (Fix typo bug in DepGraph::try_mark_green().)
 - #57720 (Fix suggestions given mulitple bad lifetimes)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Jan 18, 2019

Rollup merge of rust-lang#57685 - pthariensflame:enhancement/pin-impl…
…-applicability, r=withoutboats

Enhance `Pin` impl applicability for `PartialEq` and `PartialOrd`.

This allows for comparing for equality or ordering a `Pin<P>` and a `Pin<Q>` as long as `P` and `Q` are correspondingly comparable themselves *even when `P` and `Q` are different types*.
An example might be comparing a `Pin<&mut OsString>` to a `Pin<&mut PathBuf>`, which might arise from pin projections from a pair of larger contexts that aren't `Unpin`.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jan 18, 2019

Rollup merge of rust-lang#57685 - pthariensflame:enhancement/pin-impl…
…-applicability, r=withoutboats

Enhance `Pin` impl applicability for `PartialEq` and `PartialOrd`.

This allows for comparing for equality or ordering a `Pin<P>` and a `Pin<Q>` as long as `P` and `Q` are correspondingly comparable themselves *even when `P` and `Q` are different types*.
An example might be comparing a `Pin<&mut OsString>` to a `Pin<&mut PathBuf>`, which might arise from pin projections from a pair of larger contexts that aren't `Unpin`.

bors added a commit that referenced this pull request Jan 18, 2019

Auto merge of #57732 - Centril:rollup, r=Centril
Rollup of 21 pull requests

Successful merges:

 - #56594 (Remove confusing comment about ideally using `!` for `c_void`)
 - #57107 (Add a regression test for mutating a non-mut #[thread_local])
 - #57340 (Use correct tracking issue for c_variadic)
 - #57357 (Cleanup PartialEq docs.)
 - #57370 (Support passing cflags/cxxflags/ldflags to LLVM build)
 - #57501 (High priority resolutions for associated variants)
 - #57551 (resolve: Add a test for issue #57539)
 - #57610 (Fix nested `?` matchers)
 - #57634 (Remove an unused function argument)
 - #57635 (use structured macro and path resolve suggestions)
 - #57636 (Fix sources sidebar not showing up)
 - #57646 (Fixes text becoming invisible when element targetted)
 - #57650 (librustc_metadata: Pass a default value when unwrapping a span)
 - #57654 (Add some links in std::fs.)
 - #57658 (Two HIR tweaks)
 - #57659 (Fix release manifest generation)
 - #57683 (Document Unpin in std::prelude documentation)
 - #57685 (Enhance `Pin` impl applicability for `PartialEq` and `PartialOrd`.)
 - #57698 (Fix typo bug in DepGraph::try_mark_green().)
 - #57720 (Fix suggestions given mulitple bad lifetimes)
 - #57725 (Use structured suggestion to surround struct literal with parenthesis)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Jan 18, 2019

Rollup merge of rust-lang#57685 - pthariensflame:enhancement/pin-impl…
…-applicability, r=withoutboats

Enhance `Pin` impl applicability for `PartialEq` and `PartialOrd`.

This allows for comparing for equality or ordering a `Pin<P>` and a `Pin<Q>` as long as `P` and `Q` are correspondingly comparable themselves *even when `P` and `Q` are different types*.
An example might be comparing a `Pin<&mut OsString>` to a `Pin<&mut PathBuf>`, which might arise from pin projections from a pair of larger contexts that aren't `Unpin`.

bors added a commit that referenced this pull request Jan 18, 2019

Auto merge of #57737 - Centril:rollup, r=Centril
Rollup of 10 pull requests

Successful merges:

 - #56594 (Remove confusing comment about ideally using `!` for `c_void`)
 - #57340 (Use correct tracking issue for c_variadic)
 - #57357 (Cleanup PartialEq docs.)
 - #57551 (resolve: Add a test for issue #57539)
 - #57636 (Fix sources sidebar not showing up)
 - #57646 (Fixes text becoming invisible when element targetted)
 - #57654 (Add some links in std::fs.)
 - #57683 (Document Unpin in std::prelude documentation)
 - #57685 (Enhance `Pin` impl applicability for `PartialEq` and `PartialOrd`.)
 - #57710 (Fix non-clickable urls)

Failed merges:

r? @ghost

@bors bors merged commit fefe1da into rust-lang:master Jan 18, 2019

@pthariensflame pthariensflame deleted the pthariensflame:enhancement/pin-impl-applicability branch Jan 18, 2019

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