@@ -32,6 +32,21 @@ fn empty_hints_no_warn() {
3232
3333#[ cargo_test]
3434fn unknown_hints_warn ( ) {
35+ Package :: new ( "bar" , "1.0.0" )
36+ . file (
37+ "Cargo.toml" ,
38+ r#"
39+ [package]
40+ name = "bar"
41+ version = "1.0.0"
42+ edition = "2015"
43+
44+ [hints]
45+ this-is-an-unknown-hint = true
46+ "# ,
47+ )
48+ . file ( "src/lib.rs" , "" )
49+ . publish ( ) ;
3550 let p = project ( )
3651 . file (
3752 "Cargo.toml" ,
@@ -86,6 +101,9 @@ fn hint_unknown_type_warn() {
86101
87102 [dependencies]
88103 bar = "1.0"
104+
105+ [hints]
106+ mostly-unused = "string"
89107 "# ,
90108 )
91109 . file ( "src/main.rs" , "fn main() {}" )
@@ -96,6 +114,7 @@ fn hint_unknown_type_warn() {
96114[LOCKING] 1 package to latest compatible version
97115[DOWNLOADING] crates ...
98116[DOWNLOADED] bar v1.0.0 (registry `dummy-registry`)
117+ [WARNING] [email protected] : ignoring unsupported value type (string) for 'hints.mostly-unused', which expects a boolean 99118[WARNING] [email protected] : ignoring unsupported value type (integer) for 'hints.mostly-unused', which expects a boolean 100119[CHECKING] bar v1.0.0
101120[RUNNING] `rustc --crate-name bar [..]`
@@ -136,6 +155,9 @@ fn hints_mostly_unused_warn_without_gate() {
136155
137156 [dependencies]
138157 bar = "1.0"
158+
159+ [hints]
160+ mostly-unused = true
139161 "# ,
140162 )
141163 . file ( "src/main.rs" , "fn main() {}" )
@@ -146,6 +168,7 @@ fn hints_mostly_unused_warn_without_gate() {
146168[LOCKING] 1 package to latest compatible version
147169[DOWNLOADING] crates ...
148170[DOWNLOADED] bar v1.0.0 (registry `dummy-registry`)
171+ [WARNING] [email protected] : ignoring 'hints.mostly-unused', pass `-Zprofile-hint-mostly-unused` to enable it 149172[WARNING] [email protected] : ignoring 'hints.mostly-unused', pass `-Zprofile-hint-mostly-unused` to enable it 150173[CHECKING] bar v1.0.0
151174[RUNNING] `rustc --crate-name bar [..]`
0 commit comments