summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/author/matches.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/author/matches.rs')
-rw-r--r--src/tools/clippy/tests/ui/author/matches.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/author/matches.rs b/src/tools/clippy/tests/ui/author/matches.rs
new file mode 100644
index 000000000..674e07ec2
--- /dev/null
+++ b/src/tools/clippy/tests/ui/author/matches.rs
@@ -0,0 +1,13 @@
+#![allow(clippy::let_and_return)]
+
+fn main() {
+ #[clippy::author]
+ let a = match 42 {
+ 16 => 5,
+ 17 => {
+ let x = 3;
+ x
+ },
+ _ => 1,
+ };
+}