You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/introduction.md
+13-41Lines changed: 13 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,64 +7,39 @@ This book is the primary reference for the Rust programming language.
7
7
8
8
## Rust releases
9
9
10
-
Rust has a new language release every six weeks.
11
-
The first stable release of the language was Rust 1.0.0, followed by Rust 1.1.0 and so on.
12
-
Tools (`rustc`, `cargo`, etc.) and documentation ([Standard library], this book, etc.) are released with the language release.
10
+
Rust has a new language release every six weeks. The first stable release of the language was Rust 1.0.0, followed by Rust 1.1.0 and so on. Tools (`rustc`, `cargo`, etc.) and documentation ([Standard library], this book, etc.) are released with the language release.
13
11
14
-
The latest release of this book, matching the latest Rust version, can always be found at <https://doc.rust-lang.org/reference/>.
15
-
Prior versions can be found by adding the Rust version before the "reference" directory.
16
-
For example, the Reference for Rust 1.49.0 is located at <https://doc.rust-lang.org/1.49.0/reference/>.
12
+
The latest release of this book, matching the latest Rust version, can always be found at <https://doc.rust-lang.org/reference/>. Prior versions can be found by adding the Rust version before the "reference" directory. For example, the Reference for Rust 1.49.0 is located at <https://doc.rust-lang.org/1.49.0/reference/>.
17
13
18
14
## What *The Reference* is not
19
15
20
-
This book does not serve as an introduction to the language.
21
-
Background familiarity with the language is assumed.
22
-
A separate [book] is available to help acquire such background familiarity.
16
+
This book does not serve as an introduction to the language. Background familiarity with the language is assumed. A separate [book] is available to help acquire such background familiarity.
23
17
24
-
This book also does not serve as a reference to the [standard library] included in the language distribution.
25
-
Those libraries are documented separately by extracting documentation attributes from their source code.
26
-
Many of the features that one might expect to be language features are library features in Rust, so what you're looking for may be there, not here.
18
+
This book also does not serve as a reference to the [standard library] included in the language distribution. Those libraries are documented separately by extracting documentation attributes from their source code. Many of the features that one might expect to be language features are library features in Rust, so what you're looking for may be there, not here.
27
19
28
-
Similarly, this book does not usually document the specifics of `rustc` as a tool or of Cargo.
29
-
`rustc` has its own [book][rustc book].
30
-
Cargo has a [book][cargo book] that contains a [reference][cargo reference].
31
-
There are a few pages such as [linkage] that still describe how `rustc` works.
20
+
Similarly, this book does not usually document the specifics of `rustc` as a tool or of Cargo. `rustc` has its own [book][rustc book]. Cargo has a [book][cargo book] that contains a [reference][cargo reference]. There are a few pages such as [linkage] that still describe how `rustc` works.
32
21
33
-
This book also only serves as a reference to what is available in stable Rust.
34
-
For unstable features being worked on, see the [Unstable Book].
22
+
This book also only serves as a reference to what is available in stable Rust. For unstable features being worked on, see the [Unstable Book].
35
23
36
-
Rust compilers, including `rustc`, will perform optimizations.
37
-
The reference does not specify what optimizations are allowed or disallowed.
38
-
Instead, think of the compiled program as a black box.
39
-
You can only probe by running it, feeding it input and observing its output.
40
-
Everything that happens that way must conform to what the reference says.
24
+
Rust compilers, including `rustc`, will perform optimizations. The reference does not specify what optimizations are allowed or disallowed. Instead, think of the compiled program as a black box. You can only probe by running it, feeding it input and observing its output. Everything that happens that way must conform to what the reference says.
41
25
42
26
## How to use this book
43
27
44
-
This book does not assume you are reading this book sequentially.
45
-
Each chapter generally can be read standalone, but will cross-link to other chapters for facets of the language they refer to, but do not discuss.
28
+
This book does not assume you are reading this book sequentially. Each chapter generally can be read standalone, but will cross-link to other chapters for facets of the language they refer to, but do not discuss.
46
29
47
30
There are two main ways to read this document.
48
31
49
-
The first is to answer a specific question.
50
-
If you know which chapter answers that question, you can jump to that chapter in the table of contents.
51
-
Otherwise, you can press `s` or click the magnifying glass on the top bar to search for keywords related to your question.
52
-
For example, say you wanted to know when a temporary value created in a let statement is dropped.
53
-
If you didn't already know that the [lifetime of temporaries] is defined in the [expressions chapter], you could search "temporary let" and the first search result will take you to that section.
32
+
The first is to answer a specific question. If you know which chapter answers that question, you can jump to that chapter in the table of contents. Otherwise, you can press `s` or click the magnifying glass on the top bar to search for keywords related to your question. For example, say you wanted to know when a temporary value created in a let statement is dropped. If you didn't already know that the [lifetime of temporaries] is defined in the [expressions chapter], you could search "temporary let" and the first search result will take you to that section.
54
33
55
-
The second is to generally improve your knowledge of a facet of the language.
56
-
In that case, just browse the table of contents until you see something you want to know more about, and just start reading.
57
-
If a link looks interesting, click it, and read about that section.
34
+
The second is to generally improve your knowledge of a facet of the language. In that case, just browse the table of contents until you see something you want to know more about, and just start reading. If a link looks interesting, click it, and read about that section.
58
35
59
36
That said, there is no wrong way to read this book. Read it however you feel helps you best.
60
37
61
38
### Conventions
62
39
63
-
Like all technical books, this book has certain conventions in how it displays information.
64
-
These conventions are documented here.
40
+
Like all technical books, this book has certain conventions in how it displays information. These conventions are documented here.
65
41
66
-
* Statements that define a term contain that term in *italics*.
67
-
Whenever that term is used outside of that chapter, it is usually a link to the section that has this definition.
42
+
* Statements that define a term contain that term in *italics*. Whenever that term is used outside of that chapter, it is usually a link to the section that has this definition.
68
43
69
44
An *example term* is an example of a term being defined.
70
45
@@ -122,10 +97,7 @@ r[example.rule.label]
122
97
123
98
We welcome contributions of all kinds.
124
99
125
-
You can contribute to this book by opening an issue or sending a pull request to [the Rust Reference repository].
126
-
If this book does not answer your question, and you think its answer is in scope of it, please do not hesitate to [file an issue] or ask about it in the `t-lang/doc` stream on [Zulip].
127
-
Knowing what people use this book for the most helps direct our attention to making those sections the best that they can be.
128
-
And of course, if you see anything that is wrong or is non-normative but not specifically called out as such, please also [file an issue].
100
+
You can contribute to this book by opening an issue or sending a pull request to [the Rust Reference repository]. If this book does not answer your question, and you think its answer is in scope of it, please do not hesitate to [file an issue] or ask about it in the `t-lang/doc` stream on [Zulip]. Knowing what people use this book for the most helps direct our attention to making those sections the best that they can be. And of course, if you see anything that is wrong or is non-normative but not specifically called out as such, please also [file an issue].
0 commit comments