diff options
| author | bors <bors@rust-lang.org> | 2017-08-27 10:02:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-08-27 10:02:51 +0000 |
| commit | 78e95bb7ac92f8f92654705a47cef652b6a0b259 (patch) | |
| tree | a0d4ee18cfe588ccfc8ad76f5b91b70a03d1da30 /src/libstd | |
| parent | 93cdf5e3c45a0578c79afe8563065d07e5f6984f (diff) | |
| parent | a91bdf4ad558b3cf7b2a0230df15d83a6a686397 (diff) | |
| download | rust-78e95bb7ac92f8f92654705a47cef652b6a0b259.tar.gz rust-78e95bb7ac92f8f92654705a47cef652b6a0b259.zip | |
Auto merge of #42588 - ishitatsuyuki:patch-1, r=petrochenkov
Make unused-extern-crate warn-by-default Apart from enabling the lint, this pull request also removes existing unused crates in the codebase, and fix some amount of false positives on crates with special purposes. Now that all false positive issues are closed, it should be possible to make it available to wider users. Quote: > Now that macro modularization is implemented, this is true today! *https://github.com/rust-lang/rust/issues/30849#issuecomment-286573218* Concerns: can break some `#[deny(warnings)]`. Close #42591
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/lib.rs | 1 | ||||
| -rw-r--r-- | src/libstd/prelude/mod.rs | 1 | ||||
| -rw-r--r-- | src/libstd/sys/unix/ext/fs.rs | 2 |
3 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index cf1eb5cd52e..b57067e35e9 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -358,6 +358,7 @@ extern crate std_unicode; extern crate libc; // We always need an unwinder currently for backtraces +#[allow(unused_extern_crates)] extern crate unwind; // compiler-rt intrinsics diff --git a/src/libstd/prelude/mod.rs b/src/libstd/prelude/mod.rs index 49cdba21a1d..538753d8692 100644 --- a/src/libstd/prelude/mod.rs +++ b/src/libstd/prelude/mod.rs @@ -23,6 +23,7 @@ //! On a technical level, Rust inserts //! //! ``` +//! # #[allow(unused_extern_crates)] //! extern crate std; //! ``` //! diff --git a/src/libstd/sys/unix/ext/fs.rs b/src/libstd/sys/unix/ext/fs.rs index a94585723a1..f44b9aa9615 100644 --- a/src/libstd/sys/unix/ext/fs.rs +++ b/src/libstd/sys/unix/ext/fs.rs @@ -154,8 +154,6 @@ pub trait OpenOptionsExt { /// # Examples /// /// ```no_run - /// # #![feature(libc)] - /// extern crate libc; /// use std::fs::OpenOptions; /// use std::os::unix::fs::OpenOptionsExt; /// |
