@@ -145,42 +145,32 @@ unclear to you.
145
145
If you are hacking on Clippy and want to install it from source, do the
146
146
following:
147
147
148
- First, take note of the toolchain
149
- [ override] ( https://rust-lang.github.io/rustup/overrides.html ) in
150
- ` /rust-toolchain.toml ` . We will use this override to install Clippy into the right
151
- toolchain.
152
-
153
- > Tip: You can view the active toolchain for the current directory with `rustup
154
- > show active-toolchain`.
155
-
156
148
From the Clippy project root, run the following command to build the Clippy
157
- binaries and copy them into the toolchain directory. This will override the
158
- currently installed Clippy component.
149
+ binaries and copy them into the toolchain directory. This will create a new
150
+ toolchain called ` clippy ` by default, see ` cargo dev setup toolchain --help `
151
+ for other options.
159
152
160
153
``` terminal
161
- cargo build --release --bin cargo-clippy --bin clippy-driver -Zunstable-options --out-dir "$(rustc --print=sysroot)/bin"
154
+ cargo dev setup toolcahin
162
155
```
163
156
164
- Now you may run ` cargo clippy ` in any project, using the toolchain where you
165
- just installed Clippy.
157
+ Now you may run ` cargo +clippy clippy ` in any project using the new toolchain.
166
158
167
159
``` terminal
168
160
cd my-project
169
- cargo +nightly-2021-07-01 clippy
161
+ cargo +clippy clippy
170
162
```
171
163
172
164
...or ` clippy-driver `
173
165
174
166
``` terminal
175
- clippy-driver +nightly-2021-07-01 <filename>
167
+ clippy-driver +clippy <filename>
176
168
```
177
169
178
- If you need to restore the default Clippy installation, run the following (from
179
- the Clippy project root).
170
+ If you no longer need the toolchain it can be uninstalled using ` rustup ` :
180
171
181
172
``` terminal
182
- rustup component remove clippy
183
- rustup component add clippy
173
+ rustup toolchain uninstall clippy
184
174
```
185
175
186
176
> ** DO NOT** install using ` cargo install --path . --force ` since this will
0 commit comments