Skip to content

Commit eb21ced

Browse files
committed
Discuss module syntax earlier in the tutorial
as per #3578
1 parent 65a1287 commit eb21ced

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/tutorial.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,11 @@ while count < 10 {
214214
}
215215
~~~~
216216

217+
The name of the function that prints a line of text, `io::println`, is
218+
qualified: it refers to the function named `println` that's defined in the
219+
module `io`. In Rust, a double colon---`::`---separates parts of a
220+
qualified name. For more details, see the section on [crates](#crates).
221+
217222
Although Rust can almost always infer the types of local variables, you
218223
can specify a variable's type by following it with a colon, then the type
219224
name.

0 commit comments

Comments
 (0)