Skip to content

Commit 0bc993c

Browse files
committed
Auto merge of #26734 - Gankro:deprecate-vecmap, r=alexcrichton
VecMap doesn't really fit with the current standard library's strategy (small!). I've mirrored the code to https://github.com/contain-rs/vec-map but @GBGamer has already claimed the name on crates.io a couple months ago for the same purpose. It hasn't been updated since, though. CC @rust-lang/libs
2 parents 4d52d7c + 2907611 commit 0bc993c

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

src/libcollections/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ pub use enum_set::EnumSet;
8787
pub use vec_deque::VecDeque;
8888
pub use string::String;
8989
pub use vec::Vec;
90+
#[allow(deprecated)]
9091
pub use vec_map::VecMap;
9192

9293
// Needed for the vec! macro
@@ -108,6 +109,7 @@ pub mod str;
108109
pub mod string;
109110
pub mod vec;
110111
pub mod vec_deque;
112+
#[allow(deprecated)]
111113
pub mod vec_map;
112114

113115
#[unstable(feature = "bitvec", reason = "RFC 509")]

src/libcollections/vec_map.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
//! A simple map based on a vector for small integer keys. Space requirements
1212
//! are O(highest integer key).
1313
14+
#![deprecated(reason = "VecMap moved to crates.io as vec_map",
15+
since = "1.3.0")]
16+
#![unstable(feature = "vecmap", reason = "deprecated")]
17+
#![allow(deprecated)]
18+
1419
#![allow(missing_docs)]
15-
#![unstable(feature = "vecmap",
16-
reason = "may not be stabilized in the standard library")]
1720

1821
use self::Entry::*;
1922

src/libserialize/collection_impls.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// VecMap
12+
#![allow(deprecated)]
13+
1114
//! Implementations of serialization for structures found in libcollections
1215
1316
use std::usize;

0 commit comments

Comments
 (0)