File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,36 @@ Caused by:
148
148
. run ( ) ;
149
149
}
150
150
151
+ #[ cargo_test]
152
+ fn warn_on_unused_key ( ) {
153
+ let foo = project ( )
154
+ . file (
155
+ "Cargo.toml" ,
156
+ r#"
157
+ [package]
158
+ name = "foo"
159
+ version = "0.0.1"
160
+
161
+ [workspace.lints.rust]
162
+ rust-2018-idioms = { level = "allow", unused = true }
163
+ [lints.rust]
164
+ rust-2018-idioms = { level = "allow", unused = true }
165
+ "# ,
166
+ )
167
+ . file ( "src/lib.rs" , "" )
168
+ . build ( ) ;
169
+
170
+ foo. cargo ( "check" )
171
+ . with_stderr (
172
+ "\
173
+ [WARNING] [CWD]/Cargo.toml: unused manifest key: workspace.lints.rust.rust-2018-idioms.unused
174
+ [CHECKING] foo v0.0.1 ([CWD])
175
+ [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
176
+ " ,
177
+ )
178
+ . run ( ) ;
179
+ }
180
+
151
181
#[ cargo_test]
152
182
fn fail_on_tool_injection ( ) {
153
183
let foo = project ( )
You can’t perform that action at this time.
0 commit comments