Repository navigation
Closed
Labels
T-compilerAdd this label so rfcbot knows to poll the compiler teamAdd this label so rfcbot knows to poll the compiler teammajor-changeA proposal to make a major change to rustcA proposal to make a major change to rustcmajor-change-acceptedA major change proposal that was acceptedA major change proposal that was accepted
Description
Proposal
rust-lang/rust#73851 reworks specialization in the following noticeable ways:
- The type parameter in the Encodable and Decodable traits is moved from the method to the trait.
- These traits are now derived using macros in
rustc_macrosrather than the built-inRustcEncodableandRustcDecodablederives. - Specialized implementations of
EncodableandDecodablenow directly use specialization. - A lot of transmutes are removed
Further documentation of serialization in rustc after the PR has landed can be found at rust-lang/rustc-dev-guide#785.
Mentors or Reviewers
PR has already been reviewed by @oli-obk
Process
The main points of the Major Change Process is as follows:
- File an issue describing the proposal.
- A compiler team member or contributor who is knowledgeable in the area can second by writing
@rustbot second.- Finding a "second" suffices for internal changes. If however you are proposing a new public-facing feature, such as a
-C flag, then full team check-off is required. - Compiler team members can initiate a check-off via
@rfcbot fcp mergeon either the MCP or the PR.
- Finding a "second" suffices for internal changes. If however you are proposing a new public-facing feature, such as a
- Once an MCP is seconded, the Final Comment Period begins. If no objections are raised after 10 days, the MCP is considered approved.
You can read more about Major Change Proposals on forge.
Comments
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.
Reacted by Mateusz Mikuła
Metadata
Metadata
Assignees
Labels
T-compilerAdd this label so rfcbot knows to poll the compiler teamAdd this label so rfcbot knows to poll the compiler teammajor-changeA proposal to make a major change to rustcA proposal to make a major change to rustcmajor-change-acceptedA major change proposal that was acceptedA major change proposal that was accepted
Activity
rustbot commentedon Jul 4, 2020
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.
oli-obk commentedon Jul 6, 2020
@rustbot second
extf33 commentedon Sep 5, 2023
@matthewjasper
Hello, I came across this issue while looking for a way to serialize/deserialize the MIR Body.
I have two questions.
Where in the rustc code is the
decode()method, which is associated with the MIR Body (as mentioned below), used?Is it possible to serialize the MIR Body to a file (during a MIR pass) and then load it back by deserializing it?
If so, how should the code be written?
I thought of a logic like the one below.
matthewjasper commentedon Sep 5, 2023
Zulip (or a new issue if you have a suitable repository for it) might be a better place to discuss this than this Github issue, but to answer your questions:
https://github.com/rust-lang/rust/blob/af488be5f82b5e1010f7b52bc4fcda697793950d/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs#L88
and another here:
https://github.com/rust-lang/rust/blob/b402182d4e0b00254c1afd0620547e2ee42ae336/compiler/rustc_middle/src/query/on_disk_cache.rs#L532
TyDecoderand encoder that implementsTyEncoderand neither of the current types used for this would be suitable. You could try implementing your own. What do you actually want to do here? Why can't you keep the MIR in memory