Skip to content

Make Ord and PartialOrd opt-out in newtype_index #94404

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

pierwill
Copy link
Member

@pierwill pierwill commented Feb 26, 2022

Part of work on #90317. This will allow us to do

rustc_index::newtype_index! {
    /// A unique ID associated with a macro invocation and expansion.
    pub struct LocalExpnId {
        ENCODABLE = custom
        DEBUG_FORMAT = "expn{}"
+       ORD_IMPL = off
    }
}

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Feb 26, 2022
@rust-highfive
Copy link
Contributor

r? @michaelwoerister

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

cc @Aaron1011, @cjgillot

@pierwill pierwill force-pushed the newtype-index-noord-2 branch from c11e67c to 0a8a1ce Compare February 26, 2022 21:11
@rust-log-analyzer

This comment has been minimized.

@michaelwoerister
Copy link
Member

@Aaron1011, do you want to take this?

@pierwill pierwill requested a review from Aaron1011 March 3, 2022 16:11
Also remove `step` impl if `ORD_IMPL = off`
@pierwill pierwill force-pushed the newtype-index-noord-2 branch from 9df8df6 to c08a9a4 Compare March 3, 2022 17:53
@Aaron1011
Copy link
Member

Thanks! @bors r+

@bors
Copy link
Collaborator

bors commented Mar 3, 2022

📌 Commit c08a9a4 has been approved by Aaron1011

@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 Mar 3, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 4, 2022
…aron1011

Make Ord and PartialOrd opt-out in `newtype_index`

Part of work on rust-lang#90317. This will allow us to do

```diff
rustc_index::newtype_index! {
    /// A unique ID associated with a macro invocation and expansion.
    pub struct LocalExpnId {
        ENCODABLE = custom
        DEBUG_FORMAT = "expn{}"
+       ORD_IMPL = off
    }
}
```
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 4, 2022
Rollup of 10 pull requests

Successful merges:

 - rust-lang#88805 (Clarification of default socket flags)
 - rust-lang#93418 (rustdoc & doc: no `shortcut` for `rel="icon"`)
 - rust-lang#93913 (Remove the everybody loops pass)
 - rust-lang#93965 (Make regular stdio lock() return 'static handles)
 - rust-lang#94339 (ARM: Only allow using d16-d31 with asm! when supported by the target)
 - rust-lang#94404 (Make Ord and PartialOrd opt-out in `newtype_index`)
 - rust-lang#94466 (bootstrap: correct reading of flags for llvm)
 - rust-lang#94572 (Use `HandleOrNull` and `HandleOrInvalid` in the Windows FFI bindings.)
 - rust-lang#94575 (CTFE SwitchInt: update comment)
 - rust-lang#94582 (Fix a bug in `x.py fmt` that prevents some files being formatted.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit aede21f into rust-lang:master Mar 4, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 4, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

7 participants