Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(test_runner): address the
drop_non_drop
clippy lint
This `drop` call is intended to cut short the borrow `'a` maintained by a reference-containing `Mutex<&'a mut _>`, but actually it's unnecessary because `Mutex`'s contained data (`&'a mut _`) is not subject to [drop check][1], hence the borrow is allowed to expire before the containing `Mutex` is dropped. As for the `drop_non_drop` lint, I would say it's a false-positive because not every target supported by `std` has a trivial destructor for `Mutex`. This lint started to trigger only recently because [rust-lang/rust#95035][2] replaced the `Mutex` implementation with a futex-based one on Linux. [1]: https://doc.rust-lang.org/nomicon/dropck.html [2]: rust-lang/rust#95035
- Loading branch information