From b933c4fad08f2e5ef159dc236ee345f896934702 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Tue, 13 Aug 2024 03:57:48 +0300 Subject: [PATCH 1/5] Another `cargo update` for good measure. --- Cargo.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 428115e..3131bcc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" @@ -57,15 +57,15 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" [[package]] name = "indexmap" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", "hashbrown", @@ -223,9 +223,9 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "syn" -version = "2.0.77" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", From 2db7e116cee23debc7bdca4ccd1b14a06323cf6a Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Tue, 13 Aug 2024 03:57:48 +0300 Subject: [PATCH 2/5] Fix lint warnings (including clippy). --- Cargo.toml | 3 +++ src/lib.rs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ab59989..0dccdd0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,6 +34,9 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" smallvec = { version = "1.7.0", features = ["serde", "union"] } +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(git_main_docs)'] } + [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs", "--document-private-items"] diff --git a/src/lib.rs b/src/lib.rs index 88a94a0..3710c6a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -104,7 +104,6 @@ clippy::match_wild_err_arm, clippy::match_wildcard_for_single_variants, clippy::mem_forget, - clippy::mismatched_target_os, clippy::missing_enforced_import_renames, clippy::mut_mut, clippy::mutex_integer, @@ -145,6 +144,9 @@ // NOTE(eddyb) ignored because it's misguided to suggest `let mut s = ...;` // and `s.push_str(...);` when `+` is equivalent and does not require `let`. clippy::string_add, + + // FIXME(eddyb) rework doc comments to conform to linted expectations. + clippy::too_long_first_doc_paragraph, )] // NOTE(eddyb) this is stronger than the "Embark standard lints" above, because // we almost never need `unsafe` code and this is a further "speed bump" to it. From 89667fded481fa6bf4c370fc68057a0b647c13b9 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Tue, 13 Aug 2024 03:57:48 +0300 Subject: [PATCH 3/5] Switch `rustfmt.toml` to `style_edition = "2024"`. --- .github/workflows/ci.yml | 5 ++--- rustfmt.toml | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1332b1..833f0d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,9 +18,8 @@ jobs: submodules: true - uses: actions-rs/toolchain@v1 with: - # HACK(eddyb) only nightly supports setting `version = "Two"` - # in `rustfmt.toml`, which is needed to format array/slice patterns - # at all (see https://github.com/rust-lang/rustfmt/pull/4994). + # FIXME(eddyb) `style_edition = "2024"` in `rustfmt.toml` is what keeps + # this on `nightly`, should switch to `stable` when that stabilizes. toolchain: nightly override: true diff --git a/rustfmt.toml b/rustfmt.toml index 1568008..cbce8ad 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,6 +1,4 @@ -# HACK(eddyb) needed to format array/slice patterns at all, because it was a -# breaking change (see https://github.com/rust-lang/rustfmt/pull/4994). -version = "Two" +style_edition = "2024" # HACK(eddyb) avoid random spilling of e.g. method call chains onto many lines. use_small_heuristics = "Max" From f0fbff082fa97439c35eec023592efb067c07e4a Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Thu, 3 Oct 2024 23:25:13 +0300 Subject: [PATCH 4/5] Bump `cargo-deny` and fix its deprecation warnings (now errors). --- .github/workflows/ci.yml | 2 +- deny.toml | 21 ++++----------------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 833f0d5..13cf071 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,7 +90,7 @@ jobs: - uses: actions/checkout@v3 with: submodules: true - - uses: EmbarkStudios/cargo-deny-action@v1 + - uses: EmbarkStudios/cargo-deny-action@v2 publish-check: name: Publish Check diff --git a/deny.toml b/deny.toml index 60bff90..26f4d0d 100644 --- a/deny.toml +++ b/deny.toml @@ -2,23 +2,17 @@ # More documentation for the advisories section can be found here: # https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html [advisories] -# The lint level for security vulnerabilities -vulnerability = "deny" -# The lint level for unmaintained crates -unmaintained = "deny" +# NOTE(eddyb) see https://github.com/EmbarkStudios/cargo-deny/pull/611. +version = 2 # The lint level for crates that have been yanked from their source registry yanked = "deny" -# The lint level for crates with security notices. Note that as of -# 2019-12-17 there are no security notice advisories in -# https://github.com/rustsec/advisory-db -notice = "deny" # This section is considered when running `cargo deny check licenses` # More documentation for the licenses section can be found here: # https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html [licenses] -# The lint level for crates which do not have a detectable license -unlicensed = "deny" +# NOTE(eddyb) see https://github.com/EmbarkStudios/cargo-deny/pull/611. +version = 2 # List of explicitly allowed licenses # See https://spdx.org/licenses/ for list of possible licenses # [possible values: any SPDX 3.11 short identifier (+ optional exception)]. @@ -27,8 +21,6 @@ allow = [ "Apache-2.0", "Unicode-DFS-2016", ] -# Lint level for licenses considered copyleft -copyleft = "deny" # This section is considered when running `cargo deny check bans`. # More documentation about the 'bans' section can be found here: @@ -38,11 +30,6 @@ copyleft = "deny" multiple-versions = "deny" # Lint level for when a crate version requirement is `*` wildcards = "deny" -# Certain crates/versions that will be skipped when doing duplicate detection. -skip = [ - # FIXME(eddyb) `syn 2` has not replaced `syn 1` across the ecosystem yet. - { name = "syn", version = "2" }, -] # This section is considered when running `cargo deny check sources`. # More documentation about the 'sources' section can be found here: From c465e026106bb515fd9b5b9abde7657266f79bb4 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Fri, 4 Oct 2024 00:24:19 +0300 Subject: [PATCH 5/5] ci: try to fix "Ensure compatibility with rust-gpu nightly rust version" check. --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13cf071..b24c1bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,10 @@ jobs: # FIXME(eddyb) `style_edition = "2024"` in `rustfmt.toml` is what keeps # this on `nightly`, should switch to `stable` when that stabilizes. toolchain: nightly - override: true + # HACK(eddyb) use `nightly` by default without breaking the ability to + # temporarily bypass it through `rust-toolchain.toml`. + default: true + override: false # run cargo fetch w/ --locked to verify Cargo.lock is up-to-date - run: cargo fetch --locked