From 9c4bccad3ca632a982aca4199d76298e6553c2da Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sun, 30 Mar 2025 03:49:53 -0700 Subject: [PATCH 1/3] Update mdbook-spec to Rust 2024 --- mdbook-spec/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdbook-spec/Cargo.toml b/mdbook-spec/Cargo.toml index c9a6e31af..4422573a8 100644 --- a/mdbook-spec/Cargo.toml +++ b/mdbook-spec/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "mdbook-spec" version = "0.1.2" -edition = "2021" +edition = "2024" license = "MIT OR Apache-2.0" description = "An mdBook preprocessor to help with the Rust specification." repository = "https://github.com/rust-lang/spec/" From 7857573fd32799fe7d9248a181cff996d9b9808b Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sun, 30 Mar 2025 03:50:22 -0700 Subject: [PATCH 2/3] Rustfmt mdbook-spec for Rust 2024 --- mdbook-spec/src/lib.rs | 4 ++-- mdbook-spec/src/rules.rs | 4 ++-- mdbook-spec/src/std_links.rs | 6 +++--- rustfmt.toml | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 rustfmt.toml diff --git a/mdbook-spec/src/lib.rs b/mdbook-spec/src/lib.rs index 9eac0e4ed..0ce85c0ee 100644 --- a/mdbook-spec/src/lib.rs +++ b/mdbook-spec/src/lib.rs @@ -1,11 +1,11 @@ #![deny(rust_2018_idioms, unused_lifetimes)] use crate::rules::Rules; -use anyhow::{bail, Context, Result}; +use anyhow::{Context, Result, bail}; +use mdbook::BookItem; use mdbook::book::{Book, Chapter}; use mdbook::errors::Error; use mdbook::preprocess::{CmdPreprocessor, Preprocessor, PreprocessorContext}; -use mdbook::BookItem; use once_cell::sync::Lazy; use regex::{Captures, Regex}; use semver::{Version, VersionReq}; diff --git a/mdbook-spec/src/rules.rs b/mdbook-spec/src/rules.rs index 8276292a3..1c33d433c 100644 --- a/mdbook-spec/src/rules.rs +++ b/mdbook-spec/src/rules.rs @@ -1,9 +1,9 @@ //! Handling for rule identifiers. use crate::test_links::RuleToTests; -use crate::{warn_or_err, Diagnostics, Spec}; -use mdbook::book::Book; +use crate::{Diagnostics, Spec, warn_or_err}; use mdbook::BookItem; +use mdbook::book::Book; use once_cell::sync::Lazy; use regex::{Captures, Regex}; use std::collections::{BTreeMap, HashSet}; diff --git a/mdbook-spec/src/std_links.rs b/mdbook-spec/src/std_links.rs index 8a80388e5..cbbed3a5c 100644 --- a/mdbook-spec/src/std_links.rs +++ b/mdbook-spec/src/std_links.rs @@ -1,9 +1,9 @@ //! Support for translating links to the standard library. -use crate::{bug, warn_or_err, Diagnostics}; -use anyhow::{bail, Result}; -use mdbook::book::{Book, Chapter}; +use crate::{Diagnostics, bug, warn_or_err}; +use anyhow::{Result, bail}; use mdbook::BookItem; +use mdbook::book::{Book, Chapter}; use once_cell::sync::Lazy; use pulldown_cmark::{BrokenLink, CowStr, Event, LinkType, Options, Parser, Tag}; use regex::Regex; diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 000000000..350113681 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1 @@ +style_edition = "2024" From d01bedd5b9f62c11d39c672d5cab3a4661779425 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sun, 30 Mar 2025 03:51:19 -0700 Subject: [PATCH 3/3] Update style-check to Rust 2024 --- style-check/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/style-check/Cargo.toml b/style-check/Cargo.toml index 1fa578086..ccc08cf82 100644 --- a/style-check/Cargo.toml +++ b/style-check/Cargo.toml @@ -2,7 +2,7 @@ name = "style-check" version = "0.1.0" authors = ["steveklabnik "] -edition = "2021" +edition = "2024" [dependencies] pulldown-cmark = "0.10.0"