v0.39.0
In this release
- 20 new lints, for a total of 127!
- Spotlight: Merging into
cargo
This release requires Rust 1.81+ both to install (MSRV) and at runtime. Future releases will require Rust 1.83+.
Spotlight: Merging into cargo
While cargo-semver-checks is currently a standalone tool, Rust's cargo team plans to eventually make it a built-in part of cargo itself. Here's how that would work.
When users run cargo publish today, cargo first runs a series of checks to make sure everything is in order. For example, it ensures that the code repository doesn't include any uncommitted changes, so as not to accidentally publish uncommitted code to crates.io:
$ cargo publish
Updating crates.io index
error: 1 files in the working directory contain changes that were not yet committed into git:
src/lib.rs
to proceed despite this and include the uncommitted changes, pass the `--allow-dirty` flag
cargo-semver-checks is planned to become another such pre-publish check, equivalent to running cargo semver-checks && cargo publish today. Of course, there are situations where maintainers may prefer to intentionally publish breaking changes in a non-major version, such as for a sufficiently critical security fix. The automatic semver-check will be overridable by passing a flag analogous to the --allow-dirty flag for uncommitted changes.
While we're excited to merge cargo-semver-checks into cargo, we are proceeding with caution before enabling it by default. We want to ensure "merge day" is a day of celebration for the entire Rust community, instead of causing frustration and further breakage! Good news: you can help us do that! Consider:
- Reporting any issues you find, including any suspected false-positives with our lints.
- Contributing lints to make
cargo-semver-checkssmarter - Funding the project via GitHub Sponsors
New lints
Preventing breakage caused by changes in generic parameters (lifetimes, const generics, and generic types), changes in package features, union field changes, and more:
feature_not_enabled_by_defaultfunction_abi_now_unwindfunction_requires_different_const_generic_paramsfunction_requires_different_generic_type_paramsmethod_requires_different_const_generic_paramsmethod_requires_different_generic_type_paramsproc_macro_now_doc_hiddentrait_allows_fewer_const_generic_paramstrait_allows_fewer_generic_type_paramstrait_method_parameter_count_changedtrait_method_requires_different_const_generic_paramstrait_method_requires_different_generic_type_paramstrait_requires_more_const_generic_paramstrait_requires_more_generic_type_paramstype_allows_fewer_const_generic_paramstype_allows_fewer_generic_type_paramstype_requires_more_const_generic_paramstype_requires_more_generic_type_paramsunion_field_added_with_all_pub_fieldsunion_field_added_with_non_pub_fields
Additionally, we've renamed one lint to align with the shift in preferred Rust terminology:
trait_no_longer_object_safe->trait_no_longer_dyn_compatible
Thanks to @Frank-III for contributing lints to this release!
All merged PRs
- Bump mozilla-actions/sccache-action from 0.0.6 to 0.0.7 by @dependabot in #1044
- Fix false-positive "macro no longer exported" report. by @obi1kenobi in #1043
- Weekly
cargo updateof dependencies by @obi1kenobi in #1045 - Use the new
importable_pathedge to clean up declarative macro lints. by @obi1kenobi in #1046 - Use
importable_pathdata in proc macro lints. by @obi1kenobi in #1047 - Add two lints looking for new fields in
repr(C)unions. by @obi1kenobi in #1049 - Add
proc_macro_now_doc_hiddenlint. by @obi1kenobi in #1050 - Add
feature_not_enabled_by_defaultlint. by @obi1kenobi in #1051 - Add the
type_requires_more_const_generic_paramslint. by @obi1kenobi in #1052 - Add the
type_allows_fewer_const_generic_paramslint. by @obi1kenobi in #1054 - Rename test crate to match lint name. by @obi1kenobi in #1053
- Add
function_requires_different_const_generic_paramslint. by @obi1kenobi in #1056 - Remove unnecessary snapshot file. by @obi1kenobi in #1057
- Add
method_requires_different_const_generic_paramslint. by @obi1kenobi in #1058 - Add matching lints for const-generics breakage in traits. by @obi1kenobi in #1055
- Add
trait_method_requires_different_const_generic_paramslint. by @obi1kenobi in #1060 - Add
trait_method_parameter_count_changedlint. by @obi1kenobi in #1059 - Add
function_abi_now_unwindlint and fixfunction_abi_no_longer_unwind. by @obi1kenobi in #1061 - Weekly
cargo updateof dependencies by @obi1kenobi in #1062 - Weekly
cargo updateof dependencies by @obi1kenobi in #1064 - Update to the latest
trustfall_rustdocversion. by @obi1kenobi in #1065 - Update funding info for 2025. by @obi1kenobi in #1066
- Small tweaks to funding manifest to make it valid. by @obi1kenobi in #1067
- Add next Rust minor to test matrix by @obi1kenobi in #1072
- Weekly
cargo updateof dependencies by @obi1kenobi in #1069 - Weekly
cargo updateof dependencies by @obi1kenobi in #1074 - Update
trustfallto avoid missed optimization perf regression. by @obi1kenobi in #1075 - Weekly
cargo updateof dependencies by @obi1kenobi in #1077 - Bump to latest (including major) versions of all dependencies. by @obi1kenobi in #1078
- Add two lints over types' use of generic type arguments. by @obi1kenobi in #1079
- Add lints over changes in generic types in traits. by @obi1kenobi in #1080
- Add lints for type generics in functions, methods, and trait methods. by @obi1kenobi in #1081
- Weekly
cargo updateof dependencies by @obi1kenobi in #1082 - Add support for rustdoc JSON format v39. by @obi1kenobi in #1084
- replace
object_safewithdyn_compatibleby @Frank-III in #1083 - Release v0.39.0 with 20 new lints. by @obi1kenobi in #1085
New Contributors
- @Frank-III made their first contribution in #1083
Full Changelog: v0.38.0...v0.39.0