File tree 1 file changed +56
-0
lines changed 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change @@ -1022,3 +1022,59 @@ im-a-teapot = true
1022
1022
)
1023
1023
. run ( ) ;
1024
1024
}
1025
+
1026
+ #[ cargo_test]
1027
+ fn cargo_lints_cap_lints ( ) {
1028
+ Package :: new ( "baz" , "0.1.0" ) . publish ( ) ;
1029
+ Package :: new ( "bar" , "0.1.0" )
1030
+ . file (
1031
+ "Cargo.toml" ,
1032
+ r#"
1033
+ [package]
1034
+ name = "bar"
1035
+ version = "0.1.0"
1036
+ edition = "2021"
1037
+
1038
+ [dependencies]
1039
+ baz = { version = "0.1.0", optional = true }
1040
+
1041
+ [lints.cargo]
1042
+ implicit-features = "warn"
1043
+ "# ,
1044
+ )
1045
+ . file ( "src/lib.rs" , "" )
1046
+ . publish ( ) ;
1047
+ let p = project ( )
1048
+ . file (
1049
+ "Cargo.toml" ,
1050
+ r#"
1051
+ [package]
1052
+ name = "foo"
1053
+ version = "0.1.0"
1054
+ edition = "2021"
1055
+
1056
+ [dependencies]
1057
+ bar = "0.1.0"
1058
+
1059
+ [lints.cargo]
1060
+ implicit-features = "warn"
1061
+ "# ,
1062
+ )
1063
+ . file ( "src/lib.rs" , "" )
1064
+ . build ( ) ;
1065
+
1066
+ p. cargo ( "check -Zcargo-lints" )
1067
+ . masquerade_as_nightly_cargo ( & [ "cargo-lints" ] )
1068
+ . with_stderr (
1069
+ "\
1070
+ [UPDATING] [..]
1071
+ [LOCKING] 2 packages to latest compatible versions
1072
+ [DOWNLOADING] crates ...
1073
+ [DOWNLOADED] bar v0.1.0 ([..])
1074
+ [CHECKING] bar v0.1.0
1075
+ [CHECKING] foo v0.1.0 ([CWD])
1076
+ [FINISHED] [..]
1077
+ " ,
1078
+ )
1079
+ . run ( ) ;
1080
+ }
You can’t perform that action at this time.
0 commit comments