]> git.lizzy.rs Git - rust.git/blobdiff - CONTRIBUTING.md
Rustup to rust-lang/rust#68725
[rust.git] / CONTRIBUTING.md
index 2a85197068f5083d7d7aa5fb8187d360a58867c7..4a828051185f2c06a4a5bea67e1fd4ea95bb9a1d 100644 (file)
@@ -105,7 +105,7 @@ pub fn register_plugins(reg: &mut rustc_driver::plugin::Registry) {
 
 The [`plugin::PluginRegistry`][plugin_registry] provides two methods to register lints: [register_early_lint_pass][reg_early_lint_pass] and [register_late_lint_pass][reg_late_lint_pass].
 Both take an object that implements an [`EarlyLintPass`][early_lint_pass] or [`LateLintPass`][late_lint_pass] respectively. This is done in every single lint.
-It's worth noting that the majority of `clippy_lints/src/lib.rs` is autogenerated by `util/dev update_lints` and you don't have to add anything by hand. When you are writing your own lint, you can use that script to save you some time.
+It's worth noting that the majority of `clippy_lints/src/lib.rs` is autogenerated by `cargo dev update_lints` and you don't have to add anything by hand. When you are writing your own lint, you can use that script to save you some time.
 
 ```rust
 // ./clippy_lints/src/else_if_without_else.rs
@@ -145,13 +145,28 @@ using that version of Rust.
 
 You can use [rustup-toolchain-install-master][rtim] to do that:
 
-```
+```bash
 cargo install rustup-toolchain-install-master
-rustup-toolchain-install-master -n master --force
+rustup-toolchain-install-master --force -n master -c rustc-dev
 rustup override set master
 cargo test
 ```
 
+After fixing the build failure on this repository, we can submit a pull request
+to [`rust-lang/rust`] to fix the toolstate.
+
+To submit a pull request, you should follow these steps:
+
+```bash
+# Assuming you already cloned the rust-lang/rust repo and you're in the correct directory
+git submodule update --remote src/tools/clippy
+cargo update -p clippy
+git add -u
+git commit -m "Update Clippy"
+./x.py test -i --stage 1 src/tools/clippy # This is optional and should succeed anyway
+# Open a PR in rust-lang/rust
+```
+
 ## Issue and PR triage
 
 Clippy is following the [Rust triage procedure][triage] for issues and pull
@@ -211,3 +226,4 @@ or the [MIT](http://opensource.org/licenses/MIT) license.
 [homu]: https://github.com/servo/homu
 [homu_instructions]: https://buildbot2.rust-lang.org/homu/
 [homu_queue]: https://buildbot2.rust-lang.org/homu/queue/clippy
+[`rust-lang/rust`]: https://github.com/rust-lang/rust