-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
ADT simplification #5314
Closed
Closed
ADT simplification #5314
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Out goes the extra layer of struct wrapping; the destructedness flag is added to the end of the struct. This means that, if the struct previously had alignment padding at the end, the flag will live there instead of increasing the struct size.
The only thing we really lose is that C-like enums with one variant and a non-zero discriminant now take up space, but I do not think this is a common usage. As previously noted, that was mostly there for transitional compatibility with the pre-adt.rs codebase.
bors
added a commit
that referenced
this pull request
Mar 11, 2013
Struct and enum representations have some complicatedness that's no longer needed. Now that everything's in one place and has access to anything we'd want to know about the type, flatten some of that out. Slight changes to representations in some cases.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 27, 2020
Changes: ```` remove redundant import rustup rust-lang#68404 rustup rust-lang#69644 rustup rust-lang#70344 Move verbose_file_reads to restriction move redundant_pub_crate to nursery readme: explain how to run only a single lint on a codebase Remove dependency on `matches` crate Move useless_transmute to nursery nursery group -> style Update for PR feedback Auto merge of rust-lang#5314 - ehuss:remove-git2, r=flip1995 Lint for `pub(crate)` items that are not crate visible due to the visibility of the module that contains them ```` Fixes rust-lang#70456
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 28, 2020
submodules: update clippy from 1ff81c1 to 70b93aa Changes: ```` remove redundant import rustup rust-lang#68404 rustup rust-lang#69644 rustup rust-lang#70344 Move verbose_file_reads to restriction move redundant_pub_crate to nursery readme: explain how to run only a single lint on a codebase Remove dependency on `matches` crate Move useless_transmute to nursery nursery group -> style Update for PR feedback Auto merge of rust-lang#5314 - ehuss:remove-git2, r=flip1995 Lint for `pub(crate)` items that are not crate visible due to the visibility of the module that contains them ```` Fixes rust-lang#70456
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 2, 2020
Remove git2 dependency. This removes the `git2` dependency (used in the integration test). Updating git2 is awkward because both cargo and clippy have to be updated in sync, so this removes that requirement. It didn't look like it was using the git2 library for any particular reason, so this just launches the `git` executable, which should be available more or less everywhere. This unblocks updating Cargo. changelog: none
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 2, 2020
Remove git2 dependency. This removes the `git2` dependency (used in the integration test). Updating git2 is awkward because both cargo and clippy have to be updated in sync, so this removes that requirement. It didn't look like it was using the git2 library for any particular reason, so this just launches the `git` executable, which should be available more or less everywhere. This unblocks updating Cargo. changelog: none
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Struct and enum representations have some complicatedness that's no longer needed. Now that everything's in one place and has access to anything we'd want to know about the type, flatten some of that out. Slight changes to representations in some cases.