Skip to content

Commit 65e4c54

Browse files
authored
Rollup merge of #146320 - tshepang:rdg-sync, r=tshepang
rustc-dev-guide subtree update Subtree update of `rustc-dev-guide` to rust-lang/rustc-dev-guide@d03ffd4. Created using https://github.com/rust-lang/josh-sync. r? `@ghost`
2 parents 803b5b5 + 30ad58f commit 65e4c54

28 files changed

+186
-64
lines changed

src/doc/rustc-dev-guide/.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if: github.repository == 'rust-lang/rustc-dev-guide'
1515
runs-on: ubuntu-latest
1616
env:
17-
MDBOOK_VERSION: 0.4.48
17+
MDBOOK_VERSION: 0.4.52
1818
MDBOOK_LINKCHECK2_VERSION: 0.9.1
1919
MDBOOK_MERMAID_VERSION: 0.12.6
2020
MDBOOK_OUTPUT__LINKCHECK__FOLLOW_WEB_LINKS: ${{ github.event_name != 'pull_request' }}

src/doc/rustc-dev-guide/rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a1dbb443527bd126452875eb5d5860c1d001d761
1+
2f3f27bf79ec147fec9d2e7980605307a74067f4

src/doc/rustc-dev-guide/src/about-this-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ You might also find the following sites useful:
7373
- [compiler-team] -- the home-base for the Rust compiler team, with description
7474
of the team procedures, active working groups, and the team calendar.
7575
- [std-dev-guide] -- a similar guide for developing the standard library.
76-
- [The t-compiler zulip][z]
76+
- [The t-compiler Zulip][z]
7777
- The [Rust Internals forum][rif], a place to ask questions and
7878
discuss Rust's internals
7979
- The [Rust reference][rr], even though it doesn't specifically talk about

