v0.40.0
In this release
- 21 new lints, for a total of 148!
- Spotlight:
#[doc(hidden)]and sealed lints
This release requires Rust 1.83+ both to install (MSRV) and at runtime. Future releases will require Rust 1.84+.
Spotlight: #[doc(hidden)] and sealed lints
When is "this trait can be implemented" part of the trait's public API?
At a high level, the answer is: when writing an impl of that trait for our own type doesn't require using any #[doc(hidden)] items. But you've been following cargo-semver-checks long enough to know the full answer is much more complex. And getting the right answer here affects the correctness of a ton of lints!
Good news! This cargo-semver-checks release ships with a much more sophisticated system for analyzing whether traits can be implemented or are instead "sealed." The new system is more thorough, more nuanced, and faster to boot!
Read more about it here: https://predr.ag/blog/when-is-trait-can-be-implemented-public-api/
New lints
We added new 21 lints across several categories. Some of the new lints are error-by-default, while others are merely warnings meant to flag changes deserving closer review.
API breakage:
static_became_unsafe
ABI and FFI breakage due to changed repr(C) type layout:
repr_c_enum_struct_variant_fields_reorderedrepr_c_plain_struct_fields_reordered
Item deprecations, which cause lints in downstream use:
function_marked_deprecatedglobal_value_marked_deprecatedmacro_marked_deprecatedproc_macro_marked_deprecatedstruct_field_marked_deprecatedtrait_associated_const_marked_deprecatedtrait_associated_type_marked_deprecatedtrait_marked_deprecatedtrait_method_marked_deprecatedtype_associated_const_marked_deprecatedtype_method_marked_deprecated
Code behavior changes, such as changes to sort order of existing types:
partial_ord_enum_struct_variant_fields_reorderedpartial_ord_enum_variants_reorderedpartial_ord_struct_fields_reordered
Compatibility risks, such as changes that may require a SemVer major bump to revert, or may otherwise represent unintended API changes without being SemVer-major themselves:
pub_api_sealed_trait_became_unconditionally_sealedunconditionally_sealed_trait_became_pub_api_sealedunconditionally_sealed_trait_became_unsealedpub_api_sealed_trait_became_unsealed
Thanks to @Frank-III, @geetanshjuneja, and @lovelindhoni for contributing lints to this release!
All merged PRs
- Require Rust 1.83+ going forward. by @obi1kenobi in #1086
- Use newer trustfall_rustdoc with only supported rustdoc versions. by @obi1kenobi in #1087
- Update CI and release profile settings for speed and efficiency. by @obi1kenobi in #1088
- Eliminate clippy lint. by @obi1kenobi in #1089
- feat: static became unsafe lint by @Frank-III in #1090
- new lint:
trait_marked_deprecatedby @Frank-III in #1092 - Weekly
cargo updateof dependencies by @obi1kenobi in #1097 - new lint:
function_marked_deprecatedby @Frank-III in #1093 - new lint:
trait_method_marked_deprecatedby @Frank-III in #1098 - new lint
trait_associated_type_marked_deprecatedby @Frank-III in #1099 - new lint:
trait_associated_const_marked_deprecatedby @Frank-III in #1100 - new lint:
global_value_marked_deprecatedby @Frank-III in #1101 - new lint:
macro_marked_deprecatedby @Frank-III in #1102 - Avoid stack overflow when checking sealing on cyclic trait bounds. by @obi1kenobi in #1103
- Replace deprecated
sealedproperty with newunconditionally_sealed. by @obi1kenobi in #1104 - Remove outdated TODOs related to trait sealing. by @obi1kenobi in #1106
- new lint:
proc_macro_marked_deprecatedby @Frank-III in #1118 - new lint:
struct_field_marked_deprecatedby @Frank-III in #1125 - fix: check if trait is deprecated or not by @Frank-III in #1127
- Add
span_end_lineto lints with spans by @suaviloquence in #1126 - new lint:
type_method_marked_deprecatedby @Frank-III in #1130 - new lint:
type_associated_const_deprecatedby @Frank-III in #1131 - Weekly
cargo updateof dependencies by @obi1kenobi in #1136 - Add a test that fails when generated rustdocs are older than test crate data by @suaviloquence in #1128
- add actionlint workflow by @Frank-III in #1137
- Add zero-tolerance policy for AI slop "contributions". by @obi1kenobi in #1139
- Weekly
cargo updateof dependencies by @obi1kenobi in #1140 - Add next Rust minor to test matrix by @obi1kenobi in #1142
- Mention turbofish use as breakage example in function generics change. by @obi1kenobi in #1143
- Eliminate compilation errors from test crates that rustdoc can't catch. by @obi1kenobi in #1144
- Suppress expected lint in test crate. by @obi1kenobi in #1146
- Require test crates to pass
cargo check. by @obi1kenobi in #1145 - new lint:
repr_c_plain_struct_fields_reorderedby @Frank-III in #1138 - Weekly
cargo updateof dependencies by @obi1kenobi in #1147 - Added public api sealed to trait_added_supertrait lint by @geetanshjuneja in #1148
- Added public api sealed in trait_const_added lint by @geetanshjuneja in #1149
- Added public sealed api in trait_associated_type_added by @geetanshjuneja in #1151
- new lint:
repr_c_enum_struct_variant_fields_reorderedby @Frank-III in #1152 - Added public API sealed in trait_method_default_impl removed by @geetanshjuneja in #1156
- Added public API sealed in trait_unsafe_removed lint by @geetanshjuneja in #1157
- Added public API sealed in trait_unsafe_added lint by @geetanshjuneja in #1158
- Added public API sealed in trait_associated_type_default_removed lint by @geetanshjuneja in #1154
- Added public API sealed in trait_method_added lint by @geetanshjuneja in #1155
- Added public api sealed in trait_associated_const_default_removed by @geetanshjuneja in #1150
- Added public API sealed in trait_method_unsafe_removed by @geetanshjuneja in #1159
- Added public API sealed in trait_newly_sealed by @geetanshjuneja in #1160
- new lint
partial_ord_struct_field_reorderedby @Frank-III in #1161 - new lint:
partial_ord_enum_variants_reorderedby @Frank-III in #1163 - new lint
partial_ord_enum_struct_variant_fields_reorderedby @Frank-III in #1165 - new lint:
pub_api_sealed_trait_became_unsealedby @lovelindhoni in #1162 - new lint:
unconditionally_sealed_trait_became_unsealedby @lovelindhoni in #1164 - new lint:
pub_api_sealed_trait_became_unconditionally_sealedby @lovelindhoni in #1166 - new lint:
unconditionally_sealed_trait_became_pub_api_sealedby @lovelindhoni in #1167 - Weekly
cargo updateof dependencies by @obi1kenobi in #1168 - Build release binaries using Ubuntu 22.04 to avoid too-new glibc dep. by @obi1kenobi in #1170
- Use
#![no_std]in test crates to speed up tests. by @obi1kenobi in #1171 - Bump mozilla-actions/sccache-action from 0.0.7 to 0.0.8 by @dependabot in #1172
- Update dependency in preparation for publishing new version. by @obi1kenobi in #1173
- Release cargo-semver-checks v0.40.0 by @obi1kenobi in #1174
New Contributors
- @geetanshjuneja made their first contribution in #1148
- @lovelindhoni made their first contribution in #1162
Full Changelog: v0.39.0...v0.40.0