From f6759924f45f0ea76b115622133a66e885a49d1b Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Thu, 21 Aug 2014 12:14:59 -0400 Subject: [PATCH] fix module wording in guide @kimundi was a bit worried this was misleading. --- src/doc/guide.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/doc/guide.md b/src/doc/guide.md index 94c77efc94d..7333de022e4 100644 --- a/src/doc/guide.md +++ b/src/doc/guide.md @@ -2884,9 +2884,11 @@ pub fn print_hello() { } ``` -When we include a module like this, we don't need to make the `mod` declaration, -it's just understood. This helps prevent 'rightward drift': when you end up -indenting so many times that your code is hard to read. +When we include a module like this, we don't need to make the `mod` declaration +in `hello.rs`, because it's already been declared in `lib.rs`. `hello.rs` just +contains the body of the module which is defined (by the `pub mod hello`) in +`lib.rs`. This helps prevent 'rightward drift': when you end up indenting so +many times that your code is hard to read. Finally, make a new directory, `src/goodbye`, and make a new file in it, `src/goodbye/mod.rs`: