From 2afa501467ac0e7e73b65f67e7d4eec63f595c79 Mon Sep 17 00:00:00 2001 From: Kristofer Rye Date: Sun, 23 Dec 2018 16:57:34 -0600 Subject: [PATCH 1/3] Stop using #![feature(use_extern_macros)] This is done because it was stabilized in 1.30. --- src/lib.rs | 4 ++-- tests/injecting.rs | 2 +- tests/injecting_no_std.rs | 1 - tests/mocking.rs | 2 -- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 5f9e928..4c64d67 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(fn_traits, get_type_id, unboxed_closures, use_extern_macros)] +#![feature(fn_traits, get_type_id, unboxed_closures)] //! Mocking framework for Rust (currently only nightly) //! @@ -38,7 +38,7 @@ //! Enable procedural macros in crate root: //! //! ``` -//! #![cfg_attr(test, feature(proc_macro_mod, use_extern_macros))] +//! #![cfg_attr(test, feature(proc_macro_mod))] //! ``` //! Import Mocktopus: //! diff --git a/tests/injecting.rs b/tests/injecting.rs index 69b6a6a..15aa185 100644 --- a/tests/injecting.rs +++ b/tests/injecting.rs @@ -1,4 +1,4 @@ -#![feature(const_fn, proc_macro_gen, proc_macro_mod, use_extern_macros)] +#![feature(const_fn, proc_macro_gen, proc_macro_mod)] // Test if injecting works even if mocktopus is aliased extern crate mocktopus as mocktopus_aliased; diff --git a/tests/injecting_no_std.rs b/tests/injecting_no_std.rs index a7ee7ba..8d8ec25 100644 --- a/tests/injecting_no_std.rs +++ b/tests/injecting_no_std.rs @@ -1,4 +1,3 @@ -#![feature(use_extern_macros)] #![no_std] extern crate mocktopus; diff --git a/tests/mocking.rs b/tests/mocking.rs index b6bef84..9cebb7b 100644 --- a/tests/mocking.rs +++ b/tests/mocking.rs @@ -1,5 +1,3 @@ -#![feature(use_extern_macros)] - extern crate mocktopus; mod mocking_fns; From f9c8774547757b295f8c291a1b7d3534a511b6a7 Mon Sep 17 00:00:00 2001 From: Kristofer Rye Date: Sun, 23 Dec 2018 21:10:39 -0600 Subject: [PATCH 2/3] tests/injecting: Combine proc_macro_gen and proc_macro_mod features See commit d3c902f3113575b134641c14a9734b5075d06b09 in rust-lang/rust, which was released in version 1.30.0. (I think.) Cleans up a bunch of `cargo test` errors and allows CI to actually run. Signed-off-by: Kristofer Rye --- tests/injecting.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/injecting.rs b/tests/injecting.rs index 15aa185..83cb3b4 100644 --- a/tests/injecting.rs +++ b/tests/injecting.rs @@ -1,4 +1,4 @@ -#![feature(const_fn, proc_macro_gen, proc_macro_mod)] +#![feature(const_fn, proc_macro_hygiene)] // Test if injecting works even if mocktopus is aliased extern crate mocktopus as mocktopus_aliased; From 5ba38388040ef3c9c113d08ba57c57214be0fd87 Mon Sep 17 00:00:00 2001 From: Kristofer Rye Date: Sun, 23 Dec 2018 21:15:15 -0600 Subject: [PATCH 3/3] lib: Update documentation example for proc_macro_mod inclusion? I'm not even sure we need this, but since this feature gate hasn't been stabilized I guess we still need this. (If I remove #![feature(proc_macro_hygiene)] from the tests, the builds go red.) Signed-off-by: Kristofer Rye --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 4c64d67..ab20629 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,7 +38,7 @@ //! Enable procedural macros in crate root: //! //! ``` -//! #![cfg_attr(test, feature(proc_macro_mod))] +//! #![cfg_attr(test, feature(proc_macro_hygiene))] //! ``` //! Import Mocktopus: //!