Update to rust-lang/rust's proc_macro API
diff --git a/tests/compile-fail/symbol_send.rs b/tests/compile-fail/symbol_send.rs
index 64727fc..19da4e7 100644
--- a/tests/compile-fail/symbol_send.rs
+++ b/tests/compile-fail/symbol_send.rs
@@ -1,9 +1,9 @@
extern crate proc_macro2;
-use proc_macro2::Symbol;
+use proc_macro2::Term;
fn assert_send<T: Send>() {}
fn main() {
- assert_send::<Symbol>(); //~ the trait bound `*const (): std::marker::Send` is not satisfied in `proc_macro2::Symbol`
+ assert_send::<Term>(); //~ the trait bound `*const (): std::marker::Send` is not satisfied in `proc_macro2::Term`
}
diff --git a/tests/compile-fail/symbol_sync.rs b/tests/compile-fail/symbol_sync.rs
index ede06d1..68c1289 100644
--- a/tests/compile-fail/symbol_sync.rs
+++ b/tests/compile-fail/symbol_sync.rs
@@ -1,9 +1,9 @@
extern crate proc_macro2;
-use proc_macro2::Symbol;
+use proc_macro2::Term;
fn assert_sync<T: Sync>() {}
fn main() {
- assert_sync::<Symbol>(); //~ the trait bound `*const (): std::marker::Sync` is not satisfied in `proc_macro2::Symbol`
+ assert_sync::<Term>(); //~ the trait bound `*const (): std::marker::Sync` is not satisfied in `proc_macro2::Term`
}
diff --git a/tests/test.rs b/tests/test.rs
index 0f81816..4d6831b 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -1,17 +1,17 @@
extern crate proc_macro2;
-use proc_macro2::{Symbol, Literal, TokenStream};
+use proc_macro2::{Term, Literal, TokenStream};
#[test]
fn symbols() {
- assert_eq!(Symbol::from("foo").as_str(), "foo");
- assert_eq!(Symbol::from("bar").as_str(), "bar");
+ assert_eq!(Term::intern("foo").as_str(), "foo");
+ assert_eq!(Term::intern("bar").as_str(), "bar");
}
#[test]
fn literals() {
- assert_eq!(Literal::from("foo").to_string(), "\"foo\"");
- assert_eq!(Literal::from("\"").to_string(), "\"\\\"\"");
+ assert_eq!(Literal::string("foo").to_string(), "\"foo\"");
+ assert_eq!(Literal::string("\"").to_string(), "\"\\\"\"");
}
#[test]