Commit graph

11 commits

Author SHA1 Message Date
Philipp Krones
f26cf11fe8
Merge remote-tracking branch 'upstream/master' into rustup 2022-06-30 10:27:25 +02:00
Preston From
3cfd1e5233 Make messages more accurate, check lint enabled 2022-06-27 22:52:22 -06:00
Preston From
1f707db0bf Update messages for clarity when linting 2022-06-22 22:34:49 -06:00
Preston From
2476100c85 Add details about significant drop in match scrutinees causing deadlocks
Adds more details about how a significant drop in a match scrutinee can
cause a deadlock and include link to documentation. Emits messages
indicating temporaries with significant drops in arms of matches and
message about possible deadlocks/unexpected behavior.

changelog: Add more details to significant drop lint to explicitly show
how temporaries in match scrutinees can cause deadlocks/unexpected
behavior.
2022-06-20 23:59:15 -06:00
Maybe Waffle
4d88993544 bless clippy ui tests 2022-06-16 18:00:32 +04:00
Philipp Krones
f067783461 Merge commit 'd9ddce8a223cb9916389c039777b6966ea448dc8' into clippyup 2022-06-04 13:34:07 +02:00
Preston From
bc5a8e9537 Lint message correctly identifies match vs for loop 2022-06-02 02:38:57 -06:00
Preston From
e33d87d4a0 When setting suggestion, add suggestion for MoveAndClone for non-ref
When trying to set the current suggestion, if the type of the expression
is not a reference and it is not trivially pure clone copy, we should still
trigger and emit a lint message. Since this fix may require cloning an
expensive-to-clone type, do not attempt to offer a suggested fix.

This change means that matches generated from TryDesugar and AwaitDesugar
would normally trigger a lint, but they are out of scope for this lint,
so we will explicitly ignore matches with sources of TryDesugar or
AwaitDesugar.

changelog: Update for [`significant_drop_in_scrutinee`] to correctly
emit lint messages for cases where the type is not a reference and
not trivially pure clone copy.
2022-05-27 00:08:49 -06:00
xFrednet
4587b6628d Merge 'rust-clippy/master' into clippyup 2022-05-21 13:24:00 +02:00
xFrednet
4e6cf0036e
Merge remote-tracking branch 'upstream/master' into rustup 2022-05-20 20:47:31 +02:00
Preston From
41c7e4d382 Lint for significant drops who may have surprising lifetimes #1
author Preston From <prestonfrom@gmail.com> 1645164142 -0600
committer Preston From <prestonfrom@gmail.com> 1650005351 -0600
2022-05-06 21:48:17 -06:00