|
12 | 12 | //! [`IndexSet`]: set/struct.IndexSet.html
|
13 | 13 | //!
|
14 | 14 | //!
|
| 15 | +//! |
15 | 16 | //! ## Rust Version
|
16 | 17 | //!
|
17 | 18 | //! This version of indexmap requires Rust 1.18 or later, or 1.30+ for
|
18 |
| -//! development builds. |
| 19 | +//! development builds, and Rust 1.36+ for using with `alloc` (without `std`), |
| 20 | +//! see below. |
19 | 21 | //!
|
20 | 22 | //! The indexmap 1.x release series will use a carefully considered version
|
21 | 23 | //! upgrade policy, where in a later 1.x version, we will raise the minimum
|
22 | 24 | //! required Rust version.
|
| 25 | +//! |
| 26 | +//! ## No Standard Library Targets |
| 27 | +//! |
| 28 | +//! From Rust 1.36, this crate supports being built without `std`, requiring |
| 29 | +//! `alloc` instead. This is enabled automatically when it is detected that |
| 30 | +//! `std` is not available. There is no crate feature to enable/disable to |
| 31 | +//! trigger this. It can be tested by building for a std-less target. |
| 32 | +//! |
| 33 | +//! - Creating maps and sets using [`new`][IndexMap::new] and |
| 34 | +//! [`with_capacity`][IndexMap::with_capacity] is unavailable without `std`. |
| 35 | +//! Use methods [`IndexMap::default`][def], |
| 36 | +//! [`with_hasher`][IndexMap::with_hasher], |
| 37 | +//! [`with_capacity_and_hasher`][IndexMap::with_capacity_and_hasher] instead. |
| 38 | +//! A no-std compatible hasher will be needed as well, for example |
| 39 | +//! from the crate `twox-hash`. |
| 40 | +//! - Macros [`indexmap!`] and [`indexset!`] are unavailable without `std`. |
| 41 | +//! |
| 42 | +//! [def]: map/struct.IndexMap.html#impl-Default |
23 | 43 |
|
24 | 44 | #[cfg(not(has_std))]
|
25 | 45 | #[macro_use(vec)]
|
|
0 commit comments