about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-09-18 03:52:39 +0000
committerbors <bors@rust-lang.org>2018-09-18 03:52:39 +0000
commitb80cb47889e0ad9400b6708ce2b4c4b364b71982 (patch)
treeca70c0600050ce729db297996e4b4a701c0dcaad /src/libsyntax
parent2224a42c353636db6ee53cc3f9b1a968e9d9c1f6 (diff)
parent53589b7e4ea36927f2f58c30a23df427f3560f06 (diff)
downloadrust-b80cb47889e0ad9400b6708ce2b4c4b364b71982.tar.gz
rust-b80cb47889e0ad9400b6708ce2b4c4b364b71982.zip
Auto merge of #54286 - nnethercote:BitSet, r=pnkfelix
Merge `bitvec.rs` and `indexed_set.rs`

Because it's not good to have two separate implementations. Also, I will combine the best parts of each to improve NLL memory usage on some benchmarks significantly.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/lib.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs
index 2aaab6aaa16..68b46841718 100644
--- a/src/libsyntax/lib.rs
+++ b/src/libsyntax/lib.rs
@@ -46,7 +46,7 @@ extern crate smallvec;
 extern crate serialize as rustc_serialize; // used by deriving
 
 use rustc_data_structures::sync::Lock;
-use rustc_data_structures::bitvec::BitVector;
+use rustc_data_structures::bit_set::GrowableBitSet;
 pub use rustc_data_structures::small_vec::OneVector;
 pub use rustc_data_structures::thin_vec::ThinVec;
 use ast::AttrId;
@@ -82,8 +82,8 @@ macro_rules! unwrap_or {
 }
 
 pub struct Globals {
-    used_attrs: Lock<BitVector<AttrId>>,
-    known_attrs: Lock<BitVector<AttrId>>,
+    used_attrs: Lock<GrowableBitSet<AttrId>>,
+    known_attrs: Lock<GrowableBitSet<AttrId>>,
     syntax_pos_globals: syntax_pos::Globals,
 }
 
@@ -92,8 +92,8 @@ impl Globals {
         Globals {
             // We have no idea how many attributes their will be, so just
             // initiate the vectors with 0 bits. We'll grow them as necessary.
-            used_attrs: Lock::new(BitVector::new()),
-            known_attrs: Lock::new(BitVector::new()),
+            used_attrs: Lock::new(GrowableBitSet::new_empty()),
+            known_attrs: Lock::new(GrowableBitSet::new_empty()),
             syntax_pos_globals: syntax_pos::Globals::new(),
         }
     }