Skip to content

Commit

Permalink
proc_macro_hygiene is not needed with proc-macro-hack
Browse files Browse the repository at this point in the history
  • Loading branch information
abonander committed Jul 7, 2019
1 parent f6407a0 commit ab473a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,20 @@ a compiler note about how long it took.
Usage
=====

PHF data structures can be constucted via either the compiler plugins in the
`phf_macros` crate or code generation supported by the `phf_codegen` crate.
Compiler plugins are not a stable part of Rust at the moment, so `phf_macros`
can only be used with nightlies.
##### Release 0.8.0 requires Rust 1.32.0

The `phf/core` feature will compile the `phf` crate with a dependency on libcore instead of libstd, enabling use in environments where libstd will not work.
PHF data structures can be constucted via either the procedural
macros in the `phf_macros` crate or code generation supported by the
`phf_codegen` crate.

The `phf/core` feature will compile the `phf` crate with a dependency on
libcore instead of libstd, enabling use in environments where libstd
will not work.

phf_macros
===========

```rust
#![feature(proc_macro_hygiene)]

use phf::phf_map;

#[derive(Clone)]
Expand Down
5 changes: 2 additions & 3 deletions phf_macros/benches/bench.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#![feature(test, proc_macro_hygiene)]
#![feature(test)]

extern crate test;

mod map {
use std::collections::{BTreeMap, HashMap};
use test::Bencher;
use phf_macros::phf_map;
use phf;
use phf::phf_map;

macro_rules! map_and_match {
($map:ident, $f:ident, $($key:expr => $value:expr,)+) => {
Expand Down
2 changes: 0 additions & 2 deletions phf_macros/tests/test.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(proc_macro_hygiene)]

mod map {
use std::collections::{HashMap, HashSet};
use phf::phf_map;
Expand Down

0 comments on commit ab473a4

Please sign in to comment.