Merge pull request #2707 from noritada/fix/edition2024-in-guide
Document the `edition2024` code block attribute
This commit is contained in:
commit
1ffa9fe830
2 changed files with 2 additions and 2 deletions
|
|
@ -73,7 +73,7 @@ edition = "2015" # the default edition for code blocks
|
||||||
|
|
||||||
- **edition**: Rust edition to use by default for the code snippets. Default
|
- **edition**: Rust edition to use by default for the code snippets. Default
|
||||||
is `"2015"`. Individual code blocks can be controlled with the `edition2015`,
|
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
|
~~~text
|
||||||
```rust,edition2015
|
```rust,edition2015
|
||||||
|
|
|
||||||
|
|
@ -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.
|
* `no_run` --- The code is compiled when tested, but it is not run.
|
||||||
The play button is also not shown.
|
The play button is also not shown.
|
||||||
* `compile_fail` --- The code should fail to compile.
|
* `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.
|
See [`rust.edition`] to set this globally.
|
||||||
|
|
||||||
[`mdbook test`]: ../cli/test.md
|
[`mdbook test`]: ../cli/test.md
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue