Skip to content

Commit b9cae79

Browse files
committed
Auto merge of #8037 - ojeda:doc-codegen-change, r=camsteffen
`README`: document that Clippy may change codegen Currently, Clippy does not guarantee the same codegen will be produced. Therefore, it should not be used as an universal replacement for `rustc`. See #8035. Signed-off-by: Miguel Ojeda <[email protected]> fixes #8035 changelog: document that Clippy may change codegen
2 parents ae01c4a + 3d4fded commit b9cae79

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ Table of contents:
3737

3838
## Usage
3939

40-
Below are instructions on how to use Clippy as a subcommand, compiled from source
41-
or in Travis CI.
40+
Below are instructions on how to use Clippy as a cargo subcommand,
41+
in projects that do not use cargo, or in Travis CI.
4242

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

@@ -98,22 +98,18 @@ If you want to run Clippy **only** on the given crate, use the `--no-deps` optio
9898
cargo clippy -p example -- --no-deps
9999
```
100100

101-
### As a rustc replacement (`clippy-driver`)
101+
### Using `clippy-driver`
102102

103-
Clippy can also be used in projects that do not use cargo. To do so, you will need to replace
104-
your `rustc` compilation commands with `clippy-driver`. For example, if your project runs:
105-
106-
```terminal
107-
rustc --edition 2018 -Cpanic=abort foo.rs
108-
```
109-
110-
Then, to enable Clippy, you will need to call:
103+
Clippy can also be used in projects that do not use cargo. To do so, run `clippy-driver`
104+
with the same arguments you use for `rustc`. For example:
111105

112106
```terminal
113107
clippy-driver --edition 2018 -Cpanic=abort foo.rs
114108
```
115109

116-
Note that `rustc` will still run, i.e. it will still emit the output files it normally does.
110+
Note that `clippy-driver` is designed for running Clippy only and should not be used as a general
111+
replacement for `rustc`. `clippy-driver` may produce artifacts that are not optimized as expected,
112+
for example.
117113

118114
### Travis CI
119115

0 commit comments

Comments
 (0)