Skip to content

Properly convert and translate unit structs into MIR#30551

Merged
bors merged 1 commit into
rust-lang:masterfrom
nagisa:mir-unit-structs
Dec 25, 2015
Merged

Properly convert and translate unit structs into MIR#30551
bors merged 1 commit into
rust-lang:masterfrom
nagisa:mir-unit-structs

Conversation

@nagisa

@nagisa nagisa commented Dec 24, 2015

Copy link
Copy Markdown
Member

Fixes #30514

i also went ahead and removed the redundant ItemKinds.

r? @nikomatsakis (this is an easy one I guess)

@nagisa

nagisa commented Dec 24, 2015

Copy link
Copy Markdown
Member Author
struct Droppable;
fn mir() {
    Droppable
}

results in

foo

@luqmana

luqmana commented Dec 25, 2015

Copy link
Copy Markdown
Contributor

LGTM! @bors: r+

@bors

bors commented Dec 25, 2015

Copy link
Copy Markdown
Collaborator

📌 Commit 75e8f4a has been approved by luqmana

Manishearth added a commit to Manishearth/rust that referenced this pull request Dec 25, 2015
Fixes rust-lang#30514

i also went ahead and removed the redundant `ItemKind`s.

r? @nikomatsakis (this is an easy one I guess)
bors added a commit that referenced this pull request Dec 25, 2015
@bors bors merged commit 75e8f4a into rust-lang:master Dec 25, 2015

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can't you have the same problem with unit variants (e.g. Option::None)?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Wow, I now feel kinda stupid not having noticed it myself 😃.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants