Skip to content

Conversation

@clarfonthey
Copy link
Contributor

@clarfonthey clarfonthey commented Dec 23, 2025

This is the version where Cargo's MSRV resolver was added, so, it was what was decided previously as a good place to bump to. Includes clippy fixes for methods that were added in the meantime that could be used instead.

I also took the liberty of running taplo fmt in the repo to clean up the TOML files. I can revert this if desired.

In preparation for 2024 edition compatibility, I have enabled the unsafe_op_in_unsafe_fn lint and ensured it passes here, since that's the largest change that edition 2024 would have. I've done my best to try and minimise the unsafe block bounds auto-added by fixes as well as possible, but there's a lot of code that needs to be annotated with safety comments anyway, so, some are left with very large unsafe blocks.

Additionally, I have made unreachable_pub now warn by default as agreed upon in #675. With a higher MSRV, we can avoid false positives.

Note that 1.85 was when edition 2024 was added, so, it might also be desirable to bump to that, but with this PR, the changes to do so are minimal and just require cargo fmt.

@clarfonthey clarfonthey force-pushed the msrv-1.84 branch 2 times, most recently from 3c9b290 to 8c3980d Compare December 23, 2025 20:42
Comment on lines -42 to -45
#![cfg_attr(
feature = "nightly",
allow(clippy::incompatible_msrv, internal_features)
)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably could have removed incompatible_msrv here for a while; this now understands that a nightly feature means that you're not going to be following MSRV.

@clarfonthey clarfonthey force-pushed the msrv-1.84 branch 3 times, most recently from 33b2b90 to 0dbbb18 Compare December 23, 2025 20:58

if retry rustup component add clippy ; then
cargo clippy --all --tests --features serde,rayon -- -D clippy::all
cargo clippy --all --tests --features serde,rayon -- -D warnings
Copy link
Contributor Author

@clarfonthey clarfonthey Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-D clippy::all has a higher priority than the various lints in Cargo.toml, so, this ends up ignoring our lint preferences to allow some lints, but -D warnings does what we want here.

Comment on lines +19 to +25
# rust_2018_idioms
bare_trait_objects = "warn"
elided_lifetimes_in_paths = "warn"
ellipsis_inclusive_range_patterns = "warn"
explicit_outlives_requirements = "warn"
unused_extern_crates = "warn"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than enable the lint group here, I decided to just manually add these lints to the list since it avoids lint group priority issues. Since this is 2018 idioms, I doubt that the group will gain any new additions any time soon.

@clarfonthey clarfonthey force-pushed the msrv-1.84 branch 2 times, most recently from 2e8e439 to 60cbe03 Compare December 23, 2025 21:50
@clarfonthey clarfonthey force-pushed the msrv-1.84 branch 4 times, most recently from 0aeba7d to ee9e7c3 Compare December 23, 2025 22:12
@clarfonthey
Copy link
Contributor Author

Side note: I hate that you can't lint code that's been cfg'd out. I know that this is nothing new, but it's frustrating that something as simple as unsafe-op-in-unsafe-fn requires downloading multiple builds of libstd, recompiling dependencies for multiple targets, and potentially even downloading separate linking tools for other targets all because of this limitation. I've done it for multiple different cases but this is just the latest one and I'm annoyed about it and going to vent about it here.

Thanks for coming to my talk.

@clarfonthey clarfonthey force-pushed the msrv-1.84 branch 3 times, most recently from 780b782 to 3581589 Compare December 24, 2025 00:34
@clarfonthey
Copy link
Contributor Author

I think at this point, I've implemented all major changes up to the MSRV that I think are important before merging. If I've missed any, please feel free to mention it, although as usual, no rush. I'm not going to have a proper computer to dev this for the next couple days, so, I'll get to any requests when I'm back home unless I happen to notice them before I go to bed tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants