Skip to content

Commit 70e08b3

Browse files
authored
Merge pull request #2388 from rust-lang/rustc-pull
Rustc pull update
2 parents 1ddf2df + 142b48a commit 70e08b3

File tree

7 files changed

+23
-23
lines changed

7 files changed

+23
-23
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7e552b46af72df390ed233b58a7f51650515b2a8
1+
414482f6a0d4e7290f614300581a0b55442552a3

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/tests/ci.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,16 @@ There are several use-cases for try builds:
135135
- Run a specific CI job (e.g. Windows tests) on a PR, to quickly test if it
136136
passes the test suite executed by that job.
137137

138-
You can select which CI jobs will
139-
be executed in the try build by adding lines containing `try-job:
140-
<job pattern>` to the PR description. All such specified jobs will be executed
141-
in the try build once the `@bors try` command is used on the PR. If no try
142-
jobs are specified in this way, the jobs defined in the `try` section of
143-
[`jobs.yml`] will be executed by default.
138+
By default, if you send a comment with `@bors try`, the jobs defined in the `try` section of
139+
[`jobs.yml`] will be executed. We call this mode a "fast try build". Such a try build
140+
will not execute any tests, and it will allow compilation warnings. It is useful when you want to
141+
get an optimized toolchain as fast as possible, for a crater run or performance benchmarks,
142+
even if it might not be working fully correctly.
143+
144+
If you want to run a custom CI job in a try build and make sure that it passes all tests and does
145+
not produce any compilation warnings, you can select CI jobs to be executed by adding lines
146+
containing `try-job: <job pattern>` to the PR description. All such specified jobs will be executed
147+
in the try build once the `@bors try` command is used on the PR.
144148

145149
Each pattern can either be an exact name of a job or a glob pattern that matches multiple jobs,
146150
for example `*msvc*` or `*-alt`. You can start at most 20 jobs in a single try build. When using

src/tests/compiletest.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -325,12 +325,8 @@ The tests in [`tests/codegen-units`] test the
325325
[monomorphization](../backend/monomorph.md) collector and CGU partitioning.
326326

327327
These tests work by running `rustc` with a flag to print the result of the
328-
monomorphization collection pass, and then special annotations in the file are
329-
used to compare against that.
330-
331-
Each test should be annotated with the `//@
332-
compile-flags:-Zprint-mono-items=VAL` directive with the appropriate `VAL` to
333-
instruct `rustc` to print the monomorphization information.
328+
monomorphization collection pass, i.e., `-Zprint-mono-items`, and then special
329+
annotations in the file are used to compare against that.
334330

335331
Then, the test should be annotated with comments of the form `//~ MONO_ITEM
336332
name` where `name` is the monomorphized string printed by rustc like `fn <u32 as

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)