Skip to content

deprecate BitSet and BitVec #26034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 1, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/libcollections/bit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deprecated(reason = "BitVec and BitSet have been migrated to cargo as bit-vec and bit-set",
since = "1.3.0")]
#![unstable(feature = "collections", reason = "deprecated")]
#![allow(deprecated)]

// FIXME(Gankro): BitVec and BitSet are very tightly coupled. Ideally (for
// maintenance), they should be in separate files/modules, with BitSet only
// using BitVec's public API. This will be hard for performance though, because
Expand Down
4 changes: 4 additions & 0 deletions src/libcollections/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ extern crate alloc;
#[cfg(test)] extern crate test;

pub use binary_heap::BinaryHeap;
#[allow(deprecated)]
pub use bit_vec::BitVec;
#[allow(deprecated)]
pub use bit_set::BitSet;
pub use btree_map::BTreeMap;
pub use btree_set::BTreeSet;
Expand Down Expand Up @@ -111,11 +113,13 @@ pub mod vec_map;

#[unstable(feature = "bitvec", reason = "RFC 509")]
pub mod bit_vec {
#![allow(deprecated)]
pub use bit::{BitVec, Iter};
}

#[unstable(feature = "bitset", reason = "RFC 509")]
pub mod bit_set {
#![allow(deprecated)]
pub use bit::{BitSet, Union, Intersection, Difference, SymmetricDifference};
pub use bit::SetIter as Iter;
}
Expand Down
3 changes: 3 additions & 0 deletions src/librustc_lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
//! Use the former for unit-like structs and the latter for structs with
//! a `pub fn new()`.

// BitSet
#![allow(deprecated)]

use metadata::{csearch, decoder};
use middle::def::*;
use middle::mem_categorization::Typer;
Expand Down
3 changes: 3 additions & 0 deletions src/libsyntax/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

// Functions dealing with attributes and meta items

// BitSet
#![allow(deprecated)]

pub use self::StabilityLevel::*;
pub use self::ReprAttr::*;
pub use self::IntType::*;
Expand Down