Commit 651799a
committed
Auto merge of #12136 - loongarch-rs:useless-drop, r=hi-rustin
Remove useless drop of copy type
### What does this PR try to resolve?
This PR aims to remove useless drop of copy type to clear warnings that reported after rust-lang/rust#109732
```
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing
--> src/cargo/core/compiler/job_queue/mod.rs:1048:21
|
1048 | drop(write!(
| ______________________^____-
| | _____________________|
| ||
1049 | || message,
1050 | || " (run `{command} --{args}` to apply {suggestions})"
1051 | || ))
| ||_____________________-^
| |______________________|
| argument has type `Result<(), std::fmt::Error>`
|
= note: use `let _ = ...` to ignore the expression or result
= note: `#[warn(drop_copy)]` on by default
```
### How should we test and review this PR?
```bash
cargo build && cargo test # without any warnings
```
### Additional information
NoneFile tree
3 files changed
+16
-19
lines changed- crates/cargo-test-support/src
- src/cargo/core
- compiler/job_queue
3 files changed
+16
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
| 62 | + | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1045 | 1045 | | |
1046 | 1046 | | |
1047 | 1047 | | |
1048 | | - | |
| 1048 | + | |
1049 | 1049 | | |
1050 | 1050 | | |
1051 | | - | |
| 1051 | + | |
1052 | 1052 | | |
1053 | 1053 | | |
1054 | 1054 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
588 | | - | |
| 588 | + | |
589 | 589 | | |
590 | 590 | | |
591 | | - | |
| 591 | + | |
592 | 592 | | |
593 | | - | |
| 593 | + | |
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
| 598 | + | |
599 | 599 | | |
600 | | - | |
| 600 | + | |
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
632 | | - | |
| 632 | + | |
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
638 | | - | |
| 638 | + | |
639 | 639 | | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
| 640 | + | |
644 | 641 | | |
645 | 642 | | |
646 | | - | |
| 643 | + | |
647 | 644 | | |
648 | 645 | | |
649 | 646 | | |
650 | | - | |
| 647 | + | |
651 | 648 | | |
652 | | - | |
| 649 | + | |
653 | 650 | | |
654 | 651 | | |
655 | 652 | | |
656 | 653 | | |
657 | | - | |
| 654 | + | |
658 | 655 | | |
659 | 656 | | |
660 | 657 | | |
| |||
0 commit comments