Skip to content

Commit 85a8b92

Browse files
committed
extra comment about macros
Fixes #17190
1 parent 49fcb27 commit 85a8b92

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/doc/guide.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,11 @@ The second point is the `println!()` part. This is calling a Rust **macro**,
195195
which is how metaprogramming is done in Rust. If it were a function instead, it
196196
would look like this: `println()`. For our purposes, we don't need to worry
197197
about this difference. Just know that sometimes, you'll see a `!`, and that
198-
means that you're calling a macro instead of a normal function. One last thing
199-
to mention: Rust's macros are significantly different than C macros, if you've
200-
used those. Don't be scared of using macros. We'll get to the details
198+
means that you're calling a macro instead of a normal function. Rust implements
199+
`println!` as a macro rather than a function for good reasons, but that's a
200+
very advanced topic. You'll learn more when we talk about macros later. One
201+
last thing to mention: Rust's macros are significantly different than C macros,
202+
if you've used those. Don't be scared of using macros. We'll get to the details
201203
eventually, you'll just have to trust us for now.
202204

203205
Next, `"Hello, world!"` is a **string**. Strings are a surprisingly complicated

0 commit comments

Comments
 (0)