Skip to content
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

Inherit the visibility of remote struct definition #1001

Merged
merged 1 commit into from
Jul 27, 2017
Merged

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Jul 26, 2017

For remote derive this will give the derived methods the same visibility as the definition.

#[serde(remote = "...")]
struct Def; // Def::serialize and deserialize are private to this module

#[serde(remote = "...")]
pub struct Def; // Def::serialize and deserialize are public

#[serde(remote = "...")]
pub(crate) struct Def; // Def::serialize and deserialize are pub(crate)

Fixes #1000. @arcnmx

@dtolnay dtolnay requested a review from oli-obk July 26, 2017 06:56
@arcnmx
Copy link

arcnmx commented Jul 26, 2017

Such a prompt response! Looks like a good solution to me.

@dtolnay dtolnay merged commit ccec002 into master Jul 27, 2017
@dtolnay dtolnay deleted the remotevis branch July 27, 2017 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants