Remove std feature from cranelift-bforest
This commit is contained in:
@@ -14,11 +14,6 @@ edition = "2018"
|
||||
[dependencies]
|
||||
cranelift-entity = { path = "../cranelift-entity", version = "0.44.0", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
std = ["cranelift-entity/std"]
|
||||
core = []
|
||||
|
||||
[badges]
|
||||
maintenance = { status = "experimental" }
|
||||
travis-ci = { repository = "CraneStation/cranelift" }
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
|
||||
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
|
||||
#![warn(unused_import_braces)]
|
||||
#![cfg_attr(feature = "std", warn(unstable_features))]
|
||||
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::new_without_default))]
|
||||
#![cfg_attr(
|
||||
@@ -34,13 +33,8 @@
|
||||
#![no_std]
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(not(feature = "std"))]
|
||||
#[macro_use]
|
||||
extern crate alloc as std;
|
||||
#[cfg(test)]
|
||||
#[cfg(feature = "std")]
|
||||
#[macro_use]
|
||||
extern crate std;
|
||||
extern crate alloc;
|
||||
|
||||
#[macro_use]
|
||||
extern crate cranelift_entity as entity;
|
||||
|
||||
@@ -231,7 +231,7 @@ where
|
||||
|
||||
/// Get a text version of the path to `key`.
|
||||
fn tpath<C: Comparator<K>>(&self, key: K, forest: &MapForest<K, V>, comp: &C) -> String {
|
||||
use std::string::ToString;
|
||||
use alloc::string::ToString;
|
||||
match self.root.expand() {
|
||||
None => "map(empty)".to_string(),
|
||||
Some(root) => {
|
||||
@@ -420,7 +420,7 @@ where
|
||||
|
||||
/// Get a text version of the path to the current position.
|
||||
fn tpath(&self) -> String {
|
||||
use std::string::ToString;
|
||||
use alloc::string::ToString;
|
||||
self.path.to_string()
|
||||
}
|
||||
}
|
||||
@@ -430,7 +430,7 @@ mod tests {
|
||||
use super::super::NodeData;
|
||||
use super::*;
|
||||
use core::mem;
|
||||
use std::vec::Vec;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
#[test]
|
||||
fn node_size() {
|
||||
|
||||
@@ -585,7 +585,7 @@ where
|
||||
mod tests {
|
||||
use super::*;
|
||||
use core::mem;
|
||||
use std::string::ToString;
|
||||
use alloc::string::ToString;
|
||||
|
||||
// Forest impl for a set implementation.
|
||||
struct TF();
|
||||
|
||||
@@ -86,7 +86,7 @@ impl<F: Forest> NodePool<F> {
|
||||
use crate::entity::EntitySet;
|
||||
use core::borrow::Borrow;
|
||||
use core::cmp::Ordering;
|
||||
use std::vec::Vec;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
// The root node can't be an inner node with just a single sub-tree. It should have been
|
||||
// pruned.
|
||||
|
||||
@@ -6,7 +6,7 @@ use crate::packed_option::PackedOption;
|
||||
use core::fmt;
|
||||
use core::marker::PhantomData;
|
||||
#[cfg(test)]
|
||||
use std::string::String;
|
||||
use alloc::string::String;
|
||||
|
||||
/// Tag type defining forest types for a set.
|
||||
struct SetTypes<K>(PhantomData<K>);
|
||||
@@ -321,7 +321,7 @@ where
|
||||
|
||||
/// Get a text version of the path to the current position.
|
||||
fn tpath(&self) -> String {
|
||||
use std::string::ToString;
|
||||
use alloc::string::ToString;
|
||||
self.path.to_string()
|
||||
}
|
||||
}
|
||||
@@ -358,7 +358,7 @@ mod tests {
|
||||
use super::super::NodeData;
|
||||
use super::*;
|
||||
use core::mem;
|
||||
use std::vec::Vec;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
#[test]
|
||||
fn node_size() {
|
||||
|
||||
@@ -15,7 +15,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
cranelift-codegen-shared = { path = "./shared", version = "0.44.0" }
|
||||
cranelift-entity = { path = "../cranelift-entity", version = "0.44.0", default-features = false }
|
||||
cranelift-bforest = { path = "../cranelift-bforest", version = "0.44.0", default-features = false }
|
||||
cranelift-bforest = { path = "../cranelift-bforest", version = "0.44.0" }
|
||||
failure = { version = "0.1.1", default-features = false, features = ["derive"] }
|
||||
failure_derive = { version = "0.1.1", default-features = false }
|
||||
hashbrown = { version = "0.6", optional = true }
|
||||
@@ -39,7 +39,6 @@ default = ["std"]
|
||||
# features need to be enabled.
|
||||
std = [
|
||||
"cranelift-entity/std",
|
||||
"cranelift-bforest/std",
|
||||
"cranelift-codegen-meta/std"
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user