97e5449a70
When setting suggestion for significant_drop_in_scrutinee, 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. changelog: [`significant_drop_in_scrutinee`]: No longer lint on Try `?` and `await` desugared expressions. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |