Skip to content

Conversation

weiznich
Copy link
Contributor

@weiznich weiznich commented Jul 2, 2024

This change enables the #[diagnostic::on_unimplemented] attribute for the Serialize and Deserialize trait to point the user to the relevant derives and point out that they might want to check crates features for external types by adding the relevant hints an note.

The help text is up for discussion, but I feel that this might help quite a lot of users that struggle why external crates do not implement the serde traits.

This change enables the `#[diagnostic::on_unimplemented]` attribute for
the `Serialize` and `Deserialize` trait to point the user to the
relevant derives and point out that they might want to check crates
features for external types by adding the relevant hints an note.
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!

I've added a test for this in #2769.

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.

3 participants