@@ -659,9 +659,7 @@ fn unexpected_cfgs_target_lint_level_allow() {
659659
660660 p. cargo ( "check -Zcargo-lints -Zcheck-target-cfgs" )
661661 . masquerade_as_nightly_cargo ( & [ "requires -Zcheck-target-cfgs" ] )
662- // FIXME: We shouldn't warn any target cfgs because of the level="allow"
663662 . with_stderr_data ( str![ [ r#"
664- [WARNING] [ROOT]/foo/Cargo.toml: unexpected `cfg` condition name: `foo` in `[target.'cfg(foo)'.dependencies]`
665663[LOCKING] 1 package to latest compatible version
666664[CHECKING] a v0.0.1 ([ROOT]/foo)
667665[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -697,14 +695,10 @@ fn unexpected_cfgs_target_lint_level_deny() {
697695 p. cargo ( "check -Zcargo-lints -Zcheck-target-cfgs" )
698696 . masquerade_as_nightly_cargo ( & [ "requires -Zcheck-target-cfgs" ] )
699697 . with_stderr_data ( str![ [ r#"
700- [WARNING] [ROOT]/foo/Cargo.toml: unexpected `cfg` condition name: `foo` in `[target.'cfg(foo)'.dependencies]`
701- [LOCKING] 1 package to latest compatible version
702- [CHECKING] a v0.0.1 ([ROOT]/foo)
703- [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
698+ [ERROR] [ROOT]/foo/Cargo.toml: unexpected `cfg` condition name: `foo` in `[target.'cfg(foo)'.dependencies]`
704699
705700"# ] ] )
706- // FIXME: this test should fail
707- // .with_status(101)
701+ . with_status ( 101 )
708702 . run ( ) ;
709703}
710704
@@ -737,12 +731,11 @@ fn unexpected_cfgs_target_cfg_any() {
737731 . masquerade_as_nightly_cargo ( & [ "requires -Zcheck-target-cfgs" ] )
738732 // FIXME: We shouldn't be linting `cfg(foo)` because of the `cfg(any())`
739733 . with_stderr_data ( str![ [ r#"
740- [WARNING] [ROOT]/foo/Cargo.toml: unexpected `cfg` condition name: `foo` in `[target.'cfg(foo)'.dependencies]`
741- [LOCKING] 1 package to latest compatible version
742- [CHECKING] a v0.0.1 ([ROOT]/foo)
743- [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
734+ [ERROR] [ROOT]/foo/Cargo.toml: unexpected `cfg` condition name: `foo` in `[target.'cfg(foo)'.dependencies]`
744735
745736"# ] ] )
737+ // nor should we error out because of the level="deny"
738+ . with_status ( 101 )
746739 . run ( ) ;
747740}
748741
@@ -790,9 +783,6 @@ fn no_unexpected_cfgs_target() {
790783 p. cargo ( "check -Zcargo-lints" )
791784 . masquerade_as_nightly_cargo ( & [ "requires -Zcargo-lints" ] )
792785 . with_stderr_data ( str![ [ r#"
793- [LOCKING] 1 package to latest compatible version
794- [CHECKING] b v0.0.1 ([ROOT]/foo/b)
795- [CHECKING] a v0.0.1 ([ROOT]/foo)
796786[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
797787
798788"# ] ] )
0 commit comments