@@ -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" ,
@@ -41,6 +56,9 @@ fn unknown_hints_warn() {
4156 version = "0.0.1"
4257 edition = "2015"
4358
59+ [dependencies]
60+ bar = "1.0"
61+
4462 [hints]
4563 this-is-an-unknown-hint = true
4664 "# ,
@@ -50,6 +68,12 @@ fn unknown_hints_warn() {
5068 p. cargo ( "check -v" )
5169 . with_stderr_data ( str![ [ r#"
5270[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 [..]`
5377[CHECKING] foo v0.0.1 ([ROOT]/foo)
5478[RUNNING] `rustc --crate-name foo [..]`
5579[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -86,6 +110,9 @@ fn hint_unknown_type_warn() {
86110
87111 [dependencies]
88112 bar = "1.0"
113+
114+ [hints]
115+ mostly-unused = "string"
89116 "# ,
90117 )
91118 . file ( "src/main.rs" , "fn main() {}" )
@@ -96,6 +123,7 @@ fn hint_unknown_type_warn() {
96123[LOCKING] 1 package to latest compatible version
97124[DOWNLOADING] crates ...
98125[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
99127[WARNING] bar@1.0.0: ignoring unsupported value type (integer) for 'hints.mostly-unused', which expects a boolean
100128[CHECKING] bar v1.0.0
101129[RUNNING] `rustc --crate-name bar [..]`
@@ -136,6 +164,9 @@ fn hints_mostly_unused_warn_without_gate() {
136164
137165 [dependencies]
138166 bar = "1.0"
167+
168+ [hints]
169+ mostly-unused = true
139170 "# ,
140171 )
141172 . file ( "src/main.rs" , "fn main() {}" )
@@ -146,6 +177,7 @@ fn hints_mostly_unused_warn_without_gate() {
146177[LOCKING] 1 package to latest compatible version
147178[DOWNLOADING] crates ...
148179[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
149181[WARNING] bar@1.0.0: ignoring 'hints.mostly-unused', pass `-Zprofile-hint-mostly-unused` to enable it
150182[CHECKING] bar v1.0.0
151183[RUNNING] `rustc --crate-name bar [..]`
0 commit comments