1
1
use crate :: support:: paths:: { self , CargoPathExt } ;
2
2
use crate :: support:: registry:: Package ;
3
- use crate :: support:: { basic_bin_manifest, basic_manifest, main_file, project, rustc_host, Project } ;
3
+ use crate :: support:: {
4
+ basic_bin_manifest, basic_manifest, is_nightly, main_file, project, rustc_host, Project ,
5
+ } ;
4
6
use filetime:: FileTime ;
5
7
use std:: fs;
6
8
use std:: path:: Path ;
@@ -166,10 +168,12 @@ fn no_rewrite_if_no_change() {
166
168
}
167
169
168
170
#[ cargo_test]
169
- // Remove once https://github.com/rust-lang/rust/pull/61727 lands, and switch
170
- // to a `nightly` check.
171
- #[ ignore]
172
171
fn relative_depinfo_paths_ws ( ) {
172
+ if !is_nightly ( ) {
173
+ // See https://github.com/rust-lang/rust/issues/63012
174
+ return ;
175
+ }
176
+
173
177
// Test relative dep-info paths in a workspace with --target with
174
178
// proc-macros and other dependency kinds.
175
179
Package :: new ( "regdep" , "0.1.0" )
@@ -257,8 +261,9 @@ fn relative_depinfo_paths_ws() {
257
261
. build ( ) ;
258
262
259
263
let host = rustc_host ( ) ;
260
- p. cargo ( "build --target" )
264
+ p. cargo ( "build -Z binary-dep-depinfo - -target" )
261
265
. arg ( & host)
266
+ . masquerade_as_nightly_cargo ( )
262
267
. with_stderr_contains ( "[COMPILING] foo [..]" )
263
268
. run ( ) ;
264
269
@@ -293,17 +298,20 @@ fn relative_depinfo_paths_ws() {
293
298
) ;
294
299
295
300
// Make sure it stays fresh.
296
- p. cargo ( "build --target" )
301
+ p. cargo ( "build -Z binary-dep-depinfo - -target" )
297
302
. arg ( & host)
303
+ . masquerade_as_nightly_cargo ( )
298
304
. with_stderr ( "[FINISHED] dev [..]" )
299
305
. run ( ) ;
300
306
}
301
307
302
308
#[ cargo_test]
303
- // Remove once https://github.com/rust-lang/rust/pull/61727 lands, and switch
304
- // to a `nightly` check.
305
- #[ ignore]
306
309
fn relative_depinfo_paths_no_ws ( ) {
310
+ if !is_nightly ( ) {
311
+ // See https://github.com/rust-lang/rust/issues/63012
312
+ return ;
313
+ }
314
+
307
315
// Test relative dep-info paths without a workspace with proc-macros and
308
316
// other dependency kinds.
309
317
Package :: new ( "regdep" , "0.1.0" )
@@ -382,7 +390,8 @@ fn relative_depinfo_paths_no_ws() {
382
390
. file ( "bar/src/lib.rs" , "pub fn f() {}" )
383
391
. build ( ) ;
384
392
385
- p. cargo ( "build" )
393
+ p. cargo ( "build -Z binary-dep-depinfo" )
394
+ . masquerade_as_nightly_cargo ( )
386
395
. with_stderr_contains ( "[COMPILING] foo [..]" )
387
396
. run ( ) ;
388
397
@@ -417,7 +426,10 @@ fn relative_depinfo_paths_no_ws() {
417
426
) ;
418
427
419
428
// Make sure it stays fresh.
420
- p. cargo ( "build" ) . with_stderr ( "[FINISHED] dev [..]" ) . run ( ) ;
429
+ p. cargo ( "build -Z binary-dep-depinfo" )
430
+ . masquerade_as_nightly_cargo ( )
431
+ . with_stderr ( "[FINISHED] dev [..]" )
432
+ . run ( ) ;
421
433
}
422
434
423
435
#[ cargo_test]
@@ -461,10 +473,11 @@ fn reg_dep_source_not_tracked() {
461
473
}
462
474
463
475
#[ cargo_test]
464
- // Remove once https://github.com/rust-lang/rust/pull/61727 lands, and switch
465
- // to a `nightly` check.
466
- #[ ignore]
467
476
fn canonical_path ( ) {
477
+ if !is_nightly ( ) {
478
+ // See https://github.com/rust-lang/rust/issues/63012
479
+ return ;
480
+ }
468
481
if !crate :: support:: symlink_supported ( ) {
469
482
return ;
470
483
}
@@ -491,7 +504,9 @@ fn canonical_path() {
491
504
real. mkdir_p ( ) ;
492
505
p. symlink ( real, "target" ) ;
493
506
494
- p. cargo ( "build" ) . run ( ) ;
507
+ p. cargo ( "build -Z binary-dep-depinfo" )
508
+ . masquerade_as_nightly_cargo ( )
509
+ . run ( ) ;
495
510
496
511
assert_deps_contains (
497
512
& p,
0 commit comments