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

Use explicit re-export of serde_derive to give rustc more info #2400

Merged
merged 1 commit into from Mar 14, 2023
Merged

Use explicit re-export of serde_derive to give rustc more info #2400

merged 1 commit into from Mar 14, 2023

Conversation

Nilstrieb
Copy link
Contributor

rustc will start looking behind #[cfg(FALSE)] items to start giving better diagnostics. By using an explicit re-export instead of a glob export, we tell rustc that Deserialize and Serialize exist here.

I'm not sure whether it's worth it to open this PR before upstream has been merged, but since this adds minimal maintenance effort and may even make the code nicer I opened it already, feel free to wait if you prefer.

Upstream PR: rust-lang/rust#109005

rustc will start looking behind `#[cfg(FALSE)]` items to start giving
better diagnostics. By using an explicit re-export instead of a glob
export, we tell rustc that `Deserialize` and `Serialize` exist here.
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Thanks!

@dtolnay dtolnay merged commit a38aa31 into serde-rs:master Mar 14, 2023
@Nilstrieb Nilstrieb deleted the explicit-reexport branch March 14, 2023 07:58
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