File tree Expand file tree Collapse file tree
courses/rust_essentials/060_references Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,11 +78,13 @@ The "Rebinder" (let mut r = &x)
7878 rf = &news_b;
7979 *rf = "Peace"; // Error
8080
81- :error: `error[E0594]: cannot assign to '*rf', which is behind a '&'' reference `
81+ .. container :: latex_environment footnotesize
82+
83+ :error: `error[E0594]: cannot assign to '*rf', which is behind a '&'' reference `
8284
8385.. note ::
8486
85- The reference can be redirected, but the data cannot be modified
87+ The reference * can * be redirected, but the data * cannot * be modified
8688
8789---------------------------------
8890The "Modifier" (let r = &mut x)
@@ -104,7 +106,7 @@ The "Modifier" (let r = &mut x)
104106
105107.. note ::
106108
107- The reference cannot be redirected, but the data can be modified
109+ The reference * cannot * be redirected, but the data * can * be modified
108110
109111---------------------------------------
110112The "Free Agent" (let mut r = &mut x)
@@ -125,4 +127,4 @@ The "Free Agent" (let mut r = &mut x)
125127
126128 .. note ::
127129
128- The reference can be redirected, and the data can be modified
130+ The reference * can * be redirected, and the data * can * be modified
Original file line number Diff line number Diff line change @@ -29,13 +29,25 @@ Slice Creation
2929----------------
3030
3131- Created by referring to a collection, and specifying the range
32- - :rust: `&a[start..] `
32+
33+ .. container :: latex_environment scriptsize
34+
35+ .. list-table ::
36+ :header-rows: 1
37+
38+ * - Syntax
39+ - Range
40+
41+ * - :rust: `&a[start..] `
3342 - Explicit start to implicit end
34- - :rust: `&a[..end] `
43+
44+ * - :rust: `&a[..end] `
3545 - Implicit start to explicit end (*end * excluded)
36- - :rust: `&a[..] `
46+
47+ * - :rust: `&a[..] `
3748 - Full range
38- - :rust: `&a[start..end] `
49+
50+ * - :rust: `&a[start..end] `
3951 - Explicit start and end (*end * excluded)
4052
4153----------------
You can’t perform that action at this time.
0 commit comments