@@ -69,11 +69,11 @@ $ ./main
69
69
Hello, world!
70
70
```
71
71
72
- On Windows, enter the command ` .\main.exe ` instead of ` ./main ` :
72
+ On Windows, enter the command ` .\main ` instead of ` ./main ` :
73
73
74
74
``` powershell
75
75
> rustc main.rs
76
- > .\main.exe
76
+ > .\main
77
77
Hello, world!
78
78
```
79
79
@@ -122,10 +122,11 @@ This line does all the work in this little program: it prints text to the
122
122
screen. There are three important details to notice here.
123
123
124
124
First, ` println! ` calls a Rust macro. If it had called a function instead, it
125
- would be entered as ` println ` (without the ` ! ` ). We’ll discuss Rust macros in
126
- more detail in Chapter 20. For now, you just need to know that using a ` ! `
127
- means that you’re calling a macro instead of a normal function and that macros
128
- don’t always follow the same rules as functions.
125
+ would be entered as ` println ` (without the ` ! ` ). Rust macros are a way to write
126
+ code that generates code to extend Rust syntax, and we’ll discuss them in more
127
+ detail in [ Chapter 20] [ ch20-macros ] <!-- ignore --> . For now, you just need to
128
+ know that using a ` ! ` means that you’re calling a macro instead of a normal
129
+ function and that macros don’t always follow the same rules as functions.
129
130
130
131
Second, you see the ` "Hello, world!" ` string. We pass this string as an argument
131
132
to ` println! ` , and the string is printed to the screen.
@@ -175,7 +176,7 @@ Windows, a file containing debugging information with the _.pdb_ extension.
175
176
From here, you run the _ main_ or _ main.exe_ file, like this:
176
177
177
178
``` console
178
- $ ./main # or .\main.exe on Windows
179
+ $ ./main # or .\main on Windows
179
180
```
180
181
181
182
If your _ main.rs_ is your “Hello, world!” program, this line prints `Hello,
@@ -197,3 +198,4 @@ real-world Rust programs.
197
198
198
199
[ troubleshooting ] : ch01-01-installation.html#troubleshooting
199
200
[ devtools ] : appendix-04-useful-development-tools.html
201
+ [ ch20-macros ] : ch20-05-macros.html
0 commit comments