Skip to content

Commit aaf34be

Browse files
committed
One Sentence is One Line the Introduction
1 parent f02b09e commit aaf34be

File tree

1 file changed

+51
-74
lines changed

1 file changed

+51
-74
lines changed

src/introduction.md

Lines changed: 51 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,86 @@
11
# Introduction
22

3-
This book is the primary reference for the Rust programming language. It
4-
provides three kinds of material:
3+
This book is the primary reference for the Rust programming language.
4+
It provides three kinds of material:
55

66
- Chapters that informally describe each language construct and their use.
7-
- Chapters that informally describe the memory model, concurrency model,
8-
runtime services, linkage model, and debugging facilities.
9-
- Appendix chapters providing rationale and references to languages that
10-
influenced the design.
7+
- Chapters that informally describe the memory model, concurrency model, runtime services, linkage model, and debugging facilities.
8+
- Appendix chapters providing rationale and references to languages that influenced the design.
119

1210
<div class="warning">
1311

14-
Warning: This book is incomplete. Documenting everything takes a while. See
15-
the [GitHub issues] for what is not documented in this book.
12+
Warning:
13+
This book is incomplete. Documenting everything takes a while.
14+
See the [GitHub issues] for what is not documented in this book.
1615

1716
</div>
1817

1918
## What *The Reference* is Not
2019

21-
This book does not serve as an introduction to the language. Background
22-
familiarity with the language is assumed. A separate [book] is available to
23-
help acquire such background familiarity.
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.
2423

25-
This book also does not serve as a reference to the [standard library]
26-
included in the language distribution. Those libraries are documented
27-
separately by extracting documentation attributes from their source code. Many
28-
of the features that one might expect to be language features are library
29-
features in Rust, so what you're looking for may be there, not here.
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.
3027

31-
Similarly, this book does not usually document the specifics of `rustc` as a
32-
tool or of Cargo. `rustc` has its own [book][rustc book]. Cargo has a
33-
[book][cargo book] that contains a [reference][cargo reference]. There are a few
34-
pages such as [linkage] that still describe how `rustc` works.
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.
3532

36-
This book also only serves as a reference to what is available in stable
37-
Rust. For unstable features being worked on, see the [Unstable Book].
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].
3835

39-
Rust compilers, including `rustc`, will perform optimizations. The reference
40-
does not specify what optimizations are allowed or disallowed. Instead, think of
41-
the compiled program as a black box. You can only probe by running it, feeding
42-
it input and observing its output. Everything that happens that way must conform
43-
to what the reference says.
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.
4441

45-
Finally, this book is not normative. It may include details that are
46-
specific to `rustc` itself, and should not be taken as a specification for
47-
the Rust language. We intend to produce such a book someday, and until then,
48-
the reference is the closest thing we have to one.
42+
Finally, this book is not normative.
43+
It may include details that are specific to `rustc` itself, and should not be taken as a specification for the Rust language.
44+
We intend to produce such a book someday, and until then, the reference is the closest thing we have to one.
4945

5046
## How to Use This Book
5147

52-
This book does not assume you are reading this book sequentially. Each
53-
chapter generally can be read standalone, but will cross-link to other chapters
54-
for facets of the language they refer to, but do not discuss.
48+
This book does not assume you are reading this book sequentially.
49+
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.
5550

5651
There are two main ways to read this document.
5752

58-
The first is to answer a specific question. If you know which chapter answers
59-
that question, you can jump to that chapter in the table of contents. Otherwise,
60-
you can press `s` or the click the magnifying glass on the top bar to search for
61-
keywords related to your question. For example, say you wanted to know when a
62-
temporary value created in a let statement is dropped. If you didn't already
63-
know that the [lifetime of temporaries] is defined in the [expressions chapter],
64-
you could search "temporary let" and the first search result will take you to
65-
that section.
53+
The first is to answer a specific question.
54+
If you know which chapter answers that question, you can jump to that chapter in the table of contents.
55+
Otherwise, you can press `s` or the click the magnifying glass on the top bar to search for keywords related to your question.
56+
For example, say you wanted to know when a temporary value created in a let statement is dropped.
57+
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.
6658

