Skip to content

Clarify serialization macros documentation#2704

Merged
jdonszelmann merged 3 commits intorust-lang:mainfrom
reddevilmidzy:macro
Dec 18, 2025
Merged

Clarify serialization macros documentation#2704
jdonszelmann merged 3 commits intorust-lang:mainfrom
reddevilmidzy:macro

Conversation

@reddevilmidzy
Copy link
Copy Markdown
Member

@reddevilmidzy reddevilmidzy commented Dec 18, 2025

close: #2698

remove MetadataDecodable and add BlobDecodable and LazyDecodable.

r? @tshepang

remove `MetadataDecodable` and add `BlobDecodable` and `LazyDecodable`.
@rustbot rustbot added the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Dec 18, 2025
Comment thread src/serialization.md Outdated
Comment thread src/serialization.md Outdated
Co-authored-by: Tshepang Mbambo <hopsi@tuta.io>
@tshepang
Copy link
Copy Markdown
Member

will defer to @jdonszelmann to check if these changes are good...

@jdonszelmann
Copy link
Copy Markdown
Contributor

r? jdonszelmann

@rustbot rustbot assigned jdonszelmann and unassigned tshepang Dec 18, 2025
Comment thread src/serialization.md Outdated
only allow decoding by [`rustc_metadata::rmeta::encoder::EncodeContext`].
- [`BlobDecodable`] and [`LazyDecodable`] generates implementations that decode
with the metadata blob decoders in [`rustc_metadata::rmeta`]; use `BlobDecodable`
when the type has no lazy metadata handles, and `LazyDecodable` when it does.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention that these together form a counterpart to MetadataEncodable.

@jdonszelmann
Copy link
Copy Markdown
Contributor

r=me otherwise

@jdonszelmann
Copy link
Copy Markdown
Contributor

@bors r+

@jdonszelmann jdonszelmann merged commit a1e2150 into rust-lang:main Dec 18, 2025
1 check passed
@rustbot rustbot removed the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Dec 18, 2025
@reddevilmidzy reddevilmidzy deleted the macro branch December 19, 2025 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace MetadataDecodable macro

4 participants