Closed arkeet closed 7 months ago
A few folks have asked me directly, so for posterity: cargo-semver-checks
would not have caught this today.
This is a breaking but not semver-major change, so it should be a "warn" or opt-in lint. cargo-semver-checks
doesn't currently have such a capability, but it's something we're planning to add in the immediate future. After that, cargo-semver-checks
will catch it and many more similar hazards (see "opt-in warnings" sections here).
Tangentially, if the maintainers of this repo might be interested in adopting cargo-semver-checks
, I'd be happy to open a PR for it.
If I pub use
the item rather than pub type
, that would solve this? Ignoring the fact that use
items cannot be deprecated.
This has been fixed and released. FormatItem
is now re-exported via pub use
, with pub type
remaining in place for documentation purposes (namely showing the deprecation).
I noticed
sqlx-sqlite
(0.7.4) does not build with 0.3.35 (but built with 0.3.34):So evidently replacing an enum with a type alias is a breaking change. One possible fix is to replace the type alias with a re-export i.e.
pub use BorrowedFormatItem as FormatItem;
, but unfortunately deprecating re-exports doesn't work: https://github.com/rust-lang/rust/issues/30827