diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-08-26 12:05:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-26 12:05:26 +0200 |
| commit | 91755d1f91108f85ebf8b9bf7bce89e478f89c65 (patch) | |
| tree | bfd8caa4a4aeb49c9d9d70aabadfb7f3e5c210fd /src/libstd | |
| parent | 9c20f06f738ad75fb8dbf5201ae0e3a23fbf4dcc (diff) | |
| parent | 61fc7f18c3f3fed492ec117d25e9bcc3c5b52217 (diff) | |
| download | rust-91755d1f91108f85ebf8b9bf7bce89e478f89c65.tar.gz rust-91755d1f91108f85ebf8b9bf7bce89e478f89c65.zip | |
Rollup merge of #53651 - GuillaumeGomez:struct-keyword, r=QuietMisdreavus
Add struct keyword doc Slowly, one keyword at a time. r? @QuietMisdreavus
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/keyword_docs.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/libstd/keyword_docs.rs b/src/libstd/keyword_docs.rs index 4f6bda6cfe3..d70cf132b3c 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 { } |
