diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-07-01 00:27:44 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-07-05 17:18:45 +0200 |
| commit | 1ff7f04120f11e4d15a6dad40417551873bf8ff2 (patch) | |
| tree | a0f919231e898d9fd5d324f8ce51cc567cebd584 /src/test/rustdoc-ui | |
| parent | 94eb1760551096363ec04e42367b6b195592dbd8 (diff) | |
| download | rust-1ff7f04120f11e4d15a6dad40417551873bf8ff2.tar.gz rust-1ff7f04120f11e4d15a6dad40417551873bf8ff2.zip | |
Fix rustdoc run failures by shutting down definitely some lints
Diffstat (limited to 'src/test/rustdoc-ui')
| -rw-r--r-- | src/test/rustdoc-ui/unused.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/unused.rs b/src/test/rustdoc-ui/unused.rs new file mode 100644 index 00000000000..8b530986392 --- /dev/null +++ b/src/test/rustdoc-ui/unused.rs @@ -0,0 +1,24 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// compile-pass + +// This test purpose is to check that unused_imports lint isn't fired +// by rustdoc. Why would it? Because when rustdoc is running, it uses +// "everybody-loops" which replaces parts of code with "loop {}" to get +// huge performance improvements. + +#![deny(unused_imports)] + +use std::fs::File; + +pub fn f() { + let _: File; +} |
