about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-10-15 07:32:29 +0900
committerGitHub <noreply@github.com>2020-10-15 07:32:29 +0900
commit022d20759baa6ebc9dcbe803aec1f19216c47d7f (patch)
treed57199f3c4a32c27132387b159fbd01377c9fc05 /compiler/rustc_data_structures/src
parent35210a66edcbea56765493bb6e85e55659b21e59 (diff)
parent215cd36e1cff1806429806cb5be81f6d1a5f98b0 (diff)
downloadrust-022d20759baa6ebc9dcbe803aec1f19216c47d7f.tar.gz
rust-022d20759baa6ebc9dcbe803aec1f19216c47d7f.zip
Rollup merge of #77739 - est31:remove_unused_code, r=petrochenkov,varkor
Remove unused code

Rustc has a builtin lint for detecting unused code inside a crate, but when an item is marked `pub`, the code, even if unused inside the entire workspace, is never marked as such. Therefore, I've built [warnalyzer](https://github.com/est31/warnalyzer) to detect unused items in a cross-crate setting.

Closes https://github.com/est31/warnalyzer/issues/2
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/work_queue.rs6
1 files changed, 0 insertions, 6 deletions
diff --git a/compiler/rustc_data_structures/src/work_queue.rs b/compiler/rustc_data_structures/src/work_queue.rs
index 0c848eb144d..cc562bc1e4d 100644
--- a/compiler/rustc_data_structures/src/work_queue.rs
+++ b/compiler/rustc_data_structures/src/work_queue.rs
@@ -14,12 +14,6 @@ pub struct WorkQueue<T: Idx> {
 }
 
 impl<T: Idx> WorkQueue<T> {
-    /// Creates a new work queue with all the elements from (0..len).
-    #[inline]
-    pub fn with_all(len: usize) -> Self {
-        WorkQueue { deque: (0..len).map(T::new).collect(), set: BitSet::new_filled(len) }
-    }
-
     /// Creates a new work queue that starts empty, where elements range from (0..len).
     #[inline]
     pub fn with_none(len: usize) -> Self {