6759
The second is to generally improve your knowledge of a facet of the language.
68-
In that case, just browse the table of contents until you see something you
69-
want to know more about, and just start reading. If a link looks interesting,
70-
click it, and read about that section.
60+
In that case, just browse the table of contents until you see something you want to know more about, and just start reading.
61+
If a link looks interesting, click it, and read about that section.
7162

72-
That said, there is no wrong way to read this book. Read it however you feel
73-
helps you best.
63+
That said, there is no wrong way to read this book. Read it however you feel helps you best.
7464

7565
### Conventions
7666

77-
Like all technical books, this book has certain conventions in how it displays
78-
information. These conventions are documented here.
67+
Like all technical books, this book has certain conventions in how it displays information.
68+
These conventions are documented here.
7969

80-
* Statements that define a term contain that term in *italics*. Whenever that
81-
term is used outside of that chapter, it is usually a link to the section that
82-
has this definition.
70+
* Statements that define a term contain that term in *italics*.
71+
Whenever that term is used outside of that chapter, it is usually a link to the section that has this definition.
8372

8473
An *example term* is an example of a term being defined.
8574

86-
* Differences in the language by which edition the crate is compiled under are
87-
in a blockquote that start with the words "Edition Differences:" in **bold**.
75+
* Differences in the language by which edition the crate is compiled under are in a blockquote that start with the words "Edition Differences:" in **bold**.
8876

89-
> **Edition Differences**: In the 2015 edition, this syntax is valid that is
90-
> disallowed as of the 2018 edition.
77+
> **Edition Differences**: In the 2015 edition, this syntax is valid that is disallowed as of the 2018 edition.
9178
92-
* Notes that contain useful information about the state of the book or point out
93-
useful, but mostly out of scope, information are in blockquotes that start
94-
with the word "Note:" in **bold**.
79+
* Notes that contain useful information about the state of the book or point out useful, but mostly out of scope, information are in blockquotes that start with the word "Note:" in **bold**.
9580

9681
> **Note**: This is an example note.
9782
98-
* Warnings that show unsound behavior in the language or possibly confusing
99-
interactions of language features are in a special warning box.
83+
* Warnings that show unsound behavior in the language or possibly confusing interactions of language features are in a special warning box.
10084

10185
<div class="warning">
10286

@@ -106,8 +90,7 @@ information. These conventions are documented here.
10690

10791
* Code snippets inline in the text are inside `<code>` tags.
10892

109-
Longer code examples are in a syntax highlighted box that has controls for
110-
copying, executing, and showing hidden lines in the top right corner.
93+
Longer code examples are in a syntax highlighted box that has controls for copying, executing, and showing hidden lines in the top right corner.
11194

11295
```rust
11396
# // This is a hidden line.
@@ -116,8 +99,7 @@ information. These conventions are documented here.
11699
}
117100
```
118101

119-
* The grammar and lexical structure is in blockquotes with either "Lexer" or
120-
"Syntax" in <sup>**bold superscript**</sup> as the first line.
102+
* The grammar and lexical structure is in blockquotes with either "Lexer" or "Syntax" in <sup>**bold superscript**</sup> as the first line.
121103

122104
> **<sup>Syntax</sup>**\
123105
> _ExampleGrammar_:\
@@ -130,15 +112,10 @@ information. These conventions are documented here.
130112

131113
We welcome contributions of all kinds.
132114

133-
You can contribute to this book by opening an issue or sending a pull
134-
request to [the Rust Reference repository]. If this book does not answer
135-
your question, and you think its answer is in scope of it, please do not
136-
hesitate to [file an issue] or ask about it in the `t-lang/doc` stream on
137-
[Zulip]. Knowing what people use this book for the most helps direct our
138-
attention to making those sections the best that they can be. We also want
139-
the reference to be as normative as possible, so if you see anything that is
140-
wrong or is non-normative but not specifically called out, please also [file
141-
an issue].
115+
You can contribute to this book by opening an issue or sending a pull request to [the Rust Reference repository].
116+
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].
117+
Knowing what people use this book for the most helps direct our attention to making those sections the best that they can be.
118+
We also want the reference to be as normative as possible, so if you see anything that is wrong or is non-normative but not specifically called out, please also [file an issue].
142119

143120
[book]: ../book/index.html
144121
[github issues]: https://github.com/rust-lang/reference/issues

0 commit comments

Comments
 (0)