Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme: Explain nightly install and clippy update #2611

Merged
merged 1 commit into from
Apr 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ as an included feature during build. All of these options are detailed below.

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

To install Rust nightly, the recommended way is to use [rustup](https://rustup.rs/):

```terminal
rustup install nightly
```

### As a cargo subcommand (`cargo clippy`)

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

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

To update the subcommand together with the latest nightly use the [rust-update](rust-update) script or run:

```terminal
rustup update nightly
cargo +nightly install --force clippy
```

In case you are not using rustup, you need to set the environment flag
`SYSROOT` during installation so clippy knows where to find `librustc` and
similar crates.
Expand Down Expand Up @@ -191,7 +204,7 @@ You can add options to `allow`/`warn`/`deny`:
Note: `deny` produces errors instead of warnings.

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

```rust
Expand Down