diff --git a/src/doc/intro.md b/src/doc/intro.md index eb190d2ab2e..07a90959deb 100644 --- a/src/doc/intro.md +++ b/src/doc/intro.md @@ -565,7 +565,7 @@ while retaining safety. The answer is iterators: ```{rust} let vec = vec![1, 2, 3]; -for x in vec { +for x in &vec { println!("{}", x); } ```