Commit a2ea66b
committed
Auto merge of #11400 - hi-rustin:rustin-patch-fix-error, r=epage
Add error message when `cargo fix` on an empty repo
### What does this PR try to resolve?
close #11380
Add error message when `cargo fix` on an empty repo.
### How should we test and review this PR?
- [x] unit test
```sh
set -eux
cargo +nightly new repro
cd repro
echo "fn main() { let _ = 0.clone(); }" > src/main.rs
cargo fix
```2 files changed
+31
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
774 | 800 | | |
775 | 801 | | |
776 | 802 | | |
| |||
1405 | 1431 | | |
1406 | 1432 | | |
1407 | 1433 | | |
1408 | | - | |
| 1434 | + | |
1409 | 1435 | | |
1410 | 1436 | | |
1411 | 1437 | | |
| |||
1715 | 1741 | | |
1716 | 1742 | | |
1717 | 1743 | | |
1718 | | - | |
| 1744 | + | |
1719 | 1745 | | |
1720 | 1746 | | |
1721 | 1747 | | |
| |||
1725 | 1751 | | |
1726 | 1752 | | |
1727 | 1753 | | |
1728 | | - | |
| 1754 | + | |
1729 | 1755 | | |
1730 | 1756 | | |
1731 | 1757 | | |
| |||
0 commit comments