11use crate :: support:: paths:: { self , CargoPathExt } ;
22use 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+ } ;
46use filetime:: FileTime ;
57use std:: fs;
68use std:: path:: Path ;
@@ -166,10 +168,12 @@ fn no_rewrite_if_no_change() {
166168}
167169
168170#[ cargo_test]
169- // Remove once https://github.com/rust-lang/rust/pull/61727 lands, and switch
170- // to a `nightly` check.
171- #[ ignore]
172171fn relative_depinfo_paths_ws ( ) {
172+ if !is_nightly ( ) {
173+ // See https://github.com/rust-lang/rust/issues/63012
174+ return ;
175+ }
176+
173177 // Test relative dep-info paths in a workspace with --target with
174178 // proc-macros and other dependency kinds.
175179 Package :: new ( "regdep" , "0.1.0" )
@@ -257,8 +261,9 @@ fn relative_depinfo_paths_ws() {
257261 . build ( ) ;
258262
259263 let host = rustc_host ( ) ;
260- p. cargo ( "build --target" )
264+ p. cargo ( "build -Z binary-dep-depinfo - -target" )
261265 . arg ( & host)
266+ . masquerade_as_nightly_cargo ( )
262267 . with_stderr_contains ( "[COMPILING] foo [..]" )
263268 . run ( ) ;
264269
@@ -293,17 +298,20 @@ fn relative_depinfo_paths_ws() {
293298 ) ;
294299
295300 // Make sure it stays fresh.
296- p. cargo ( "build --target" )
301+ p. cargo ( "build -Z binary-dep-depinfo - -target" )
297302 . arg ( & host)
303+ . masquerade_as_nightly_cargo ( )
298304 . with_stderr ( "[FINISHED] dev [..]" )
299305 . run ( ) ;
300306}
301307
302308#[ cargo_test]
303- // Remove once https://github.com/rust-lang/rust/pull/61727 lands, and switch
304- // to a `nightly` check.
305- #[ ignore]
306309fn relative_depinfo_paths_no_ws ( ) {
310+ if !is_nightly ( ) {
311+ // See https://github.com/rust-lang/rust/issues/63012
312+ return ;
313+ }
314+
307315 // Test relative dep-info paths without a workspace with proc-macros and
308316 // other dependency kinds.
309317 Package :: new ( "regdep" , "0.1.0" )
@@ -382,7 +390,8 @@ fn relative_depinfo_paths_no_ws() {
382390 . file ( "bar/src/lib.rs" , "pub fn f() {}" )
383391 . build ( ) ;
384392
385- p. cargo ( "build" )
393+ p. cargo ( "build -Z binary-dep-depinfo" )
394+ . masquerade_as_nightly_cargo ( )
386395 . with_stderr_contains ( "[COMPILING] foo [..]" )
387396 . run ( ) ;
388397
@@ -417,7 +426,10 @@ fn relative_depinfo_paths_no_ws() {
417426 ) ;
418427
419428 // 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 ( ) ;
421433}
422434
423435#[ cargo_test]
@@ -461,10 +473,11 @@ fn reg_dep_source_not_tracked() {
461473}
462474
463475#[ cargo_test]
464- // Remove once https://github.com/rust-lang/rust/pull/61727 lands, and switch
465- // to a `nightly` check.
466- #[ ignore]
467476fn canonical_path ( ) {
477+ if !is_nightly ( ) {
478+ // See https://github.com/rust-lang/rust/issues/63012
479+ return ;
480+ }
468481 if !crate :: support:: symlink_supported ( ) {
469482 return ;
470483 }
@@ -491,7 +504,9 @@ fn canonical_path() {
491504 real. mkdir_p ( ) ;
492505 p. symlink ( real, "target" ) ;
493506
494- p. cargo ( "build" ) . run ( ) ;
507+ p. cargo ( "build -Z binary-dep-depinfo" )
508+ . masquerade_as_nightly_cargo ( )
509+ . run ( ) ;
495510
496511 assert_deps_contains (
497512 & p,
0 commit comments