iomentum / cargo-breaking

Mozilla Public License 2.0
112 stars 7 forks source link

Refine diagnosis for structs and enums #6

Open scrabsha opened 3 years ago

scrabsha commented 3 years ago

Currently we emit a modification for the whole struct/enum if one of its token changes (source). This needs to be refined a bit.

The best solution would be to implement DiagnosticGenerator for StructMetadata and EnumMetadata, so that it handles things more cleanly.

It would also be a good idea to handle cases where an empty named struct is changed into an empty tupled struct (this is not a breaking change, see here).