Skip to content

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Jul 23, 2019

Apparently there was no test covering this...

r? @oli-obk
cc @petrochenkov

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 23, 2019
@Centril
Copy link
Contributor Author

Centril commented Jul 23, 2019

@bors rollup

#[repr(u8)]
enum Alpha {
V1 = 41,
V2 = Self::V1 as u8 + 1, // OK -- but why?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Really... why?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought it felt familiar... 😭.

At some point we should do what @RalfJung suggested in #61723 (comment) since Ralf is right that this is so incredibly niche and imo clearly a bug...

Oh well... not much to do about it here!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adjusted the comment to refer to #50072... Should be good to merge now. :)

@rust-highfive

This comment has been minimized.

@Centril Centril force-pushed the self-in-enum-def branch from b3c7704 to 76929c7 Compare July 24, 2019 02:13
@Centril Centril force-pushed the self-in-enum-def branch from 76929c7 to 2e193f7 Compare July 24, 2019 02:14
@oli-obk
Copy link
Contributor

oli-obk commented Jul 24, 2019

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jul 24, 2019

📌 Commit 7fdfe8b has been approved by oli-obk

@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 Jul 24, 2019
Centril added a commit to Centril/rust that referenced this pull request Jul 24, 2019
Add test `self-in-enum-definition`

Apparently there was no test covering this...

r? @oli-obk
cc @petrochenkov
Centril added a commit to Centril/rust that referenced this pull request Jul 24, 2019
Rollup of 10 pull requests

Successful merges:

 - rust-lang#62641 (Regenerate character tables for Unicode 12.1)
 - rust-lang#62716 (state also in the intro that UnsafeCell has no effect on &mut)
 - rust-lang#62738 (Remove uses of mem::uninitialized from std::sys::cloudabi)
 - rust-lang#62772 (Suggest trait bound on type parameter when it is unconstrained)
 - rust-lang#62890 (Normalize use of backticks in compiler messages for libsyntax/*)
 - rust-lang#62905 (Normalize use of backticks in compiler messages for doc)
 - rust-lang#62916 (Add test `self-in-enum-definition`)
 - rust-lang#62917 (Always emit trailing slash error)
 - rust-lang#62926 (Fix typo in mem::uninitialized doc)
 - rust-lang#62927 (use PanicMessage in MIR, kill InterpError::description)

Failed merges:

r? @ghost
bors added a commit that referenced this pull request Jul 24, 2019
Rollup of 10 pull requests

Successful merges:

 - #62641 (Regenerate character tables for Unicode 12.1)
 - #62716 (state also in the intro that UnsafeCell has no effect on &mut)
 - #62738 (Remove uses of mem::uninitialized from std::sys::cloudabi)
 - #62772 (Suggest trait bound on type parameter when it is unconstrained)
 - #62890 (Normalize use of backticks in compiler messages for libsyntax/*)
 - #62905 (Normalize use of backticks in compiler messages for doc)
 - #62916 (Add test `self-in-enum-definition`)
 - #62917 (Always emit trailing slash error)
 - #62926 (Fix typo in mem::uninitialized doc)
 - #62927 (use PanicMessage in MIR, kill InterpError::description)

Failed merges:

r? @ghost
@bors bors merged commit 7fdfe8b into rust-lang:master Jul 24, 2019
@Centril Centril deleted the self-in-enum-def branch July 29, 2019 02:57
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.

4 participants