From dd3d0f1fedc19bbea2795bb63b9ce623618f4e31 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 26 Oct 2014 15:09:56 -0700 Subject: [PATCH] Drop libstd requirement --- phf/src/lib.rs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/phf/src/lib.rs b/phf/src/lib.rs index 4b9d1aad..0258419f 100644 --- a/phf/src/lib.rs +++ b/phf/src/lib.rs @@ -4,17 +4,28 @@ //! literals, or any of the fixed-size integral types. #![doc(html_root_url="https://sfackler.github.io/doc")] #![warn(missing_doc)] -#![feature(macro_rules, tuple_indexing)] +#![feature(macro_rules, tuple_indexing, phase, globs)] +#![no_std] -use std::fmt; -use std::iter; -use std::slice; +#[phase(plugin, link)] +extern crate core; +extern crate collections; + +use core::fmt; +use core::iter; +use core::slice; +use core::prelude::*; +use collections::{Map, Set}; pub use shared::PhfHash; #[path="../../shared/mod.rs"] mod shared; +mod std { + pub use core::fmt; +} + /// An immutable map constructed at compile time. /// /// `PhfMap`s may be created with the `phf_map` macro: