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

Special case remote = "Self" #1196

Merged
merged 1 commit into from Mar 27, 2018
Merged

Special case remote = "Self" #1196

merged 1 commit into from Mar 27, 2018

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Mar 27, 2018

The following has worked since remote was introduced. It generates fn serialize and fn deserialize with the same signature as Serialize::serialize and Deserialize::deserialize.

#[derive(Serialize, Deserialize)]
#[serde(remote = "RemoteSelf")]
struct RemoteSelf;

This PR makes the following equivalent to the above. This did not work before due to our use of the remote path in places where Self had not the right meaning.

#[derive(Serialize, Deserialize)]
#[serde(remote = "Self")]
struct RemoteSelf;

@dtolnay dtolnay merged commit a2fa4c2 into master Mar 27, 2018
@dtolnay dtolnay deleted the self branch March 27, 2018 09:12
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