about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2016-02-04 16:39:05 -0500
committerSteve Klabnik <steve@steveklabnik.com>2016-02-04 16:39:05 -0500
commitfc6e7698c1a2f36f3c59eee9ef6f6b0945cb1798 (patch)
tree623544e980f656443dd29b7acb1beeb273228890
parentcd418ba09b22e337e48f7e56249b43146e2df539 (diff)
parenta2f22a00ecce9d3db1db60b5ab24f192c100bd67 (diff)
downloadrust-fc6e7698c1a2f36f3c59eee9ef6f6b0945cb1798.tar.gz
rust-fc6e7698c1a2f36f3c59eee9ef6f6b0945cb1798.zip
Rollup merge of #31412 - tshepang:add-trailing-commas, r=steveklabnik
-rw-r--r--src/doc/reference.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md
index c291b6d7824..f2ff0aa0390 100644
--- a/src/doc/reference.md
+++ b/src/doc/reference.md
@@ -1179,7 +1179,7 @@ Enumeration constructors can have either named or unnamed fields:
 ```rust
 enum Animal {
     Dog (String, f64),
-    Cat { name: String, weight: f64 }
+    Cat { name: String, weight: f64 },
 }
 
 let mut a: Animal = Animal::Dog("Cocoa".to_string(), 37.2);
@@ -1237,12 +1237,12 @@ const STRING: &'static str = "bitstring";
 
 struct BitsNStrings<'a> {
     mybits: [u32; 2],
-    mystring: &'a str
+    mystring: &'a str,
 }
 
 const BITS_N_STRINGS: BitsNStrings<'static> = BitsNStrings {
     mybits: BITS,
-    mystring: STRING
+    mystring: STRING,
 };
 ```
 
@@ -1661,7 +1661,7 @@ struct Foo;
 
 // Declare a public struct with a private field
 pub struct Bar {
-    field: i32
+    field: i32,
 }
 
 // Declare a public enum with two public variants
@@ -3212,7 +3212,7 @@ may refer to the variables bound within the pattern they follow.
 let message = match maybe_digit {
     Some(x) if x < 10 => process_digit(x),
     Some(x) => process_other(x),
-    None => panic!()
+    None => panic!(),
 };
 ```