diff --git a/src/backend/backend-agnostic.md b/src/backend/backend-agnostic.md index f61bf62b3..3299e2cc7 100644 --- a/src/backend/backend-agnostic.md +++ b/src/backend/backend-agnostic.md @@ -2,7 +2,7 @@ -As of January 2021 , `rustc_codegen_ssa` provides an +As of 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/borrow_check/region_inference/member_constraints.md b/src/borrow_check/region_inference/member_constraints.md index f64e39461..9e22aabc9 100644 --- a/src/borrow_check/region_inference/member_constraints.md +++ b/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 , +parameters from the current function. As of 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/compiler-src.md b/src/compiler-src.md index c4f415441..61af38652 100644 --- a/src/compiler-src.md +++ b/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 , the standard libraries have been +> As of 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/contributing.md b/src/contributing.md index fbcd2001a..4a1994986 100644 --- a/src/contributing.md +++ b/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 ` ` to ease search. + - Additionally, include a machine-readable comment of the form `` (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 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 `` 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/diagnostics/lintstore.md b/src/diagnostics/lintstore.md index d6fdd1e34..6a59cf264 100644 --- a/src/diagnostics/lintstore.md +++ b/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 , we lint against direct declarations +As of 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/miri.md b/src/miri.md index 54f96391a..fd091d565 100644 --- a/src/miri.md +++ b/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 +transmuting an integer to a pointer (as of 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/overview.md b/src/overview.md index c34d01dfd..1aa79e791 100644 --- a/src/overview.md +++ b/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 , 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 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/parallel-rustc.md b/src/parallel-rustc.md index c47a46e78..8be19e8dc 100644 --- a/src/parallel-rustc.md +++ b/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 , work on explicitly parallelizing the +As of 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 , much of this effort is on hold due +As of 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/profiling.md b/src/profiling.md index aa8bf27a2..429376167 100644 --- a/src/profiling.md +++ b/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 , 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 January 2021, inlining currently only happens in +LLVM but this might change in the future. diff --git a/src/queries/profiling.md b/src/queries/profiling.md index d903eabff..1160ba818 100644 --- a/src/queries/profiling.md +++ b/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 + _timed passes_ in the compiler. As of 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/queries/query-evaluation-model-in-detail.md b/src/queries/query-evaluation-model-in-detail.md index eb6659420..4c2427e3c 100644 --- a/src/queries/query-evaluation-model-in-detail.md +++ b/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 , this input data consists mainly of +As of 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/rustdoc-internals.md b/src/rustdoc-internals.md index f7799f967..3e950a0eb 100644 --- a/src/rustdoc-internals.md +++ b/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 : +Here is the list of passes as of February 2021: - `calculate-doc-coverage` calculates information used for the `--show-coverage` flag. diff --git a/src/salsa.md b/src/salsa.md index 67d813b28..bfe753824 100644 --- a/src/salsa.md +++ b/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 , although Salsa is inspired by +> As of 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/tests/adding.md b/src/tests/adding.md index 465317672..944b895b5 100644 --- a/src/tests/adding.md +++ b/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 , this includes compile-fail, run-fail, and incremental, though +Certain classes of tests support "revisions" (as of +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/tests/intro.md b/src/tests/intro.md index 6b2f9452f..641913345 100644 --- a/src/tests/intro.md +++ b/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 , over 50 different configurations). Due to the limit on the +time on a wide set of platforms using GitHub Actions (as of 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/the-parser.md b/src/the-parser.md index 9c3433884..ff43220c1 100644 --- a/src/the-parser.md +++ b/src/the-parser.md @@ -1,6 +1,6 @@ # Lexing and Parsing -As of January 2021 , the lexer and parser are undergoing +As of 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/traits/resolution.md b/src/traits/resolution.md index f2ffdcc97..70b53e910 100644 --- a/src/traits/resolution.md +++ b/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 , this amounts to unifying +_matching_. As of 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/type-inference.md b/src/type-inference.md index 7674fdf5a..71c2b08b1 100644 --- a/src/type-inference.md +++ b/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 - January 2018): +All told, the inference context stores four kinds of inference variables +(as of January 2018): - Type variables, which come in three varieties: - General type variables (the most common). These can be unified with any