From ba402328f0c32ae9417fe2773ac320cc36f1d80e Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Wed, 2 Nov 2016 14:47:11 +0100 Subject: [PATCH] Use heapsize_derive --- Cargo.toml | 4 ++-- atoms/Cargo.toml | 4 ++-- atoms/lib.rs | 4 ++-- src/lib.rs | 7 +++---- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6b649557..7dc3d667 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ harness = false [features] unstable = ["tendril/unstable"] -heap_size = ["heapsize", "heapsize_plugin"] +heap_size = ["heapsize", "heapsize_derive", "html5ever-atoms/heap_size"] [dependencies] log = "0" @@ -40,7 +40,7 @@ phf = "0.7" mac = "0" tendril = "0.2.2" heapsize = { version = "0.3", optional = true } -heapsize_plugin = { version = "0.1.0", optional = true } +heapsize_derive = { version = "0.1", optional = true } html5ever-atoms = { version = "0.1", path = "./atoms" } [dev-dependencies] diff --git a/atoms/Cargo.toml b/atoms/Cargo.toml index 3478201d..d4ca2008 100644 --- a/atoms/Cargo.toml +++ b/atoms/Cargo.toml @@ -12,12 +12,12 @@ build = "build.rs" path = "lib.rs" [features] -heap_size = ["heapsize", "heapsize_plugin"] +heap_size = ["heapsize", "heapsize_derive", "string_cache/heap_size"] [dependencies] string_cache = "0.3" heapsize = { version = "0.3", optional = true } -heapsize_plugin = { version = "0.1.0", optional = true } +heapsize_derive = { version = "0.1", optional = true } [build-dependencies] string_cache_codegen = "0.3" diff --git a/atoms/lib.rs b/atoms/lib.rs index 08975a0f..29535368 100644 --- a/atoms/lib.rs +++ b/atoms/lib.rs @@ -7,8 +7,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![cfg_attr(feature = "heap_size", feature(plugin, custom_derive))] -#![cfg_attr(feature = "heap_size", plugin(heapsize_plugin))] +#![cfg_attr(feature = "heap_size", feature(proc_macro))] +#[cfg(feature = "heap_size")] #[macro_use] extern crate heapsize_derive; #[cfg(feature = "heap_size")] extern crate heapsize; extern crate string_cache; diff --git a/src/lib.rs b/src/lib.rs index 5d641969..991e579d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,10 +13,9 @@ #![cfg_attr(test, deny(warnings))] #![allow(unused_parens)] -#![cfg_attr(feature = "heap_size", feature(plugin, custom_derive))] -#![cfg_attr(feature = "heap_size", plugin(heapsize_plugin))] -#[cfg(feature = "heap_size")] -extern crate heapsize; +#![cfg_attr(feature = "heap_size", feature(proc_macro))] +#[cfg(feature = "heap_size")] #[macro_use] extern crate heapsize_derive; +#[cfg(feature = "heap_size")] extern crate heapsize; #[macro_use] extern crate log;