improve DiscriminantKind handling#74276
Merged
bors merged 1 commit intorust-lang:masterfrom Jul 16, 2020
Merged
Conversation
Contributor
|
(rust_highfive has picked a reviewer for you, use r? to override) |
nagisa
reviewed
Jul 15, 2020
nagisa
approved these changes
Jul 15, 2020
Member
nagisa
left a comment
There was a problem hiding this comment.
You mentioned that discriminant for Generators became u32. Can you elaborate "how" (in e.g. the commit message), given that the changes otherwise only involve removing the previously present i32… default.
Otheriwse r=me on implementation...
Collaborator
|
☔ The latest upstream changes (presumably #74175) made this pull request unmergeable. Please resolve the merge conflicts. |
3647808 to
c51e366
Compare
This now reuses `fn discriminant_ty` in project, removing some code duplication. Doing so made me realize that we previously had a disagreement about the discriminant type of generators, with MIR using `u32` and codegen and trait selection using `i32`. We now always use `u32`.
c51e366 to
fcf52c1
Compare
Contributor
Author
|
Renamed the lang item to |
Member
|
@bors r+ |
Collaborator
|
📌 Commit fcf52c1 has been approved by |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 16, 2020
…arth Rollup of 14 pull requests Successful merges: - rust-lang#72973 (RISC-V GNU/Linux as host platform) - rust-lang#73918 (Clean up E0715 explanation) - rust-lang#73959 (Clean up E0716 explanation) - rust-lang#74119 (Remove `Compiler::compile()`.) - rust-lang#74196 (Add option to collapse automatically implementors) - rust-lang#74218 (Add margin after doc search results) - rust-lang#74276 (improve DiscriminantKind handling) - rust-lang#74291 (Added docs for `From<c_int>` for `ExitStatus`) - rust-lang#74294 (Update cross-compilation README) - rust-lang#74337 (Handle case of incomplete local ty more gracefully) - rust-lang#74344 (Remove string comparison and use diagnostic item instead) - rust-lang#74347 (Initialize default providers only once) - rust-lang#74353 (Edit docs for rustc_middle::dep_graph::dep_node) - rust-lang#74374 (Add a 1.45 release note on lto vs. embed-bitcode) Failed merges: - rust-lang#74251 (Teach bootstrap about target files vs target triples) r? @ghost
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.
Adds a lang item
discriminant_typefor the associated typeDiscriminantKind::Discriminant.Changes the discriminant of generators from
i32tou32, which should not be observable to fix anoversight where MIR was using
u32and codegen and typeck usedi32.