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-checks
smarter - 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_default
function_abi_now_unwind
function_requires_different_const_generic_params
function_requires_different_generic_type_params
method_requires_different_const_generic_params
method_requires_different_generic_type_params
proc_macro_now_doc_hidden
trait_allows_fewer_const_generic_params
trait_allows_fewer_generic_type_params
trait_method_parameter_count_changed
trait_method_requires_different_const_generic_params
trait_method_requires_different_generic_type_params
trait_requires_more_const_generic_params
trait_requires_more_generic_type_params
type_allows_fewer_const_generic_params
type_allows_fewer_generic_type_params
type_requires_more_const_generic_params
type_requires_more_generic_type_params
union_field_added_with_all_pub_fields
union_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 update
of dependencies by @obi1kenobi in #1045 - Use the new
importable_path
edge to clean up declarative macro lints. by @obi1kenobi in #1046 - Use
importable_path
data 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_hidden
lint. by @obi1kenobi in #1050 - Add
feature_not_enabled_by_default
lint. by @obi1kenobi in #1051 - Add the
type_requires_more_const_generic_params
lint. by @obi1kenobi in #1052 - Add the
type_allows_fewer_const_generic_params
lint. by @obi1kenobi in #1054 - Rename test crate to match lint name. by @obi1kenobi in #1053
- Add
function_requires_different_const_generic_params
lint. by @obi1kenobi in #1056 - Remove unnecessary snapshot file. by @obi1kenobi in #1057
- Add
method_requires_different_const_generic_params
lint. by @obi1kenobi in #1058 - Add matching lints for const-generics breakage in traits. by @obi1kenobi in #1055
- Add
trait_method_requires_different_const_generic_params
lint. by @obi1kenobi in #1060 - Add
trait_method_parameter_count_changed
lint. by @obi1kenobi in #1059 - Add
function_abi_now_unwind
lint and fixfunction_abi_no_longer_unwind
. by @obi1kenobi in #1061 - Weekly
cargo update
of dependencies by @obi1kenobi in #1062 - Weekly
cargo update
of dependencies by @obi1kenobi in #1064 - Update to the latest
trustfall_rustdoc
version. 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 update
of dependencies by @obi1kenobi in #1069 - Weekly
cargo update
of dependencies by @obi1kenobi in #1074 - Update
trustfall
to avoid missed optimization perf regression. by @obi1kenobi in #1075 - Weekly
cargo update
of 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 update
of dependencies by @obi1kenobi in #1082 - Add support for rustdoc JSON format v39. by @obi1kenobi in #1084
- replace
object_safe
withdyn_compatible
by @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