Rollup merge of #91554 - r00ster91:patch-3, r=GuillaumeGomez

Update doc about code block edition attributes
This commit is contained in:
Matthias Krüger 2021-12-06 00:11:51 +01:00 committed by GitHub
commit d6ff1326e7
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.