From 61fc7f18c3f3fed492ec117d25e9bcc3c5b52217 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 23 Aug 2018 23:50:05 +0200 Subject: [PATCH] Add struct keyword doc --- src/libstd/keyword_docs.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/libstd/keyword_docs.rs b/src/libstd/keyword_docs.rs index 4f6bda6cfe379..d70cf132b3c3a 100644 --- a/src/libstd/keyword_docs.rs +++ b/src/libstd/keyword_docs.rs @@ -56,3 +56,24 @@ mod fn_keyword { } /// /// [book]: https://doc.rust-lang.org/book/second-edition/ch03-01-variables-and-mutability.html mod let_keyword { } + +#[doc(keyword = "struct")] +// +/// The `struct` keyword. +/// +/// The `struct` keyword is used to define a struct type. +/// +/// Example: +/// +/// ``` +/// struct Foo { +/// field1: u32, +/// field2: String, +/// } +/// ``` +/// +/// There are different kinds of structs. For more information, take a look at the +/// [Rust Book][book]. +/// +/// [book]: https://doc.rust-lang.org/book/second-edition/ch05-01-defining-structs.html +mod struct_keyword { }