diff options
Diffstat (limited to 'src/ir/objc.rs')
-rw-r--r-- | src/ir/objc.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ir/objc.rs b/src/ir/objc.rs index 0f72c399..18b51978 100644 --- a/src/ir/objc.rs +++ b/src/ir/objc.rs @@ -13,6 +13,7 @@ use clang_sys::CXCursor_ObjCInstanceMethodDecl; use clang_sys::CXCursor_ObjCProtocolDecl; use clang_sys::CXCursor_ObjCProtocolRef; use quote; +use proc_macro2; /// Objective C interface as used in TypeKind /// @@ -216,7 +217,7 @@ impl ObjCMethod { let split_name: Vec<_> = self.name .split(':') .filter(|p| !p.is_empty()) - .map(quote::Ident::new) + .map(proc_macro2::Term::intern) .collect(); // No arguments @@ -239,9 +240,10 @@ impl ObjCMethod { // Get arguments without type signatures to pass to `msg_send!` let mut args_without_types = vec![]; for arg in args.iter() { - let name_and_sig: Vec<&str> = arg.as_str().split(' ').collect(); + let arg = arg.to_string(); + let name_and_sig: Vec<&str> = arg.split(' ').collect(); let name = name_and_sig[0]; - args_without_types.push(quote::Ident::new(name)) + args_without_types.push(proc_macro2::Term::intern(name)) }; let args = split_name |