bors 95396f61bc Auto merge of #8617 - Alexendoo:relax-needless-late-init, r=giraffate
`needless_late_init`: ignore `if let`, `let mut` and significant drops

No longer lints `if let`, personal taste on this one is pretty split, so it probably shouldn't be warning by default. Fixes #8613

```rust
let x = if let Some(n) = y {
    n
} else {
    1
}
```

No longer lints `let mut`, things like the following are not uncommon and look fine as they are

b169c16d86/src/sixty_four.rs (L88-L93)

Avoids changing the drop order in an observable way, where the type of `x` has a drop with side effects and something between `x` and the first use also does, e.g.

48cc6cb791/tests/test_api.rs (L159-L167)

The implementation of `type_needs_ordered_drop_inner` was changed a bit, it now uses `Ty::has_significant_drop` and reordered the ifs to check diagnostic name before checking the implicit drop impl

changelog: [`needless_late_init`]: No longer lints `if let` statements, `let mut` bindings and no longer significantly changes drop order
2022-04-27 00:11:17 +00:00
..
2022-04-15 14:18:09 -07:00
2022-04-19 10:48:12 +09:00
2022-04-19 10:48:12 +09:00
2022-04-19 10:48:12 +09:00
2022-03-28 04:48:12 -04:00
2022-03-30 20:12:58 +02:00
2022-04-10 01:07:01 +08:00
2022-04-21 10:03:01 +02:00
2022-04-21 10:03:01 +02:00
2022-04-21 10:03:01 +02:00
2022-04-06 19:25:58 +02:00
2022-04-06 19:25:58 +02:00
2022-04-06 19:25:58 +02:00
2022-04-25 05:20:08 -04:00
2022-04-13 22:48:36 -06:00
2022-04-13 22:48:36 -06:00
2022-03-30 20:12:58 +02:00
2022-03-30 20:12:58 +02:00
2022-03-30 20:12:58 +02:00
2022-03-30 20:12:58 +02:00
2022-03-30 20:12:58 +02:00
2022-03-30 20:12:58 +02:00
2022-03-30 20:12:58 +02:00
2022-03-30 20:12:58 +02:00
2022-03-30 20:12:58 +02:00
2022-04-14 13:16:46 +02:00
2022-03-30 20:13:16 +02:00
2022-03-30 20:13:16 +02:00
2022-03-30 20:12:58 +02:00
2022-04-13 13:48:27 +02:00
2022-04-13 13:48:27 +02:00
2022-03-30 20:12:58 +02:00
2022-03-30 20:12:58 +02:00
2022-04-14 21:33:32 -04:00
2022-04-14 21:33:32 -04:00
2022-03-30 20:12:58 +02:00
2022-03-30 20:12:58 +02:00
2022-03-30 20:12:58 +02:00
2022-03-30 20:12:58 +02:00
fix
2022-04-23 22:45:26 +09:00
fix
2022-04-23 22:45:26 +09:00
fix
2022-04-23 22:45:26 +09:00