about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorCamelid <camelidcamel@gmail.com>2021-02-22 01:22:23 -0800
committerGitHub <noreply@github.com>2021-02-22 18:22:23 +0900
commita71819b012c98db21815b9ef32b68b4b52d526dd (patch)
tree4079dedcf993c8239b623ce0f841f42b6ddb5c8f /src/doc/rustc-dev-guide
parentadb5c2c49e34ca328ebe7250850cf66c79c88370 (diff)
downloadrust-a71819b012c98db21815b9ef32b68b4b52d526dd.tar.gz
rust-a71819b012c98db21815b9ef32b68b4b52d526dd.zip
Fix formatting of more date references (#1067)
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/backend/backend-agnostic.md2
-rw-r--r--src/doc/rustc-dev-guide/src/borrow_check/region_inference/member_constraints.md4
-rw-r--r--src/doc/rustc-dev-guide/src/compiler-src.md2
-rw-r--r--src/doc/rustc-dev-guide/src/contributing.md11
-rw-r--r--src/doc/rustc-dev-guide/src/diagnostics/lintstore.md2
-rw-r--r--src/doc/rustc-dev-guide/src/miri.md2
-rw-r--r--src/doc/rustc-dev-guide/src/overview.md8
-rw-r--r--src/doc/rustc-dev-guide/src/parallel-rustc.md4
-rw-r--r--src/doc/rustc-dev-guide/src/profiling.md6
-rw-r--r--src/doc/rustc-dev-guide/src/queries/profiling.md2
-rw-r--r--src/doc/rustc-dev-guide/src/queries/query-evaluation-model-in-detail.md2
-rw-r--r--src/doc/rustc-dev-guide/src/rustdoc-internals.md2
-rw-r--r--src/doc/rustc-dev-guide/src/salsa.md2
-rw-r--r--src/doc/rustc-dev-guide/src/tests/adding.md4
-rw-r--r--src/doc/rustc-dev-guide/src/tests/intro.md4
-rw-r--r--src/doc/rustc-dev-guide/src/the-parser.md2
-rw-r--r--src/doc/rustc-dev-guide/src/traits/resolution.md2
-rw-r--r--src/doc/rustc-dev-guide/src/type-inference.md4
18 files changed, 38 insertions, 27 deletions
diff --git a/src/doc/rustc-dev-guide/src/backend/backend-agnostic.md b/src/doc/rustc-dev-guide/src/backend/backend-agnostic.md
index f61bf62b344..3299e2cc79f 100644
--- a/src/doc/rustc-dev-guide/src/backend/backend-agnostic.md
+++ b/src/doc/rustc-dev-guide/src/backend/backend-agnostic.md
@@ -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]).
 
