about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/vec.fixed
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-09-05 02:01:50 +0000
committerbors <bors@rust-lang.org>2025-09-05 02:01:50 +0000
commit91edc3ebccc4daa46c20a93f4709862376da1fdd (patch)
tree63e75231cb63d011d54d9cd3e771fb4b91eb81da /src/tools/clippy/tests/ui/vec.fixed
parentb3cfb8faf84c5f3b7909479a9f9b6a3290d5f4d7 (diff)
parent75b9ee5f085f695cba061fd9ed7fa3b912dd1bbf (diff)
downloadrust-91edc3ebccc4daa46c20a93f4709862376da1fdd.tar.gz
rust-91edc3ebccc4daa46c20a93f4709862376da1fdd.zip
Auto merge of #146218 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`
Diffstat (limited to 'src/tools/clippy/tests/ui/vec.fixed')
-rw-r--r--src/tools/clippy/tests/ui/vec.fixed9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/vec.fixed b/src/tools/clippy/tests/ui/vec.fixed
index f360a8afadf..55742459c92 100644
--- a/src/tools/clippy/tests/ui/vec.fixed
+++ b/src/tools/clippy/tests/ui/vec.fixed
@@ -242,3 +242,12 @@ fn issue_12101() {
     for a in &[1, 2] {}
     //~^ useless_vec
 }
+
+fn issue_14531() {
+    // The lint used to suggest using an array rather than a reference to a slice.
+
+    fn requires_ref_slice(v: &[()]) {}
+    let v = &[];
+    //~^ useless_vec
+    requires_ref_slice(v);
+}