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

implement Ord for OutlivesPredicate and other types #50930

Merged
merged 1 commit into from
May 24, 2018

Conversation

toidiu
Copy link
Contributor

@toidiu toidiu commented May 21, 2018

It became necessary while implementing #50070 to have Ord implemented for OutlivesPredicate.

This PR implements Ord for OutlivesPredicate as well as other types needed for the implementation.

@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(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 May 21, 2018
@toidiu
Copy link
Contributor Author

toidiu commented May 21, 2018

r? @nikomatsakis

@toidiu
Copy link
Contributor Author

toidiu commented May 21, 2018

@eddyb isolated the Ord commits to make reviewing easier.

@ishitatsuyuki
Copy link
Contributor

I think you can simply add that commit to #50070?


impl<'tcx> PartialOrd for TyS<'tcx> {
fn partial_cmp(&self, other: &TyS<'tcx>) -> Option<Ordering> {
Some(self.sty.cmp(&other.sty))
Copy link
Member

Choose a reason for hiding this comment

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

This could be Some(self.cmp(other)), to keep the implementation details in the Ord impl.

fn partial_cmp(&self, other: &Slice<T>) -> Option<Ordering> {
if self == other { Some(Ordering::Equal) } else {
<[T] as PartialOrd>::partial_cmp(&self.0, &other.0)
}
Copy link
Member

Choose a reason for hiding this comment

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

Same here (Some(self.cmp(other))).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some(self.cmp(other)) will require the bound T: Ord, which I was not sure we wanted to impose for all types that that maybe only want to implement PartialOrd?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I somehow missed that this was generic - seems fine, then.

@@ -578,6 +590,22 @@ impl <'gcx: 'tcx, 'tcx> Canonicalize<'gcx, 'tcx> for Ty<'tcx> {
#[derive(Debug, RustcEncodable)]
pub struct Slice<T>([T]);

impl<T> Ord for Slice<T> where T: Ord {
fn cmp(&self, other: &Slice<T>) -> Ordering {
if self == other { Ordering::Equal } else {
Copy link
Member

Choose a reason for hiding this comment

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

Nice optimization!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

credit goes to @nikomatsakis

impl<'tcx> Ord for Kind<'tcx> {
fn cmp(&self, other: &Kind) -> Ordering {
match (self.unpack(), other.unpack()) {
(UnpackedKind::Type(_), UnpackedKind::Lifetime(_)) => Ordering::Greater,
Copy link
Member

Choose a reason for hiding this comment

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

You don't need to implement all of this manually, just add #[derive(PartialEq, Eq, PartialOrd, Ord)] on UnpackedKind and implement this method going through that. That's how other traits are implemented on Kind.

Copy link
Member

Choose a reason for hiding this comment

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

This seems to be unresolved?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops missed this one. Here is a pr for that #54074

@toidiu
Copy link
Contributor Author

toidiu commented May 21, 2018

@ishitatsuyuki A reason for extracting this into a separate PR was because the changes in this PR are isolated from #50070 and are useful on their own.

Also this way others not familiar with #50070 can review these changes without prior context and hopefully its less messy and easier to understand :)

@toidiu
Copy link
Contributor Author

toidiu commented May 21, 2018

@nikomatsakis @eddyb rebased to master and should be ready for review

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented May 21, 2018

📌 Commit fabe510 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 May 21, 2018
@bors
Copy link
Contributor

bors commented May 22, 2018

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

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 22, 2018
@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented May 22, 2018

📌 Commit 6e3a2ed 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 May 22, 2018
@bors
Copy link
Contributor

bors commented May 23, 2018

⌛ Testing commit 6e3a2ed7d3fd0173e507c3bf8f18bd416cdc640c with merge 4fc63c69d4512d3edc6b42624b34bba467b0ee29...

@bors
Copy link
Contributor

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

The job x86_64-gnu-debug 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.
  Downloading https://files.pythonhosted.org/packages/87/c5/7ed94b700d30534f346bb55408ca8501325840bcdc371628cff10d7ba68d/botocore-1.10.26-py2.py3-none-any.whl (4.2MB)
Collecting pyasn1>=0.1.3 (from rsa<=3.5.0,>=3.1.2->awscli)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/a0/70/2c27740f08e477499ce19eefe05dbcae6f19fdc49e9e82ce4768be0643b9/pyasn1-0.4.3-py2.py3-none-any.whl (72kB)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/2d/99/b2c4e9d5a30f6471e410a146232b4118e697fa3ffc06d6a65efde84debd0/futures-3.2.0-py2-none-any.whl
Collecting jmespath<1.0.0,>=0.7.1 (from botocore==1.10.26->awscli)
---
[00:03:55]     Checking syntax_pos v0.0.0 (file:///checkout/src/libsyntax_pos)
[00:03:56]     Checking rustc_errors v0.0.0 (file:///checkout/src/librustc_errors)
[00:04:11]     Checking proc_macro v0.0.0 (file:///checkout/src/libproc_macro)
[00:04:12]     Checking syntax_ext v0.0.0 (file:///checkout/src/libsyntax_ext)
[00:04:29] error[E0277]: the trait bound `mir::interpret::Relocations: std::cmp::PartialOrd` is not satisfied
[00:04:29]    --> librustc/mir/interpret/mod.rs:345:5
[00:04:29]     |
[00:04:29] 345 |     pub relocations: Relocations,
[00:04:29]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't compare `mir::interpret::Relocations` with `mir::interpret::Relocations`
[00:04:29]     |
[00:04:29]     = help: the trait `std::cmp::PartialOrd` is not implemented for `mir::interpret::Relocations`
[00:04:29]     = note: required by `std::cmp::PartialOrd::partial_cmp`
[00:04:29] 
[00:04:29] error[E0369]: binary operation `<` cannot be applied to type `mir::interpret::Relocations`
[00:04:29]    --> librustc/mir/interpret/mod.rs:345:5
[00:04:29]     |
[00:04:29] 345 |     pub relocations: Relocations,
[00:04:29]     |
[00:04:29]     |
[00:04:29]     = note: an implementation of `std::cmp::PartialOrd` might be missing for `mir::interpret::Relocations`
[00:04:29] 
[00:04:29] error[E0369]: binary operation `>` cannot be applied to type `mir::interpret::Relocations`
[00:04:29]    --> librustc/mir/interpret/mod.rs:345:5
[00:04:29]     |
[00:04:29] 345 |     pub relocations: Relocations,
[00:04:29]     |
[00:04:29]     |
[00:04:29]     = note: an implementation of `std::cmp::PartialOrd` might be missing for `mir::interpret::Relocations`
[00:04:29] 
[00:04:29] error[E0277]: the trait bound `mir::interpret::Relocations: std::cmp::Ord` is not satisfied
[00:04:29]    --> librustc/mir/interpret/mod.rs:345:5
[00:04:29]     |
[00:04:29] 345 |     pub relocations: Relocations,
[00:04:29]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `mir::interpret::Relocations`
[00:04:29]     |
[00:04:29]     = note: required by `std::cmp::Ord::cmp`
[00:04:38] error: aborting due to 4 previous errors
[00:04:38] 
[00:04:38] Some errors occurred: E0277, E0369.
[00:04:38] For more information about an error, try `rustc --explain E0277`.
[00:04:38] For more information about an error, try `rustc --explain E0277`.
[00:04:38] error: Could not compile `rustc`.
[00:04:38] 
[00:04:38] Caused by:
[00:04:38]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name rustc librustc/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,metadata -C prefer-dynamic -C opt-level=3 -C metadata=abe31e1c98d3f369 -C extra-filename=-abe31e1c98d3f369 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps --extern tempdir=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libtempdir-3e386995dc337d92.rmeta --extern log=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblog-908351a74ebbba8d.rmeta --extern jobserver=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libjobserver-94fbc955671d506d.rmeta --extern rustc_data_structures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-6a4a79105f9bd54f.rmeta --extern fmt_macros=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libfmt_macros-357b7a8b98d95f3a.rmeta --extern arena=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libarena-54250918861a699e.rmeta --extern rustc_target=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_target-c0040c81b4505a50.rmeta --extern syntax_pos=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax_pos-cae04dca295ba694.rmeta --extern syntax=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax-745f4de0590494cb.rmeta --extern byteorder=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbyteorder-b8199a574fa70348.rmeta --extern rustc_errors=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_errors-221bca35c0d44663.rmeta --extern lazy_static=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblazy_static-dc0342f292e689dd.rmeta --extern bitflags=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbitflags-11bfc3c679285c78.rmeta --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-b369f4a8ef58b783.rmeta --extern backtrace=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbacktrace-41851314beb0e86b.rmeta --extern proc_macro=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libproc_macro-6ff7bacc2b99651c.rmeta --extern flate2=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libflate2-11f45a861d5fea25.rmeta --extern rustc_apfloat=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_apfloat-51a6c30185c022f8.rmeta --extern graphviz=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libgraphviz-d89334909265f444.rmeta -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/backtrace-sys-f085762345e9053e/out/.libs -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/miniz-sys-c0082fee642cc0bf/out` (exit code: 101)
[00:04:38] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--color" "always" "--features" " jemalloc" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:04:38] expected success, got: exit code: 101
[00:04:38] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:04:38] travis_fold:end:stage0-rustc

[00:04:38] travis_time:end:stage0-rustc:start=1527115693400527851,finish=1527115759265216392,duration=65864688541

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)

1 similar comment
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-debug 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.
  Downloading https://files.pythonhosted.org/packages/87/c5/7ed94b700d30534f346bb55408ca8501325840bcdc371628cff10d7ba68d/botocore-1.10.26-py2.py3-none-any.whl (4.2MB)
Collecting pyasn1>=0.1.3 (from rsa<=3.5.0,>=3.1.2->awscli)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/a0/70/2c27740f08e477499ce19eefe05dbcae6f19fdc49e9e82ce4768be0643b9/pyasn1-0.4.3-py2.py3-none-any.whl (72kB)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/2d/99/b2c4e9d5a30f6471e410a146232b4118e697fa3ffc06d6a65efde84debd0/futures-3.2.0-py2-none-any.whl
Collecting jmespath<1.0.0,>=0.7.1 (from botocore==1.10.26->awscli)
---
[00:03:55]     Checking syntax_pos v0.0.0 (file:///checkout/src/libsyntax_pos)
[00:03:56]     Checking rustc_errors v0.0.0 (file:///checkout/src/librustc_errors)
[00:04:11]     Checking proc_macro v0.0.0 (file:///checkout/src/libproc_macro)
[00:04:12]     Checking syntax_ext v0.0.0 (file:///checkout/src/libsyntax_ext)
[00:04:29] error[E0277]: the trait bound `mir::interpret::Relocations: std::cmp::PartialOrd` is not satisfied
[00:04:29]    --> librustc/mir/interpret/mod.rs:345:5
[00:04:29]     |
[00:04:29] 345 |     pub relocations: Relocations,
[00:04:29]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't compare `mir::interpret::Relocations` with `mir::interpret::Relocations`
[00:04:29]     |
[00:04:29]     = help: the trait `std::cmp::PartialOrd` is not implemented for `mir::interpret::Relocations`
[00:04:29]     = note: required by `std::cmp::PartialOrd::partial_cmp`
[00:04:29] 
[00:04:29] error[E0369]: binary operation `<` cannot be applied to type `mir::interpret::Relocations`
[00:04:29]    --> librustc/mir/interpret/mod.rs:345:5
[00:04:29]     |
[00:04:29] 345 |     pub relocations: Relocations,
[00:04:29]     |
[00:04:29]     |
[00:04:29]     = note: an implementation of `std::cmp::PartialOrd` might be missing for `mir::interpret::Relocations`
[00:04:29] 
[00:04:29] error[E0369]: binary operation `>` cannot be applied to type `mir::interpret::Relocations`
[00:04:29]    --> librustc/mir/interpret/mod.rs:345:5
[00:04:29]     |
[00:04:29] 345 |     pub relocations: Relocations,
[00:04:29]     |
[00:04:29]     |
[00:04:29]     = note: an implementation of `std::cmp::PartialOrd` might be missing for `mir::interpret::Relocations`
[00:04:29] 
[00:04:29] error[E0277]: the trait bound `mir::interpret::Relocations: std::cmp::Ord` is not satisfied
[00:04:29]    --> librustc/mir/interpret/mod.rs:345:5
[00:04:29]     |
[00:04:29] 345 |     pub relocations: Relocations,
[00:04:29]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::cmp::Ord` is not implemented for `mir::interpret::Relocations`
[00:04:29]     |
[00:04:29]     = note: required by `std::cmp::Ord::cmp`
[00:04:38] error: aborting due to 4 previous errors
[00:04:38] 
[00:04:38] Some errors occurred: E0277, E0369.
[00:04:38] For more information about an error, try `rustc --explain E0277`.
[00:04:38] For more information about an error, try `rustc --explain E0277`.
[00:04:38] error: Could not compile `rustc`.
[00:04:38] 
[00:04:38] Caused by:
[00:04:38]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name rustc librustc/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,metadata -C prefer-dynamic -C opt-level=3 -C metadata=abe31e1c98d3f369 -C extra-filename=-abe31e1c98d3f369 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps --extern tempdir=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libtempdir-3e386995dc337d92.rmeta --extern log=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblog-908351a74ebbba8d.rmeta --extern jobserver=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libjobserver-94fbc955671d506d.rmeta --extern rustc_data_structures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-6a4a79105f9bd54f.rmeta --extern fmt_macros=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libfmt_macros-357b7a8b98d95f3a.rmeta --extern arena=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libarena-54250918861a699e.rmeta --extern rustc_target=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_target-c0040c81b4505a50.rmeta --extern syntax_pos=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax_pos-cae04dca295ba694.rmeta --extern syntax=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax-745f4de0590494cb.rmeta --extern byteorder=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbyteorder-b8199a574fa70348.rmeta --extern rustc_errors=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_errors-221bca35c0d44663.rmeta --extern lazy_static=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/liblazy_static-dc0342f292e689dd.rmeta --extern bitflags=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbitflags-11bfc3c679285c78.rmeta --extern serialize=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-b369f4a8ef58b783.rmeta --extern backtrace=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libbacktrace-41851314beb0e86b.rmeta --extern proc_macro=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libproc_macro-6ff7bacc2b99651c.rmeta --extern flate2=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libflate2-11f45a861d5fea25.rmeta --extern rustc_apfloat=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_apfloat-51a6c30185c022f8.rmeta --extern graphviz=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libgraphviz-d89334909265f444.rmeta -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/backtrace-sys-f085762345e9053e/out/.libs -L native=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/miniz-sys-c0082fee642cc0bf/out` (exit code: 101)
[00:04:38] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--color" "always" "--features" " jemalloc" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:04:38] expected success, got: exit code: 101
[00:04:38] thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
[00:04:38] travis_fold:end:stage0-rustc

[00:04:38] travis_time:end:stage0-rustc:start=1527115693400527851,finish=1527115759265216392,duration=65864688541

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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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:04:45] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:04:45] tidy error: /checkout/src/librustc_data_structures/sorted_map.rs:25: line longer than 100 chars
[00:04:46] some tidy checks failed
[00:04:46] 
[00:04:46] 
[00:04:46] 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:04:46] 
[00:04:46] 
[00:04:46] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:46] Build completed unsuccessfully in 0:01:49
[00:04:46] Build completed unsuccessfully in 0:01:49
[00:04:46] Makefile:79: recipe for target 'tidy' failed
[00:04:46] make: *** [tidy] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:2428e7ba
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented May 24, 2018

📌 Commit 9a8400c 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 May 24, 2018
@bors
Copy link
Contributor

bors commented May 24, 2018

⌛ Testing commit 9a8400c with merge a41dd6f...

bors added a commit that referenced this pull request May 24, 2018
implement Ord for OutlivesPredicate and other types

It became necessary while implementing #50070 to have `Ord` implemented for `OutlivesPredicate`.

This PR implements `Ord` for `OutlivesPredicate` as well as other types needed for the implementation.
@bors
Copy link
Contributor

bors commented May 24, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing a41dd6f to master...

@bors bors merged commit 9a8400c into rust-lang:master May 24, 2018
@toidiu toidiu deleted the ak-ordOutlivesPredicate branch May 24, 2018 17:53
@@ -332,7 +332,7 @@ impl AddAssign for Size {
/// Each field is a power of two, giving the alignment a maximum value
/// of 2<sup>(2<sup>8</sup> - 1)</sup>, which is limited by LLVM to a
/// maximum capacity of 2<sup>29</sup> or 536870912.
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, RustcEncodable, RustcDecodable)]
#[derive(Copy, Clone, PartialEq, Eq, Ord, PartialOrd, Hash, Debug, RustcEncodable, RustcDecodable)]
Copy link
Member

Choose a reason for hiding this comment

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

This is a mistake, because this type does not have a defined ordering (see the min/max methods).

I'll try to figure out if I can fix it locally (as part of a PR that would probably remove the need for using this type in most places, by replacing it with one alignment, instead of two).

kennytm added a commit to kennytm/rust that referenced this pull request Sep 12, 2018
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.

None yet

7 participants