Skip to content

Commit 9214d4a

Browse files
authored
Fix formatting of more date references (#1067)
1 parent c0e7305 commit 9214d4a

18 files changed

+38
-27
lines changed

src/backend/backend-agnostic.md

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

33
<!-- toc -->
44

5-
As of January 2021 <!-- date: 2021-01 -->, `rustc_codegen_ssa` provides an
5+
As of <!-- date: 2021-01 --> January 2021, `rustc_codegen_ssa` provides an
66
abstract interface for all backends to implement, to allow other codegen
77
backends (e.g. [Cranelift]).
88

src/borrow_check/region_inference/member_constraints.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ member constraints come in.
9494
## Choices are always lifetime parameters
9595

9696
At present, the "choice" regions from a member constraint are always lifetime
97-
parameters from the current function. As of January 2021 <!-- date: 2021-01 -->,
97+
parameters from the current function. As of <!-- date: 2021-01 --> January 2021,
9898
this falls out from the placement of impl Trait, though in the future it may not
99-
be the case. We take some advantage of this fact, as it simplifies the current
99+
be the case. We take some advantage of this fact, as it simplifies the current
100100
code. In particular, we don't have to consider a case like `'0 member of ['1,
101101
'static]`, in which the value of both `'0` and `'1` are being inferred and hence
102102
changing. See [rust-lang/rust#61773][#61773] for more information.

src/compiler-src.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
> top-level directory has separate directories for the compiler, build-system,
88
> std libs, etc, rather than one huge `src/` directory.
99
>
10-
> As of January 2021 <!-- date: 2021-01 -->, the standard libraries have been
10+
> As of <!-- date: 2021-01 --> January 2021, the standard libraries have been
1111
> moved to `library/` and the crates that make up the `rustc` compiler itself
1212
> have been moved to `compiler/`.
1313

src/contributing.md

+11
Original file line numberDiff line numberDiff line change
@@ -405,27 +405,38 @@ Just a few things to keep in mind:
405405

406406
- Please limit line length to 100 characters. This is enforced by CI, and you can run the checks
407407
locally with `ci/check_line_lengths.sh`.
408+
408409
- When contributing text to the guide, please contextualize the information with some time period
409410
and/or a reason so that the reader knows how much to trust or mistrust the information.
410411
Aim to provide a reasonable amount of context, possibly including but not limited to:
412+
411413
- A reason for why the data may be out of date other than "change", as change is a constant across
412414
the project.
415+
413416
- The date the comment was added, e.g. instead of writing _"Currently, ..."_
414417
or _"As of now, ..."_, consider writing
415418
_"As of January 2021, ..."_.
416419
Try to format the date as `<MONTH> <YEAR>` to ease search.
420+
417421
- Additionally, include a machine-readable comment of the form `<!-- date:
418422
2021-01 -->` (if the current month is January 2021). We have an automated
419423
tool that uses these (in `ci/date-check`).
424+
425+
So, for the month of January 2021, the comment would look like: `As of <!--
426+
date: 2021-01 --> January 2021`. Make sure to put the comment *between* `as of`
427+
and `January 2021`; see [PR #1066][rdg#1066] for the rationale.
428+
420429
- A link to a relevant WG, tracking issue, `rustc` rustdoc page, or similar, that may provide
421430
further explanation for the change process or a way to verify that the information is not
422431
outdated.
432+
423433
- If a text grows rather long (more than a few page scrolls) or complicated (more than four
424434
subsections) it might benefit from having a Table of Contents at the beginning, which you can
425435
auto-generate by including the `<!-- toc -->` marker.
426436

427437
[rdg]: https://rustc-dev-guide.rust-lang.org/
428438
[rdgrepo]: https://github.com/rust-lang/rustc-dev-guide
439+
[rdg#1066]: https://github.com/rust-lang/rustc-dev-guide/pull/1066
429440

430441
## Issue Triage
431442

src/diagnostics/lintstore.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ First, we have the lint declarations themselves: this is where the name and defa
1717
other metadata come from. These are normally defined by way of the [`declare_lint!`] macro, which
1818
boils down to a static with type `&rustc_session::lint::Lint`.
1919

20-
As of January 2021 <!-- date: 2021-01 -->, we lint against direct declarations
20+
As of <!-- date: 2021-01 --> January 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 by
2323
example).

src/miri.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ concrete integer.
193193

194194
However, a variable of pointer or reference *type*, such as `*const T` or `&T`,
195195
does not have to have a pointer *value*: it could be obtaining by casting or
196-
transmuting an integer to a pointer (as of January 2021 <!-- date: 2021-01 -->
196+
transmuting an integer to a pointer (as of <!-- date: 2021-01 --> January 2021
197197
that is hard to do in const eval, but eventually `transmute` will be stable as a
198198
`const fn`). And similarly, when casting or transmuting a reference to some
199199
actual allocation to an integer, we end up with a pointer *value*

src/overview.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,10 @@ to remain to ensure that unreachable functions still have their errors emitted.
249249
Moreover, the compiler wasn't originally built to use a query system; the query
250250
system has been retrofitted into the compiler, so parts of it are not query-fied
251251
yet. Also, LLVM isn't our code, so that isn't querified either. The plan is to
252-
eventually query-fy all of the steps listed in the previous section, but as of
253-
February 2021 <!-- date: 2021-02 -->, only the steps between HIR and LLVM IR are
254-
query-fied. That is, lexing, parsing, name resolution, and macro expansion are
255-
done all at once for the whole program.
252+
eventually query-fy all of the steps listed in the previous section,
253+
but as of <!-- date: 2021-02 --> February 2021, only the steps between HIR and
254+
LLVM IR are query-fied. That is, lexing, parsing, name resolution, and macro
255+
expansion are done all at once for the whole program.
256256

257257
One other thing to mention here is the all-important "typing context",
258258
[`TyCtxt`], which is a giant struct that is at the center of all things.

src/parallel-rustc.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Most of the compiler is not parallel. This represents an opportunity for
44
improving compiler performance.
55

6-
As of January 2021 <!-- date: 2021-01 -->, work on explicitly parallelizing the
6+
As of <!-- date: 2021-01 --> January 2021, work on explicitly parallelizing the
77
compiler has stalled. There is a lot of design and correctness work that needs
88
to be done.
99

@@ -22,7 +22,7 @@ There are a few basic ideas in this effort:
2222

2323
[`rayon`]: https://crates.io/crates/rayon
2424

25-
As of February 2021 <!-- date: 2021-02 -->, much of this effort is on hold due
25+
As of <!-- date: 2021-02 --> February 2021, much of this effort is on hold due
2626
to lack of manpower. We have a working prototype with promising performance
2727
gains in many cases. However, there are two blockers:
2828

src/profiling.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,6 @@ The llvm-lines output is affected by several options.
8989
`optimize = false` increases it from 2.1GB to 3.5GB and `codegen-units = 0` to 4.1GB.
9090

9191
MIR optimizations have little impact. Compared to the default `RUSTFLAGS="-Z
92-
mir-opt-level=1"`, level 0 adds 0.3GB and level 2 removes 0.2GB. As of January
93-
2021 <!-- date: 2021-01 -->, inlining currently only happens in LLVM but this
94-
might change in the future.
92+
mir-opt-level=1"`, level 0 adds 0.3GB and level 2 removes 0.2GB.
93+
As of <!-- date: 2021-01 --> January 2021, inlining currently only happens in
94+
LLVM but this might change in the future.

src/queries/profiling.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ The trace of the queries has a formal structure; see
8989
We style this formal structure as follows:
9090

9191
- **Timed passes:** Green boxes, when present (via `-Z time-passes`), represent
92-
_timed passes_ in the compiler. As of January 2021 <!-- date: 2021-01 -->
92+
_timed passes_ in the compiler. As of <!-- date: 2021-01 --> January 2021
9393
these passes are not queries, but may be replaced by queries in future versions.
9494
- **Labels:** Some green and red boxes are labeled with text. Where they are
9595
present, the labels give the following information:

src/queries/query-evaluation-model-in-detail.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ executed, no results are cached. But the context already provides access to
7676
"input" data, i.e. pieces of immutable data that were computed before the
7777
context was created and that queries can access to do their computations.
7878

79-
As of January 2021 <!-- date: 2021-01 -->, this input data consists mainly of
79+
As of <!-- date: 2021-01 --> January 2021, this input data consists mainly of
8080
the HIR map, upstream crate metadata, and the command-line options the compiler
8181
was invoked with; but in the future inputs will just consist of command-line
8282
options and a list of source files -- the HIR map will itself be provided by a

src/rustdoc-internals.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ these passes, please let us know!)
6666

6767
[44136]: https://github.com/rust-lang/rust/issues/44136
6868

69-
Here is the list of passes as of February 2021 <!-- date: 2021-02 -->:
69+
Here is the list of passes as of <!-- date: 2021-02 --> February 2021:
7070

7171
- `calculate-doc-coverage` calculates information used for the `--show-coverage`
7272
flag.

src/salsa.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ want to watch [Salsa In More
99
Depth](https://www.youtube.com/watch?v=i_IhACacPRY), also by Niko
1010
Matsakis.
1111

12-
> As of January 2021 <!-- date: 2021-01 -->, although Salsa is inspired by
12+
> As of <!-- date: 2021-01 --> January 2021, although Salsa is inspired by
1313
> (among other things) rustc's query system, it is not used directly in rustc.
1414
> It _is_ used in chalk and extensively in `rust-analyzer`, but there are no
1515
> medium or long-term concrete plans to integrate it into the compiler.

src/tests/adding.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,8 @@ The error levels that you can have are:
339339

340340
## Revisions
341341

342-
Certain classes of tests support "revisions" (as of February 2021 <!-- date:
343-
2021-02 -->, this includes compile-fail, run-fail, and incremental, though
342+
Certain classes of tests support "revisions" (as of <!-- date: 2021-02 -->
343+
February 2021, this includes compile-fail, run-fail, and incremental, though
344344
incremental tests are somewhat different). Revisions allow a single test file to
345345
be used for multiple tests. This is done by adding a special header at the top
346346
of the file:

src/tests/intro.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ essence, it runs `./x.py test` after building for each of them.
126126

127127
The integration bot [bors] is used for coordinating merges to the master branch.
128128
When a PR is approved, it goes into a [queue] where merges are tested one at a
129-
time on a wide set of platforms using GitHub Actions (as of January 2021 <!--
130-
date: 2021-01 -->, over 50 different configurations). Due to the limit on the
129+
time on a wide set of platforms using GitHub Actions (as of <!-- date: 2021-01
130+
--> January 2021, over 50 different configurations). Due to the limit on the
131131
number of parallel jobs, we run CI under the [rust-lang-ci] organization except
132132
for PRs. Most platforms only run the build steps, some run a restricted set of
133133
tests, only a subset run the full suite of tests (see Rust's [platform tiers]).

src/the-parser.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Lexing and Parsing
22

3-
As of January 2021 <!-- date: 2021-01 -->, the lexer and parser are undergoing
3+
As of <!-- date: 2021-01 --> January 2021, the lexer and parser are undergoing
44
refactoring to allow extracting them into libraries.
55

66
The very first thing the compiler does is take the program (in Unicode

src/traits/resolution.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ the obligation contains unbound inference variables.
120120

121121
The subroutines that decide whether a particular impl/where-clause/etc applies
122122
to a particular obligation are collectively referred to as the process of
123-
_matching_. As of January 2021 <!-- date: 2021-01 -->, this amounts to unifying
123+
_matching_. As of <!-- date: 2021-01 --> January 2021, this amounts to unifying
124124
the `Self` types, but in the future we may also recursively consider some of the
125125
nested obligations, in the case of an impl.
126126

src/type-inference.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ inference works, or perhaps this blog post on
7171

7272
[Unification in the Chalk project]: http://smallcultfollowing.com/babysteps/blog/2017/03/25/unification-in-chalk-part-1/
7373

74-
All told, the inference context stores four kinds of inference variables (as of
75-
<!-- date: 2018-01 --> January 2018):
74+
All told, the inference context stores four kinds of inference variables
75+
(as of <!-- date: 2018-01 --> January 2018):
7676

7777
- Type variables, which come in three varieties:
7878
- General type variables (the most common). These can be unified with any

0 commit comments

Comments
 (0)