Skip to content

Commit 9ddfbb1

Browse files
committed
Adjusted intro error to match code
The error in the Brief Introduction shows the problematic line as "x.push(4)", while the example code uses a vector of strings.
1 parent f4ab2b3 commit 9ddfbb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/trpl/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ vector. When we try to compile this program, we get an error:
127127

128128
```text
129129
error: cannot borrow `x` as mutable because it is also borrowed as immutable
130-
x.push(4);
130+
x.push("foo");
131131
^
132132
note: previous borrow of `x` occurs here; the immutable borrow prevents
133133
subsequent moves or mutable borrows of `x` until the borrow ends

0 commit comments

Comments
 (0)