diff options
Diffstat (limited to 'src/ir/context.rs')
-rw-r--r-- | src/ir/context.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ir/context.rs b/src/ir/context.rs index 07863809..7d316c3a 100644 --- a/src/ir/context.rs +++ b/src/ir/context.rs @@ -24,7 +24,7 @@ use cexpr; use clang::{self, Cursor}; use clang_sys; use parse::ClangItemParser; -use quote; +use proc_macro2; use std::borrow::Cow; use std::cell::Cell; use std::collections::{HashMap, HashSet, hash_map}; @@ -905,7 +905,7 @@ impl BindgenContext { } /// Returns a mangled name as a rust identifier. - pub fn rust_ident<S>(&self, name: S) -> quote::Ident + pub fn rust_ident<S>(&self, name: S) -> proc_macro2::Term where S: AsRef<str> { @@ -913,11 +913,11 @@ impl BindgenContext { } /// Returns a mangled name as a rust identifier. - pub fn rust_ident_raw<T>(&self, name: T) -> quote::Ident + pub fn rust_ident_raw<T>(&self, name: T) -> proc_macro2::Term where - T: Into<quote::Ident> + T: AsRef<str> { - name.into() + proc_macro2::Term::intern(name.as_ref()) } /// Iterate over all items that have been defined. @@ -2341,7 +2341,7 @@ impl BindgenContext { /// Convenient method for getting the prefix to use for most traits in /// codegen depending on the `use_core` option. - pub fn trait_prefix(&self) -> quote::Ident { + pub fn trait_prefix(&self) -> proc_macro2::Term { if self.options().use_core { self.rust_ident_raw("core") } else { |