Skip to content

Commit

Permalink
Convert phf_macros to new-style proc-macros
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Jan 2, 2019
1 parent 0d36453 commit 5ae4131
Show file tree
Hide file tree
Showing 7 changed files with 235 additions and 623 deletions.
24 changes: 7 additions & 17 deletions phf_macros/Cargo.toml
@@ -1,30 +1,20 @@
[package]
name = "phf_macros"
version = "0.1.0"
authors = ["Steven Fackler <sfackler@gmail.com>"]
version = "0.7.23"
license = "MIT"
description = "Compiler plugin for perfect hash function data structures"
repository = "https://github.com/sfackler/rust-phf"
documentation = "https://docs.rs/phf_macros/0.7.23/phf_macros"
edition = "2018"

[lib]
name = "phf_macros"
path = "src/lib.rs"
plugin = true
test = false

[features]
unicase_support = ["unicase", "phf_shared/unicase"]

# Deprecated
stats = []
proc-macro = true

[dependencies]
syn = { version = "0.15", features = ["full", "extra-traits"] }
quote = "0.6"
proc-macro2 = "0.4"

phf_generator = { version = "=0.7.23", path = "../phf_generator" }
phf_shared = { version = "=0.7.23", path = "../phf_shared" }
unicase = { version = "1.4", optional = true }

[dev-dependencies]
compiletest_rs = "0.3"
phf = { version = "0.7.23", path = "../phf" }

6 changes: 2 additions & 4 deletions phf_macros/benches/bench.rs
@@ -1,13 +1,11 @@
#![feature(plugin, test)]
#![plugin(phf_macros)]
#![feature(test, proc_macro_hygiene)]

extern crate test;
extern crate phf;

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

use phf_macros::phf_map;
use phf;

macro_rules! map_and_match {
Expand Down

0 comments on commit 5ae4131

Please sign in to comment.