doc: Address feedback about intro
This commit is contained in:
parent
6bacbcc32e
commit
d1eb0e393f
2 changed files with 4 additions and 1 deletions
|
@ -7,7 +7,7 @@
|
||||||
li {list-style-type: none; }
|
li {list-style-type: none; }
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
* [A 30-minute Intro to Rust](intro.html) (read this first)
|
* [A 30-minute Intro to Rust](intro.html)
|
||||||
* [The Rust tutorial](tutorial.html) (* [PDF](tutorial.pdf))
|
* [The Rust tutorial](tutorial.html) (* [PDF](tutorial.pdf))
|
||||||
* [The Rust reference manual](rust.html) (* [PDF](rust.pdf))
|
* [The Rust reference manual](rust.html) (* [PDF](rust.pdf))
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,9 @@ int add_one(void)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Note: obviously this is very simple and non-idiomatic C++.
|
||||||
|
You wouldn't write it in practice; it is for illustrative purposes.**
|
||||||
|
|
||||||
This function allocates an integer on the stack,
|
This function allocates an integer on the stack,
|
||||||
and stores it in a variable, `i`.
|
and stores it in a variable, `i`.
|
||||||
It then returns a reference to the variable `i`.
|
It then returns a reference to the variable `i`.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue