diff options
| author | bors <bors@rust-lang.org> | 2024-10-01 21:02:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-01 21:02:31 +0000 |
| commit | d578f6ab0c89b9f556a3fd0f116a78613162cf4f (patch) | |
| tree | 395485dc9c14be2db8627290f048bbad927f934f /src/librustdoc/scrape_examples.rs | |
| parent | 71c7d445db57084549cde578d1fc1a80eeb5c81c (diff) | |
| parent | c88cb08afc100a400cf8f0095bac5b83175b5791 (diff) | |
| download | rust-d578f6ab0c89b9f556a3fd0f116a78613162cf4f.tar.gz rust-d578f6ab0c89b9f556a3fd0f116a78613162cf4f.zip | |
Auto merge of #13122 - rshearman:fix-9854, r=blyxyas
Fix `mut_mutex_lock` when reference not ultimately mutable When there is are multiple references where one of the references isn't mutable then this results in a false-positive for `mut_mutex_lock` as it only checks the mutability of the first reference level. Fix this by using `peel_mid_ty_refs_is_mutable` which correctly determines whether the reference is ultimately mutable and thus whether `Mutex::get_lock()` can actually be used. Fixes #9854 changelog: [`mut_mutex_lock`]: No longer lints if the mutex is behind multiple references and one of those references isn't mutable
Diffstat (limited to 'src/librustdoc/scrape_examples.rs')
0 files changed, 0 insertions, 0 deletions
