-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
improve DiscriminantKind handling #74276
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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...
☔ 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
Renamed the lang item to |
@bors r+ |
📌 Commit fcf52c1 has been approved by |
…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
Adds a lang item
discriminant_type
for the associated typeDiscriminantKind::Discriminant
.Changes the discriminant of generators from
i32
tou32
, which should not be observable to fix anoversight where MIR was using
u32
and codegen and typeck usedi32
.