@@ -783,26 +783,13 @@ fn unexpected_cfgs_target_with_lint() {
783783
784784 p. cargo ( "check -Zcargo-lints -Zcheck-target-cfgs" )
785785 . masquerade_as_nightly_cargo ( & [ "requires -Zcheck-target-cfgs" ] )
786- // FIXME: We should not warn on `cfg(foo = "foo")` but we currently do
787786 . with_stderr_data ( str![ [ r#"
788787[WARNING] unexpected `cfg` condition name: bar
789788 --> Cargo.toml:14:25
790789 |
79179014 | [target."cfg(bar)".dependencies]
792791 | ----------
793792 |
794- [WARNING] unexpected `cfg` condition name: foo for `foo = "foo"`
795- --> Cargo.toml:11:25
796- |
797- 11 | [target.'cfg(foo = "foo")'.dependencies] # should not warn here
798- | ------------------
799- |
800- [WARNING] unexpected `cfg` condition name: foo
801- --> Cargo.toml:8:25
802- |
803- 8 | [target."cfg(foo)".dependencies] # should not warn here
804- | ----------
805- |
806793[LOCKING] 1 package to latest compatible version
807794[CHECKING] a v0.0.1 ([ROOT]/foo)
808795[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -957,18 +944,12 @@ fn unexpected_cfgs_target_cfg_any() {
957944
958945 p. cargo ( "check -Zcargo-lints -Zcheck-target-cfgs" )
959946 . masquerade_as_nightly_cargo ( & [ "requires -Zcheck-target-cfgs" ] )
960- // FIXME: We shouldn't be linting `cfg(foo)` because of the `cfg(any())`
961947 . with_stderr_data ( str![ [ r#"
962- [ERROR] unexpected `cfg` condition name: foo
963- --> Cargo.toml:8:25
964- |
965- 8 | [target."cfg(foo)".dependencies]
966- | ^^^^^^^^^^
967- |
948+ [LOCKING] 1 package to latest compatible version
949+ [CHECKING] a v0.0.1 ([ROOT]/foo)
950+ [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
968951
969952"# ] ] )
970- // nor should we error out because of the level="deny"
971- . with_status ( 101 )
972953 . run ( ) ;
973954}
974955
0 commit comments