@@ -472,16 +472,14 @@ fn thin_lto_works() {
472472#[ cargo_test]
473473fn strip_works ( ) {
474474 if !is_nightly ( ) {
475- // -Zstrip is unstable
475+ // rustc 1.58 stabilized -C strip; disable the test until that ships.
476476 return ;
477477 }
478478
479479 let p = project ( )
480480 . file (
481481 "Cargo.toml" ,
482482 r#"
483- cargo-features = ["strip"]
484-
485483 [package]
486484 name = "foo"
487485 version = "0.1.0"
@@ -494,73 +492,27 @@ fn strip_works() {
494492 . build ( ) ;
495493
496494 p. cargo ( "build --release -v" )
497- . masquerade_as_nightly_cargo ( )
498495 . with_stderr (
499496 "\
500497 [COMPILING] foo [..]
501- [RUNNING] `rustc [..] -Z strip=symbols [..]`
498+ [RUNNING] `rustc [..] -C strip=symbols [..]`
502499[FINISHED] [..]
503500" ,
504501 )
505502 . run ( ) ;
506503}
507504
508- #[ cargo_test]
509- fn strip_requires_cargo_feature ( ) {
510- if !is_nightly ( ) {
511- // -Zstrip is unstable
512- return ;
513- }
514-
515- let p = project ( )
516- . file (
517- "Cargo.toml" ,
518- r#"
519- [package]
520- name = "foo"
521- version = "0.1.0"
522-
523- [profile.release]
524- strip = 'symbols'
525- "# ,
526- )
527- . file ( "src/main.rs" , "fn main() {}" )
528- . build ( ) ;
529-
530- p. cargo ( "build --release -v" )
531- . masquerade_as_nightly_cargo ( )
532- . with_status ( 101 )
533- . with_stderr (
534- "\
535- [ERROR] failed to parse manifest at `[CWD]/Cargo.toml`
536-
537- Caused by:
538- feature `strip` is required
539-
540- The package requires the Cargo feature called `strip`, but that feature is \
541- not stabilized in this version of Cargo (1.[..]).
542- Consider adding `cargo-features = [\" strip\" ]` to the top of Cargo.toml \
543- (above the [package] table) to tell Cargo you are opting in to use this unstable feature.
544- See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-strip-option \
545- for more information about the status of this feature.
546- " ,
547- )
548- . run ( ) ;
549- }
550-
551505#[ cargo_test]
552506fn strip_passes_unknown_option_to_rustc ( ) {
553507 if !is_nightly ( ) {
554- // -Zstrip is unstable
508+ // rustc 1.58 stabilized -C strip; disable the test until that ships.
555509 return ;
556510 }
557511
558512 let p = project ( )
559513 . file (
560514 "Cargo.toml" ,
561515 r#"
562- cargo-features = ["strip"]
563-
564516 [package]
565517 name = "foo"
566518 version = "0.1.0"
@@ -573,13 +525,12 @@ fn strip_passes_unknown_option_to_rustc() {
573525 . build ( ) ;
574526
575527 p. cargo ( "build --release -v" )
576- . masquerade_as_nightly_cargo ( )
577528 . with_status ( 101 )
578529 . with_stderr_contains (
579530 "\
580531 [COMPILING] foo [..]
581- [RUNNING] `rustc [..] -Z strip=unknown [..]`
582- error: incorrect value `unknown` for debugging option `strip` - either `none`, `debuginfo`, or `symbols` was expected
532+ [RUNNING] `rustc [..] -C strip=unknown [..]`
533+ error: incorrect value `unknown` for [..] `strip` [..] was expected
583534" ,
584535 )
585536 . run ( ) ;
@@ -588,16 +539,14 @@ error: incorrect value `unknown` for debugging option `strip` - either `none`, `
588539#[ cargo_test]
589540fn strip_accepts_true_to_strip_symbols ( ) {
590541 if !is_nightly ( ) {
591- // -Zstrip is unstable
542+ // rustc 1.58 stabilized -C strip; disable the test until that ships.
592543 return ;
593544 }
594545
595546 let p = project ( )
596547 . file (
597548 "Cargo.toml" ,
598549 r#"
599- cargo-features = ["strip"]
600-
601550 [package]
602551 name = "foo"
603552 version = "0.1.0"
@@ -610,11 +559,10 @@ fn strip_accepts_true_to_strip_symbols() {
610559 . build ( ) ;
611560
612561 p. cargo ( "build --release -v" )
613- . masquerade_as_nightly_cargo ( )
614562 . with_stderr (
615563 "\
616564 [COMPILING] foo [..]
617- [RUNNING] `rustc [..] -Z strip=symbols [..]`
565+ [RUNNING] `rustc [..] -C strip=symbols [..]`
618566[FINISHED] [..]
619567" ,
620568 )
@@ -624,15 +572,14 @@ fn strip_accepts_true_to_strip_symbols() {
624572#[ cargo_test]
625573fn strip_accepts_false_to_disable_strip ( ) {
626574 if !is_nightly ( ) {
627- // -Zstrip is unstable
575+ // rustc 1.58 stabilized -C strip; disable the test until that ships.
628576 return ;
629577 }
578+
630579 let p = project ( )
631580 . file (
632581 "Cargo.toml" ,
633582 r#"
634- cargo-features = ["strip"]
635-
636583 [package]
637584 name = "foo"
638585 version = "0.1.0"
@@ -645,7 +592,6 @@ fn strip_accepts_false_to_disable_strip() {
645592 . build ( ) ;
646593
647594 p. cargo ( "build --release -v" )
648- . masquerade_as_nightly_cargo ( )
649- . with_stderr_does_not_contain ( "-Z strip" )
595+ . with_stderr_does_not_contain ( "-C strip" )
650596 . run ( ) ;
651597}
0 commit comments