Skip to content

Commit 8a599c8

Browse files
committed
Auto merge of #26034 - Gankro:deprecate-bits, r=alexcrichton
I've mirrored them out to crates (bit-vec and bit-set) that build on stable. (not sure if this actually correctly deprecates them in std)
2 parents 9d67b9f + 7850c8d commit 8a599c8

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

src/libcollections/bit.rs

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![deprecated(reason = "BitVec and BitSet have been migrated to cargo as bit-vec and bit-set",
12+
since = "1.3.0")]
13+
#![unstable(feature = "collections", reason = "deprecated")]
14+
#![allow(deprecated)]
15+
1116
// FIXME(Gankro): BitVec and BitSet are very tightly coupled. Ideally (for
1217
// maintenance), they should be in separate files/modules, with BitSet only
1318
// using BitVec's public API. This will be hard for performance though, because

src/libcollections/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ extern crate alloc;
7777
#[cfg(test)] extern crate test;
7878

7979
pub use binary_heap::BinaryHeap;
80+
#[allow(deprecated)]
8081
pub use bit_vec::BitVec;
82+
#[allow(deprecated)]
8183
pub use bit_set::BitSet;
8284
pub use btree_map::BTreeMap;
8385
pub use btree_set::BTreeSet;
@@ -111,11 +113,13 @@ pub mod vec_map;
111113

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

117120
#[unstable(feature = "bitset", reason = "RFC 509")]
118121
pub mod bit_set {
122+
#![allow(deprecated)]
119123
pub use bit::{BitSet, Union, Intersection, Difference, SymmetricDifference};
120124
pub use bit::SetIter as Iter;
121125
}

src/librustc_lint/builtin.rs

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
//! Use the former for unit-like structs and the latter for structs with
2929
//! a `pub fn new()`.
3030
31+
// BitSet
32+
#![allow(deprecated)]
33+
3134
use metadata::{csearch, decoder};
3235
use middle::def::*;
3336
use middle::mem_categorization::Typer;

src/libsyntax/attr.rs

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010

1111
// Functions dealing with attributes and meta items
1212

13+
// BitSet
14+
#![allow(deprecated)]
15+
1316
pub use self::StabilityLevel::*;
1417
pub use self::ReprAttr::*;
1518
pub use self::IntType::*;

0 commit comments

Comments
 (0)