]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #57685 - pthariensflame:enhancement/pin-impl-applicability, r=without...
authorMazdak Farrokhzad <twingoow@gmail.com>
Fri, 18 Jan 2019 17:06:38 +0000 (18:06 +0100)
committerGitHub <noreply@github.com>
Fri, 18 Jan 2019 17:06:38 +0000 (18:06 +0100)
commit25ea20dfeb79379a5624388a9a0608434f3fdc78
tree7165063b9313f557d4774882ecee8cdef1313795
parentb0563fdb443fa0eefeb9e2a27f351e7e485df058
parentfefe1dacb6255304dab5c13fb669b1d9d40f9e03
Rollup merge of #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`.