Fix formatting of more date references (#1067)
This commit is contained in:
parent
b4b1fb0058
commit
9539f6c271
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<!-- toc -->
|
||||
|
||||
As of January 2021 <!-- date: 2021-01 -->, `rustc_codegen_ssa` provides an
|
||||
As of <!-- date: 2021-01 --> January 2021, `rustc_codegen_ssa` provides an
|
||||
abstract interface for all backends to implement, to allow other codegen
|
||||
backends (e.g. [Cranelift]).
|
||||
|
||||
|
|
|
|||
|
|
@ -94,9 +94,9 @@ member constraints come in.
|
|||
## Choices are always lifetime parameters
|
||||
|
||||
At present, the "choice" regions from a member constraint are always lifetime
|
||||
parameters from the current function. As of January 2021 <!-- date: 2021-01 -->,
|
||||
parameters from the current function. As of <!-- date: 2021-01 --> January 2021,
|
||||
this falls out from the placement of impl Trait, though in the future it may not
|
||||
be the case. We take some advantage of this fact, as it simplifies the current
|
||||
be the case. We take some advantage of this fact, as it simplifies the current
|
||||
code. In particular, we don't have to consider a case like `'0 member of ['1,
|
||||
'static]`, in which the value of both `'0` and `'1` are being inferred and hence
|
||||
changing. See [rust-lang/rust#61773][#61773] for more information.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
> top-level directory has separate directories for the compiler, build-system,
|
||||
> std libs, etc, rather than one huge `src/` directory.
|
||||
>
|
||||
> As of January 2021 <!-- date: 2021-01 -->, the standard libraries have been
|
||||
> As of <!-- date: 2021-01 --> January 2021, the standard libraries have been
|
||||
> moved to `library/` and the crates that make up the `rustc` compiler itself
|
||||
> have been moved to `compiler/`.
|
||||
|
||||
|
|
|
|||
|
|
@ -405,27 +405,38 @@ Just a few things to keep in mind:
|
|||
|
||||
- Please limit line length to 100 characters. This is enforced by CI, and you can run the checks
|
||||
locally with `ci/check_line_lengths.sh`.
|
||||
|
||||
- When contributing text to the guide, please contextualize the information with some time period
|
||||
and/or a reason so that the reader knows how much to trust or mistrust the information.
|
||||
Aim to provide a reasonable amount of context, possibly including but not limited to:
|
||||
|
||||
- A reason for why the data may be out of date other than "change", as change is a constant across
|
||||
the project.
|
||||
|
||||
- The date the comment was added, e.g. instead of writing _"Currently, ..."_
|
||||
or _"As of now, ..."_, consider writing
|
||||
_"As of January 2021, ..."_.
|
||||
Try to format the date as `<MONTH> <YEAR>` to ease search.
|
||||
|
||||
- Additionally, include a machine-readable comment of the form `<!-- date:
|
||||
2021-01 -->` (if the current month is January 2021). We have an automated
|
||||
tool that uses these (in `ci/date-check`).
|
||||
|
||||
So, for the month of January 2021, the comment would look like: `As of <!--
|
||||
date: 2021-01 --> January 2021`. Make sure to put the comment *between* `as of`
|
||||
and `January 2021`; see [PR #1066][rdg#1066] for the rationale.
|
||||
|
||||
- A link to a relevant WG, tracking issue, `rustc` rustdoc page, or similar, that may provide
|
||||
further explanation for the change process or a way to verify that the information is not
|
||||
outdated.
|
||||
|
||||
- If a text grows rather long (more than a few page scrolls) or complicated (more than four
|
||||
subsections) it might benefit from having a Table of Contents at the beginning, which you can
|
||||
auto-generate by including the `<!-- toc -->` marker.
|
||||
|
||||
[rdg]: https://rustc-dev-guide.rust-lang.org/
|
||||
[rdgrepo]: https://github.com/rust-lang/rustc-dev-guide
|
||||
[rdg#1066]: https://github.com/rust-lang/rustc-dev-guide/pull/1066
|
||||
|
||||
## Issue Triage
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ First, we have the lint declarations themselves: this is where the name and defa
|
|||
other metadata come from. These are normally defined by way of the [`declare_lint!`] macro, which
|
||||
boils down to a static with type `&rustc_session::lint::Lint`.
|
||||
|
||||
As of January 2021 <!-- date: 2021-01 -->, we lint against direct declarations
|
||||
As of <!-- date: 2021-01 --> January 2021, we lint against direct declarations
|
||||
without the use of the macro today (although this may change in the future, as
|
||||
the macro is somewhat unwieldy to add new fields to, like all macros by
|
||||
example).
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ concrete integer.
|
|||
|
||||
However, a variable of pointer or reference *type*, such as `*const T` or `&T`,
|
||||
does not have to have a pointer *value*: it could be obtaining by casting or
|
||||
transmuting an integer to a pointer (as of January 2021 <!-- date: 2021-01 -->
|
||||
transmuting an integer to a pointer (as of <!-- date: 2021-01 --> January 2021
|
||||
that is hard to do in const eval, but eventually `transmute` will be stable as a
|
||||
`const fn`). And similarly, when casting or transmuting a reference to some
|
||||
actual allocation to an integer, we end up with a pointer *value*
|
||||
|
|
|
|||
|
|
@ -249,10 +249,10 @@ to remain to ensure that unreachable functions still have their errors emitted.
|
|||
Moreover, the compiler wasn't originally built to use a query system; the query
|
||||
system has been retrofitted into the compiler, so parts of it are not query-fied
|
||||
yet. Also, LLVM isn't our code, so that isn't querified either. The plan is to
|
||||
eventually query-fy all of the steps listed in the previous section, but as of
|
||||
February 2021 <!-- date: 2021-02 -->, only the steps between HIR and LLVM IR are
|
||||
query-fied. That is, lexing, parsing, name resolution, and macro expansion are
|
||||
done all at once for the whole program.
|
||||
eventually query-fy all of the steps listed in the previous section,
|
||||
but as of <!-- date: 2021-02 --> February 2021, only the steps between HIR and
|
||||
LLVM IR are query-fied. That is, lexing, parsing, name resolution, and macro
|
||||
expansion are done all at once for the whole program.
|
||||
|
||||
One other thing to mention here is the all-important "typing context",
|
||||
[`TyCtxt`], which is a giant struct that is at the center of all things.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Most of the compiler is not parallel. This represents an opportunity for
|
||||
improving compiler performance.
|
||||
|
||||
As of January 2021 <!-- date: 2021-01 -->, work on explicitly parallelizing the
|
||||
As of <!-- date: 2021-01 --> January 2021, work on explicitly parallelizing the
|
||||
compiler has stalled. There is a lot of design and correctness work that needs
|
||||
to be done.
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ There are a few basic ideas in this effort:
|
|||
|
||||
[`rayon`]: https://crates.io/crates/rayon
|
||||
|
||||
As of February 2021 <!-- date: 2021-02 -->, much of this effort is on hold due
|
||||
As of <!-- date: 2021-02 --> February 2021, much of this effort is on hold due
|
||||
to lack of manpower. We have a working prototype with promising performance
|
||||
gains in many cases. However, there are two blockers:
|
||||
|
||||
|
|
|
|||
|
|
@ -89,6 +89,6 @@ The llvm-lines output is affected by several options.
|
|||
`optimize = false` increases it from 2.1GB to 3.5GB and `codegen-units = 0` to 4.1GB.
|
||||
|
||||
MIR optimizations have little impact. Compared to the default `RUSTFLAGS="-Z
|
||||
mir-opt-level=1"`, level 0 adds 0.3GB and level 2 removes 0.2GB. As of January
|
||||
2021 <!-- date: 2021-01 -->, inlining currently only happens in LLVM but this
|
||||
might change in the future.
|
||||
mir-opt-level=1"`, level 0 adds 0.3GB and level 2 removes 0.2GB.
|
||||
As of <!-- date: 2021-01 --> January 2021, inlining currently only happens in
|
||||
LLVM but this might change in the future.
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ The trace of the queries has a formal structure; see
|
|||
We style this formal structure as follows:
|
||||
|
||||
- **Timed passes:** Green boxes, when present (via `-Z time-passes`), represent
|
||||
_timed passes_ in the compiler. As of January 2021 <!-- date: 2021-01 -->
|
||||
_timed passes_ in the compiler. As of <!-- date: 2021-01 --> January 2021
|
||||
these passes are not queries, but may be replaced by queries in future versions.
|
||||
- **Labels:** Some green and red boxes are labeled with text. Where they are
|
||||
present, the labels give the following information:
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ executed, no results are cached. But the context already provides access to
|
|||
"input" data, i.e. pieces of immutable data that were computed before the
|
||||
context was created and that queries can access to do their computations.
|
||||
|
||||
As of January 2021 <!-- date: 2021-01 -->, this input data consists mainly of
|
||||
As of <!-- date: 2021-01 --> January 2021, this input data consists mainly of
|
||||
the HIR map, upstream crate metadata, and the command-line options the compiler
|
||||
was invoked with; but in the future inputs will just consist of command-line
|
||||
options and a list of source files -- the HIR map will itself be provided by a
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ these passes, please let us know!)
|
|||
|
||||
[44136]: https://github.com/rust-lang/rust/issues/44136
|
||||
|
||||
Here is the list of passes as of February 2021 <!-- date: 2021-02 -->:
|
||||
Here is the list of passes as of <!-- date: 2021-02 --> February 2021:
|
||||
|
||||
- `calculate-doc-coverage` calculates information used for the `--show-coverage`
|
||||
flag.
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ want to watch [Salsa In More
|
|||
Depth](https://www.youtube.com/watch?v=i_IhACacPRY), also by Niko
|
||||
Matsakis.
|
||||
|
||||
> As of January 2021 <!-- date: 2021-01 -->, although Salsa is inspired by
|
||||
> As of <!-- date: 2021-01 --> January 2021, although Salsa is inspired by
|
||||
> (among other things) rustc's query system, it is not used directly in rustc.
|
||||
> It _is_ used in chalk and extensively in `rust-analyzer`, but there are no
|
||||
> medium or long-term concrete plans to integrate it into the compiler.
|
||||
|
|
|
|||
|
|
@ -339,8 +339,8 @@ The error levels that you can have are:
|
|||
|
||||
## Revisions
|
||||
|
||||
Certain classes of tests support "revisions" (as of February 2021 <!-- date:
|
||||
2021-02 -->, this includes compile-fail, run-fail, and incremental, though
|
||||
Certain classes of tests support "revisions" (as of <!-- date: 2021-02 -->
|
||||
February 2021, this includes compile-fail, run-fail, and incremental, though
|
||||
incremental tests are somewhat different). Revisions allow a single test file to
|
||||
be used for multiple tests. This is done by adding a special header at the top
|
||||
of the file:
|
||||
|
|
|
|||
|
|
@ -126,8 +126,8 @@ essence, it runs `./x.py test` after building for each of them.
|
|||
|
||||
The integration bot [bors] is used for coordinating merges to the master branch.
|
||||
When a PR is approved, it goes into a [queue] where merges are tested one at a
|
||||
time on a wide set of platforms using GitHub Actions (as of January 2021 <!--
|
||||
date: 2021-01 -->, over 50 different configurations). Due to the limit on the
|
||||
time on a wide set of platforms using GitHub Actions (as of <!-- date: 2021-01
|
||||
--> January 2021, over 50 different configurations). Due to the limit on the
|
||||
number of parallel jobs, we run CI under the [rust-lang-ci] organization except
|
||||
for PRs. Most platforms only run the build steps, some run a restricted set of
|
||||
tests, only a subset run the full suite of tests (see Rust's [platform tiers]).
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Lexing and Parsing
|
||||
|
||||
As of January 2021 <!-- date: 2021-01 -->, the lexer and parser are undergoing
|
||||
As of <!-- date: 2021-01 --> January 2021, the lexer and parser are undergoing
|
||||
refactoring to allow extracting them into libraries.
|
||||
|
||||
The very first thing the compiler does is take the program (in Unicode
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ the obligation contains unbound inference variables.
|
|||
|
||||
The subroutines that decide whether a particular impl/where-clause/etc applies
|
||||
to a particular obligation are collectively referred to as the process of
|
||||
_matching_. As of January 2021 <!-- date: 2021-01 -->, this amounts to unifying
|
||||
_matching_. As of <!-- date: 2021-01 --> January 2021, this amounts to unifying
|
||||
the `Self` types, but in the future we may also recursively consider some of the
|
||||
nested obligations, in the case of an impl.
|
||||
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ inference works, or perhaps this blog post on
|
|||
|
||||
[Unification in the Chalk project]: http://smallcultfollowing.com/babysteps/blog/2017/03/25/unification-in-chalk-part-1/
|
||||
|
||||
All told, the inference context stores four kinds of inference variables (as of
|
||||
<!-- date: 2018-01 --> January 2018):
|
||||
All told, the inference context stores four kinds of inference variables
|
||||
(as of <!-- date: 2018-01 --> January 2018):
|
||||
|
||||
- Type variables, which come in three varieties:
|
||||
- General type variables (the most common). These can be unified with any
|
||||
|
|
|
|||
Loading…
Reference in New Issue