Skip to content

Commit 8f22582

Browse files
committed
Fix breakage. Expand const examples in manual
1 parent 633b9a8 commit 8f22582

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

doc/rust.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,17 @@ const bit1: uint = 1 << 0;
11111111
const bit2: uint = 1 << 1;
11121112
11131113
const bits: [uint * 2] = [bit1, bit2];
1114-
const bits_r: &[uint] = &bits;
1114+
const string: &str = "bitstring";
1115+
1116+
struct BitsNStrings {
1117+
mybits: [uint *2],
1118+
mystring: &str
1119+
}
1120+
1121+
const bits_n_strings: BitsNStrings = BitsNStrings {
1122+
mybits: bits,
1123+
mystring: string
1124+
};
11151125
~~~~
11161126

11171127
### Traits

0 commit comments

Comments
 (0)