Skip to content

Commit 4aeda22

Browse files
committed
rustdoc: test ignoring rustc lints in CLI
1 parent 88ba7fb commit 4aeda22

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/rustdoc-ui/lints/unused.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
//@ revisions: unused_attr unused_cli
2+
//@[unused_cli] compile-flags: -Dunused_imports
13
//@ check-pass
24

35
// This test purpose is to check that unused_imports lint isn't fired
46
// by rustdoc. Why would it? Because when rustdoc is running, it uses
57
// "everybody-loops" which replaces parts of code with "loop {}" to get
68
// huge performance improvements.
79

8-
#![deny(unused_imports)]
10+
#![cfg_attr(unused_attr, deny(unused_imports))]
911

1012
use std::fs::File;
1113

0 commit comments

Comments
 (0)