Skip to content

Commit 363f6ce

Browse files
rukaijyn514
authored andcommitted
Spelling fixes
1 parent 7b93c85 commit 363f6ce

14 files changed

+15
-15
lines changed

Diff for: src/appendix/glossary.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Term | Meaning
8787
<span id="ut">uninhabited type</span> &nbsp; | A type which has _no_ values. This is not the same as a ZST, which has exactly 1 value. An example of an uninhabited type is `enum Foo {}`, which has no variants, and so, can never be created. The compiler can treat code that deals with uninhabited types as dead code, since there is no such value to be manipulated. `!` (the never type) is an uninhabited type. Uninhabited types are also called "empty types".
8888
<span id="upvar">upvar</span> &nbsp; | A variable captured by a closure from outside the closure.
8989
<span id="variance">variance</span> &nbsp; | Determines how changes to a generic type/lifetime parameter affect subtyping; for example, if `T` is a subtype of `U`, then `Vec<T>` is a subtype `Vec<U>` because `Vec` is *covariant* in its generic parameter. See [the background chapter](./background.md#variance) for a more general explanation. See the [variance chapter](../variance.md) for an explanation of how type checking handles variance.
90-
<span id="variant-idx">variant index</span> &nbsp; | In an enum, identifies a variant by assigning them indices starting at 0. This is purely internal and not to be confused with the ["discrimiant"](#discriminant) which can be overwritten by the user (e.g. `enum Bool { True = 42, False = 0 }`).
90+
<span id="variant-idx">variant index</span> &nbsp; | In an enum, identifies a variant by assigning them indices starting at 0. This is purely internal and not to be confused with the ["discriminant"](#discriminant) which can be overwritten by the user (e.g. `enum Bool { True = 42, False = 0 }`).
9191
<span id="wide-ptr">wide pointer</span> &nbsp; | A pointer with additional metadata. See "fat pointer" for more.
9292
<span id="zst">ZST</span> &nbsp; | Zero-Sized Type. A type whose values have size 0 bytes. Since `2^0 = 1`, such types can have exactly one value. For example, `()` (unit) is a ZST. `struct Foo;` is also a ZST. The compiler can do some nice optimizations around ZSTs.
9393

Diff for: src/backend/monomorph.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ or more modules in Crate B.
7171
| - | - |
7272
| Non-generic function | Crate A function doesn't appear in any codegen units of Crate B |
7373
| Non-generic `#[inline]` function | Crate A function appears with in a single CGU of Crate B, and exists even after post-inlining stage|
74-
| Generic function | Regardless of inlining, all monoporphized (specialized) functions <br> from Crate A appear within a single codegen unit for Crate B. <br> The codegen unit exists even after the post inlining stage.|
74+
| Generic function | Regardless of inlining, all monomorphized (specialized) functions <br> from Crate A appear within a single codegen unit for Crate B. <br> The codegen unit exists even after the post inlining stage.|
7575
| Generic `#[inline]` function | - same - |
7676

7777
For more details about the partitioner read the module level [documentation].

Diff for: src/diagnostics/lintstore.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ As of <!-- date: 2021-07 --> July 2021, we lint against direct declarations
2121
without the use of the macro today (although this may change in the future, as
2222
the macro is somewhat unwieldy to add new fields to, like all macros).
2323

24-
Lint declarations don't carry any "state" - they are merely global identifers and descriptions of
24+
Lint declarations don't carry any "state" - they are merely global identifiers and descriptions of
2525
lints. We assert at runtime that they are not registered twice (by lint name).
2626

2727
Lint passes are the meat of any lint. Notably, there is not a one-to-one relationship between

Diff for: src/early-late-bound.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ of type `for<T> fn(T)`, we would need a single function pointer that can be
2424
used for a parameter of any type, but in Rust we generate customized code for
2525
each parameter type.
2626

27-
One consequence of this asymmetry is a weird split in how we represesent some
27+
One consequence of this asymmetry is a weird split in how we represent some
2828
generic types: _early-_ and _late-_ bound parameters.
2929
Basically, if we cannot represent a type (e.g. a universally quantified type),
3030
we have to bind it _early_ so that the unrepresentable type is never around.

Diff for: src/git.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ nothing to commit, working tree clean
408408
```
409409

410410
As far as git is concerned, you are no longer in the `rust` repo, but in the `miri` repo.
411-
You will notice that we are in "detatched HEAD" state, i.e. not on a branch but on a
411+
You will notice that we are in "detached HEAD" state, i.e. not on a branch but on a
412412
particular commit.
413413

414414
This is because, like any dependency, we want to be able to control which version to use.

Diff for: src/llvm-coverage-instrumentation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ The nodes contain information in sections:
453453
its `BasicCoverageBlockData`).
454454
2. The first content section shows the assigned `Counter` or `Expression` for
455455
each contiguous section of code. (There may be more than one `Expression`
456-
incremented by the same `Counter` for discontiguous sections of code
456+
incremented by the same `Counter` for noncontiguous sections of code
457457
representing the same sequential actions.) Note the code is represented by
458458
the line and column ranges (for example: `52:28-52:33`, representing the
459459
original source line 52, for columns 28-33). These are followed by the MIR

Diff for: src/macro-expansion.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ syntactic sugar and are allowed to be in namespaces.
585585

586586
## Procedural Macros
587587

588-
Precedural macros are also expanded during parsing, as mentioned above.
588+
Procedural macros are also expanded during parsing, as mentioned above.
589589
However, they use a rather different mechanism. Rather than having a parser in
590590
the compiler, procedural macros are implemented as custom, third-party crates.
591591
The compiler will compile the proc macro crate and specially annotated

Diff for: src/mir/debugging.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ control-flow graph
1212
spans associated with MIR elements (including mouse-over actions to reveal
1313
elements obscured by overlaps, and tooltips to view the MIR statements).
1414
This flag takes an optional value: `statement` (the default), `terminator`, or
15-
`block`, to generate span highlights with different levels of granulatity.
15+
`block`, to generate span highlights with different levels of granularity.
1616

1717
`-Z dump-mir=F` is a handy compiler options that will let you view the MIR for
1818
each function at each stage of compilation. `-Z dump-mir` takes a **filter** `F`

Diff for: src/mir/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ This section introduces the key concepts of MIR, summarized here:
5454
- **Operands:** the arguments to an rvalue, which can either be a
5555
constant (like `22`) or a place (like `_1`).
5656

57-
You can get a feeling for how MIR is structed by translating simple
57+
You can get a feeling for how MIR is constructed by translating simple
5858
programs into MIR and reading the pretty printed output. In fact, the
5959
playground makes this easy, since it supplies a MIR button that will
6060
show you the MIR for your program. Try putting this program into play

Diff for: src/miri.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ allocation. These allocations can be accessed via the methods on
119119
see [the next section](#memory) for more on that.
120120

121121
If you are expecting a numeric result, you can use `eval_usize` (panics on
122-
anything that can't be representad as a `u64`) or `try_eval_usize` which results
122+
anything that can't be represented as a `u64`) or `try_eval_usize` which results
123123
in an `Option<u64>` yielding the `Scalar` if possible.
124124

125125
## Memory

Diff for: src/profiling/with_perf.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ the regular expression matched.
253253

254254
### Example: Where does MIR borrowck spend its time?
255255

256-
Often we want to do a more "explorational" queries. Like, we know that
256+
Often we want to do more "explorational" queries. Like, we know that
257257
MIR borrowck is 29% of the time, but where does that time get spent?
258258
For that, the `--tree-callees` option is often the best tool. You
259259
usually also want to give `--tree-min-percent` or

Diff for: src/tests/running.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ The possible compare modes are:
194194
* split-dwarf
195195
* split-dwarf-single
196196

197-
Note that compare modes are seperate to [revisions](./adding.html#revisions).
197+
Note that compare modes are separate to [revisions](./adding.html#revisions).
198198
All revisions are tested when running `./x.py test src/test/ui`,
199199
however compare-modes must be manually run individually via the `--compare-mode` flag.
200200

Diff for: src/tracing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ here. There is no perfect balance to hit here, and is left to the reviewer's
176176
discretion to decide whether to let you leave `debug!` statements in or whether to ask
177177
you to remove them before merging.
178178

179-
It may be preferrable to use `trace!` over `debug!` for very noisy logs.
179+
It may be preferable to use `trace!` over `debug!` for very noisy logs.
180180

181181
A loosely followed convention is to use `#[instrument(level = "debug")]`
182182
([also see the attribute's documentation](https://docs.rs/tracing-attributes/0.1.17/tracing_attributes/attr.instrument.html))
@@ -201,4 +201,4 @@ This means that you should not put anything too expensive or likely to crash
201201
there - that would annoy anyone who wants to use logging for that module.
202202
No-one will know it until someone tries to use logging to find *another* bug.
203203

204-
[`tracing`]: https://docs.rs/tracing
204+
[`tracing`]: https://docs.rs/tracing

Diff for: src/ty.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ delaying a redundant span bug.
312312

313313
Recall that we represent a generic struct with `(AdtDef, substs)`. So why bother with this scheme?
314314

315-
Well, the alternate way we could have choosen to represent types would be to always create a new,
315+
Well, the alternate way we could have chosen to represent types would be to always create a new,
316316
fully-substituted form of the `AdtDef` where all the types are already substituted. This seems like
317317
less of a hassle. However, the `(AdtDef, substs)` scheme has some advantages over this.
318318

0 commit comments

Comments
 (0)