Skip to content

Commit 1bcd825

Browse files
pnkfelixalexcrichton
authored andcommitted
Minor modifications to Axel's tutorial improvements (see also #12472).
1 parent d028079 commit 1bcd825

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/doc/tutorial.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ fn main() {
133133
println!("hello?");
134134
}
135135
~~~~
136-
> ***Note:*** *Macros* are explained in the [Syntax extensions
137-
> (3.4)](#syntax-extensions) section.
136+
> ***Note:*** An identifier followed by an exclamation point, like
137+
> `println!`, is a macro invocation. Macros are explained
138+
> [later](#syntax-extensions); for now just remember to include the
139+
> exclamation point.
138140
139141
If the Rust compiler was installed successfully, running `rustc
140142
hello.rs` will produce an executable called `hello` (or `hello.exe` on
@@ -1347,8 +1349,8 @@ assert!(xs.eq(&ys));
13471349
assert!(!xs.ne(&ys));
13481350
13491351
// The Eq trait also allows us to use the shorthand infix operators.
1350-
assert!(xs == ys);
1351-
assert!(!(xs != ys));
1352+
assert!(xs == ys); // `xs == ys` is short for `xs.eq(&ys)`
1353+
assert!(!(xs != ys)); // `xs != ys` is short for `xs.ne(&ys)`
13521354
~~~
13531355

13541356
# More on boxes

0 commit comments

Comments
 (0)