Skip to content

Commit d8dec87

Browse files
committed
Auto merge of #140935 - omahs:patch-5, r=jieyouxu
Fix typos Fix typos
2 parents bf57a65 + 5a04183 commit d8dec87

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

src/autodiff/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Installation
22

3-
In the near future, `std::autodiff` should become available in nightly builds for users. As a contribute however, you will still need to build rustc from source. Please be aware that the msvc target is not supported at the moment, all other tier 1 targets should work. Please open an issue if you encounter any problems on a supported tier 1 target, or if you succesfully build this project on a tier2/tier3 target.
3+
In the near future, `std::autodiff` should become available in nightly builds for users. As a contributor however, you will still need to build rustc from source. Please be aware that the msvc target is not supported at the moment, all other tier 1 targets should work. Please open an issue if you encounter any problems on a supported tier 1 target, or if you successfully build this project on a tier2/tier3 target.
44

55
## Build instructions
66

src/rustdoc-internals/rustdoc-test-suite.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ In addition to the directives listed here,
1616
`rustdoc` tests also support most
1717
[compiletest directives](../tests/directives.html).
1818

19-
All `PATH`s in directives are relative to the the rustdoc output directory (`build/TARGET/test/rustdoc/TESTNAME`),
19+
All `PATH`s in directives are relative to the rustdoc output directory (`build/TARGET/test/rustdoc/TESTNAME`),
2020
so it is conventional to use a `#![crate_name = "foo"]` attribute to avoid
2121
having to write a long crate name multiple times.
22-
To avoid repetion, `-` can be used in any `PATH` argument to re-use the previous `PATH` argument.
22+
To avoid repetition, `-` can be used in any `PATH` argument to re-use the previous `PATH` argument.
2323

2424
All arguments take the form of quoted strings
2525
(both single and double quotes are supported),
@@ -87,7 +87,7 @@ compiletest's `--bless` flag is forwarded to htmldocck.
8787

8888
Usage: `//@ has-dir PATH`
8989

90-
Checks for the existance of directory `PATH`.
90+
Checks for the existence of directory `PATH`.
9191

9292
### `files`
9393

@@ -106,7 +106,7 @@ Example: `//@ files "foo/bar" '["index.html", "sidebar-items.js"]'`
106106
## Limitations
107107
`htmldocck.py` uses the xpath implementation from the standard library.
108108
This leads to several limitations:
109-
* All `XPATH` arguments must start with `//` due to a flaw in the implemention.
109+
* All `XPATH` arguments must start with `//` due to a flaw in the implementation.
110110
* Many XPath features (functions, axies, etc.) are not supported.
111111
* Only well-formed HTML can be parsed (hopefully rustdoc doesn't output mismatched tags).
112112

src/type-checking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Type "collection" is the process of converting the types found in the HIR
1717
**internal representation** used by the compiler (`Ty<'tcx>`) – we also do
1818
similar conversions for where-clauses and other bits of the function signature.
1919

20-
To try and get a sense for the difference, consider this function:
20+
To try and get a sense of the difference, consider this function:
2121

2222
```rust,ignore
2323
struct Foo { }

src/type-inference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Here, the type of `things` is *inferred* to be `Vec<&str>` because of the value
1919
we push into `things`.
2020

2121
The type inference is based on the standard Hindley-Milner (HM) type inference
22-
algorithm, but extended in various way to accommodate subtyping, region
22+
algorithm, but extended in various ways to accommodate subtyping, region
2323
inference, and higher-ranked types.
2424

2525
## A note on terminology

src/typing_parameter_envs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Typing Environments
66

7-
When interacting with the type system there are a few variables to consider that can affect the results of trait solving. The the set of in-scope where clauses, and what phase of the compiler type system operations are being performed in (the [`ParamEnv`][penv] and [`TypingMode`][tmode] structs respectively).
7+
When interacting with the type system there are a few variables to consider that can affect the results of trait solving. The set of in-scope where clauses, and what phase of the compiler type system operations are being performed in (the [`ParamEnv`][penv] and [`TypingMode`][tmode] structs respectively).
88

99
When an environment to perform type system operations in has not yet been created, the [`TypingEnv`][tenv] can be used to bundle all of the external context required into a single type.
1010

@@ -13,11 +13,11 @@ Once a context to perform type system operations in has been created (e.g. an [`
1313
[ocx]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/traits/struct.ObligationCtxt.html
1414
[fnctxt]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir_typeck/fn_ctxt/struct.FnCtxt.html
1515

16-
## Parameter Environemnts
16+
## Parameter Environments
1717

1818
### What is a `ParamEnv`
1919

20-
The [`ParamEnv`][penv] is a list of in-scope where-clauses, it typically corresponds to a specific item's where clauses. Some clauses are not explicitly written but are instead are implicitly added in the [`predicates_of`][predicates_of] query, such as `ConstArgHasType` or (some) implied bounds.
20+
The [`ParamEnv`][penv] is a list of in-scope where-clauses, it typically corresponds to a specific item's where clauses. Some clauses are not explicitly written but are instead implicitly added in the [`predicates_of`][predicates_of] query, such as `ConstArgHasType` or (some) implied bounds.
2121

2222
In most cases `ParamEnv`s are initially created via the [`param_env` query][query] which returns a `ParamEnv` derived from the provided item's where clauses. A `ParamEnv` can also be created with arbitrary sets of clauses that are not derived from a specific item, such as in [`compare_method_predicate_entailment`][method_pred_entailment] where we create a hybrid `ParamEnv` consisting of the impl's where clauses and the trait definition's function's where clauses.
2323

@@ -73,7 +73,7 @@ fn foo2<T>(a: T) {
7373

7474
### Acquiring a `ParamEnv`
7575

76-
Using the wrong [`ParamEnv`][penv] when interacting with the type system can lead to ICEs, illformed programs compiling, or erroing when we shouldn't. See [#82159](https://github.com/rust-lang/rust/pull/82159) and [#82067](https://github.com/rust-lang/rust/pull/82067) as examples of PRs that modified the compiler to use the correct param env and in the process fixed ICEs.
76+
Using the wrong [`ParamEnv`][penv] when interacting with the type system can lead to ICEs, illformed programs compiling, or erroring when we shouldn't. See [#82159](https://github.com/rust-lang/rust/pull/82159) and [#82067](https://github.com/rust-lang/rust/pull/82067) as examples of PRs that modified the compiler to use the correct param env and in the process fixed ICEs.
7777

7878
In the large majority of cases, when a `ParamEnv` is required it either already exists somewhere in scope, or above in the call stack and should be passed down. A non exhaustive list of places where you might find an existing `ParamEnv`:
7979
- During typeck `FnCtxt` has a [`param_env` field][fnctxt_param_env]

0 commit comments

Comments
 (0)