@@ -418,16 +418,13 @@ fn bad_crate_type() {
418
418
. file ( "src/lib.rs" , "" )
419
419
. build ( ) ;
420
420
421
- p. cargo ( "build -v " )
421
+ p. cargo ( "check " )
422
422
. with_status ( 101 )
423
423
. with_stderr_data ( str![ [ r#"
424
- [ERROR] failed to run `rustc` to learn about crate-type bad_type information
425
-
426
- Caused by:
427
- process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --crate-type bad_type` ([EXIT_STATUS]: 1)
428
- --- stderr
429
- [ERROR] unknown crate type: `bad_type`[..]
424
+ [CHECKING] foo v0.0.0 ([ROOT]/foo)
425
+ [ERROR] unknown crate type: `bad_type`, expected one of: `lib`, `rlib`, `staticlib`, `dylib`, `cdylib`, `bin`, `proc-macro`
430
426
427
+ [ERROR] could not compile `foo` (lib) due to 1 previous error
431
428
432
429
"# ] ] )
433
430
. run ( ) ;
@@ -3153,7 +3150,7 @@ fn non_existing_test() {
3153
3150
. file ( "src/lib.rs" , "" )
3154
3151
. build ( ) ;
3155
3152
3156
- p. cargo ( "build --tests -v" )
3153
+ p. cargo ( "check --tests -v" )
3157
3154
. with_status ( 101 )
3158
3155
. with_stderr_data ( str![ [ r#"
3159
3156
[ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
@@ -3187,7 +3184,7 @@ fn non_existing_example() {
3187
3184
. file ( "src/lib.rs" , "" )
3188
3185
. build ( ) ;
3189
3186
3190
- p. cargo ( "build --examples -v" )
3187
+ p. cargo ( "check --examples -v" )
3191
3188
. with_status ( 101 )
3192
3189
. with_stderr_data ( str![ [ r#"
3193
3190
[ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
@@ -3221,7 +3218,7 @@ fn non_existing_benchmark() {
3221
3218
. file ( "src/lib.rs" , "" )
3222
3219
. build ( ) ;
3223
3220
3224
- p. cargo ( "build --benches -v" )
3221
+ p. cargo ( "check --benches -v" )
3225
3222
. with_status ( 101 )
3226
3223
. with_stderr_data ( str![ [ r#"
3227
3224
[ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
@@ -3241,7 +3238,7 @@ fn non_existing_binary() {
3241
3238
. file ( "src/bin/ehlo.rs" , "" )
3242
3239
. build ( ) ;
3243
3240
3244
- p. cargo ( "build -v" )
3241
+ p. cargo ( "check -v" )
3245
3242
. with_status ( 101 )
3246
3243
. with_stderr_data ( str![ [ r#"
3247
3244
[ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
@@ -3278,7 +3275,7 @@ fn commonly_wrong_path_of_test() {
3278
3275
. file ( "test/foo.rs" , "" )
3279
3276
. build ( ) ;
3280
3277
3281
- p. cargo ( "build --tests -v" )
3278
+ p. cargo ( "check --tests -v" )
3282
3279
. with_status ( 101 )
3283
3280
. with_stderr_data ( str![ [ r#"
3284
3281
[ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
@@ -3314,7 +3311,7 @@ fn commonly_wrong_path_of_example() {
3314
3311
. file ( "example/foo.rs" , "" )
3315
3312
. build ( ) ;
3316
3313
3317
- p. cargo ( "build --examples -v" )
3314
+ p. cargo ( "check --examples -v" )
3318
3315
. with_status ( 101 )
3319
3316
. with_stderr_data ( str![ [ r#"
3320
3317
[ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
@@ -3350,7 +3347,7 @@ fn commonly_wrong_path_of_benchmark() {
3350
3347
. file ( "bench/foo.rs" , "" )
3351
3348
. build ( ) ;
3352
3349
3353
- p. cargo ( "build --benches -v" )
3350
+ p. cargo ( "check --benches -v" )
3354
3351
. with_status ( 101 )
3355
3352
. with_stderr_data ( str![ [ r#"
3356
3353
[ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
@@ -3371,7 +3368,7 @@ fn commonly_wrong_path_binary() {
3371
3368
. file ( "src/bins/foo.rs" , "" )
3372
3369
. build ( ) ;
3373
3370
3374
- p. cargo ( "build -v" )
3371
+ p. cargo ( "check -v" )
3375
3372
. with_status ( 101 )
3376
3373
. with_stderr_data ( str![ [ r#"
3377
3374
[ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
@@ -3392,7 +3389,7 @@ fn commonly_wrong_path_subdir_binary() {
3392
3389
. file ( "src/bins/foo/main.rs" , "" )
3393
3390
. build ( ) ;
3394
3391
3395
- p. cargo ( "build -v" )
3392
+ p. cargo ( "check -v" )
3396
3393
. with_status ( 101 )
3397
3394
. with_stderr_data ( str![ [ r#"
3398
3395
[ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
@@ -3414,7 +3411,7 @@ fn found_multiple_target_files() {
3414
3411
. file ( "src/bin/foo/main.rs" , "" )
3415
3412
. build ( ) ;
3416
3413
3417
- p. cargo ( "build -v" )
3414
+ p. cargo ( "check -v" )
3418
3415
. with_status ( 101 )
3419
3416
// Don't assert the inferred paths since the order is non-deterministic.
3420
3417
. with_stderr_data ( str![ [ r#"
@@ -3448,7 +3445,7 @@ fn legacy_binary_paths_warnings() {
3448
3445
. file ( "src/main.rs" , "fn main() {}" )
3449
3446
. build ( ) ;
3450
3447
3451
- p. cargo ( "build -v" )
3448
+ p. cargo ( "check -v" )
3452
3449
. with_stderr_data ( str![ [ r#"
3453
3450
[WARNING] An explicit [[bin]] section is specified in Cargo.toml which currently
3454
3451
disables Cargo from automatically inferring other binary targets.
@@ -3467,7 +3464,7 @@ For more information on this warning you can consult
3467
3464
https://github.com/rust-lang/cargo/issues/5330
3468
3465
[WARNING] path `src/main.rs` was erroneously implicitly accepted for binary `bar`,
3469
3466
please set bin.path in Cargo.toml
3470
- [COMPILING ] foo v1.0.0 ([ROOT]/foo)
3467
+ [CHECKING ] foo v1.0.0 ([ROOT]/foo)
3471
3468
[RUNNING] `rustc [..]`
3472
3469
[RUNNING] `rustc [..]`
3473
3470
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -3493,7 +3490,7 @@ please set bin.path in Cargo.toml
3493
3490
. file ( "src/bin/main.rs" , "fn main() {}" )
3494
3491
. build ( ) ;
3495
3492
3496
- p. cargo ( "build -v" )
3493
+ p. cargo ( "check -v" )
3497
3494
. with_stderr_data ( str![ [ r#"
3498
3495
[WARNING] An explicit [[bin]] section is specified in Cargo.toml which currently
3499
3496
disables Cargo from automatically inferring other binary targets.
@@ -3512,7 +3509,7 @@ For more information on this warning you can consult
3512
3509
https://github.com/rust-lang/cargo/issues/5330
3513
3510
[WARNING] path `src/bin/main.rs` was erroneously implicitly accepted for binary `bar`,
3514
3511
please set bin.path in Cargo.toml
3515
- [COMPILING ] foo v1.0.0 ([ROOT]/foo)
3512
+ [CHECKING ] foo v1.0.0 ([ROOT]/foo)
3516
3513
[RUNNING] `rustc [..]`
3517
3514
[RUNNING] `rustc [..]`
3518
3515
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -3537,11 +3534,11 @@ please set bin.path in Cargo.toml
3537
3534
. file ( "src/bar.rs" , "fn main() {}" )
3538
3535
. build ( ) ;
3539
3536
3540
- p. cargo ( "build -v" )
3537
+ p. cargo ( "check -v" )
3541
3538
. with_stderr_data ( str![ [ r#"
3542
3539
[WARNING] path `src/bar.rs` was erroneously implicitly accepted for binary `bar`,
3543
3540
please set bin.path in Cargo.toml
3544
- [COMPILING ] foo v1.0.0 ([ROOT]/foo)
3541
+ [CHECKING ] foo v1.0.0 ([ROOT]/foo)
3545
3542
[RUNNING] `rustc [..]`
3546
3543
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
3547
3544
0 commit comments