rust/tests
bors 7f2068cc2b Auto merge of #6568 - Jarcho:redundant_pattern_matching, r=flip1995
Fix: redundant_pattern_matching drop order

Fixes #5746

A note about the change in drop order is added when the scrutinee (or any temporary in the expression) isn't known to be safe to drop in any order (i.e. doesn't implement the `Drop` trait, or contain such a type). There is a whitelist for some `std` types, but it's incomplete. Currently just `Vec<_>`, `Box<_>`, `Rc<_>` and `Arc<_>`, but only if the contained type is also safe to drop in any order.

Another lint for when the drop order changes could be added as allowed by default, but the drop order requirement is pretty subtle in this case. I think the note added to the lint should be enough to make someone think before applying the change.

changelog: Added a note to `redundant_pattern_matching` when the change in drop order might matter
2021-04-16 16:45:59 +00:00
..
auxiliary
cargo
ui Auto merge of #6568 - Jarcho:redundant_pattern_matching, r=flip1995 2021-04-16 16:45:59 +00:00
ui-cargo Remove author requirement for cargo_common_metadata 2021-04-03 22:52:48 +02:00
ui-internal Remove all usages of match_path, match_qpath and match_path_ast except the author lint. 2021-04-15 19:27:25 -04:00
ui-toml
compile-test.rs Fix all occurences of needless_borrow internally 2021-04-06 10:43:47 -04:00
dogfood.rs
fmt.rs
integration.rs
lint_message_convention.rs
missing-test-files.rs
versioncheck.rs