Skip to content

Commit 0a5bb7f

Browse files
igarayJoshua Nelson
andauthored
Add context to dated information (#1013)
* Fixes #924 Add context to dated information * Fixes #924 Addressed comments and some uses of 'currently' * Update src/contributing.md Co-authored-by: Joshua Nelson <[email protected]> * Update src/salsa.md Co-authored-by: Joshua Nelson <[email protected]> * Fixes #924 Addressed comments * Fixes #924 Fixed line lengths. Co-authored-by: Joshua Nelson <[email protected]>
1 parent e7ac2ff commit 0a5bb7f

25 files changed

+90
-67
lines changed

src/SUMMARY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@
107107
- [Lowering to logic](./traits/lowering-to-logic.md)
108108
- [Goals and clauses](./traits/goals-and-clauses.md)
109109
- [Canonical queries](./traits/canonical-queries.md)
110-
- [Lowering module in rustc](./traits/lowering-module.md)
111110
- [Type checking](./type-checking.md)
112111
- [Method Lookup](./method-lookup.md)
113112
- [Variance](./variance.md)

src/about-this-guide.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,27 @@ There are six parts to this guide:
3030
[p5]: ./part-5-intro.md
3131
[app]: ./appendix/background.md
3232

33-
The Guide itself is of course open-source as well, and the sources can
34-
be found at the [GitHub repository]. If you find any mistakes in the
35-
guide, please file an issue about it, or even better, open a PR
36-
with a correction!
33+
### Constant change
34+
35+
Keep in mind that `rustc` is a real production-quality product, being worked upon continuously by a
36+
sizeable set of contributors.
37+
As such, it has its fair share of codebase churn and technical debt.
38+
In addition, many of the ideas discussed throughout this guide are idealized designs that are not
39+
fully realized yet.
40+
All this makes keeping this guide completely up to date on everything very hard!
41+
42+
The Guide itself is of course open-source as well, and the sources can be found at the
43+
[GitHub repository].
44+
If you find any mistakes in the guide, please file an issue about it, or even better, open a PR with
45+
a correction!
46+
47+
If you do contribute to the guide, please see the corresponding
48+
[subsection on writing documentation in this guide].
49+
50+
[subsection on writing documentation in this guide]: contributing.md#contributing-to-rustc-dev-guide.
51+
52+
> “‘All conditioned things are impermanent’ — when one sees this with wisdom, one turns away from
53+
> suffering.” _The Dhammapada, verse 277_
3754
3855
## Other places to find information
3956

src/backend/backend-agnostic.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Backend Agnostic Codegen
22

3-
In the future, it would be nice to allow other codegen backends (e.g.
4-
[Cranelift]). To this end, `rustc_codegen_ssa` provides an
5-
abstract interface for all backends to implement.
3+
As of January 2021, `rustc_codegen_ssa` provides an abstract interface for all backends to
4+
implement, to allow other codegen backends (e.g. [Cranelift]).
65

76
[Cranelift]: https://github.com/bytecodealliance/wasmtime/tree/HEAD/cranelift
87

src/borrow_check/region_inference/member_constraints.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ member constraints come in.
9292
## Choices are always lifetime parameters
9393

9494
At present, the "choice" regions from a member constraint are always
95-
lifetime parameters from the current function. This falls out from the
96-
placement of impl Trait, though in the future it may not be the case.
95+
lifetime parameters from the current function. As of January 2021,
96+
this falls out from the placement of impl Trait, though in the future
97+
it may not be the case.
9798
We take some advantage of this fact, as it simplifies the current
9899
code. In particular, we don't have to consider a case like `'0 member
99100
of ['1, 'static]`, in which the value of both `'0` and `'1` are being

src/contributing.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -401,11 +401,28 @@ You can also use `rustdoc` directly to check small fixes. For example,
401401
`rustdoc src/doc/reference.md` will render reference to `doc/reference.html`.
402402
The CSS might be messed up, but you can verify that the HTML is right.
403403

404-
Additionally, contributions to the [rustc-dev-guide][rdg] are always welcome.
405-
Contributions can be made directly at [the rust-lang/rustc-dev-guide
406-
repo][rdgrepo]. The issue tracker in that repo is also a great way to find
407-
things that need doing. There are issues for beginners and advanced compiler
408-
devs alike!
404+
### Contributing to rustc-dev-guide
405+
406+
Contributions to the [rustc-dev-guide][rdg] are always welcome, and can be made directly at
407+
[the rust-lang/rustc-dev-guide repo][rdgrepo].
408+
The issue tracker in that repo is also a great way to find things that need doing.
409+
There are issues for beginners and advanced compiler devs alike!
410+
411+
Just a few things to keep in mind:
412+
413+
- Please limit line length to 100 characters. This is enforced by CI, and you can run the checks
414+
locally with `ci/check_line_lengths.sh`.
415+
- When contributing text to the guide, please contextualize the information with some time period
416+
and/or a reason so that the reader knows how much to trust or mistrust the information.
417+
Aim to provide a reasonable amount of context, possibly including but not limited to:
418+
- A reason for why the data may be out of date other than "change", as change is a constant across
419+
the project.
420+
- A date the comment was added, e.g. instead of writing _"Currently, ..."_ consider writing
421+
_"As of January 2021, ..."_.
422+
Try to format the date as `<MONTH> <YEAR>` to ease search.
423+
- A link to a relevant WG, tracking issue, `rustc` rustdoc page, or similar, that may provide
424+
further explanation for the change process or a way to verify that the information is not
425+
outdated.
409426

410427
[rdg]: https://rustc-dev-guide.rust-lang.org/
411428
[rdgrepo]: https://github.com/rust-lang/rustc-dev-guide

src/debugging-support-in-rustc.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ document so there is no duplication etc.?
9393

9494
### LLDB
9595

96-
We have our own fork of LLDB - [https://github.com/rust-lang/lldb]
97-
9896
Fork of LLVM project - [https://github.com/rust-lang/llvm-project]
9997

10098
LLDB currently only works on macOS because of a dependency issue. This issue was easier to

src/diagnostics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ declare_lint! {
594594

595595
If you need a combination of options that's not supported by the
596596
`declare_lint!` macro, you can always define your own static with a type of
597-
`&Lint` but this is currently linted against in the compiler tree.
597+
`&Lint` but this is (as of January 2021) linted against in the compiler tree.
598598

599599
<a id="future-incompatible"></a>
600600
#### Guidelines for creating a future incompatibility lint

src/diagnostics/lintstore.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ Unfortunately, a lot of the documentation we have refers to both of these as jus
1515

1616
First, we have the lint declarations themselves: this is where the name and default lint level and
1717
other metadata come from. These are normally defined by way of the [`declare_lint!`] macro, which
18-
boils down to a static with type `&rustc_session::lint::Lint`. We lint against direct declarations
19-
without the use of the macro today (though this may change in the future, as the macro is somewhat
20-
unwieldy to add new fields to, like all macros by example).
18+
boils down to a static with type `&rustc_session::lint::Lint`.
19+
20+
As of January 2021, we lint against direct declarations without the use of the macro today
21+
(although this may change in the future, as the macro is somewhat unwieldy to add new fields to,
22+
like all macros by example).
2123

2224
Lint declarations don't carry any "state" - they are merely global identifers and descriptions of
2325
lints. We assert at runtime that they are not registered twice (by lint name).

src/git.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,10 @@ no changes added to commit (use "git add" and/or "git commit -a")
145145
These changes are not changes to files: they are changes to submodules
146146
(more on this [later](#git-submodules)). To get rid of those, run `git submodule update` (or run any
147147
`x.py` command, which will automatically update the submodules).
148-
Note that there is currently a bug if you use worktrees, submodules, and x.py in a commit hook.
148+
Note that there is (as of January 2021) a bug if you use worktrees, submodules, and x.py in a commit
149+
hook.
149150
If you run into an error like:
151+
150152
```
151153
error: failed to read `/home/joshua/rustc-worktree/src/tools/miri/cargo-miri/Cargo.toml`
152154
@@ -202,7 +204,7 @@ rebase. The section between `<<<<<<< HEAD` and `=======` has the code from
202204
master, while the other side has your version of the code. You'll need to
203205
decide how to deal with the conflict. You may want to keep your changes,
204206
keep the changes on master, or combine the two.
205-
207+
206208
Generally, resolving the conflict consists of two steps: First, fix the
207209
particular conflict. Edit the file to make the changes you want and remove the
208210
`<<<<<<<`, `=======` and `>>>>>>>` lines in the process. Second, check the
@@ -311,7 +313,7 @@ This is because, like any dependency, we want to be able to control which versio
311313
Submodules allow us to do just that: every submodule is "pinned" to a certain
312314
commit, which doesn't change unless modified manually. If you use `git checkout <commit>`
313315
in the `miri` directory and go back to the `rust` directory, you can stage this
314-
change like any
316+
change like any
315317
This is usually done by
316318
the maintainers of the project, and looks like [this][miri-update].
317319

src/llvm-coverage-instrumentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ properly-configured variables in LLVM IR, according to very specific
219219
details of the [_LLVM Coverage Mapping Format_][coverage-mapping-format]
220220
(Version 4).[^llvm-and-covmap-versions]
221221

222-
[^llvm-and-covmap-versions]: The Rust compiler currently supports
222+
[^llvm-and-covmap-versions]: The Rust compiler (as of January 2021) supports
223223
_LLVM Coverage Mapping Format_ Version 4 (the most up-to-date version
224224
of the format, at the time of this writing) for improved compatibility
225225
with other LLVM-based compilers (like _Clang_), and to take advantage

0 commit comments

Comments
 (0)