Skip to content

Commit dc9c8d5

Browse files
committed
Update the Unstable Book to use #[rustc_auto_trait]
1 parent 53e59fa commit dc9c8d5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/doc/unstable-book/src/language-features/auto-traits.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ Example:
2626
#![feature(negative_impls)]
2727
#![feature(auto_traits)]
2828

29-
auto trait Valid {}
29+
#[rustc_auto_trait]
30+
trait Valid {}
3031

3132
struct True;
3233
struct False;
@@ -48,7 +49,7 @@ fn main() {
4849

4950
## Automatic trait implementations
5051

51-
When a type is declared as an `auto trait`, we will automatically
52+
When a type is declared as an auto trait, we will automatically
5253
create impls for every struct/enum/union, unless an explicit impl is
5354
provided. These automatic impls contain a where clause for each field
5455
of the form `T: AutoTrait`, where `T` is the type of the field and

0 commit comments

Comments
 (0)