@@ -8,13 +8,11 @@ fn gated_by_unstable_opts() {
8
8
. build ( ) ;
9
9
10
10
p. cargo ( "check --compile-time-deps" )
11
- . with_status ( 1 )
11
+ . with_status ( 101 )
12
12
. with_stderr_data ( str![ [ r#"
13
- [ERROR] unexpected argument '--compile-time-deps' found
14
-
15
- Usage: cargo check [OPTIONS]
16
-
17
- For more information, try '--help'.
13
+ [ERROR] the `--compile-time-deps` flag is unstable, and only available on the nightly channel of Cargo, but this is the `stable` channel
14
+ See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels.
15
+ See https://github.com/rust-lang/cargo/issues/14434 for more information about the `--compile-time-deps` flag.
18
16
19
17
"# ] ] )
20
18
. run ( ) ;
@@ -55,11 +53,10 @@ fn non_comp_time_dep() {
55
53
. file ( "bar/src/lib.rs" , r#"pub fn bar() {}"# )
56
54
. build ( ) ;
57
55
58
- p. cargo ( "check" )
56
+ p. cargo ( "-Zunstable-options check --compile-time-deps" )
57
+ . masquerade_as_nightly_cargo ( & [ "compile-time-deps" ] )
59
58
. with_stderr_data ( str![ [ r#"
60
59
[LOCKING] 1 package to latest compatible version
61
- [CHECKING] bar v0.0.1 ([ROOT]/foo/bar)
62
- [CHECKING] foo v0.0.1 ([ROOT]/foo)
63
60
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
64
61
65
62
"# ] ] )
@@ -151,33 +148,33 @@ fn proc_macro_dep() {
151
148
. file ( "baz/src/lib.rs" , r#"pub fn baz() {}"# )
152
149
. build ( ) ;
153
150
154
- p. cargo ( "check --package foo" )
151
+ p. cargo ( "-Zunstable-options check --package foo --compile-time-deps" )
152
+ . masquerade_as_nightly_cargo ( & [ "compile-time-deps" ] )
155
153
. with_stderr_data ( str![ [ r#"
156
154
[COMPILING] baz v0.0.1 ([ROOT]/foo/baz)
157
155
[COMPILING] bar v0.0.1 ([ROOT]/foo/bar)
158
- [CHECKING] foo v0.0.1 ([ROOT]/foo/foo)
159
156
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
160
157
161
158
"# ] ] )
162
159
. run ( ) ;
163
160
164
161
p. cargo ( "clean" ) . run ( ) ;
165
162
166
- p. cargo ( "check --package bar" )
163
+ p. cargo ( "-Zunstable-options check --package bar --compile-time-deps" )
164
+ . masquerade_as_nightly_cargo ( & [ "compile-time-deps" ] )
167
165
. with_stderr_data ( str![ [ r#"
168
- [CHECKING] baz v0.0.1 ([ROOT]/foo/baz)
169
- [CHECKING] bar v0.0.1 ([ROOT]/foo/bar)
170
166
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
171
167
172
168
"# ] ] )
173
169
. run ( ) ;
174
170
175
171
p. cargo ( "clean" ) . run ( ) ;
176
172
177
- p. cargo ( "check --package bar --all-targets" )
173
+ p. cargo ( "-Zunstable-options check --package bar --all-targets --compile-time-deps" )
174
+ . masquerade_as_nightly_cargo ( & [ "compile-time-deps" ] )
178
175
. with_stderr_data ( str![ [ r#"
179
- [CHECKING ] baz v0.0.1 ([ROOT]/foo/baz)
180
- [CHECKING ] bar v0.0.1 ([ROOT]/foo/bar)
176
+ [COMPILING ] baz v0.0.1 ([ROOT]/foo/baz)
177
+ [COMPILING ] bar v0.0.1 ([ROOT]/foo/bar)
181
178
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
182
179
183
180
"# ] ] )
@@ -241,7 +238,8 @@ fn build_dep() {
241
238
. file ( "bar/baz/src/lib.rs" , r#"pub fn baz() {}"# )
242
239
. build ( ) ;
243
240
244
- p. cargo ( "check" )
241
+ p. cargo ( "-Zunstable-options check --compile-time-deps" )
242
+ . masquerade_as_nightly_cargo ( & [ "compile-time-deps" ] )
245
243
. with_stderr_data ( str![ [ r#"
246
244
[LOCKING] 2 packages to latest compatible versions
247
245
[COMPILING] baz v0.0.1 ([ROOT]/foo/bar/baz)
@@ -314,12 +312,12 @@ fn indirect_comp_time_dep() {
314
312
. file ( "bar/baz/src/lib.rs" , r#"pub fn baz() {}"# )
315
313
. build ( ) ;
316
314
317
- p. cargo ( "check" )
315
+ p. cargo ( "-Zunstable-options check --compile-time-deps" )
316
+ . masquerade_as_nightly_cargo ( & [ "compile-time-deps" ] )
318
317
. with_stderr_data ( str![ [ r#"
319
318
[LOCKING] 2 packages to latest compatible versions
320
319
[COMPILING] baz v0.0.1 ([ROOT]/foo/bar/baz)
321
320
[COMPILING] bar v0.0.1 ([ROOT]/foo/bar)
322
- [CHECKING] foo v0.0.1 ([ROOT]/foo)
323
321
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
324
322
325
323
"# ] ] )
@@ -379,21 +377,21 @@ fn tests_target() {
379
377
)
380
378
. build ( ) ;
381
379
382
- p. cargo ( "check --tests" )
380
+ p. cargo ( "-Zunstable-options check --tests --compile-time-deps " )
383
381
. with_stderr_data ( str![ [ r#"
384
382
[LOCKING] 1 package to latest compatible version
385
383
[COMPILING] bar v0.0.1 ([ROOT]/foo/bar)
386
- [CHECKING] foo v0.0.1 ([ROOT]/foo)
387
384
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
388
385
389
386
"# ] ] )
387
+ . masquerade_as_nightly_cargo ( & [ "compile-time-deps" ] )
390
388
. run ( ) ;
391
389
392
390
p. cargo ( "clean" ) . run ( ) ;
393
391
394
- p. cargo ( "check" )
392
+ p. cargo ( "-Zunstable-options check --compile-time-deps" )
393
+ . masquerade_as_nightly_cargo ( & [ "compile-time-deps" ] )
395
394
. with_stderr_data ( str![ [ r#"
396
- [CHECKING] foo v0.0.1 ([ROOT]/foo)
397
395
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
398
396
399
397
"# ] ] )
0 commit comments