Skip to content

Commit f2aecb5

Browse files
committed
Auto merge of #236 - cuviper:proc-macro, r=hauleth
derive: update to proc-macro
2 parents b6db1ea + 97551ad commit f2aecb5

File tree

7 files changed

+11
-12
lines changed

7 files changed

+11
-12
lines changed

derive/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ path = ".."
2121
version = "0.1"
2222

2323
[lib]
24-
crate-type = ["rustc-macro"]
2524
name = "num_derive"
26-
rustc-macro = true
25+
proc-macro = true
2726
test = false

derive/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![crate_type = "rustc-macro"]
12-
#![feature(rustc_macro, rustc_macro_lib)]
11+
#![crate_type = "proc-macro"]
12+
#![feature(proc_macro, proc_macro_lib)]
1313

1414
extern crate syn;
1515
#[macro_use]
1616
extern crate quote;
17-
extern crate rustc_macro;
17+
extern crate proc_macro;
1818

19-
use rustc_macro::TokenStream;
19+
use proc_macro::TokenStream;
2020

2121
use syn::Body::Enum;
2222
use syn::VariantData::Unit;
2323

24-
#[rustc_macro_derive(FromPrimitive)]
24+
#[proc_macro_derive(FromPrimitive)]
2525
pub fn from_primitive(input: TokenStream) -> TokenStream {
2626
let source = input.to_string();
2727

derive/tests/compile-fail/derive_on_struct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// option. This file may not be copied, modified, or distributed
1010
// except according to those terms.
1111

12-
#![feature(rustc_macro)]
12+
#![feature(proc_macro)]
1313

1414
extern crate num;
1515
#[macro_use]

derive/tests/compile-fail/enum_with_associated_data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// option. This file may not be copied, modified, or distributed
1010
// except according to those terms.
1111

12-
#![feature(rustc_macro)]
12+
#![feature(proc_macro)]
1313

1414
extern crate num;
1515
#[macro_use]

derive/tests/empty_enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// option. This file may not be copied, modified, or distributed
1010
// except according to those terms.
1111

12-
#![feature(rustc_macro)]
12+
#![feature(proc_macro)]
1313

1414
extern crate num;
1515
#[macro_use]

derive/tests/trivial.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(rustc_macro)]
11+
#![feature(proc_macro)]
1212

1313
extern crate num;
1414
#[macro_use]

derive/tests/with_custom_values.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(rustc_macro)]
11+
#![feature(proc_macro)]
1212

1313
extern crate num;
1414
#[macro_use]

0 commit comments

Comments
 (0)