Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
a701af45cb25cd5a7f45f6b51aa224b7a5d65f3a
rust/tests/ui/double_neg.rs

9 lines
113 B
Rust
Raw Normal View History

Adapt ui-tests to the tool_lints
2018-07-28 17:34:52 +02: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-20 23:23:22 -04:00
#[allow(clippy::no_effect)]
new lint: double_neg
2016-06-30 01:00:25 +02:00
fn main() {
let x = 1;
-x;
-(-x);
remove all //~ from tests
2017-02-08 14:58:07 +01:00
--x;
new lint: double_neg
2016-06-30 01:00:25 +02:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 551ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API