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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 11 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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:

0 commit comments

Comments
 (0)