about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/single_element_loop.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/single_element_loop.fixed')
-rw-r--r--src/tools/clippy/tests/ui/single_element_loop.fixed8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/single_element_loop.fixed b/src/tools/clippy/tests/ui/single_element_loop.fixed
index 4e59c763198..64cbd5e9c90 100644
--- a/src/tools/clippy/tests/ui/single_element_loop.fixed
+++ b/src/tools/clippy/tests/ui/single_element_loop.fixed
@@ -57,4 +57,12 @@ fn main() {
             }
         };
     }
+
+    // Should lint with correct suggestion (issue #12782)
+    let res_void: Result<bool, bool> = Ok(true);
+
+    {
+        let (Ok(mut _x) | Err(mut _x)) = res_void;
+        let ptr: *const bool = std::ptr::null();
+    }
 }