Have the drop code suggestion not include let _ =

This commit is contained in:
Aaron Kofsky 2022-06-11 10:36:48 -04:00
parent 7237e8635d
commit b040666e05
3 changed files with 5 additions and 5 deletions

View file

@ -157,7 +157,7 @@ fn build_and_emit_lint(
.multipart_suggestion(
"consider immediately dropping the value",
vec![
(init_span.shrink_to_lo(), "drop(".to_string()),
(local.span.until(init_span), "drop(".to_string()),
(init_span.shrink_to_hi(), ")".to_string()),
],
Applicability::MachineApplicable,