diff --git a/src/doc/rustc-dev-guide/src/borrow_check/region_inference/member_constraints.md b/src/doc/rustc-dev-guide/src/borrow_check/region_inference/member_constraints.md
index f64e39461f7..9e22aabc956 100644
--- a/src/doc/rustc-dev-guide/src/borrow_check/region_inference/member_constraints.md
+++ b/src/doc/rustc-dev-guide/src/borrow_check/region_inference/member_constraints.md
@@ -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.
diff --git a/src/doc/rustc-dev-guide/src/compiler-src.md b/src/doc/rustc-dev-guide/src/compiler-src.md
index c4f41544176..61af386522e 100644
--- a/src/doc/rustc-dev-guide/src/compiler-src.md
+++ b/src/doc/rustc-dev-guide/src/compiler-src.md
@@ -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/`.
 
diff --git a/src/doc/rustc-dev-guide/src/contributing.md b/src/doc/rustc-dev-guide/src/contributing.md
index fbcd2001a98..4a199498603 100644
--- a/src/doc/rustc-dev-guide/src/contributing.md
+++ b/src/doc/rustc-dev-guide/src/contributing.md
@@ -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
 
diff --git a/src/doc/rustc-dev-guide/src/diagnostics/lintstore.md b/src/doc/rustc-dev-guide/src/diagnostics/lintstore.md
index d6fdd1e34a0..6a59cf26474 100644
--- a/src/doc/rustc-dev-guide/src/diagnostics/lintstore.md
+++ b/src/doc/rustc-dev-guide/src/diagnostics/lintstore.md
@@ -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).
diff --git a/src/doc/rustc-dev-guide/src/miri.md b/src/doc/rustc-dev-guide/src/miri.md
index 54f96391ae8..fd091d565b6 100644
--- a/src/doc/rustc-dev-guide/src/miri.md
+++ b/src/doc/rustc-dev-guide/src/miri.md
@@ -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*
diff --git a/src/doc/rustc-dev-guide/src/overview.md b/src/doc/rustc-dev-guide/src/overview.md
index c34d01dfd91..1aa79e79146 100644
--- a/src/doc/rustc-dev-guide/src/overview.md
+++ b/src/doc/rustc-dev-guide/src/overview.md
@@ -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.
diff --git a/src/doc/rustc-dev-guide/src/parallel-rustc.md b/src/doc/rustc-dev-guide/src/parallel-rustc.md
index c47a46e7889..8be19e8dcfe 100644
--- a/src/doc/rustc-dev-guide/src/parallel-rustc.md
+++ b/src/doc/rustc-dev-guide/src/parallel-rustc.md
@@ -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:
 
diff --git a/src/doc/rustc-dev-guide/src/profiling.md b/src/doc/rustc-dev-guide/src/profiling.md
index aa8bf27a22c..429376167d5 100644
--- a/src/doc/rustc-dev-guide/src/profiling.md
+++ b/src/doc/rustc-dev-guide/src/profiling.md
@@ -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.
diff --git a/src/doc/rustc-dev-guide/src/queries/profiling.md b/src/doc/rustc-dev-guide/src/queries/profiling.md
index d903eabff60..1160ba81886 100644
--- a/src/doc/rustc-dev-guide/src/queries/profiling.md
+++ b/src/doc/rustc-dev-guide/src/queries/profiling.md
@@ -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:
diff --git a/src/doc/rustc-dev-guide/src/queries/query-evaluation-model-in-detail.md b/src/doc/rustc-dev-guide/src/queries/query-evaluation-model-in-detail.md
index eb6659420d5..4c2427e3c4e 100644
--- a/src/doc/rustc-dev-guide/src/queries/query-evaluation-model-in-detail.md
+++ b/src/doc/rustc-dev-guide/src/queries/query-evaluation-model-in-detail.md
@@ -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
diff --git a/src/doc/rustc-dev-guide/src/rustdoc-internals.md b/src/doc/rustc-dev-guide/src/rustdoc-internals.md
index f7799f96736..3e950a0eb85 100644
--- a/src/doc/rustc-dev-guide/src/rustdoc-internals.md
+++ b/src/doc/rustc-dev-guide/src/rustdoc-internals.md
@@ -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.
diff --git a/src/doc/rustc-dev-guide/src/salsa.md b/src/doc/rustc-dev-guide/src/salsa.md
index 67d813b28a8..bfe75382478 100644
--- a/src/doc/rustc-dev-guide/src/salsa.md
+++ b/src/doc/rustc-dev-guide/src/salsa.md
@@ -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.
diff --git a/src/doc/rustc-dev-guide/src/tests/adding.md b/src/doc/rustc-dev-guide/src/tests/adding.md
index 4653176722b..944b895b52a 100644
--- a/src/doc/rustc-dev-guide/src/tests/adding.md
+++ b/src/doc/rustc-dev-guide/src/tests/adding.md
@@ -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:
diff --git a/src/doc/rustc-dev-guide/src/tests/intro.md b/src/doc/rustc-dev-guide/src/tests/intro.md
index 6b2f9452f36..64191334558 100644
--- a/src/doc/rustc-dev-guide/src/tests/intro.md
+++ b/src/doc/rustc-dev-guide/src/tests/intro.md
@@ -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]).
diff --git a/src/doc/rustc-dev-guide/src/the-parser.md b/src/doc/rustc-dev-guide/src/the-parser.md
index 9c3433884be..ff43220c141 100644
--- a/src/doc/rustc-dev-guide/src/the-parser.md
+++ b/src/doc/rustc-dev-guide/src/the-parser.md
@@ -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
diff --git a/src/doc/rustc-dev-guide/src/traits/resolution.md b/src/doc/rustc-dev-guide/src/traits/resolution.md
index f2ffdcc9766..70b53e91057 100644
--- a/src/doc/rustc-dev-guide/src/traits/resolution.md
+++ b/src/doc/rustc-dev-guide/src/traits/resolution.md
@@ -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.
 
diff --git a/src/doc/rustc-dev-guide/src/type-inference.md b/src/doc/rustc-dev-guide/src/type-inference.md
index 7674fdf5a4f..71c2b08b190 100644
--- a/src/doc/rustc-dev-guide/src/type-inference.md
+++ b/src/doc/rustc-dev-guide/src/type-inference.md
@@ -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