rust/tests/ui/readonly_write_lock.stderr

17 lines
592 B
Plaintext
Raw Normal View History

2023-07-21 19:17:51 -05:00
error: this write lock is used only for reading
--> $DIR/readonly_write_lock.rs:16:22
|
LL | let writer = lock.write().unwrap();
| ^^^^^^^^^^^^ help: consider using a read lock instead: `lock.read()`
|
= note: `-D clippy::readonly-write-lock` implied by `-D warnings`
error: this write lock is used only for reading
--> $DIR/readonly_write_lock.rs:23:22
2023-07-21 19:17:51 -05:00
|
LL | let writer = lock.write().unwrap();
| ^^^^^^^^^^^^ help: consider using a read lock instead: `lock.read()`
error: aborting due to 2 previous errors