Merge pull request #1072 from dashed/patch-1
Add note on how to enable the optional dependency
This commit is contained in:
commit
3cd177d2db
1 changed files with 2 additions and 0 deletions
|
@ -286,6 +286,8 @@ And, in your `main.rs` or `lib.rs`:
|
||||||
#![cfg_attr(feature="clippy", plugin(clippy))]
|
#![cfg_attr(feature="clippy", plugin(clippy))]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Then build by enabling the feature: `cargo build --features "clippy"`
|
||||||
|
|
||||||
Instead of adding the `cfg_attr` attributes you can also run clippy on demand:
|
Instead of adding the `cfg_attr` attributes you can also run clippy on demand:
|
||||||
`cargo rustc --features clippy -- -Z no-trans -Z extra-plugins=clippy`
|
`cargo rustc --features clippy -- -Z no-trans -Z extra-plugins=clippy`
|
||||||
(the `-Z no trans`, while not neccessary, will stop the compilation process after
|
(the `-Z no trans`, while not neccessary, will stop the compilation process after
|
||||||
|
|
Loading…
Reference in a new issue