Skip to content

Commit 22ef886

Browse files
rmehri01tshepang
authored andcommitted
Fix some typos
1 parent 36ea4b4 commit 22ef886

13 files changed

+16
-16
lines changed

Diff for: src/asm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ multiple output places where a `Call` only has a single return place output.
108108

109109
Operands are lowered one more time before being passed to LLVM codegen, this is represented by the [`InlineAsmOperandRef` type][inline_asm_codegen] from `rustc_codegen_ssa`.
110110

111-
The operands are lowered to LLVM operands and constraint codes as follow:
111+
The operands are lowered to LLVM operands and constraint codes as follows:
112112
- `out` and the output part of `inout` operands are added first, as required by LLVM. Late output
113113
operands have a `=` prefix added to their constraint code, non-late output operands have a `=&`
114114
prefix added to their constraint code.

Diff for: src/borrow_check/opaque-types-region-inference-restrictions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ fn test::{closure#0}(_upvar: &'?8 str) -> Opaque<'?6, '?7> {
229229
// "hidden type captures lifetime that does not appear in bounds".
230230
```
231231

232-
Without this restrictions error messages are consfusing and, more impotantly, there is a risk that
233-
we accept code the we would likely break in the future because member constraints are super broken
232+
Without this restrictions error messages are confusing and, more importantly, there is a risk that
233+
we accept code that would likely break in the future because member constraints are super broken
234234
in closures.
235235

236236
**Output types:**

Diff for: src/borrow_check/region_inference/lifetime_parameters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ various universal regions in scope on a particular function. We also
2929
create a [`UniversalRegionRelations`] struct, which tracks their
3030
relationships to one another. So if you have e.g. `where 'a: 'b`, then
3131
the [`UniversalRegionRelations`] struct would track that `'a: 'b` is
32-
known to hold (which could be tested with the [`outlives`] function.
32+
known to hold (which could be tested with the [`outlives`] function).
3333

3434
[`UniversalRegions`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/universal_regions/struct.UniversalRegions.html
3535
[`UniversalRegionRelations`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_borrowck/type_check/free_region_relations/struct.UniversalRegionRelations.html

Diff for: src/building/bootstrapping/what-bootstrapping-does.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ recently changed.
290290
When you build a project with `cargo`, the build artifacts for dependencies are
291291
normally stored in `target/debug/deps`. This only contains dependencies `cargo`
292292
knows about; in particular, it doesn't have the standard library. Where do `std`
293-
or `proc_macro` come from? They comes from the **sysroot**, the root of a number
293+
or `proc_macro` come from? They come from the **sysroot**, the root of a number
294294
of directories where the compiler loads build artifacts at runtime. The
295295
`sysroot` doesn't just store the standard library, though - it includes anything
296296
that needs to be loaded at runtime. That includes (but is not limited to):

Diff for: src/building/how-to-build-and-run.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ space, possibly around 100GB. This is compounded if you have a separate build di
394394
rust-analyzer (e.g. `build-rust-analyzer`). This is easy to hit with dev-desktops which have a [set
395395
disk
396396
quota](https://github.com/rust-lang/simpleinfra/blob/8a59e4faeb75a09b072671c74a7cb70160ebef50/ansible/roles/dev-desktop/defaults/main.yml#L7)
397-
for each user, but this also applies to local development as well. Occassionally, you may need to:
397+
for each user, but this also applies to local development as well. Occasionally, you may need to:
398398

399399
- Remove `build/` directory.
400400
- Remove `build-rust-analyzer/` directory (if you have a separate rust-analyzer build directory).

Diff for: src/coherence.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Overlap checks are performed for both inherent impls, and for trait impls.
2424
This uses the same overlap checking code, really done as two separate analyses.
2525
Overlap checks always consider pairs of implementations, comparing them to each other.
2626

27-
Overlap checking for inherent impl blocks is done through `fn check_item` in coherence/inherent_impls_overlap.rs),
27+
Overlap checking for inherent impl blocks is done through `fn check_item` (in coherence/inherent_impls_overlap.rs),
2828
where you can very clearly see that (at least for small `n`), the check really performs `n^2`
2929
comparisons between impls.
3030

Diff for: src/diagnostics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ contexts:
413413
some heuristics for verbosity are met)
414414
- shown as a `help` sub-diagnostic with no content (used for cases where the
415415
suggestion is obvious from the text, but we still want to let tools to apply
416-
them))
416+
them)
417417
- not shown (used for _very_ obvious cases, but we still want to allow tools to
418418
apply them)
419419

Diff for: src/pat-exhaustive-checking.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ That file contains a detailed description of the algorithm.
8888
### Constructors and fields
8989

9090
In the value `Pair(Some(0), true)`, `Pair` is called the constructor of the value, and `Some(0)` and
91-
`true` are its fields. Every matcheable value can be decomposed in this way. Examples of
91+
`true` are its fields. Every matchable value can be decomposed in this way. Examples of
9292
constructors are: `Some`, `None`, `(,)` (the 2-tuple constructor), `Foo {..}` (the constructor for
9393
a struct `Foo`), and `2` (the constructor for the number `2`).
9494

Diff for: src/profiling/with_perf.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ What happens with `--tree-callees` is that
263263
to build up a call tree
264264

265265
The `--tree-min-percent 3` option says "only show me things that take
266-
more than 3% of the time. Without this, the tree often gets really
266+
more than 3% of the time". Without this, the tree often gets really
267267
noisy and includes random stuff like the innards of
268268
malloc. `--tree-max-depth` can be useful too, it just limits how many
269269
levels we print.

Diff for: src/tests/adding.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,5 +196,5 @@ These comments are very useful to others later on when your test breaks, since
196196
they often can highlight what the problem is. They are also useful if for some
197197
reason the tests need to be refactored, since they let others know which parts
198198
of the test were important. Often a test must be rewritten because it no longer
199-
tests what is was meant to test, and then it's useful to know what it *was*
199+
tests what it was meant to test, and then it's useful to know what it *was*
200200
meant to test exactly.

Diff for: src/tests/running.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ notice a change) you can use the `--force-rerun` CLI option.
3030

3131
> **Note on requirements of external dependencies**
3232
>
33-
> Some test suites may require external dependecies. This is especially true of
33+
> Some test suites may require external dependencies. This is especially true of
3434
> debuginfo tests. Some debuginfo tests require a Python-enabled gdb. You can
3535
> test if your gdb install supports Python by using the `python` command from
3636
> within gdb. Once invoked you can type some Python code (e.g. `print("hi")`)
@@ -78,7 +78,7 @@ Likewise, you can test a single file by passing its path:
7878
```
7979

8080
`x` doesn't support running a single tool test by passing its path yet. You'll
81-
have to use the `--test-args` argument as describled
81+
have to use the `--test-args` argument as described
8282
[below](#running-an-individual-test).
8383

8484
```bash

Diff for: src/ty_module/binders.md

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

33
Sometimes we define generic parameters not on an item but as part of a type or a where clauses. As an example the type `for<'a> fn(&'a u32)` or the where clause `for<'a> T: Trait<'a>` both introduce a generic lifetime named `'a`. Currently there is no stable syntax for `for<T>` or `for<const N: usize>` but on nightly `feature(non_lifetime_binders)` feature can be used to write where clauses (but not types) using `for<T>`/`for<const N: usize>`.
44

5-
The `for` is referred to as a "binder" because it brings new names into scope. In rustc we use the `Binder` type to track where these parameters are introduced and what the parameters are (i.e. how many and whether they the parameter is a type/const/region). A type such as `for<'a> fn(&'a u32)` would be
5+
The `for` is referred to as a "binder" because it brings new names into scope. In rustc we use the `Binder` type to track where these parameters are introduced and what the parameters are (i.e. how many and whether the parameter is a type/const/region). A type such as `for<'a> fn(&'a u32)` would be
66
represented in rustc as:
77
```
88
Binder(

Diff for: src/ty_module/instantiating_binders.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Unlike `EarlyBinder` we typically do not instantiate `Binder` with some concrete
2121
## Instantiating with inference variables
2222

2323
We instantiate binders with inference variables when we are trying to infer a possible instantiation of the binder, e.g. calling higher ranked function pointers or attempting to use a higher ranked where-clause to prove some bound. For example, given the `higher_ranked_fn_ptr` from the example above, if we were to call it with `&10_u32` we would:
24-
- Instantaite the binder with infer vars yielding a signature of `fn(&'?0 u32) -> &'?0 u32)`
24+
- Instantiate the binder with infer vars yielding a signature of `fn(&'?0 u32) -> &'?0 u32)`
2525
- Equate the type of the provided argument `&10_u32` (&'static u32) with the type in the signature, `&'?0 u32`, inferring `'?0 = 'static`
2626
- The provided arguments were correct as we were successfully able to unify the types of the provided arguments with the types of the arguments in fn ptr signature
2727

@@ -50,7 +50,7 @@ Note: in the original example of this chapter it was mentioned that we should no
5050

5151
You may be wondering why we have both of these variants, afterall the data stored in `Placeholder` is effectively equivalent to that of `ReBound`: something to track which binder, and an index to track which parameter the `Binder` introduced.
5252

53-
The main reason for this is that `Bound` is a more syntactic representation of bound variables wheras `Placeholder` is a more semantic representation. As a concrete example:
53+
The main reason for this is that `Bound` is a more syntactic representation of bound variables whereas `Placeholder` is a more semantic representation. As a concrete example:
5454
```rust
5555
impl<'a> Other<'a> for &'a u32 { }
5656

0 commit comments

Comments
 (0)