From 593b042f7b518e89731d63c2635cb62a766acf9e Mon Sep 17 00:00:00 2001 From: Sabrina Jewson Date: Tue, 10 May 2022 18:53:43 +0100 Subject: [PATCH] docs: mention that Clippy must be run with the MSRV (#4676) ## Motivation In #4675 I learnt the hard way that Tokio uses Clippy on its MSRV. ## Solution Document this in the contributor's guide. --- .github/workflows/ci.yml | 8 ++++++++ CONTRIBUTING.md | 18 ++++++++++++++++++ README.md | 12 ++++++++++++ tokio/README.md | 12 ++++++++++++ 4 files changed, 50 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41087e7d8..da2d6231a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,14 @@ env: rust_stable: stable rust_nightly: nightly-2022-03-21 rust_clippy: 1.52.0 + # When updating this, also update: + # - README.md + # - tokio/README.md + # - CONTRIBUTING.md + # - tokio/Cargo.toml + # - tokio-util/Cargo.toml + # - tokio-test/Cargo.toml + # - tokio-stream/Cargo.toml rust_min: 1.49.0 defaults: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6979fb3e1..f7e758574 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -131,6 +131,24 @@ cargo check --all-features cargo test --all-features ``` +Clippy must be run using the MSRV, so Tokio can avoid having to `#[allow]` new +lints whose fixes would be incompatible with the current MSRV: + + + +``` +cargo +1.49.0 clippy --all-features +``` + When building documentation normally, the markers that list the features required for various parts of Tokio are missing. To build the documentation correctly, use this command: diff --git a/README.md b/README.md index a1a4b74d3..d2e8224f1 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,18 @@ several other libraries, including: ## Supported Rust Versions + + Tokio will keep a rolling MSRV (minimum supported rust version) policy of **at least** 6 months. When increasing the MSRV, the new Rust version must have been released at least six months ago. The current MSRV is 1.49.0. diff --git a/tokio/README.md b/tokio/README.md index a1a4b74d3..d2e8224f1 100644 --- a/tokio/README.md +++ b/tokio/README.md @@ -163,6 +163,18 @@ several other libraries, including: ## Supported Rust Versions + + Tokio will keep a rolling MSRV (minimum supported rust version) policy of **at least** 6 months. When increasing the MSRV, the new Rust version must have been released at least six months ago. The current MSRV is 1.49.0.