src/doc/rustc-dev-guide/src/appendix/code-index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Item | Kind | Short description | Chapter |
1313
`DefId` | struct | One of four types of HIR node identifiers | [Identifiers in the HIR] | [compiler/rustc_hir/src/def_id.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/def_id/struct.DefId.html)
1414
`Diag` | struct | A struct for a compiler diagnostic, such as an error or lint | [Emitting Diagnostics] | [compiler/rustc_errors/src/diagnostic.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors/struct.Diag.html)
1515
`DocContext` | struct | A state container used by rustdoc when crawling through a crate to gather its documentation | [Rustdoc] | [src/librustdoc/core.rs](https://github.com/rust-lang/rust/blob/master/src/librustdoc/core.rs)
16-
`HirId` | struct | One of four types of HIR node identifiers | [Identifiers in the HIR] | [compiler/rustc_hir/src/hir_id.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir_id/struct.HirId.html)
16+
`HirId` | struct | One of four types of HIR node identifiers | [Identifiers in the HIR] | [compiler/rustc_hir_id/src/lib.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/struct.HirId.html)
1717
`Lexer` | struct | This is the lexer used during parsing. It consumes characters from the raw source code being compiled and produces a series of tokens for use by the rest of the parser | [The parser] | [compiler/rustc_parse/src/lexer/mod.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/lexer/struct.Lexer.html)
1818
`NodeId` | struct | One of four types of HIR node identifiers. Being phased out | [Identifiers in the HIR] | [compiler/rustc_ast/src/ast.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast/node_id/struct.NodeId.html)
1919
`P` | struct | An owned immutable smart pointer. By contrast, `&T` is not owned, and `Box<T>` is not immutable. | None | [compiler/rustc_ast/src/ptr.rs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_ast/ptr/struct.P.html)

src/doc/rustc-dev-guide/src/backend/debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ The quick summary is:
183183
### Getting help and asking questions
184184

185185
If you have some questions, head over to the [rust-lang Zulip] and
186-
specifically the `#t-compiler/wg-llvm` stream.
186+
specifically the `#t-compiler/wg-llvm` channel.
187187

188188
[rust-lang Zulip]: https://rust-lang.zulipchat.com/
189189

src/doc/rustc-dev-guide/src/compiler-debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ error: layout_of(&'a u32) = Layout {
367367
error: aborting due to previous error
368368
```
369369

370-
[`Layout`]: https://doc.rust-lang.org/nightly/nightly-rustc/stable_mir/abi/struct.Layout.html
370+
[`Layout`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_public/abi/struct.Layout.html
371371

372372

373373
## Configuring CodeLLDB for debugging `rustc`

src/doc/rustc-dev-guide/src/compiler-src.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ The bulk of [`rustdoc`] is in [`librustdoc`]. However, the [`rustdoc`] binary
153153
itself is [`src/tools/rustdoc`], which does nothing except call [`rustdoc::main`].
154154

155155
There is also `JavaScript` and `CSS` for the docs in [`src/tools/rustdoc-js`]
156-
and [`src/tools/rustdoc-themes`].
156+
and [`src/tools/rustdoc-themes`]. The type definitions for `--output-format=json`
157+
are in a separate crate in [`src/rustdoc-json-types`].
157158

158159
You can read more about [`rustdoc`] in [this chapter][rustdoc-chapter].
159160

@@ -162,6 +163,7 @@ You can read more about [`rustdoc`] in [this chapter][rustdoc-chapter].
162163
[`src/tools/rustdoc-js`]: https://github.com/rust-lang/rust/tree/master/src/tools/rustdoc-js
163164
[`src/tools/rustdoc-themes`]: https://github.com/rust-lang/rust/tree/master/src/tools/rustdoc-themes
164165
[`src/tools/rustdoc`]: https://github.com/rust-lang/rust/tree/master/src/tools/rustdoc
166+
[`src/rustdoc-json-types`]: https://github.com/rust-lang/rust/tree/master/src/rustdoc-json-types
165167
[rustdoc-chapter]: ./rustdoc.md
166168

167169
## Tests

src/doc/rustc-dev-guide/src/compiler-team.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ contributions to rustc and its design.
1212
Currently the compiler team chats in Zulip:
1313

1414
- Team chat occurs in the [`t-compiler`][zulip-t-compiler] stream on the Zulip instance
15-
- There are also a number of other associated Zulip streams,
15+
- There are also a number of other associated Zulip channels,
1616
such as [`t-compiler/help`][zulip-help], where people can ask for help
1717
with rustc development, or [`t-compiler/meetings`][zulip-meetings],
1818
where the team holds their weekly triage and steering meetings.

src/doc/rustc-dev-guide/src/contributing.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ conditions that trigger the bug, or part of the error message if there is any.
2626
An example could be: **"impossible case reached" on lifetime inference for impl
2727
Trait in return position**.
2828

29-
Opening an issue is as easy as following [this
30-
link](https://github.com/rust-lang/rust/issues/new/choose) and filling out the fields
29+
Opening an issue is as easy as following [thi link][create an issue] and filling out the fields
3130
in the appropriate provided template.
3231

3332
## Bug fixes or "normal" code changes
@@ -75,7 +74,7 @@ Example of things that might require MCPs include major refactorings, changes
7574
to important types, or important changes to how the compiler does something, or
7675
smaller user-facing changes.
7776

78-
**When in doubt, ask on [zulip]. It would be a shame to put a lot of work
77+
**When in doubt, ask on [Zulip]. It would be a shame to put a lot of work
7978
into a PR that ends up not getting merged!** [See this document][mcpinfo] for
8079
more info on MCPs.
8180

@@ -127,7 +126,7 @@ when contributing to Rust under [the git section](./git.md).
127126
> from), and work with the compiler team to see if we can help you **break down a large potentially
128127
> unreviewable PR into a series of smaller more individually reviewable PRs**.
129128
>
130-
> You can communicate with the compiler team by creating a [#t-compiler thread on zulip][t-compiler]
129+
> You can communicate with the compiler team by creating a [#t-compiler thread on Zulip][t-compiler]
131130
> to discuss your proposed changes.
132131
>
133132
> Communicating with the compiler team beforehand helps in several ways:
@@ -154,11 +153,14 @@ The CI in rust-lang/rust applies your patches directly against the current maste
154153
not against the commit your branch is based on. This can lead to unexpected failures
155154
if your branch is outdated, even when there are no explicit merge conflicts.
156155

157-
Before submitting or updating a PR, make sure to update your branch
158-
as mentioned [here](git.md#keeping-things-up-to-date) if it's significantly
159-
behind the master branch (e.g., more than 100 commits behind).
160-
This fetches the latest master branch and rebases your changes on top of it,
161-
ensuring your PR is tested against the latest code.
156+
Update your branch only when needed: when you have merge conflicts, upstream CI is broken and blocking your green PR, or a maintainer requests it.
157+
Avoid updating an already-green PR under review unless necessary.
158+
During review, make incremental commits to address feedback.
159+
Prefer to squash or rebase only at the end, or when a reviewer requests it.
160+
161+
When updating, use `git push --force-with-lease` and leave a brief comment explaining what changed.
162+
Some repos prefer merging from `upstream/master` instead of rebasing; follow the project's conventions.
163+
See [keeping things up to date](git.md#keeping-things-up-to-date) for detailed instructions.
162164

163165
After rebasing, it's recommended to [run the relevant tests locally](tests/intro.md) to catch any issues before CI runs.
164166

@@ -372,6 +374,11 @@ You can also use `rustdoc` directly to check small fixes. For example,
372374
`rustdoc src/doc/reference.md` will render reference to `doc/reference.html`.
373375
The CSS might be messed up, but you can verify that the HTML is right.
374376

377+
Please notice that we don't accept typography/spellcheck fixes to **internal documentation**
378+
as it's usually not worth the churn or the review time.
379+
Examples of internal documentation is code comments and rustc api docs.
380+
However, feel free to fix those if accompanied by other improvements in the same PR.
381+
375382
### Contributing to rustc-dev-guide
376383

377384
Contributions to the [rustc-dev-guide] are always welcome, and can be made directly at
@@ -434,7 +441,8 @@ Just a few things to keep in mind:
434441

435442
#### ⚠️ Note: Where to contribute `rustc-dev-guide` changes
436443

437-
For detailed information about where to contribute rustc-dev-guide changes and the benefits of doing so, see [the rustc-dev-guide working group documentation](https://forge.rust-lang.org/wg-rustc-dev-guide/index.html#where-to-contribute-rustc-dev-guide-changes).
444+
For detailed information about where to contribute rustc-dev-guide changes and the benefits of doing so,
445+
see [the rustc-dev-guide working group documentation].
438446

439447
## Issue triage
440448

@@ -451,6 +459,7 @@ Please see <https://forge.rust-lang.org/release/issue-triaging.html>.
451459
[regression-]: https://github.com/rust-lang/rust/labels?q=regression
452460
[relnotes]: https://github.com/rust-lang/rust/labels/relnotes
453461
[S-tracking-]: https://github.com/rust-lang/rust/labels?q=s-tracking
462+
[the rustc-dev-guide working group documentation]: https://forge.rust-lang.org/wg-rustc-dev-guide/index.html#where-to-contribute-rustc-dev-guide-changes
454463

455464
### Rfcbot labels
456465

@@ -498,3 +507,4 @@ This section has moved to the ["About this guide"] chapter.
498507
[RFC 1574]: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text
499508
[rustc-dev-guide]: https://rustc-dev-guide.rust-lang.org/
500509
[rdgrepo]: https://github.com/rust-lang/rustc-dev-guide
510+
[create an issue]: https://github.com/rust-lang/rust/issues/new/choose

src/doc/rustc-dev-guide/src/hir.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ These identifiers can be converted into one another through the `TyCtxt`.
102102

103103
[`DefId`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/def_id/struct.DefId.html
104104
[`LocalDefId`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/def_id/struct.LocalDefId.html
105-
[`HirId`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir_id/struct.HirId.html
105+
[`HirId`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/struct.HirId.html
106106
[`BodyId`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir/struct.BodyId.html
107107
[Node]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir/enum.Node.html
108108
[`CrateNum`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/def_id/struct.CrateNum.html

0 commit comments

Comments
 (0)