mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
Update doc about code block edition attributes
This commit is contained in:
parent
cafc4582e6
commit
706faa10aa
@ -359,9 +359,8 @@ are added.
|
||||
# fn foo() {}
|
||||
```
|
||||
|
||||
`edition2018` tells `rustdoc` that the code sample should be compiled using
|
||||
the 2018 edition of Rust. Similarly, you can specify `edition2015` to compile
|
||||
the code with the 2015 edition.
|
||||
`edition2015`, `edition2018` and `edition2021` tell `rustdoc`
|
||||
that the code sample should be compiled using the respective edition of Rust.
|
||||
|
||||
```rust
|
||||
/// Only runs on the 2018 edition.
|
||||
|
Loading…
Reference in New Issue
Block a user