From 91d13c390ace9b34eb4d72085a585505f32cc87e Mon Sep 17 00:00:00 2001 From: Noritada Kobayashi Date: Mon, 19 May 2025 12:51:11 +0900 Subject: [PATCH] Document the `edition2024` code block attribute --- guide/src/format/configuration/general.md | 2 +- guide/src/format/mdbook.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/guide/src/format/configuration/general.md b/guide/src/format/configuration/general.md index 40a45701..c2c1a9da 100644 --- a/guide/src/format/configuration/general.md +++ b/guide/src/format/configuration/general.md @@ -73,7 +73,7 @@ edition = "2015" # the default edition for code blocks - **edition**: Rust edition to use by default for the code snippets. Default is `"2015"`. Individual code blocks can be controlled with the `edition2015`, - `edition2018` or `edition2021` annotations, such as: + `edition2018`, `edition2021` or `edition2024` annotations, such as: ~~~text ```rust,edition2015 diff --git a/guide/src/format/mdbook.md b/guide/src/format/mdbook.md index a3541129..51b9f4ba 100644 --- a/guide/src/format/mdbook.md +++ b/guide/src/format/mdbook.md @@ -122,7 +122,7 @@ These use the same attributes as [rustdoc attributes], with a few additions: * `no_run` --- The code is compiled when tested, but it is not run. The play button is also not shown. * `compile_fail` --- The code should fail to compile. -* `edition2015`, `edition2018`, `edition2021` --- Forces the use of a specific Rust edition. +* `edition2015`, `edition2018`, `edition2021`, `edition2024` --- Forces the use of a specific Rust edition. See [`rust.edition`] to set this globally. [`mdbook test`]: ../cli/test.md