summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGraham Marlow <graham@onesignal.com>2023-06-13 16:29:04 -0700
committerGraham Marlow <graham@onesignal.com>2023-06-13 16:29:04 -0700
commitec28fa8b7673db15c346cc0db45d159c15fe8ab4 (patch)
treeecf308271d4bffc30d37d4f543398e4fb649c055 /test
parent708cf774693243dbc5945fa8e764f1da65ae4ef9 (diff)
downloadflymake-clippy-ec28fa8b7673db15c346cc0db45d159c15fe8ab4.tar.gz
Rename variable prefix and add tests for regexp
Diffstat (limited to 'test')
-rw-r--r--test/fixture.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/fixture.txt b/test/fixture.txt
new file mode 100644
index 0000000..9bbcbea
--- /dev/null
+++ b/test/fixture.txt
@@ -0,0 +1,21 @@
+warning: unused variable: `user`
+ --> src/database/foo.rs:42:9
+ |
+42 | user: &User,
+ | ^^^^ help: if this is intentional, prefix it with an underscore: `_user`
+ |
+ = note: `#[warn(unused_variables)]` on by default
+
+warning: using `clone` on type `Status` which implements the `Copy` trait
+ --> src/foo.rs:31:29
+ |
+31 | Some(status) => status.clone(),
+ | ^^^^^^^^^^^^^^ help: try dereferencing it: `*status`
+
+warning: unused variable: `user`
+ --> src/foobar/user.rs:42:9
+ |
+42 | user: &User,
+ | ^^^^ help: if this is intentional, prefix it with an underscore: `_user`
+ |
+ = note: `#[warn(unused_variables)]` on by default