about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-02 17:16:43 +0000
committerbors <bors@rust-lang.org>2022-06-02 17:16:43 +0000
commit97e5449a70f0a933d4c3c75527211010d511cac5 (patch)
tree65cb5cde09368bf38d9499d3e91130508bc00e48 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parente32b66c871cc9b20e283733b6626e9d85b4447a1 (diff)
parentbc5a8e9537d30858fede92347e3842d4d4f8a803 (diff)
downloadrust-97e5449a70f0a933d4c3c75527211010d511cac5.tar.gz
rust-97e5449a70f0a933d4c3c75527211010d511cac5.zip
Auto merge of #8902 - PrestonFrom:add_suggestion_for_move_and_clone_when_not_ref, r=flip1995
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions