bors
4a56563154
Auto merge of #11900 - Enselic:needless-borrow-drop, r=Manishearth
...
needless_borrows_for_generic_args: Handle when field operand impl Drop
Before this fix, the lint had a false positive, namely when a reference was taken to a field when the field operand implements a custom Drop. The compiler will refuse to partially move a type that implements Drop, because that would put the type in a weird state.
## False Positive Example (Fixed)
```rs
struct CustomDrop(String);
impl Drop for CustomDrop {
fn drop(&mut self) {}
}
fn check_str<P: AsRef<str>>(_to: P) {}
fn test() {
let owner = CustomDrop(String::default());
check_str(&owner.0); // Don't lint. `owner` can't be partially moved because it impl Drop
}
```
changelog: [`needless_borrows_for_generic_args`]: Handle when field operand impl Drop
2023-12-05 19:10:09 +00:00
..
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 09:14:56 +01:00
2023-12-01 09:14:56 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-02 19:44:36 +00:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-11-24 19:15:52 +01:00
2023-12-01 17:24:34 +01:00
2023-12-01 16:52:34 +01:00
2023-12-01 17:24:34 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:06:03 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-11-24 19:15:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-24 19:15:52 +01:00