Remove std feature from cranelift-entity

This commit is contained in:
bjorn3
2019-09-28 15:46:03 +02:00
committed by Dan Gohman
parent d25e611946
commit a114423d0a
13 changed files with 20 additions and 32 deletions

View File

@@ -6,7 +6,7 @@ use crate::EntityRef;
use core::marker::PhantomData;
use core::ops::{Index, IndexMut};
use core::slice;
use std::boxed::Box;
use alloc::boxed::Box;
/// A slice mapping `K -> V` allocating dense entity references.
///
@@ -141,7 +141,7 @@ where
mod tests {
use super::*;
use crate::primary::PrimaryMap;
use std::vec::Vec;
use alloc::vec::Vec;
// `EntityRef` impl for testing.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]

View File

@@ -31,7 +31,6 @@
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
#![warn(unused_import_braces)]
#![cfg_attr(feature = "std", deny(unstable_features))]
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
#![cfg_attr(
feature = "cargo-clippy",
@@ -52,12 +51,7 @@
)]
#![no_std]
#[cfg(not(feature = "std"))]
#[macro_use]
extern crate alloc as std;
#[cfg(feature = "std")]
#[macro_use]
extern crate std;
extern crate alloc;
// Re-export core so that the macros works with both std and no_std crates
#[doc(hidden)]

View File

@@ -3,7 +3,7 @@ use crate::packed_option::ReservedValue;
use crate::EntityRef;
use core::marker::PhantomData;
use core::mem;
use std::vec::Vec;
use alloc::vec::Vec;
/// A small list of entity references allocated from a pool.
///

View File

@@ -13,7 +13,7 @@ use serde::{
ser::{SerializeSeq, Serializer},
Deserialize, Serialize,
};
use std::vec::Vec;
use alloc::vec::Vec;
/// A mapping `K -> V` for densely indexed entity references.
///
@@ -222,7 +222,7 @@ where
where
D: Deserializer<'de>,
{
use std::fmt;
use alloc::fmt;
struct SecondaryMapVisitor<K, V> {
unused: PhantomData<fn(K) -> V>,
}

View File

@@ -9,8 +9,8 @@ use core::ops::{Index, IndexMut};
use core::slice;
#[cfg(feature = "enable-serde")]
use serde::{Deserialize, Serialize};
use std::boxed::Box;
use std::vec::Vec;
use alloc::boxed::Box;
use alloc::vec::Vec;
/// A primary mapping `K -> V` allocating dense entity references.
///

View File

@@ -3,7 +3,7 @@
use crate::keys::Keys;
use crate::EntityRef;
use core::marker::PhantomData;
use std::vec::Vec;
use alloc::vec::Vec;
/// A set of `K` for densely indexed entity references.
///

View File

@@ -12,7 +12,7 @@ use crate::EntityRef;
use core::mem;
use core::slice;
use core::u32;
use std::vec::Vec;
use alloc::vec::Vec;
/// Trait for extracting keys from values stored in a `SparseMap`.
///