Skip to content

Commit

Permalink
Update Rust toolchains to nightly-2024-12-02 (#5768)
Browse files Browse the repository at this point in the history
Co-authored-by: hash-worker[bot] <180894564+hash-worker[bot]@users.noreply.github.com>
Co-authored-by: Tim Diekmann <[email protected]>
  • Loading branch information
hash-worker[bot] and TimDiekmann authored Dec 2, 2024
1 parent 49c64cb commit 6b9055d
Show file tree
Hide file tree
Showing 59 changed files with 46 additions and 117 deletions.
2 changes: 0 additions & 2 deletions .github/scripts/rust/sync-turborepo.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env -S cargo +nightly -Zscript
---
cargo-features = ["edition2024"]

[package]
edition = "2024"

Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[workspace]
default-members = [
"apps/hash-graph",
Expand Down
2 changes: 0 additions & 2 deletions apps/hash-graph/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-graph"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@blockprotocol/type-system/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "type-system"
description = "Definitions of types within the Block Protocol Type System"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]>> {
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/codec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-codec"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/graph/api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-graph-api"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/graph/authorization/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-graph-authorization"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/graph/migrations-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-graph-migrations-macros"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/graph/migrations/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-graph-migrations"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/graph/postgres-store/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-graph-postgres-store"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/graph/store/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-graph-store"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/graph/temporal-versioning/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-graph-temporal-versioning"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/graph/test-server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-graph-test-server"
description = "HASH Graph test server"
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/graph/type-defs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-graph-type-defs"
description = "HASH Graph type definitions"
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/graph/type-fetcher/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-graph-type-fetcher"
description = "RPC service definition to fetch external BP types"
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/graph/type-fetcher/src/fetcher.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![expect(clippy::future_not_send)]

use core::{error::Error, fmt};

use serde::{Deserialize, Serialize};
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/graph/types/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-graph-types"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/graph/validation/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-graph-validation"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/harpc/client/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "harpc-client"
authors.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/harpc/codec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "harpc-codec"
authors.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/harpc/net/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "harpc-net"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/harpc/server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "harpc-server"
authors.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/harpc/system/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "harpc-system"
authors.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/harpc/tower/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "harpc-tower"
version.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion libs/@local/harpc/tower/src/extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/harpc/types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "harpc-types"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/harpc/wire-protocol/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "harpc-wire-protocol"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/hql/cst/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hql-cst"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/hql/diagnostics/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hql-diagnostics"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/hql/span/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hql-span"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/hql/syntax-jexpr/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hql-syntax-jexpr"
authors.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/repo-chores/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-repo-chores"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/status/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-status"
description = "The HASH Status and Error Model."
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/temporal-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-temporal-client"
version.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions libs/@local/tracing/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "hash-tracing"
version.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion libs/antsi/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -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']
2 changes: 0 additions & 2 deletions libs/chonky/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["edition2024"]

[package]
name = "chonky"
description = "General-purpose tooling for segmenting, chunking and embedding files"
Expand Down
2 changes: 1 addition & 1 deletion libs/chonky/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]

extern crate alloc;

Expand Down
2 changes: 1 addition & 1 deletion libs/deer/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -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']
2 changes: 1 addition & 1 deletion libs/error-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
2 changes: 1 addition & 1 deletion libs/error-stack/macros/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
2 changes: 1 addition & 1 deletion libs/error-stack/macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
2 changes: 1 addition & 1 deletion libs/error-stack/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -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']
4 changes: 2 additions & 2 deletions libs/error-stack/src/fmt/charset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ impl Report<()> {
/// Which will result in something like:
///
/// <pre>
#[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")))]
/// </pre>
///
/// <pre>
#[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")))]
/// </pre>
pub fn set_charset(charset: Charset) {
CHARSET_OVERRIDE.store(charset);
Expand Down
6 changes: 3 additions & 3 deletions libs/error-stack/src/fmt/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ impl Report<()> {
/// Which will result in something like:
///
/// <pre>
#[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")))]
/// </pre>
///
/// <pre>
#[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")))]
/// </pre>
///
/// <pre>
#[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")))]
/// </pre>
pub fn set_color_mode(mode: ColorMode) {
COLOR_OVERRIDE.store(mode);
Expand Down
4 changes: 2 additions & 2 deletions libs/error-stack/src/fmt/hook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ impl<T> HookContext<T> {
/// ```
///
/// <pre>
#[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")))]
/// </pre>
pub fn push_appendix(&mut self, content: impl Into<String>) {
self.inner_mut().extra_mut().appendix.push(content.into());
Expand Down Expand Up @@ -351,7 +351,7 @@ impl<T> HookContext<T> {
/// ```
///
/// <pre>
#[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")))]
/// </pre>
pub fn push_body(&mut self, content: impl Into<String>) {
self.inner_mut().extra_mut().body.push(content.into());
Expand Down
4 changes: 2 additions & 2 deletions libs/error-stack/src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@
//! The output of `println!("{report:?}")`:
//!
//! <pre>
#![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")))]
//! </pre>
//!
//! The output of `println!("{report:#?}")`:
//!
//! <pre>
#![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")))]
//! </pre>
//!
//! ## Implementation Details
Expand Down
6 changes: 3 additions & 3 deletions libs/error-stack/src/hook/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl Report<()> {
/// Which will result in something like:
///
/// <pre>
#[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")))]
/// </pre>
///
/// This example showcases the ability of hooks to be invoked for values provided via the
Expand Down Expand Up @@ -144,7 +144,7 @@ impl Report<()> {
/// Which will result in something like:
///
/// <pre>
#[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")))]
/// </pre>
///
/// `error-stack` comes with some built-in hooks which can be overwritten. This is useful if you
Expand Down Expand Up @@ -186,7 +186,7 @@ impl Report<()> {
/// Which will result in something like:
///
/// <pre>
#[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")))]
/// </pre>
///
/// [`Location`]: std::panic::Location
Expand Down
Loading

0 comments on commit 6b9055d

Please sign in to comment.