about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/readonly_write_lock.fixed4
-rw-r--r--tests/ui/readonly_write_lock.rs4
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/readonly_write_lock.fixed b/tests/ui/readonly_write_lock.fixed
index 76f4a43ae53..4db13482ac7 100644
--- a/tests/ui/readonly_write_lock.fixed
+++ b/tests/ui/readonly_write_lock.fixed
@@ -43,3 +43,7 @@ fn main() {
         *writer1 = *writer2;
     }
 }
+
+fn issue12733(rw: &RwLock<()>) {
+    let _write_guard = rw.write().unwrap();
+}
diff --git a/tests/ui/readonly_write_lock.rs b/tests/ui/readonly_write_lock.rs
index 3d1d3855fe1..66ba1b2d696 100644
--- a/tests/ui/readonly_write_lock.rs
+++ b/tests/ui/readonly_write_lock.rs
@@ -43,3 +43,7 @@ fn main() {
         *writer1 = *writer2;
     }
 }
+
+fn issue12733(rw: &RwLock<()>) {
+    let _write_guard = rw.write().unwrap();
+}