serde-rs / serde

Serialization framework for Rust
https://serde.rs/
Apache License 2.0
9.06k stars 767 forks source link

Use the `#[diagnostic::on_unimplemented]` attribute when possible #2767

Closed weiznich closed 2 months ago

weiznich commented 3 months ago

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.