Update doc about code block edition attributes

This commit is contained in:
r00ster 2021-12-05 14:43:43 +01:00 committed by GitHub
parent cafc4582e6
commit 706faa10aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.