Skip to content

Commit

Permalink
Rollup merge of rust-lang#53651 - GuillaumeGomez:struct-keyword, r=Qu…
Browse files Browse the repository at this point in the history
…ietMisdreavus

Add struct keyword doc

Slowly, one keyword at a time.

r? @QuietMisdreavus
  • Loading branch information
GuillaumeGomez authored Aug 26, 2018
2 parents 9c20f06 + 61fc7f1 commit 91755d1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/libstd/keyword_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 { }

0 comments on commit 91755d1

Please sign in to comment.