@@ -32,6 +32,21 @@ fn empty_hints_no_warn() {
32
32
33
33
#[ cargo_test]
34
34
fn 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 ( ) ;
35
50
let p = project ( )
36
51
. file (
37
52
"Cargo.toml" ,
@@ -86,6 +101,9 @@ fn hint_unknown_type_warn() {
86
101
87
102
[dependencies]
88
103
bar = "1.0"
104
+
105
+ [hints]
106
+ mostly-unused = "string"
89
107
"# ,
90
108
)
91
109
. file ( "src/main.rs" , "fn main() {}" )
@@ -96,6 +114,7 @@ fn hint_unknown_type_warn() {
96
114
[LOCKING] 1 package to latest compatible version
97
115
[DOWNLOADING] crates ...
98
116
[DOWNLOADED] bar v1.0.0 (registry `dummy-registry`)
117
+ [WARNING] foo@0.0.1: ignoring unsupported value type (string) for 'hints.mostly-unused', which expects a boolean
99
118
[WARNING] bar@1.0.0: ignoring unsupported value type (integer) for 'hints.mostly-unused', which expects a boolean
100
119
[CHECKING] bar v1.0.0
101
120
[RUNNING] `rustc --crate-name bar [..]`
@@ -136,6 +155,9 @@ fn hints_mostly_unused_warn_without_gate() {
136
155
137
156
[dependencies]
138
157
bar = "1.0"
158
+
159
+ [hints]
160
+ mostly-unused = true
139
161
"# ,
140
162
)
141
163
. file ( "src/main.rs" , "fn main() {}" )
@@ -146,6 +168,7 @@ fn hints_mostly_unused_warn_without_gate() {
146
168
[LOCKING] 1 package to latest compatible version
147
169
[DOWNLOADING] crates ...
148
170
[DOWNLOADED] bar v1.0.0 (registry `dummy-registry`)
171
+ [WARNING] foo@0.0.1: ignoring 'hints.mostly-unused', pass `-Zprofile-hint-mostly-unused` to enable it
149
172
[WARNING] bar@1.0.0: ignoring 'hints.mostly-unused', pass `-Zprofile-hint-mostly-unused` to enable it
150
173
[CHECKING] bar v1.0.0
151
174
[RUNNING] `rustc --crate-name bar [..]`
0 commit comments