@@ -70,8 +70,8 @@ But we can make it nest-less by using [if_chain] macro, [like this][nest-less].
7070
7171[ ` E-medium ` ] issues are generally pretty easy too, though it's recommended you work on an [ ` good first issue ` ]
7272first. Sometimes they are only somewhat involved code wise, but not difficult per-se.
73- Note that [ ` E-medium ` ] issues may require some knowledge of Clippy internals or some
74- debugging to find the actual problem behind the issue.
73+ Note that [ ` E-medium ` ] issues may require some knowledge of Clippy internals or some
74+ debugging to find the actual problem behind the issue.
7575
7676[ ` T-middle ` ] issues can be more involved and require verifying types. The [ ` ty ` ] module contains a
7777lot of methods that are useful, though one of the most useful would be ` expr_ty ` (gives the type of
@@ -182,21 +182,26 @@ That's why the `else_if_without_else` example uses the `register_early_pass` fun
182182[ early_lint_pass ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/trait.EarlyLintPass.html
183183[ late_lint_pass ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/trait.LateLintPass.html
184184
185- ## Syncing changes from [ ` rust-lang/rust ` ] to Clippy
185+ ## Syncing changes between Clippy and [ ` rust-lang/rust ` ]
186186
187187Clippy currently gets built with a pinned nightly version.
188188
189189In the ` rust-lang/rust ` repository, where rustc resides, there's a copy of Clippy
190190that compiler hackers modify from time to time to adapt to changes in the unstable
191191API of the compiler.
192192
193- We need to sync these changes back to this repository periodically. If you want
194- to help with that, you have to sync the ` rust-lang/rust-clippy ` repository with
195- the ` subtree ` copy of Clippy in the ` rust-lang/rust ` repository, and update
196- the ` rustc-toolchain ` file accordingly.
193+ We need to sync these changes back to this repository periodically, and the changes
194+ made to this repository in the meantime also need to be synced to the ` rust-lang/rust ` repository.
197195
198- For general information about ` subtree ` s in the Rust repository
199- see [ Rust's ` CONTRIBUTING.md ` ] [ subtree ] .
196+ To avoid flooding the ` rust-lang/rust ` PR queue, this two-way sync process is done
197+ in a bi-weekly basis if there's no urgent changes. This is done starting on the day of
198+ the Rust stable release and then every other week. That way we guarantee that we keep
199+ this repo up to date with the latest compiler API, and every feature in Clippy is available
200+ for 2 weeks in nightly, before it can get to beta. For reference, the first sync
201+ following this cadence was performed the 2020-08-27.
202+
203+ This process is described in detail in the following sections. For general information
204+ about ` subtree ` s in the Rust repository see [ Rust's ` CONTRIBUTING.md ` ] [ subtree ] .
200205
201206### Patching git-subtree to work with big repos
202207
@@ -225,13 +230,14 @@ This shell has a hardcoded recursion limit set to 1000. In order to make this pr
225230you need to force the script to run ` bash ` instead. You can do this by editing the first
226231line of the ` git-subtree ` script and changing ` sh ` to ` bash ` .
227232
228- ### Performing the sync
233+ ### Performing the sync from [ ` rust-lang/rust ` ] to Clippy
229234
230235Here is a TL;DR version of the sync process (all of the following commands have
231236to be run inside the ` rust ` directory):
232237
233- 1 . Clone the [ ` rust-lang/rust ` ] repository
234- 2 . Sync the changes to the rust-copy of Clippy to your Clippy fork:
238+ 1 . Clone the [ ` rust-lang/rust ` ] repository or make sure it is up to date.
239+ 2 . Checkout the commit from the latest available nightly. You can get it using ` rustup check ` .
240+ 3 . Sync the changes to the rust-copy of Clippy to your Clippy fork:
235241 ``` bash
236242 # Make sure to change `your-github-name` to your github name in the following command
237243 git subtree push -P src/tools/clippy git@github.com:your-github-name/rust-clippy sync-from-rust
@@ -249,17 +255,11 @@ to be run inside the `rust` directory):
249255 git checkout sync-from-rust
250256 git merge upstream/master
251257 ` ` `
252- 3 . Open a PR to ` rust-lang/rust-clippy` and wait for it to get merged (to
258+ 4 . Open a PR to ` rust-lang/rust-clippy` and wait for it to get merged (to
253259 accelerate the process ping the ` @rust-lang/clippy` team in your PR and/or
254260 ~ ~annoy~~ ask them in the [Zulip] stream.)
255-
256- # ## Syncing back changes in Clippy to [`rust-lang/rust`]
257261
258- To avoid flooding the [` rust-lang/rust` ] PR queue, changes in Clippy' s repo are synced back
259- in a bi-weekly basis if there' s no urgent changes. This is done starting on the day of
260- the Rust stable release and then every other week. That way we guarantee that
261- every feature in Clippy is available for 2 weeks in nightly, before it can get to beta.
262- For reference, the first sync following this cadence was performed the 2020-08-27.
262+ # ## Performing the sync from Clippy to [`rust-lang/rust`]
263263
264264All of the following commands have to be run inside the ` rust` directory.
265265
0 commit comments