about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-09-02 18:54:06 +0000
committerbors <bors@rust-lang.org>2022-09-02 18:54:06 +0000
commitc36696ac0229ed706d3640177d6d90e232c6d615 (patch)
tree2bcea333276ebb6db188a0149611d42b9af3c8d6 /src/test/codegen/src-hash-algorithm
parent958a9cf297d313c04c40b4b5164679b516e92885 (diff)
parentffc75af4cd01740e9daac43ff24d777525e506c1 (diff)
downloadrust-c36696ac0229ed706d3640177d6d90e232c6d615.tar.gz
rust-c36696ac0229ed706d3640177d6d90e232c6d615.zip
Auto merge of #9418 - lukaslueg:issue9415, r=llogiq
Fix `mut_mutex_lock` when Mutex is behind immutable deref

I *think* the problem here is the `if let ty::Ref(_, _, Mutability::Mut) = cx.typeck_results().expr_ty(recv).kind()` line tries to check if the `Mutex` can be mutably borrowed (there already is a test for `Arc<Mutex<_>>`), but gets bamboozled by the `&mut Arc` indirection. And I *think* checking the deref-adjustment to filter immutable-adjust (the deref through the `Arc`, starting from `&mut Arc`) is the correct fix.

Fixes #9415

changelog: Fix `mut_mutex_lock` when Mutex is behind immutable deref
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions