summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/author/if.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/author/if.rs')
-rw-r--r--src/tools/clippy/tests/ui/author/if.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/author/if.rs b/src/tools/clippy/tests/ui/author/if.rs
new file mode 100644
index 000000000..946088ab3
--- /dev/null
+++ b/src/tools/clippy/tests/ui/author/if.rs
@@ -0,0 +1,17 @@
+#[allow(clippy::all)]
+
+fn main() {
+ #[clippy::author]
+ let _ = if true {
+ 1 == 1;
+ } else {
+ 2 == 2;
+ };
+
+ let a = true;
+
+ #[clippy::author]
+ if let true = a {
+ } else {
+ };
+}