Skip to content

Commit aba1ee2

Browse files
committed
Backport tech review changes from docx to src md
1 parent 57674b0 commit aba1ee2

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/ch01-02-hello-world.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ $ ./main
6969
Hello, world!
7070
```
7171

72-
On Windows, enter the command `.\main.exe` instead of `./main`:
72+
On Windows, enter the command `.\main` instead of `./main`:
7373

7474
```powershell
7575
> rustc main.rs
76-
> .\main.exe
76+
> .\main
7777
Hello, world!
7878
```
7979

@@ -122,10 +122,11 @@ This line does all the work in this little program: it prints text to the
122122
screen. There are three important details to notice here.
123123

124124
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.
129130

130131
Second, you see the `"Hello, world!"` string. We pass this string as an argument
131132
to `println!`, and the string is printed to the screen.
@@ -175,7 +176,7 @@ Windows, a file containing debugging information with the _.pdb_ extension.
175176
From here, you run the _main_ or _main.exe_ file, like this:
176177

177178
```console
178-
$ ./main # or .\main.exe on Windows
179+
$ ./main # or .\main on Windows
179180
```
180181

181182
If your _main.rs_ is your “Hello, world!” program, this line prints `Hello,
@@ -197,3 +198,4 @@ real-world Rust programs.
197198

198199
[troubleshooting]: ch01-01-installation.html#troubleshooting
199200
[devtools]: appendix-04-useful-development-tools.html
201+
[ch20-macros]: ch20-05-macros.html

0 commit comments

Comments
 (0)