mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-03 02:40:40 +00:00

`Message` is an enum with multiple variants. Four of those variants map directly onto the four variants of `WorkItemResult`. This commit reduces those four `Message` variants to a single variant containing a `WorkItemResult`. This requires increasing `WorkItemResult`'s visibility to `pub(crate)` visibility, but `WorkItem` and `Message` can also have their visibility reduced to `pub(crate)`. This change avoids some boilerplate enum translation code, and makes `Message` easier to understand.
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.