Commit c54a8e8
authored
fix(remove): On error, suggest other dependencies (#14818)
### What does this PR try to resolve?
`cargo remove` already will suggest other tables if appropriate.
`cargo add` auto-corrects `_` and `-`.
This is an extension of the two by suggesting existing dependencies
within the same table that are "close".
Related to #14814
### How should we test and review this PR?
I chose to make alt tables and alt deps mutually exclusive in the
message because I didn't wantto deal with how to separate things if both
show up.
Most likely, people will only expect one or the other and if its in an
alt table, then most likely they mean that.
### Additional informationFile tree
7 files changed
+40
-11
lines changed- src/cargo/util/toml_mut
- tests/testsuite/cargo_remove/invalid_dep
- in
- src
- out
7 files changed
+40
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
381 | 382 | | |
382 | 383 | | |
383 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
384 | 392 | | |
385 | 393 | | |
386 | 394 | | |
| |||
393 | 401 | | |
394 | 402 | | |
395 | 403 | | |
| 404 | + | |
396 | 405 | | |
397 | 406 | | |
398 | 407 | | |
| |||
605 | 614 | | |
606 | 615 | | |
607 | 616 | | |
| 617 | + | |
608 | 618 | | |
609 | 619 | | |
610 | 620 | | |
611 | 621 | | |
| 622 | + | |
| 623 | + | |
612 | 624 | | |
613 | 625 | | |
614 | 626 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | | - | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | 17 | | |
20 | 18 | | |
21 | | - | |
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
| |||
Loading
0 commit comments