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

Remove PartialOrd, Ord from AdtDefData #98946

Closed
wants to merge 1 commit into from

Conversation

pierwill
Copy link
Member

@pierwill pierwill commented Jul 5, 2022

This implementation is unused.

Helps with #90317.

This implementation is unused.

Helps with rust-lang#90317.
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 5, 2022
@rust-highfive
Copy link
Collaborator

r? @estebank

(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 Jul 5, 2022
@pierwill
Copy link
Member Author

pierwill commented Jul 5, 2022

@rustbot author

@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 5, 2022
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   |
20 | use std::cmp::Ordering;
   |     ^^^^^^^^^^^^^^^^^^
   |
   = note: `-D unused-imports` implied by `-D warnings`
    Checking rustc_builtin_macros v0.0.0 (/checkout/compiler/rustc_builtin_macros)
    Checking rustc_builtin_macros v0.0.0 (/checkout/compiler/rustc_builtin_macros)
error[E0277]: the trait bound `adt::AdtDefData: Ord` is not satisfied
   --> compiler/rustc_middle/src/ty/adt.rs:151:25
    |
149 |   #[derive(Copy, Clone, PartialEq, Eq, Hash, Ord, PartialOrd, HashStable)]
150 |   #[rustc_pass_by_value]
150 |   #[rustc_pass_by_value]
151 |   pub struct AdtDef<'tcx>(pub Interned<'tcx, AdtDefData>);
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Ord` is not implemented for `adt::AdtDefData`
   ::: /checkout/library/core/src/cmp.rs:860:1
    |
    |
860 | / pub macro Ord($item:item) {
862 | | }
862 | | }
    | |_- in this expansion of `#[derive(Ord)]`
    |
    = help: the trait `Ord` is implemented for `Interned<'a, T>`
    = note: required because of the requirements on the impl of `Ord` for `Interned<'_, adt::AdtDefData>`

error[E0277]: can't compare `adt::AdtDefData` with `adt::AdtDefData`
    --> compiler/rustc_middle/src/ty/adt.rs:151:25
     |
149  |   #[derive(Copy, Clone, PartialEq, Eq, Hash, Ord, PartialOrd, HashStable)]
150  |   #[rustc_pass_by_value]
150  |   #[rustc_pass_by_value]
151  |   pub struct AdtDef<'tcx>(pub Interned<'tcx, AdtDefData>);
     |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `adt::AdtDefData < adt::AdtDefData` and `adt::AdtDefData > adt::AdtDefData`
    ::: /checkout/library/core/src/cmp.rs:1169:1
     |
1169 | / pub macro PartialOrd($item:item) {
1170 | |     /* compiler built-in */
1170 | |     /* compiler built-in */
1171 | | }
     | |_- in this expansion of `#[derive(PartialOrd)]`
     |
     = help: the trait `std::cmp::PartialOrd` is not implemented for `adt::AdtDefData`
     = note: required because of the requirements on the impl of `std::cmp::PartialOrd<Interned<'_, adt::AdtDefData>>` for `Interned<'_, adt::AdtDefData>`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `rustc_middle` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `rustc_middle` due to 3 previous errors

@pierwill pierwill closed this Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants