diff --git a/Cargo.lock b/Cargo.lock index 4c8d7d9d0..a54325254 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -737,16 +737,6 @@ dependencies = [ "proc-macro-hack-impl 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.35 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "proc-macro-hack-impl" version = "0.3.3" @@ -1040,7 +1030,6 @@ name = "rustpython-derive" version = "0.1.0" dependencies = [ "bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "rustpython-bytecode 0.1.0", @@ -1091,7 +1080,6 @@ dependencies = [ "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)", "pwd 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.1.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2027,7 +2015,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" "checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" "checksum proc-macro-hack 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b773f824ff2a495833f85fcdddcf85e096949971decada2e93249fa2c6c3d32f" -"checksum proc-macro-hack 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)" = "0c1dd4172a1e1f96f709341418f49b11ea6c2d95d53dca08c0f74cbd332d9cf3" "checksum proc-macro-hack-impl 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0f674ccc446da486175527473ec8aa064f980b0966bbf767ee743a5dff6244a7" "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" "checksum pwd 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5dd32d8bece608e144ca20251e714ed107cdecdabb20c2d383cfc687825106a5" diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 87e7cd1be..c0a6dbe12 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -17,4 +17,3 @@ proc-macro2 = "0.4.27" rustpython-compiler = { path = "../compiler", version = "0.1.0" } rustpython-bytecode = { path = "../bytecode", version = "0.1.0" } bincode = "1.1" -proc-macro-hack = "0.5" diff --git a/derive/src/lib.rs b/derive/src/lib.rs index 70aa73c43..feab986be 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -13,7 +13,6 @@ mod pyclass; use error::{extract_spans, Diagnostic}; use proc_macro::TokenStream; use proc_macro2::TokenStream as TokenStream2; -use proc_macro_hack::proc_macro_hack; use quote::ToTokens; use syn::{parse_macro_input, AttributeArgs, DeriveInput, Item}; @@ -51,7 +50,7 @@ pub fn pystruct_sequence(attr: TokenStream, item: TokenStream) -> TokenStream { result_to_tokens(pyclass::impl_pystruct_sequence(attr, item)) } -#[proc_macro_hack] +#[proc_macro] pub fn py_compile_bytecode(input: TokenStream) -> TokenStream { result_to_tokens(compile_bytecode::impl_py_compile_bytecode(input.into())) } diff --git a/vm/Cargo.toml b/vm/Cargo.toml index c2bd8a992..e5f9ff0bb 100644 --- a/vm/Cargo.toml +++ b/vm/Cargo.toml @@ -56,7 +56,6 @@ unicode_names2 = "0.2.2" unicode-casing = "0.1.0" unic = "0.9.0" maplit = "1.0" -proc-macro-hack = "0.5" bitflags = "1.1" flame = { version = "0.2", optional = true } diff --git a/vm/src/lib.rs b/vm/src/lib.rs index 73f1804fa..3dddb7b0d 100644 --- a/vm/src/lib.rs +++ b/vm/src/lib.rs @@ -14,6 +14,9 @@ #![doc(html_logo_url = "https://raw.githubusercontent.com/RustPython/RustPython/master/logo.png")] #![doc(html_root_url = "https://docs.rs/rustpython-vm/")] +// For redox: +#![feature(proc_macro_hygiene)] + #[cfg(feature = "flame-it")] #[macro_use] extern crate flamer; @@ -36,9 +39,6 @@ extern crate self as rustpython_vm; pub use rustpython_derive::*; -#[proc_macro_hack::proc_macro_hack] -pub use rustpython_derive::py_compile_bytecode; - //extern crate eval; use eval::eval::*; // use py_code_object::{Function, NativeType, PyCodeObject};