You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`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)
14
14
`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)
15
15
`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)
17
17
`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)
18
18
`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)
19
19
`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)
Copy file name to clipboardExpand all lines: src/doc/rustc-dev-guide/src/contributing.md
+20-10Lines changed: 20 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,7 @@ conditions that trigger the bug, or part of the error message if there is any.
26
26
An example could be: **"impossible case reached" on lifetime inference for impl
27
27
Trait in return position**.
28
28
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
31
30
in the appropriate provided template.
32
31
33
32
## Bug fixes or "normal" code changes
@@ -75,7 +74,7 @@ Example of things that might require MCPs include major refactorings, changes
75
74
to important types, or important changes to how the compiler does something, or
76
75
smaller user-facing changes.
77
76
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
79
78
into a PR that ends up not getting merged!**[See this document][mcpinfo] for
80
79
more info on MCPs.
81
80
@@ -127,7 +126,7 @@ when contributing to Rust under [the git section](./git.md).
127
126
> from), and work with the compiler team to see if we can help you **break down a large potentially
128
127
> unreviewable PR into a series of smaller more individually reviewable PRs**.
129
128
>
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]
131
130
> to discuss your proposed changes.
132
131
>
133
132
> 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
154
153
not against the commit your branch is based on. This can lead to unexpected failures
155
154
if your branch is outdated, even when there are no explicit merge conflicts.
156
155
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.
162
164
163
165
After rebasing, it's recommended to [run the relevant tests locally](tests/intro.md) to catch any issues before CI runs.
164
166
@@ -372,6 +374,11 @@ You can also use `rustdoc` directly to check small fixes. For example,
372
374
`rustdoc src/doc/reference.md` will render reference to `doc/reference.html`.
373
375
The CSS might be messed up, but you can verify that the HTML is right.
374
376
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
+
375
382
### Contributing to rustc-dev-guide
376
383
377
384
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:
434
441
435
442
#### ⚠️ Note: Where to contribute `rustc-dev-guide` changes
436
443
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].
438
446
439
447
## Issue triage
440
448
@@ -451,6 +459,7 @@ Please see <https://forge.rust-lang.org/release/issue-triaging.html>.
[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
454
463
455
464
### Rfcbot labels
456
465
@@ -498,3 +507,4 @@ This section has moved to the ["About this guide"] chapter.
0 commit comments