File tree 3 files changed +10
-9
lines changed 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,7 @@ pub fn run(
32
32
if bins. is_empty ( ) {
33
33
if !options. filter . is_specific ( ) {
34
34
bail ! ( "a bin target must be available for `cargo run`" )
35
- }
36
- else {
35
+ } else {
37
36
// this will be verified in cargo_compile
38
37
}
39
38
}
@@ -55,10 +54,10 @@ pub fn run(
55
54
if !options. filter . is_specific ( ) {
56
55
let names: Vec < & str > = bins. into_iter ( ) . map ( |bin| bin. 0 ) . collect ( ) ;
57
56
bail ! (
58
- "`cargo run` could not determine which binary to run; set `default-run` \
59
- in the manifest or use the `--bin` option to specify\n available binaries: {}",
57
+ "`cargo run` requires that a project only have one \
58
+ executable; use the `--bin` option to specify which one \
59
+ to run\n available binaries: {}",
60
60
names. join( ", " )
61
-
62
61
)
63
62
} else {
64
63
bail ! (
Original file line number Diff line number Diff line change @@ -1347,8 +1347,9 @@ fn run_default_multiple_required_features() {
1347
1347
assert_that (
1348
1348
p. cargo ( "run" ) ,
1349
1349
execs ( ) . with_status ( 101 ) . with_stderr (
1350
- "error: `cargo run` could not determine which binary to run; set `default-run` \
1351
- in the manifest or use the `--bin` option to specify\n available binaries: foo1, foo2",
1350
+ "\
1351
+ error: `cargo run` requires that a project only have one executable; \
1352
+ use the `--bin` option to specify which one to run\n available binaries: foo1, foo2",
1352
1353
) ,
1353
1354
) ;
1354
1355
}
Original file line number Diff line number Diff line change @@ -277,8 +277,9 @@ fn too_many_bins() {
277
277
p. cargo ( "run" ) ,
278
278
// Using [..] here because the order is not stable
279
279
execs ( ) . with_status ( 101 ) . with_stderr (
280
- "[ERROR] `cargo run` could not determine which binary to run; set `default-run` \
281
- in the manifest or use the `--bin` option to specify\n available binaries: [..]\n ",
280
+ "[ERROR] `cargo run` requires that a project only \
281
+ have one executable; use the `--bin` option \
282
+ to specify which one to run\n available binaries: [..]\n ",
282
283
) ,
283
284
) ;
284
285
}
You can’t perform that action at this time.
0 commit comments