Skip to content

Instantly share code, notes, and snippets.

@yaahc
Created March 15, 2019 01:10
Show Gist options
  • Save yaahc/4bcdf90aa74cbae125cb618906a5b93f to your computer and use it in GitHub Desktop.
Save yaahc/4bcdf90aa74cbae125cb618906a5b93f to your computer and use it in GitHub Desktop.
clippy vs clippy-preview
master ✗ $ cargo clippy
Checking clippytest v0.1.0 (/home/jlusby/git/rust/clippytest)
error: this `if` has identical blocks
--> src/main.rs:3:12
|
3 | } else {
| ____________^
4 | | }
| |_____^
|
= note: #[deny(clippy::if_same_then_else)] on by default
note: same as this
--> src/main.rs:2:13
|
2 | if true {
| _____________^
3 | | } else {
| |_____^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
error: aborting due to previous error
error: Could not compile `clippytest`.
To learn more, run the command again with --verbose.
master ✗ $ ../cargo/target/debug/cargo clippy-preview
NO TOOL clippy-driver
NO TOOL rustc
Checking clippytest v0.1.0 (/home/jlusby/git/rust/clippytest)
error: this `if` has identical blocks
--> src/main.rs:3:12
|
3 | } else {
| ____________^
4 | | }
| |_____^
|
= note: #[deny(clippy::if_same_then_else)] on by default
note: same as this
--> src/main.rs:2:13
|
2 | if true {
| _____________^
3 | | } else {
| |_____^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
error: aborting due to previous error
error: Could not compile `clippytest`.
To learn more, run the command again with --verbose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment