aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2021-09-12 05:18:10 -0700
committerDavid Tolnay <dtolnay@gmail.com>2021-09-12 05:18:13 -0700
commit84333be2134b01f46d3946f70d9c39c2823187ea (patch)
treea60e65119be99039e2423abe3d8d1bc6c0b3833c
parentc65fa3bb53881f8a3b242c0a8db6783bd4d667da (diff)
downloadcxx-84333be2134b01f46d3946f70d9c39c2823187ea.tar.gz
Ignore if_same_then_else clippy lint
error: this `if` has identical blocks --> gen/build/src/gen/write.rs:704:33 | 704 | if arg.ty == RustString { | _________________________________^ 705 | | write!(out, "const "); 706 | | } else if let Type::RustVec(_) = arg.ty { | |_________^ | = note: `-D clippy::if-same-then-else` implied by `-D clippy::all` note: same as this --> gen/build/src/gen/write.rs:706:49 | 706 | } else if let Type::RustVec(_) = arg.ty { | _________________________________________________^ 707 | | write!(out, "const "); 708 | | } | |_________^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else error: this `if` has identical blocks --> macro/src/expand.rs:430:33 | 430 | if arg.ty == RustString { | _________________________________^ 431 | | quote!(#var #colon *const #ty) 432 | | } else if let Type::RustVec(_) = arg.ty { | |_________^ | = note: `-D clippy::if-same-then-else` implied by `-D clippy::all` note: same as this --> macro/src/expand.rs:432:49 | 432 | } else if let Type::RustVec(_) = arg.ty { | _________________________________________________^ 433 | | quote!(#var #colon *const #ty) 434 | | } else if let Type::Fn(_) = arg.ty { | |_________^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
-rw-r--r--gen/build/src/lib.rs1
-rw-r--r--gen/cmd/src/main.rs1
-rw-r--r--gen/lib/src/lib.rs1
-rw-r--r--macro/src/lib.rs1
4 files changed, 4 insertions, 0 deletions
diff --git a/gen/build/src/lib.rs b/gen/build/src/lib.rs
index 63b2cf63..b8a463c3 100644
--- a/gen/build/src/lib.rs
+++ b/gen/build/src/lib.rs
@@ -51,6 +51,7 @@
clippy::doc_markdown,
clippy::drop_copy,
clippy::enum_glob_use,
+ clippy::if_same_then_else,
clippy::inherent_to_string,
clippy::items_after_statements,
clippy::let_underscore_drop,
diff --git a/gen/cmd/src/main.rs b/gen/cmd/src/main.rs
index f419dad4..1c15db63 100644
--- a/gen/cmd/src/main.rs
+++ b/gen/cmd/src/main.rs
@@ -3,6 +3,7 @@
clippy::cognitive_complexity,
clippy::default_trait_access,
clippy::enum_glob_use,
+ clippy::if_same_then_else,
clippy::inherent_to_string,
clippy::items_after_statements,
clippy::large_enum_variant,
diff --git a/gen/lib/src/lib.rs b/gen/lib/src/lib.rs
index e3eca5e7..411953b2 100644
--- a/gen/lib/src/lib.rs
+++ b/gen/lib/src/lib.rs
@@ -12,6 +12,7 @@
clippy::cast_sign_loss,
clippy::default_trait_access,
clippy::enum_glob_use,
+ clippy::if_same_then_else,
clippy::inherent_to_string,
clippy::items_after_statements,
clippy::match_bool,
diff --git a/macro/src/lib.rs b/macro/src/lib.rs
index fe5e6e12..c1251b89 100644
--- a/macro/src/lib.rs
+++ b/macro/src/lib.rs
@@ -4,6 +4,7 @@
clippy::doc_markdown,
clippy::enum_glob_use,
clippy::filter_map,
+ clippy::if_same_then_else,
clippy::inherent_to_string,
clippy::items_after_statements,
clippy::large_enum_variant,