Skip to content

Commit 37a202c

Browse files
committed
fix all the not-en-dashes
1 parent a154eb9 commit 37a202c

24 files changed

+100
-100
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Once it gets more complete, the plan is probably to move it into the
1818
If you'd like to help finish the guide, we'd love to have you! The
1919
main tracking issue for the guide
2020
[can be found here](https://github.com/rust-lang-nursery/rustc-guide/issues/6). From
21-
there, you can find a list of all the planned chapters and subsections
22-
-- if you think something is missing, please open an issue about it!
21+
there, you can find a list of all the planned chapters and subsections.
22+
If you think something is missing, please open an issue about it!
2323
Otherwise, find a chapter that sounds interesting to you and then go
2424
to its associated issue. There should be a list of things to do.
2525

src/appendix/background.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ exposes the underlying control flow in a very clear way.
1515

1616
A control-flow graph is structured as a set of **basic blocks**
1717
connected by edges. The key idea of a basic block is that it is a set
18-
of statements that execute "together" -- that is, whenever you branch
18+
of statements that execute "together" that is, whenever you branch
1919
to a basic block, you start at the first statement and then execute
2020
all the remainder. Only at the end of the block is there the
2121
possibility of branching to more than one place (in MIR, we call that
@@ -119,7 +119,7 @@ variables, since that's the thing we're most familiar with.
119119
So there you have it: a variable "appears free" in some
120120
expression/statement/whatever if it refers to something defined
121121
outside of that expressions/statement/whatever. Equivalently, we can
122-
then refer to the "free variables" of an expression -- which is just
122+
then refer to the "free variables" of an expression which is just
123123
the set of variables that "appear free".
124124

125125
So what does this have to do with regions? Well, we can apply the

src/compiletest.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ expect, and more. If you are unfamiliar with the compiler testing framework,
1616
see [this chapter](./tests/intro.html) for additional background.
1717

1818
The tests themselves are typically (but not always) organized into
19-
"suites"--for example, `run-pass`, a folder representing tests that should
19+
"suites"for example, `run-pass`, a folder representing tests that should
2020
succeed, `run-fail`, a folder holding tests that should compile successfully,
2121
but return a failure (non-zero status), `compile-fail`, a folder holding tests
2222
that should fail to compile, and many more. The various suites are defined in

src/conventions.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ current year if you like, but you don't have to.
4444
Lines should be at most 100 characters. It's even better if you can
4545
keep things to 80.
4646

47-
**Ignoring the line length limit.** Sometimes -- in particular for
48-
tests -- it can be necessary to exempt yourself from this limit. In
47+
**Ignoring the line length limit.** Sometimes in particular for
48+
tests it can be necessary to exempt yourself from this limit. In
4949
that case, you can add a comment towards the top of the file (after
5050
the copyright notice) like so:
5151

@@ -141,7 +141,7 @@ command like `git rebase -i rust-lang/master` (presuming you use the
141141
name `rust-lang` for your remote).
142142

143143
**Individual commits do not have to build (but it's nice).** We do not
144-
require that every intermediate commit successfully builds -- we only
144+
require that every intermediate commit successfully builds we only
145145
expect to be able to bisect at a PR level. However, if you *can* make
146146
individual commits build, that is always helpful.
147147

src/incrcomp-debugging.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ path that should not exist, but you will not be quite sure how it came
9090
to be. **When the compiler is built with debug assertions,** it can
9191
help you track that down. Simply set the `RUST_FORBID_DEP_GRAPH_EDGE`
9292
environment variable to a filter. Every edge created in the dep-graph
93-
will be tested against that filter -- if it matches, a `bug!` is
93+
will be tested against that filter if it matches, a `bug!` is
9494
reported, so you can easily see the backtrace (`RUST_BACKTRACE=1`).
9595

9696
The syntax for these filters is the same as described in the previous

src/mir/borrowck.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIR borrow check
22

3-
The borrow check is Rust's "secret sauce" -- it is tasked with
3+
The borrow check is Rust's "secret sauce" it is tasked with
44
enforcing a number of properties:
55

66
- That all variables are initialized before they are used.

src/mir/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
MIR is Rust's _Mid-level Intermediate Representation_. It is
44
constructed from [HIR](./hir.html). MIR was introduced in
55
[RFC 1211]. It is a radically simplified form of Rust that is used for
6-
certain flow-sensitive safety checks -- notably the borrow checker! --
6+
certain flow-sensitive safety checks notably the borrow checker!
77
and also for optimization and code generation.
88

99
If you'd like a very high-level introduction to MIR, as well as some
@@ -122,7 +122,7 @@ StorageLive(_1);
122122
```
123123

124124
This statement indicates that the variable `_1` is "live", meaning
125-
that it may be used later -- this will persist until we encounter a
125+
that it may be used later this will persist until we encounter a
126126
`StorageDead(_1)` statement, which indicates that the variable `_1` is
127127
done being used. These "storage statements" are used by LLVM to
128128
allocate stack space.
@@ -134,7 +134,7 @@ _1 = const <std::vec::Vec<T>>::new() -> bb2;
134134
```
135135

136136
Terminators are different from statements because they can have more
137-
than one successor -- that is, control may flow to different
137+
than one successor that is, control may flow to different
138138
places. Function calls like the call to `Vec::new` are always
139139
terminators because of the possibility of unwinding, although in the
140140
case of `Vec::new` we are able to see that indeed unwinding is not
@@ -163,7 +163,7 @@ Assignments in general have the form:
163163
<Place> = <Rvalue>
164164
```
165165

166-
A place is an expression like `_3`, `_3.f` or `*_3` -- it denotes a
166+
A place is an expression like `_3`, `_3.f` or `*_3` it denotes a
167167
location in memory. An **Rvalue** is an expression that creates a
168168
value: in this case, the rvalue is a mutable borrow expression, which
169169
looks like `&mut <Place>`. So we can kind of define a grammar for
@@ -180,7 +180,7 @@ rvalues like so:
180180
| move Place
181181
```
182182

183-
As you can see from this grammar, rvalues cannot be nested -- they can
183+
As you can see from this grammar, rvalues cannot be nested they can
184184
only reference places and constants. Moreover, when you use a place,
185185
we indicate whether we are **copying it** (which requires that the
186186
place have a type `T` where `T: Copy`) or **moving it** (which works

src/mir/passes.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ that appeared within the `main` function.)
100100

101101
### Implementing and registering a pass
102102

103-
A `MirPass` is some bit of code that processes the MIR, typically --
104-
but not always -- transforming it along the way somehow. For example,
103+
A `MirPass` is some bit of code that processes the MIR, typically
104+
but not always transforming it along the way somehow. For example,
105105
it might perform an optimization. The `MirPass` trait itself is found
106106
in in [the `rustc_mir::transform` module][mirtransform], and it
107107
basically consists of one method, `run_pass`, that simply gets an
@@ -110,7 +110,7 @@ came from). The MIR is therefore modified in place (which helps to
110110
keep things efficient).
111111

112112
A good example of a basic MIR pass is [`NoLandingPads`], which walks
113-
the MIR and removes all edges that are due to unwinding -- this is
113+
the MIR and removes all edges that are due to unwinding this is
114114
used when configured with `panic=abort`, which never unwinds. As you
115115
can see from its source, a MIR pass is defined by first defining a
116116
dummy type, a struct with no fields, something like:

src/mir/regionck.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ The MIR-based region analysis consists of two major functions:
1212
- `replace_regions_in_mir`, invoked first, has two jobs:
1313
- First, it finds the set of regions that appear within the
1414
signature of the function (e.g., `'a` in `fn foo<'a>(&'a u32) {
15-
... }`). These are called the "universal" or "free" regions -- in
15+
... }`). These are called the "universal" or "free" regions in
1616
particular, they are the regions that [appear free][fvb] in the
1717
function body.
1818
- Second, it replaces all the regions from the function body with
1919
fresh inference variables. This is because (presently) those
2020
regions are the results of lexical region inference and hence are
21-
not of much interest. The intention is that -- eventually -- they
21+
not of much interest. The intention is that eventually they
2222
will be "erased regions" (i.e., no information at all), since we
2323
won't be doing lexical region inference at all.
2424
- `compute_regions`, invoked second: this is given as argument the
@@ -40,11 +40,11 @@ The MIR-based region analysis consists of two major functions:
4040

4141
## Universal regions
4242

43-
*to be written* -- explain the `UniversalRegions` type
43+
*to be written* explain the `UniversalRegions` type
4444

4545
## Region variables and constraints
4646

47-
*to be written* -- describe the `RegionInferenceContext` and
47+
*to be written* describe the `RegionInferenceContext` and
4848
the role of `liveness_constraints` vs other `constraints`, plus
4949

5050
## Closures
@@ -79,13 +79,13 @@ The kinds of region elements are as follows:
7979
- Similarly, there is an element denoted `end('static)` corresponding
8080
to the remainder of program execution after this function returns.
8181
- There is an element `!1` for each skolemized region `!1`. This
82-
corresponds (intuitively) to some unknown set of other elements --
82+
corresponds (intuitively) to some unknown set of other elements
8383
for details on skolemization, see the section
8484
[skolemization and universes](#skol).
8585

8686
## Causal tracking
8787

88-
*to be written* -- describe how we can extend the values of a variable
88+
*to be written* describe how we can extend the values of a variable
8989
with causal tracking etc
9090

9191
<a name="skol"></a>
@@ -133,7 +133,7 @@ bound in the supertype and **skolemizing** them: this means that we
133133
replace them with
134134
[universally quantified](appendix/background.html#quantified)
135135
representatives, written like `!1`. We call these regions "skolemized
136-
regions" -- they represent, basically, "some unknown region".
136+
regions" they represent, basically, "some unknown region".
137137

138138
Once we've done that replacement, we have the following relation:
139139

@@ -156,9 +156,9 @@ we swap the left and right here):
156156
```
157157

158158
According to the basic subtyping rules for a reference, this will be
159-
true if `'!1: 'static`. That is -- if "some unknown region `!1`" lives
160-
outlives `'static`. Now, this *might* be true -- after all, `'!1`
161-
could be `'static` -- but we don't *know* that it's true. So this
159+
true if `'!1: 'static`. That is if "some unknown region `!1`" lives
160+
outlives `'static`. Now, this *might* be true after all, `'!1`
161+
could be `'static` but we don't *know* that it's true. So this
162162
should yield up an error (eventually).
163163

164164
### What is a universe
@@ -238,16 +238,16 @@ not U1.
238238
**Giving existential variables a universe.** Now that we have this
239239
notion of universes, we can use it to extend our type-checker and
240240
things to prevent illegal names from leaking out. The idea is that we
241-
give each inference (existential) variable -- whether it be a type or
242-
a lifetime -- a universe. That variable's value can then only
241+
give each inference (existential) variable whether it be a type or
242+
a lifetime a universe. That variable's value can then only
243243
reference names visible from that universe. So for example is a
244244
lifetime variable is created in U0, then it cannot be assigned a value
245245
of `!1` or `!2`, because those names are not visible from the universe
246246
U0.
247247

248248
**Representing universes with just a counter.** You might be surprised
249249
to see that the compiler doesn't keep track of a full tree of
250-
universes. Instead, it just keeps a counter -- and, to determine if
250+
universes. Instead, it just keeps a counter and, to determine if
251251
one universe can see another one, it just checks if the index is
252252
greater. For example, U2 can see U0 because 2 >= 0. But U0 cannot see
253253
U2, because 0 >= 2 is false.
@@ -323,12 +323,12 @@ Now there are two ways that could happen. First, if `U(V1)` can see
323323
the universe `x` (i.e., `x <= U(V1)`), then we can just add `skol(x)`
324324
to `value(V1)` and be done. But if not, then we have to approximate:
325325
we may not know what set of elements `skol(x)` represents, but we
326-
should be able to compute some sort of **upper bound** B for it --
326+
should be able to compute some sort of **upper bound** B for it
327327
some region B that outlives `skol(x)`. For now, we'll just use
328-
`'static` for that (since it outlives everything) -- in the future, we
328+
`'static` for that (since it outlives everything) in the future, we
329329
can sometimes be smarter here (and in fact we have code for doing this
330330
already in other contexts). Moreover, since `'static` is in the root
331-
universe U0, we know that all variables can see it -- so basically if
331+
universe U0, we know that all variables can see it so basically if
332332
we find that `value(V2)` contains `skol(x)` for some universe `x`
333333
that `V1` can't see, then we force `V1` to `'static`.
334334

@@ -398,8 +398,8 @@ outlives relationships are satisfied. Then we would go to the "check
398398
universal regions" portion of the code, which would test that no
399399
universal region grew too large.
400400

401-
In this case, `V1` *did* grow too large -- it is not known to outlive
402-
`end('static)`, nor any of the CFG -- so we would report an error.
401+
In this case, `V1` *did* grow too large it is not known to outlive
402+
`end('static)`, nor any of the CFG so we would report an error.
403403

404404
## Another example
405405

src/mir/visitor.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The MIR visitor is a convenient tool for traversing the MIR and either
44
looking for things or making changes to it. The visitor traits are
5-
defined in [the `rustc::mir::visit` module][m-v] -- there are two of
5+
defined in [the `rustc::mir::visit` module][m-v] there are two of
66
them, generated via a single macro: `Visitor` (which operates on a
77
`&Mir` and gives back shared references) and `MutVisitor` (which
88
operates on a `&mut Mir` and gives back mutable references).

src/query.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Rust compiler is current transitioning from a traditional "pass-based"
55
setup to a "demand-driven" system. **The Compiler Query System is the
66
key to our new demand-driven organization.** The idea is pretty
77
simple. You have various queries that compute things about the input
8-
-- for example, there is a query called `type_of(def_id)` that, given
8+
for example, there is a query called `type_of(def_id)` that, given
99
the def-id of some item, will compute the type of that item and return
1010
it to you.
1111

src/tests/adding.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ considered an ideal setup.
4949

5050
[`src/test/run-pass`]: https://github.com/rust-lang/rust/tree/master/src/test/run-pass/
5151

52-
For regression tests -- basically, some random snippet of code that
53-
came in from the internet -- we often just name the test after the
52+
For regression tests basically, some random snippet of code that
53+
came in from the internet we often just name the test after the
5454
issue. For example, `src/test/run-pass/issue-12345.rs`. If possible,
5555
though, it is better if you can put the test into a directory that
5656
helps identify what piece of code is being tested here (e.g.,
@@ -267,9 +267,9 @@ can also make UI tests where compilation is expected to succeed, and
267267
you can even run the resulting program. Just add one of the following
268268
[header commands](#header_commands):
269269

270-
- `// compile-pass` -- compilation should succeed but do
270+
- `// compile-pass` compilation should succeed but do
271271
not run the resulting binary
272-
- `// run-pass` -- compilation should succeed and we should run the
272+
- `// run-pass` compilation should succeed and we should run the
273273
resulting binary
274274

275275
<a name="bless"></a>

0 commit comments

Comments
 (0)