Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@edmorley
Copy link
Member

@edmorley edmorley commented Nov 17, 2023

As of the Cargo included in Rust 1.74, lints can now be configured in Cargo.toml across whole crates/workspaces:
https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html
https://doc.rust-lang.org/stable/cargo/reference/manifest.html#the-lints-section
https://doc.rust-lang.org/stable/cargo/reference/workspaces.html#the-lints-table

This reduces the boilerplate, and the chance that we forget to enable lints in some targets. The only thing we need to remember is to add the [lints] workspace = true to any new crates in the future.

Making this switch exposed a few places where lints weren't enabled and issues had been missed, eg:
#746

Since this feature requires Rust 1.74, the MSRV has also been bumped. (Though we will have had to do so soon anyway to be able to start using Result::inspect_err, which is due in Rust 1.76, xref: #723 (comment))

GUS-W-14511805.

As of the Cargo included in Rust 1.74, lints can now be configured
in `Cargo.toml` across whole crates/workspaces:
https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html
https://doc.rust-lang.org/stable/cargo/reference/manifest.html#the-lints-section
https://doc.rust-lang.org/stable/cargo/reference/workspaces.html#the-lints-table

This reduces the boilerplate, and chance that we forget to enable
lints in some targets. The only thing we need to remember is to
add the `[lints] workspace = true` to any new crates in the future.

Making this switch exposed a few places where lints weren't enabled
and issues had been missed, eg:
#746

Since this feature requires Rust 1.74, the MSRV has also been bumped.
(Though we will have had to do so soon anyway to be able to start
using `Result::inspect_err`, which is due in Rust 1.76, xref:
#723 (comment))

GUS-W-14511805.
@edmorley edmorley force-pushed the edmorley/workspace-lints branch from 5f53fde to 0048262 Compare November 17, 2023 13:18
@Malax
Copy link
Member

Malax commented Nov 17, 2023

Woohoo! :)

@edmorley edmorley merged commit 02f241c into main Nov 17, 2023
@edmorley edmorley deleted the edmorley/workspace-lints branch November 17, 2023 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants