@@ -659,9 +659,7 @@ fn unexpected_cfgs_target_lint_level_allow() {
659
659
660
660
p. cargo ( "check -Zcargo-lints -Zcheck-target-cfgs" )
661
661
. masquerade_as_nightly_cargo ( & [ "requires -Zcheck-target-cfgs" ] )
662
- // FIXME: We shouldn't warn any target cfgs because of the level="allow"
663
662
. with_stderr_data ( str![ [ r#"
664
- [WARNING] [ROOT]/foo/Cargo.toml: unexpected `cfg` condition name: `foo` in `[target.'cfg(foo)'.dependencies]`
665
663
[LOCKING] 1 package to latest compatible version
666
664
[CHECKING] a v0.0.1 ([ROOT]/foo)
667
665
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -697,14 +695,10 @@ fn unexpected_cfgs_target_lint_level_deny() {
697
695
p. cargo ( "check -Zcargo-lints -Zcheck-target-cfgs" )
698
696
. masquerade_as_nightly_cargo ( & [ "requires -Zcheck-target-cfgs" ] )
699
697
. 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]`
704
699
705
700
"# ] ] )
706
- // FIXME: this test should fail
707
- // .with_status(101)
701
+ . with_status ( 101 )
708
702
. run ( ) ;
709
703
}
710
704
@@ -737,12 +731,11 @@ fn unexpected_cfgs_target_cfg_any() {
737
731
. masquerade_as_nightly_cargo ( & [ "requires -Zcheck-target-cfgs" ] )
738
732
// FIXME: We shouldn't be linting `cfg(foo)` because of the `cfg(any())`
739
733
. 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]`
744
735
745
736
"# ] ] )
737
+ // nor should we error out because of the level="deny"
738
+ . with_status ( 101 )
746
739
. run ( ) ;
747
740
}
748
741
@@ -790,9 +783,6 @@ fn no_unexpected_cfgs_target() {
790
783
p. cargo ( "check -Zcargo-lints" )
791
784
. masquerade_as_nightly_cargo ( & [ "requires -Zcargo-lints" ] )
792
785
. 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)
796
786
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
797
787
798
788
"# ] ] )
0 commit comments