Skip to content

Made Tm_ a struct instead of a record and added serialization support to... #4041

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

Closed
wants to merge 1 commit into from

Conversation

jesse99
Copy link
Contributor

@jesse99 jesse99 commented Nov 26, 2012

... Tm and Tm_.

Not entirely clear what the best way to do this is. Right now we persist the entire
struct which seems to be both portable and exactly round-trippable.

… to Tm and Tm_.

Not entirely clear what the best way to do this is. Right now we persist the entire
struct which seems to be both portable and exactly round-trippable.
@graydon
Copy link
Contributor

graydon commented Nov 26, 2012

I believe #[auto_serialize] writes these methods for you. Can you give that a try? The struct part of course is fine; we'll have to do that to everything as we deprecate structural records.

@jesse99
Copy link
Contributor Author

jesse99 commented Nov 26, 2012

I tried auto-serialize. Couldn't get it to work. As far as I can tell, the magic auto-serialize goo is trying to import the serialization module in a way that is incompatible with code that lives in std. And note that nothing in std actually uses auto-serialize.

@brson
Copy link
Contributor

brson commented Nov 26, 2012

Likely because auto_serialize generates paths prefixed with std. Add a little stub mod to std.rs that looks like mod std { pub use serialization; } should fix it. core has a similar mod core inside it for other reasons.

@jesse99 jesse99 mentioned this pull request Nov 27, 2012
@jesse99
Copy link
Contributor Author

jesse99 commented Nov 27, 2012

brson's tip fixed the import problem, but auto_serialize seems to be generating bad code for the enum. See above issue.

@brson
Copy link
Contributor

brson commented Nov 28, 2012

Thanks! Merged.

@brson brson closed this Nov 28, 2012
RalfJung added a commit to RalfJung/rust that referenced this pull request Nov 21, 2024
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.

3 participants