Skip to content

Commit fef7fb3

Browse files
authored
Merge pull request #2611 from phansch/improve_readme
Readme: Explain nightly install and clippy update
2 parents c5559c1 + fe8ba21 commit fef7fb3

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ as an included feature during build. All of these options are detailed below.
3535

3636
As a general rule clippy will only work with the *latest* Rust nightly for now.
3737

38+
To install Rust nightly, the recommended way is to use [rustup](https://rustup.rs/):
39+
40+
```terminal
41+
rustup install nightly
42+
```
43+
3844
### As a cargo subcommand (`cargo clippy`)
3945

4046
One way to use clippy is by installing clippy through cargo as a cargo
@@ -48,6 +54,13 @@ cargo +nightly install clippy
4854

4955
Now you can run clippy by invoking `cargo +nightly clippy`.
5056

57+
To update the subcommand together with the latest nightly use the [rust-update](rust-update) script or run:
58+
59+
```terminal
60+
rustup update nightly
61+
cargo +nightly install --force clippy
62+
```
63+
5164
In case you are not using rustup, you need to set the environment flag
5265
`SYSROOT` during installation so clippy knows where to find `librustc` and
5366
similar crates.
@@ -191,7 +204,7 @@ You can add options to `allow`/`warn`/`deny`:
191204
Note: `deny` produces errors instead of warnings.
192205

193206
For convenience, `cargo clippy` automatically defines a `cargo-clippy`
194-
features. This lets you set lints level and compile with or without clippy
207+
feature. This lets you set lint levels and compile with or without clippy
195208
transparently:
196209

197210
```rust

0 commit comments

Comments
 (0)