Use 64-bit integers to represent discriminants#8744
Closed
jld wants to merge 3 commits intorust-lang:masterfrom
Closed
Use 64-bit integers to represent discriminants#8744jld wants to merge 3 commits intorust-lang:masterfrom
jld wants to merge 3 commits intorust-lang:masterfrom
Conversation
This would have failed on 32-to-64-bit cross-compiles.
Contributor
Author
|
This is the new version of #8504 (which, several seconds too late, I realize I could have reopened instead of creating this). |
bors
added a commit
that referenced
this pull request
Aug 26, 2013
This is in preparation for making discriminants not always be int (#1647), but it also makes compiles for a 64-bit target not behave differently — with respect to how many bits of discriminants are preserved — depending on the build host's word size, which is a nice property to have. We may want to standardize how to abbreviate "discriminant" in a followup change.
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Nov 21, 2022
Extend `needless_collect` Extends when `is_empty` and `contains` are linted. `is_empty` will be linted when `<IterTy as Iterator>::Item` is the same as `<CollectTy as IntoIterator>::Item`. This can be a false positive if the `FromIterator` implementation filters out items, but I don't know of any which do that also implement `IntoIterator` with a matching `Item` type. `contains` will be linted when the argument type is `&<IterTy as Iterator>::Item`. It has the same false positives as `is_empty` with the same note that I know of nothing that actually causes that in practice. changelog: Lint `needless_collect` when `is_empty` or `contains` is called on some non-std types
This file contains hidden or 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
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.
This is in preparation for making discriminants not always be int (#1647), but it also makes compiles for a 64-bit target not behave differently — with respect to how many bits of discriminants are preserved — depending on the build host's word size, which is a nice property to have.
We may want to standardize how to abbreviate "discriminant" in a followup change.