Skip to content

Commit

Permalink
Merge #54
Browse files Browse the repository at this point in the history
54: derive: Remove proc_macro crate feature r=taiki-e a=taiki-e

This is potentially unstable because it uses `quote` crate's internal API

Co-authored-by: Taiki Endo <te316e89@gmail.com>
  • Loading branch information
bors[bot] and taiki-e authored Aug 30, 2019
2 parents 60299cb + 5e867fb commit 7a4a945
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 47 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Unreleased

* [Removed `"proc_macro"` crate feature.][54]

[54]: https://github.com/taiki-e/auto_enums/pull/54

# 0.6.0-alpha.1 - 2019-08-24

* Renamed `#[rec]` to `#[nested]`.
Expand Down
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ futures = ["auto_enums_derive/futures"]
# futures(v0.1)
futures01 = ["auto_enums_derive/futures01"]

# proc_macro, proc-macro2, quote, syn
proc_macro = ["auto_enums_derive/proc_macro"]

# rayon
rayon = ["auto_enums_derive/rayon"]

Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,6 @@ You can add support for external library by activating the each crate feature.
* [`futures01::Stream`](https://docs.rs/futures/0.1/futures/stream/trait.Stream.html)
* [`futures01::Sink`](https://docs.rs/futures/0.1/futures/sink/trait.Sink.html)

[`quote`](https://github.com/dtolnay/quote) *(requires `"proc_macro"` crate feature)*

* [`quote::ToTokens`](https://docs.rs/quote/1.0/quote/trait.ToTokens.html)

[`rayon`](https://github.com/rayon-rs/rayon) *(requires `"rayon"` crate feature)*

* [`rayon::ParallelIterator`](https://docs.rs/rayon/1.0/rayon/iter/trait.ParallelIterator.html) - [generated code](docs/supported_traits/external/rayon/ParallelIterator.md)
Expand Down
3 changes: 0 additions & 3 deletions derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ futures = []
# futures(v0.1)
futures01 = []

# proc_macro, proc-macro2, quote, syn
proc_macro = []

# rayon
rayon = []

Expand Down
3 changes: 0 additions & 3 deletions derive/src/derive/external/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ pub(crate) mod futures;
#[cfg(feature = "futures01")]
pub(crate) mod futures01;

#[cfg(feature = "proc_macro")]
pub(crate) mod proc_macro;

#[cfg(feature = "rayon")]
pub(crate) mod rayon;

Expand Down
1 change: 0 additions & 1 deletion derive/src/derive/external/proc_macro/mod.rs

This file was deleted.

21 changes: 0 additions & 21 deletions derive/src/derive/external/proc_macro/to_tokens.rs

This file was deleted.

3 changes: 0 additions & 3 deletions derive/src/enum_derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,6 @@ lazy_static! {
external::futures01::stream,
#[cfg(feature = "futures01")]
external::futures01::sink,
// proc_macro
#[cfg(feature = "proc_macro")]
external::proc_macro::to_tokens,
// rayon
#[cfg(feature = "rayon")]
external::rayon::par_iter,
Expand Down
6 changes: 0 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -669,10 +669,6 @@
//! * [`futures01::Stream`](https://docs.rs/futures/0.1/futures/stream/trait.Stream.html)
//! * [`futures01::Sink`](https://docs.rs/futures/0.1/futures/sink/trait.Sink.html)
//!
//! [`quote`](https://github.com/dtolnay/quote) *(requires `"proc_macro"` crate feature)*
//!
//! * [`quote::ToTokens`](https://docs.rs/quote/0.6/quote/trait.ToTokens.html)
//!
//! [`rayon`](https://github.com/rayon-rs/rayon) *(requires `"rayon"` crate feature)*
//!
//! * [`rayon::ParallelIterator`](https://docs.rs/rayon/1.0/rayon/iter/trait.ParallelIterator.html) - [generated code](https://github.com/taiki-e/auto_enums/blob/master/docs/supported_traits/external/rayon/ParallelIterator.md)
Expand Down Expand Up @@ -780,8 +776,6 @@
//!
//! * `futures01` - [futures(v0.1)](https://github.com/rust-lang-nursery/futures-rs)
//!
//! * `proc_macro` - [quote](https://github.com/dtolnay/quote)
//!
//! * `rayon` - [rayon](https://github.com/rayon-rs/rayon)
//!
//! * `serde` - [serde](https://github.com/serde-rs/serde)
Expand Down
2 changes: 0 additions & 2 deletions test_suite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ publish = false
[dev-dependencies]
auto_enums = { path = "..", default-features = false }
futures-preview = "0.3.0-alpha.18"
quote = "1.0"
rand = "0.7" # for benches
rayon = "1.1"
serde = "1.0"
Expand All @@ -23,7 +22,6 @@ type_analysis = ["auto_enums/type_analysis"]
external_libraries = [
"auto_enums/std",
"auto_enums/futures",
"auto_enums/proc_macro",
"auto_enums/rayon",
"auto_enums/serde",
]
Expand Down
1 change: 0 additions & 1 deletion test_suite/tests/external_libraries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use auto_enums::enum_derive;
#[test]
fn stable_external() {
#[enum_derive(
quote::ToTokens,
rayon::ParallelIterator,
rayon::IndexedParallelIterator,
rayon::ParallelExtend,
Expand Down

0 comments on commit 7a4a945

Please sign in to comment.