From 6b9055d511a4eeb52cfa842d88852382132ab397 Mon Sep 17 00:00:00 2001 From: "hash-worker[bot]" <180894564+hash-worker[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 22:52:42 +0000 Subject: [PATCH] Update Rust toolchains to nightly-2024-12-02 (#5768) Co-authored-by: hash-worker[bot] <180894564+hash-worker[bot]@users.noreply.github.com> Co-authored-by: Tim Diekmann --- .github/scripts/rust/sync-turborepo.rs | 2 -- Cargo.lock | 4 ++-- Cargo.toml | 2 -- apps/hash-graph/Cargo.toml | 2 -- libs/@blockprotocol/type-system/rust/Cargo.toml | 2 -- .../rust/src/schema/data_type/constraint/array.rs | 6 +++--- libs/@local/codec/Cargo.toml | 2 -- libs/@local/graph/api/Cargo.toml | 2 -- libs/@local/graph/authorization/Cargo.toml | 2 -- libs/@local/graph/migrations-macros/Cargo.toml | 2 -- libs/@local/graph/migrations/Cargo.toml | 2 -- libs/@local/graph/postgres-store/Cargo.toml | 2 -- libs/@local/graph/store/Cargo.toml | 2 -- libs/@local/graph/temporal-versioning/Cargo.toml | 2 -- libs/@local/graph/test-server/Cargo.toml | 2 -- libs/@local/graph/type-defs/Cargo.toml | 2 -- libs/@local/graph/type-fetcher/Cargo.toml | 2 -- libs/@local/graph/type-fetcher/src/fetcher.rs | 2 -- libs/@local/graph/types/rust/Cargo.toml | 2 -- libs/@local/graph/validation/Cargo.toml | 2 -- libs/@local/harpc/client/rust/Cargo.toml | 2 -- libs/@local/harpc/codec/Cargo.toml | 2 -- libs/@local/harpc/net/Cargo.toml | 2 -- libs/@local/harpc/server/Cargo.toml | 2 -- libs/@local/harpc/system/Cargo.toml | 2 -- libs/@local/harpc/tower/Cargo.toml | 2 -- libs/@local/harpc/tower/src/extensions.rs | 2 +- libs/@local/harpc/types/Cargo.toml | 2 -- libs/@local/harpc/wire-protocol/Cargo.toml | 2 -- libs/@local/hql/cst/Cargo.toml | 2 -- libs/@local/hql/diagnostics/Cargo.toml | 2 -- libs/@local/hql/span/Cargo.toml | 2 -- libs/@local/hql/syntax-jexpr/Cargo.toml | 2 -- libs/@local/repo-chores/rust/Cargo.toml | 2 -- libs/@local/status/rust/Cargo.toml | 2 -- libs/@local/temporal-client/Cargo.toml | 2 -- libs/@local/tracing/Cargo.toml | 2 -- libs/antsi/rust-toolchain.toml | 2 +- libs/chonky/Cargo.toml | 2 -- libs/chonky/src/lib.rs | 2 +- libs/deer/rust-toolchain.toml | 2 +- libs/error-stack/README.md | 2 +- libs/error-stack/macros/README.md | 2 +- libs/error-stack/macros/src/lib.rs | 2 +- libs/error-stack/rust-toolchain.toml | 2 +- libs/error-stack/src/fmt/charset.rs | 4 ++-- libs/error-stack/src/fmt/color.rs | 6 +++--- libs/error-stack/src/fmt/hook.rs | 4 ++-- libs/error-stack/src/fmt/mod.rs | 4 ++-- libs/error-stack/src/hook/mod.rs | 6 +++--- libs/error-stack/src/lib.rs | 6 +++--- libs/error-stack/src/report.rs | 6 +++--- libs/sarif/rust-toolchain.toml | 2 +- libs/sarif/src/lib.rs | 11 ++++++++--- libs/sarif/src/schema/message.rs | 10 +++++----- rust-toolchain.toml | 2 +- tests/graph/benches/Cargo.toml | 2 -- tests/graph/integration/Cargo.toml | 2 -- tests/graph/test-data/rust/Cargo.toml | 2 -- 59 files changed, 46 insertions(+), 117 deletions(-) diff --git a/.github/scripts/rust/sync-turborepo.rs b/.github/scripts/rust/sync-turborepo.rs index 1ce8d84e324..2bedfbeacce 100644 --- a/.github/scripts/rust/sync-turborepo.rs +++ b/.github/scripts/rust/sync-turborepo.rs @@ -1,7 +1,5 @@ #!/usr/bin/env -S cargo +nightly -Zscript --- -cargo-features = ["edition2024"] - [package] edition = "2024" diff --git a/Cargo.lock b/Cargo.lock index cc149a563e4..9b5e9178084 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1089,9 +1089,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.9.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" dependencies = [ "serde", ] diff --git a/Cargo.toml b/Cargo.toml index 5adfefcaea9..d6c0cbedc60 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [workspace] default-members = [ "apps/hash-graph", diff --git a/apps/hash-graph/Cargo.toml b/apps/hash-graph/Cargo.toml index 5c48df39c94..15e337c4a46 100644 --- a/apps/hash-graph/Cargo.toml +++ b/apps/hash-graph/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-graph" version.workspace = true diff --git a/libs/@blockprotocol/type-system/rust/Cargo.toml b/libs/@blockprotocol/type-system/rust/Cargo.toml index 8f5b2cbca8f..fccf539c764 100644 --- a/libs/@blockprotocol/type-system/rust/Cargo.toml +++ b/libs/@blockprotocol/type-system/rust/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "type-system" description = "Definitions of types within the Block Protocol Type System" diff --git a/libs/@blockprotocol/type-system/rust/src/schema/data_type/constraint/array.rs b/libs/@blockprotocol/type-system/rust/src/schema/data_type/constraint/array.rs index 5a3260e420e..3e0df0e599c 100644 --- a/libs/@blockprotocol/type-system/rust/src/schema/data_type/constraint/array.rs +++ b/libs/@blockprotocol/type-system/rust/src/schema/data_type/constraint/array.rs @@ -266,9 +266,9 @@ impl ConstraintValidator<[JsonValue]> for ArrayConstraints { type Error = [ArrayValidationError]; fn is_valid(&self, value: &[JsonValue]) -> bool { - self.items.as_ref().map_or(true, |items| { - value.iter().all(|value| items.constraints.is_valid(value)) - }) + self.items + .as_ref() + .is_none_or(|items| value.iter().all(|value| items.constraints.is_valid(value))) } fn validate_value(&self, value: &[JsonValue]) -> Result<(), Report<[ArrayValidationError]>> { diff --git a/libs/@local/codec/Cargo.toml b/libs/@local/codec/Cargo.toml index 5be7689d466..60ae34f49ac 100644 --- a/libs/@local/codec/Cargo.toml +++ b/libs/@local/codec/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-codec" version.workspace = true diff --git a/libs/@local/graph/api/Cargo.toml b/libs/@local/graph/api/Cargo.toml index b96960848eb..8cf9f625f1f 100644 --- a/libs/@local/graph/api/Cargo.toml +++ b/libs/@local/graph/api/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-graph-api" version.workspace = true diff --git a/libs/@local/graph/authorization/Cargo.toml b/libs/@local/graph/authorization/Cargo.toml index 041fba37352..dd36e29e4a6 100644 --- a/libs/@local/graph/authorization/Cargo.toml +++ b/libs/@local/graph/authorization/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-graph-authorization" version.workspace = true diff --git a/libs/@local/graph/migrations-macros/Cargo.toml b/libs/@local/graph/migrations-macros/Cargo.toml index f82069cecbf..a9f84a13b63 100644 --- a/libs/@local/graph/migrations-macros/Cargo.toml +++ b/libs/@local/graph/migrations-macros/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-graph-migrations-macros" version.workspace = true diff --git a/libs/@local/graph/migrations/Cargo.toml b/libs/@local/graph/migrations/Cargo.toml index 7131a198ac2..78fd05f6500 100644 --- a/libs/@local/graph/migrations/Cargo.toml +++ b/libs/@local/graph/migrations/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-graph-migrations" version.workspace = true diff --git a/libs/@local/graph/postgres-store/Cargo.toml b/libs/@local/graph/postgres-store/Cargo.toml index 6de33b59266..48a9ef5b501 100644 --- a/libs/@local/graph/postgres-store/Cargo.toml +++ b/libs/@local/graph/postgres-store/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-graph-postgres-store" version.workspace = true diff --git a/libs/@local/graph/store/Cargo.toml b/libs/@local/graph/store/Cargo.toml index 6ddb2141f5f..eaed681396e 100644 --- a/libs/@local/graph/store/Cargo.toml +++ b/libs/@local/graph/store/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-graph-store" version.workspace = true diff --git a/libs/@local/graph/temporal-versioning/Cargo.toml b/libs/@local/graph/temporal-versioning/Cargo.toml index 2d3931a6cf9..a751c9e6f4c 100644 --- a/libs/@local/graph/temporal-versioning/Cargo.toml +++ b/libs/@local/graph/temporal-versioning/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-graph-temporal-versioning" version.workspace = true diff --git a/libs/@local/graph/test-server/Cargo.toml b/libs/@local/graph/test-server/Cargo.toml index 0490b0c99c8..45afd374723 100644 --- a/libs/@local/graph/test-server/Cargo.toml +++ b/libs/@local/graph/test-server/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-graph-test-server" description = "HASH Graph test server" diff --git a/libs/@local/graph/type-defs/Cargo.toml b/libs/@local/graph/type-defs/Cargo.toml index b6da899ff5d..01355cc1e0d 100644 --- a/libs/@local/graph/type-defs/Cargo.toml +++ b/libs/@local/graph/type-defs/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-graph-type-defs" description = "HASH Graph type definitions" diff --git a/libs/@local/graph/type-fetcher/Cargo.toml b/libs/@local/graph/type-fetcher/Cargo.toml index 9ccc9108ff7..2c0b90dcca6 100644 --- a/libs/@local/graph/type-fetcher/Cargo.toml +++ b/libs/@local/graph/type-fetcher/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-graph-type-fetcher" description = "RPC service definition to fetch external BP types" diff --git a/libs/@local/graph/type-fetcher/src/fetcher.rs b/libs/@local/graph/type-fetcher/src/fetcher.rs index c5bfd6968d5..3945df5de24 100644 --- a/libs/@local/graph/type-fetcher/src/fetcher.rs +++ b/libs/@local/graph/type-fetcher/src/fetcher.rs @@ -1,5 +1,3 @@ -#![expect(clippy::future_not_send)] - use core::{error::Error, fmt}; use serde::{Deserialize, Serialize}; diff --git a/libs/@local/graph/types/rust/Cargo.toml b/libs/@local/graph/types/rust/Cargo.toml index 31ed387c9b6..2fa8c542372 100644 --- a/libs/@local/graph/types/rust/Cargo.toml +++ b/libs/@local/graph/types/rust/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-graph-types" version.workspace = true diff --git a/libs/@local/graph/validation/Cargo.toml b/libs/@local/graph/validation/Cargo.toml index c532d57f552..e24f7854d32 100644 --- a/libs/@local/graph/validation/Cargo.toml +++ b/libs/@local/graph/validation/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-graph-validation" version.workspace = true diff --git a/libs/@local/harpc/client/rust/Cargo.toml b/libs/@local/harpc/client/rust/Cargo.toml index f62ddb2cd19..3a4e2e99828 100644 --- a/libs/@local/harpc/client/rust/Cargo.toml +++ b/libs/@local/harpc/client/rust/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "harpc-client" authors.workspace = true diff --git a/libs/@local/harpc/codec/Cargo.toml b/libs/@local/harpc/codec/Cargo.toml index b8568c8fba7..45aa3766cfd 100644 --- a/libs/@local/harpc/codec/Cargo.toml +++ b/libs/@local/harpc/codec/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "harpc-codec" authors.workspace = true diff --git a/libs/@local/harpc/net/Cargo.toml b/libs/@local/harpc/net/Cargo.toml index bf7e0dd1c4f..e27dd51e985 100644 --- a/libs/@local/harpc/net/Cargo.toml +++ b/libs/@local/harpc/net/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "harpc-net" version.workspace = true diff --git a/libs/@local/harpc/server/Cargo.toml b/libs/@local/harpc/server/Cargo.toml index 74d60a9c684..26a70ec3b7c 100644 --- a/libs/@local/harpc/server/Cargo.toml +++ b/libs/@local/harpc/server/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "harpc-server" authors.workspace = true diff --git a/libs/@local/harpc/system/Cargo.toml b/libs/@local/harpc/system/Cargo.toml index 02317476074..03f0ddd7fc8 100644 --- a/libs/@local/harpc/system/Cargo.toml +++ b/libs/@local/harpc/system/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "harpc-system" authors.workspace = true diff --git a/libs/@local/harpc/tower/Cargo.toml b/libs/@local/harpc/tower/Cargo.toml index f621eebb2f8..1dd775b3bbf 100644 --- a/libs/@local/harpc/tower/Cargo.toml +++ b/libs/@local/harpc/tower/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "harpc-tower" version.workspace = true diff --git a/libs/@local/harpc/tower/src/extensions.rs b/libs/@local/harpc/tower/src/extensions.rs index 5da90d283bc..cd7e32c8eea 100644 --- a/libs/@local/harpc/tower/src/extensions.rs +++ b/libs/@local/harpc/tower/src/extensions.rs @@ -225,7 +225,7 @@ impl Extensions { #[inline] #[must_use] pub fn is_empty(&self) -> bool { - self.map.as_ref().map_or(true, |map| map.is_empty()) + self.map.as_ref().is_none_or(|map| map.is_empty()) } /// Get the numer of extensions available. diff --git a/libs/@local/harpc/types/Cargo.toml b/libs/@local/harpc/types/Cargo.toml index 5690151b026..00a017f45e7 100644 --- a/libs/@local/harpc/types/Cargo.toml +++ b/libs/@local/harpc/types/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "harpc-types" version.workspace = true diff --git a/libs/@local/harpc/wire-protocol/Cargo.toml b/libs/@local/harpc/wire-protocol/Cargo.toml index f73516ce6bf..3bcf6b73688 100644 --- a/libs/@local/harpc/wire-protocol/Cargo.toml +++ b/libs/@local/harpc/wire-protocol/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "harpc-wire-protocol" version.workspace = true diff --git a/libs/@local/hql/cst/Cargo.toml b/libs/@local/hql/cst/Cargo.toml index 985f1ccdce5..0e84fb1324e 100644 --- a/libs/@local/hql/cst/Cargo.toml +++ b/libs/@local/hql/cst/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hql-cst" version.workspace = true diff --git a/libs/@local/hql/diagnostics/Cargo.toml b/libs/@local/hql/diagnostics/Cargo.toml index b135fdf9f1b..8c3c90d5ffb 100644 --- a/libs/@local/hql/diagnostics/Cargo.toml +++ b/libs/@local/hql/diagnostics/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hql-diagnostics" version.workspace = true diff --git a/libs/@local/hql/span/Cargo.toml b/libs/@local/hql/span/Cargo.toml index eba5e0d166c..2227b2765e2 100644 --- a/libs/@local/hql/span/Cargo.toml +++ b/libs/@local/hql/span/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hql-span" version.workspace = true diff --git a/libs/@local/hql/syntax-jexpr/Cargo.toml b/libs/@local/hql/syntax-jexpr/Cargo.toml index 754ec2b308c..b43e177cb88 100644 --- a/libs/@local/hql/syntax-jexpr/Cargo.toml +++ b/libs/@local/hql/syntax-jexpr/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hql-syntax-jexpr" authors.workspace = true diff --git a/libs/@local/repo-chores/rust/Cargo.toml b/libs/@local/repo-chores/rust/Cargo.toml index 71220be4314..f46f01f67a8 100644 --- a/libs/@local/repo-chores/rust/Cargo.toml +++ b/libs/@local/repo-chores/rust/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-repo-chores" version.workspace = true diff --git a/libs/@local/status/rust/Cargo.toml b/libs/@local/status/rust/Cargo.toml index 417f7524115..0092a81cd34 100644 --- a/libs/@local/status/rust/Cargo.toml +++ b/libs/@local/status/rust/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-status" description = "The HASH Status and Error Model." diff --git a/libs/@local/temporal-client/Cargo.toml b/libs/@local/temporal-client/Cargo.toml index 885a64a4f7d..8b6fef2d5b4 100644 --- a/libs/@local/temporal-client/Cargo.toml +++ b/libs/@local/temporal-client/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-temporal-client" version.workspace = true diff --git a/libs/@local/tracing/Cargo.toml b/libs/@local/tracing/Cargo.toml index e03460329cc..99e5ee34f59 100644 --- a/libs/@local/tracing/Cargo.toml +++ b/libs/@local/tracing/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-tracing" version.workspace = true diff --git a/libs/antsi/rust-toolchain.toml b/libs/antsi/rust-toolchain.toml index 150c227c86a..5d559eec495 100644 --- a/libs/antsi/rust-toolchain.toml +++ b/libs/antsi/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2024-11-25" +channel = "nightly-2024-12-02" components = ['rustfmt', 'clippy', 'llvm-tools-preview', 'rust-analyzer', 'rustc-codegen-cranelift-preview'] diff --git a/libs/chonky/Cargo.toml b/libs/chonky/Cargo.toml index c17dda0554f..44a88789d0c 100644 --- a/libs/chonky/Cargo.toml +++ b/libs/chonky/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "chonky" description = "General-purpose tooling for segmenting, chunking and embedding files" diff --git a/libs/chonky/src/lib.rs b/libs/chonky/src/lib.rs index a5638709480..68c7d624a0f 100644 --- a/libs/chonky/src/lib.rs +++ b/libs/chonky/src/lib.rs @@ -1,4 +1,4 @@ -#![doc = include_str!("../README.md")] +#![cfg_attr(doc, doc = include_str!("../README.md"))] extern crate alloc; diff --git a/libs/deer/rust-toolchain.toml b/libs/deer/rust-toolchain.toml index 3f2b24123c8..d12a5e8f648 100644 --- a/libs/deer/rust-toolchain.toml +++ b/libs/deer/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2024-11-25" +channel = "nightly-2024-12-02" components = ['rustfmt', 'clippy', 'llvm-tools-preview', 'miri', 'rust-analyzer', 'rustc-codegen-cranelift-preview'] diff --git a/libs/error-stack/README.md b/libs/error-stack/README.md index d8a2857afa5..8e20b20e579 100644 --- a/libs/error-stack/README.md +++ b/libs/error-stack/README.md @@ -7,7 +7,7 @@ [![crates.io](https://img.shields.io/crates/v/error-stack)][crates.io] [![libs.rs](https://img.shields.io/badge/libs.rs-error--stack-orange)][libs.rs] -[![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.83.0/nightly-2024-11-25&color=blue)][rust-version] +[![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.83.0/nightly-2024-12-02&color=blue)][rust-version] [![documentation](https://img.shields.io/docsrs/error-stack)][documentation] [![license](https://img.shields.io/crates/l/error-stack)][license] diff --git a/libs/error-stack/macros/README.md b/libs/error-stack/macros/README.md index f50a4c01d48..e6358767431 100644 --- a/libs/error-stack/macros/README.md +++ b/libs/error-stack/macros/README.md @@ -6,7 +6,7 @@ [![crates.io](https://img.shields.io/crates/v/error-stack-macros)][crates.io] [![libs.rs](https://img.shields.io/badge/libs.rs-error--stack--macros-orange)][libs.rs] -[![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.83.0/nightly-2024-11-25&color=blue)][rust-version] +[![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.83.0/nightly-2024-12-02&color=blue)][rust-version] [![documentation](https://img.shields.io/docsrs/error-stack-macros)][documentation] [![license](https://img.shields.io/crates/l/error-stack)][license] diff --git a/libs/error-stack/macros/src/lib.rs b/libs/error-stack/macros/src/lib.rs index 7913c79d6bc..1800568c748 100644 --- a/libs/error-stack/macros/src/lib.rs +++ b/libs/error-stack/macros/src/lib.rs @@ -1 +1 @@ -#![doc = include_str!("../README.md")] +#![cfg_attr(doc, doc = include_str!("../README.md"))] diff --git a/libs/error-stack/rust-toolchain.toml b/libs/error-stack/rust-toolchain.toml index 31d24764247..8d7ea3c196c 100644 --- a/libs/error-stack/rust-toolchain.toml +++ b/libs/error-stack/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] # Please also update the badges in `README.md`s (`error-stack` and `error-stack-macros`), and `src/lib.rs` -channel = "nightly-2024-11-25" +channel = "nightly-2024-12-02" components = ['rustfmt', 'clippy', 'llvm-tools-preview', 'miri', 'rust-src', 'rust-analyzer', 'rustc-codegen-cranelift-preview'] diff --git a/libs/error-stack/src/fmt/charset.rs b/libs/error-stack/src/fmt/charset.rs index d03bb2c2181..6edda8c0d98 100644 --- a/libs/error-stack/src/fmt/charset.rs +++ b/libs/error-stack/src/fmt/charset.rs @@ -102,11 +102,11 @@ impl Report<()> { /// Which will result in something like: /// ///
-    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt__charset_utf8.snap"))]
+    #[cfg_attr(doc, doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt__charset_utf8.snap")))]
     /// 
/// ///
-    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt__charset_ascii.snap"))]
+    #[cfg_attr(doc, doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt__charset_ascii.snap")))]
     /// 
pub fn set_charset(charset: Charset) { CHARSET_OVERRIDE.store(charset); diff --git a/libs/error-stack/src/fmt/color.rs b/libs/error-stack/src/fmt/color.rs index 5d71ec2c35a..832aec0b47b 100644 --- a/libs/error-stack/src/fmt/color.rs +++ b/libs/error-stack/src/fmt/color.rs @@ -119,15 +119,15 @@ impl Report<()> { /// Which will result in something like: /// ///
-    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt__preference_none.snap"))]
+    #[cfg_attr(doc, doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt__preference_none.snap")))]
     /// 
/// ///
-    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt__preference_emphasis.snap"))]
+    #[cfg_attr(doc, doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt__preference_emphasis.snap")))]
     /// 
/// ///
-    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt__preference_color.snap"))]
+    #[cfg_attr(doc, doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt__preference_color.snap")))]
     /// 
pub fn set_color_mode(mode: ColorMode) { COLOR_OVERRIDE.store(mode); diff --git a/libs/error-stack/src/fmt/hook.rs b/libs/error-stack/src/fmt/hook.rs index cb634a16ade..a3e8c286cf9 100644 --- a/libs/error-stack/src/fmt/hook.rs +++ b/libs/error-stack/src/fmt/hook.rs @@ -304,7 +304,7 @@ impl HookContext { /// ``` /// ///
-    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt__hookcontext_emit.snap"))]
+    #[cfg_attr(doc, doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt__hookcontext_emit.snap")))]
     /// 
pub fn push_appendix(&mut self, content: impl Into) { self.inner_mut().extra_mut().appendix.push(content.into()); @@ -351,7 +351,7 @@ impl HookContext { /// ``` /// ///
-    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt__diagnostics_add.snap"))]
+    #[cfg_attr(doc, doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt__diagnostics_add.snap")))]
     /// 
pub fn push_body(&mut self, content: impl Into) { self.inner_mut().extra_mut().body.push(content.into()); diff --git a/libs/error-stack/src/fmt/mod.rs b/libs/error-stack/src/fmt/mod.rs index 45548a392b0..ac8bbde750c 100644 --- a/libs/error-stack/src/fmt/mod.rs +++ b/libs/error-stack/src/fmt/mod.rs @@ -126,13 +126,13 @@ //! The output of `println!("{report:?}")`: //! //!
-#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt__doc.snap"))]
+#![cfg_attr(doc, doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt__doc.snap")))]
 //! 
//! //! The output of `println!("{report:#?}")`: //! //!
-#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt_doc_alt.snap"))]
+#![cfg_attr(doc, doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/fmt_doc_alt.snap")))]
 //! 
//! //! ## Implementation Details diff --git a/libs/error-stack/src/hook/mod.rs b/libs/error-stack/src/hook/mod.rs index da872e493ee..a9494f9f09a 100644 --- a/libs/error-stack/src/hook/mod.rs +++ b/libs/error-stack/src/hook/mod.rs @@ -65,7 +65,7 @@ impl Report<()> { /// Which will result in something like: /// ///
-    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/hook__debug_hook.snap"))]
+    #[cfg_attr(doc, doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/hook__debug_hook.snap")))]
     /// 
/// /// This example showcases the ability of hooks to be invoked for values provided via the @@ -144,7 +144,7 @@ impl Report<()> { /// Which will result in something like: /// ///
-    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/hook__debug_hook_provide.snap"))]
+    #[cfg_attr(doc, doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/hook__debug_hook_provide.snap")))]
     /// 
/// /// `error-stack` comes with some built-in hooks which can be overwritten. This is useful if you @@ -186,7 +186,7 @@ impl Report<()> { /// Which will result in something like: /// ///
-    #[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/hook__location_hook.snap"))]
+    #[cfg_attr(doc, doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/hook__location_hook.snap")))]
     /// 
/// /// [`Location`]: std::panic::Location diff --git a/libs/error-stack/src/lib.rs b/libs/error-stack/src/lib.rs index 953dd3f156f..0be4935e232 100644 --- a/libs/error-stack/src/lib.rs +++ b/libs/error-stack/src/lib.rs @@ -2,7 +2,7 @@ //! //! [![crates.io](https://img.shields.io/crates/v/error-stack)][crates.io] //! [![libs.rs](https://img.shields.io/badge/libs.rs-error--stack-orange)][libs.rs] -//! [![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.83.0/nightly-2024-11-25&color=blue)][rust-version] +//! [![rust-version](https://img.shields.io/static/v1?label=Rust&message=1.83.0/nightly-2024-12-02&color=blue)][rust-version] //! //! [crates.io]: https://crates.io/crates/error-stack //! [libs.rs]: https://lib.rs/crates/error-stack @@ -237,7 +237,7 @@ //! This outputs something like: //! //!
-#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/lib__suggestion.snap"))]
+#![cfg_attr(doc, doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/lib__suggestion.snap")))]
 //! 
//! //! The `Suggestion` which was added via [`attach`] is not shown directly and only increases the @@ -321,7 +321,7 @@ //! well-defined type forces users to be conscious about how they classify and group their //! **custom** error types, which improves their usability in error-_handling_. //! -//! ### Improving Result::Err Types +//! ### Improving `Result::Err` Types //! //! By capturing the current [`Error`] in the type parameter, return types in function signatures //! continue to explicitly capture the perspective of the current code. This means that **more often diff --git a/libs/error-stack/src/report.rs b/libs/error-stack/src/report.rs index f029574e2f0..2a1b95c9724 100644 --- a/libs/error-stack/src/report.rs +++ b/libs/error-stack/src/report.rs @@ -192,18 +192,18 @@ use crate::{ /// /// If the [`Display`] implementation of `Report` will be invoked, this will print something like: ///
-#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/report_display__doc.snap"))]
+#[cfg_attr(doc, doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/report_display__doc.snap")))]
 /// 
/// /// If the alternate [`Display`] implementation of `Report` is invoked (`{report:#}`), this will /// print something like: ///
-#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/report_display_alt__doc.snap"))]
+#[cfg_attr(doc, doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/report_display_alt__doc.snap")))]
 /// 
/// /// The [`Debug`] implementation of `Report` will print something like: ///
-#[doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/report_debug__doc.snap"))]
+#[cfg_attr(doc, doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/snapshots/doc/report_debug__doc.snap")))]
 /// 
/// /// diff --git a/libs/sarif/rust-toolchain.toml b/libs/sarif/rust-toolchain.toml index 150c227c86a..5d559eec495 100644 --- a/libs/sarif/rust-toolchain.toml +++ b/libs/sarif/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2024-11-25" +channel = "nightly-2024-12-02" components = ['rustfmt', 'clippy', 'llvm-tools-preview', 'rust-analyzer', 'rustc-codegen-cranelift-preview'] diff --git a/libs/sarif/src/lib.rs b/libs/sarif/src/lib.rs index cc3d7e2e0dc..098a72b8ba8 100644 --- a/libs/sarif/src/lib.rs +++ b/libs/sarif/src/lib.rs @@ -1,13 +1,17 @@ -#![doc = include_str!("../README.md")] #![no_std] #![feature(coverage_attribute)] +#![expect( + missing_docs, + reason = "conditionally including docs resulting in false positives. We want to globally \ + apply the lint as soon as possible." +)] #![cfg_attr( doc, feature(doc_auto_cfg), - doc(test(attr(deny(warnings, clippy::pedantic, clippy::nursery)))) + doc = include_str!("../README.md"), + doc(test(attr(deny(warnings, clippy::pedantic, clippy::nursery)))), )] #![warn( - missing_docs, clippy::expect_used, clippy::panic, clippy::unreachable, @@ -19,6 +23,7 @@ extern crate alloc; #[cfg(test)] extern crate std; +#[warn(missing_docs)] pub mod schema; #[cfg(feature = "serde")] diff --git a/libs/sarif/src/schema/message.rs b/libs/sarif/src/schema/message.rs index 40811393b6a..ab91c28a299 100644 --- a/libs/sarif/src/schema/message.rs +++ b/libs/sarif/src/schema/message.rs @@ -76,7 +76,7 @@ use crate::schema::PropertyBag; /// ([ยง3.11.6]). /// /// Formatted messages **shall** be expressed in [GitHub-Flavored Markdown][GFM]. Since GFM is a -/// superset of [CommonMark][CMARK], any CommonMark Markdown syntax is acceptable. +/// superset of [CommonMark][CMARK], any `CommonMark` Markdown syntax is acceptable. /// /// /// ## Security implications @@ -144,7 +144,7 @@ use crate::schema::PropertyBag; /// > In this example, the SARIF consumer will replace the placeholder `{0}` in `message.text` /// > with the value `"pBuffer"` from the 0 element of `message.arguments`. ///
-#[doc = include_str!("doc/3.11.5-example-2.json")]
+#[cfg_attr(doc, doc = include_str!("doc/3.11.5-example-2.json"))]
 /// 
/// /// @@ -196,7 +196,7 @@ use crate::schema::PropertyBag; /// ///
///
-#[doc = include_str!("doc/3.11.6-example-1.json")]
+#[cfg_attr(doc, doc = include_str!("doc/3.11.6-example-1.json"))]
 /// 
///
/// @@ -227,7 +227,7 @@ use crate::schema::PropertyBag; /// ///
///
-#[doc = include_str!("doc/3.11.6-example-2.json")]
+#[cfg_attr(doc, doc = include_str!("doc/3.11.6-example-2.json"))]
 /// 
///
/// @@ -313,7 +313,7 @@ use crate::schema::PropertyBag; /// use the [`text`] property. /// /// The procedure is: -#[doc = include_str!("doc/3.11.7-procedure.html")] +#[cfg_attr(doc, doc = include_str!("doc/3.11.7-procedure.html"))] /// /// [`text`]: Self::text /// [`markdown`]: Self::markdown diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 3f2b24123c8..d12a5e8f648 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2024-11-25" +channel = "nightly-2024-12-02" components = ['rustfmt', 'clippy', 'llvm-tools-preview', 'miri', 'rust-analyzer', 'rustc-codegen-cranelift-preview'] diff --git a/tests/graph/benches/Cargo.toml b/tests/graph/benches/Cargo.toml index 0f7e66dad9e..5402b9e2c16 100644 --- a/tests/graph/benches/Cargo.toml +++ b/tests/graph/benches/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-graph-benches" version.workspace = true diff --git a/tests/graph/integration/Cargo.toml b/tests/graph/integration/Cargo.toml index c7f4ef12c41..3223067b0e1 100644 --- a/tests/graph/integration/Cargo.toml +++ b/tests/graph/integration/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-graph-integration" version.workspace = true diff --git a/tests/graph/test-data/rust/Cargo.toml b/tests/graph/test-data/rust/Cargo.toml index 9045b6c7b5c..3d25e28bf8e 100644 --- a/tests/graph/test-data/rust/Cargo.toml +++ b/tests/graph/test-data/rust/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["edition2024"] - [package] name = "hash-graph-test-data" version.workspace = true