This website requires JavaScript.
Explore
Help
Sign In
Mirrors
/
rust-clippy
Watch
2
Star
0
Fork
You've already forked rust-clippy
0
mirror of
https://github.com/rust-lang/rust-clippy
synced
2024-12-24 20:13:24 +00:00
Code
Issues
Projects
Releases
Packages
Wiki
Activity
41c7004cea
rust-clippy
/
tests
/
ui
/
double_neg.rs
9 lines
113 B
Rust
Raw
Normal View
History
Unescape
Escape
Adapt ui-tests to the tool_lints
2018-07-28 15:34:52 +00:00
#[
warn(clippy::double_neg)
]
Don't abort compilation after giving a lint error The only reason to use `abort_if_errors` is when the program is so broken that either: 1. later passes get confused and ICE 2. any diagnostics from later passes would be noise This is never the case for lints, because the compiler has to be able to deal with `allow`-ed lints. So it can continue to lint and compile even if there are lint errors.
2021-07-21 03:23:22 +00:00
#[
allow(clippy::no_effect)
]
new lint: double_neg
2016-06-29 23:00:25 +00:00
fn
main
(
)
{
let
x
=
1
;
-
x
;
-
(
-
x
)
;
remove all //~ from tests
2017-02-08 13:58:07 +00:00
-
-
x
;
new lint: double_neg
2016-06-29 23:00:25 +00:00
}
Reference in a new issue
Copy permalink