@@ -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" ,
@@ -41,6 +56,9 @@ fn unknown_hints_warn() {
41
56
version = "0.0.1"
42
57
edition = "2015"
43
58
59
+ [dependencies]
60
+ bar = "1.0"
61
+
44
62
[hints]
45
63
this-is-an-unknown-hint = true
46
64
"# ,
@@ -50,6 +68,12 @@ fn unknown_hints_warn() {
50
68
p. cargo ( "check -v" )
51
69
. with_stderr_data ( str![ [ r#"
52
70
[WARNING] unused manifest key: hints.this-is-an-unknown-hint
71
+ [UPDATING] `dummy-registry` index
72
+ [LOCKING] 1 package to latest compatible version
73
+ [DOWNLOADING] crates ...
74
+ [DOWNLOADED] bar v1.0.0 (registry `dummy-registry`)
75
+ [CHECKING] bar v1.0.0
76
+ [RUNNING] `rustc --crate-name bar [..]`
53
77
[CHECKING] foo v0.0.1 ([ROOT]/foo)
54
78
[RUNNING] `rustc --crate-name foo [..]`
55
79
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -86,6 +110,9 @@ fn hint_unknown_type_warn() {
86
110
87
111
[dependencies]
88
112
bar = "1.0"
113
+
114
+ [hints]
115
+ mostly-unused = "string"
89
116
"# ,
90
117
)
91
118
. file ( "src/main.rs" , "fn main() {}" )
@@ -96,6 +123,7 @@ fn hint_unknown_type_warn() {
96
123
[LOCKING] 1 package to latest compatible version
97
124
[DOWNLOADING] crates ...
98
125
[DOWNLOADED] bar v1.0.0 (registry `dummy-registry`)
126
+ [WARNING] foo@0.0.1: ignoring unsupported value type (string) for 'hints.mostly-unused', which expects a boolean
99
127
[WARNING] bar@1.0.0: ignoring unsupported value type (integer) for 'hints.mostly-unused', which expects a boolean
100
128
[CHECKING] bar v1.0.0
101
129
[RUNNING] `rustc --crate-name bar [..]`
@@ -136,6 +164,9 @@ fn hints_mostly_unused_warn_without_gate() {
136
164
137
165
[dependencies]
138
166
bar = "1.0"
167
+
168
+ [hints]
169
+ mostly-unused = true
139
170
"# ,
140
171
)
141
172
. file ( "src/main.rs" , "fn main() {}" )
@@ -146,6 +177,7 @@ fn hints_mostly_unused_warn_without_gate() {
146
177
[LOCKING] 1 package to latest compatible version
147
178
[DOWNLOADING] crates ...
148
179
[DOWNLOADED] bar v1.0.0 (registry `dummy-registry`)
180
+ [WARNING] foo@0.0.1: ignoring 'hints.mostly-unused', pass `-Zprofile-hint-mostly-unused` to enable it
149
181
[WARNING] bar@1.0.0: ignoring 'hints.mostly-unused', pass `-Zprofile-hint-mostly-unused` to enable it
150
182
[CHECKING] bar v1.0.0
151
183
[RUNNING] `rustc --crate-name bar [..]`
0 commit comments