From ec28fa8b7673db15c346cc0db45d159c15fe8ab4 Mon Sep 17 00:00:00 2001 From: Graham Marlow Date: Tue, 13 Jun 2023 16:29:04 -0700 Subject: Rename variable prefix and add tests for regexp --- test/fixture.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/fixture.txt (limited to 'test') 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 -- cgit v1.2.3