diff options
| -rw-r--r-- | src/libfourcc/lib.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libfourcc/lib.rs b/src/libfourcc/lib.rs index 9e46da56a8e..3aa40058792 100644 --- a/src/libfourcc/lib.rs +++ b/src/libfourcc/lib.rs @@ -63,10 +63,9 @@ use syntax::ext::base::{ExtCtxt, MacExpr}; use syntax::ext::build::AstBuilder; use syntax::parse::token; use syntax::parse::token::InternedString; +use syntax::ptr::P; use rustc::plugin::Registry; -use std::gc::Gc; - #[plugin_registrar] pub fn plugin_registrar(reg: &mut Registry) { reg.register_macro("fourcc", expand_syntax_ext); @@ -135,7 +134,7 @@ struct Ident { } fn parse_tts(cx: &ExtCtxt, - tts: &[ast::TokenTree]) -> (Gc<ast::Expr>, Option<Ident>) { + tts: &[ast::TokenTree]) -> (P<ast::Expr>, Option<Ident>) { let p = &mut cx.new_parser_from_tts(tts); let ex = p.parse_expr(); let id = if p.token == token::EOF { @@ -156,7 +155,7 @@ fn parse_tts(cx: &ExtCtxt, fn target_endian_little(cx: &ExtCtxt, sp: Span) -> bool { let meta = cx.meta_name_value(sp, InternedString::new("target_endian"), ast::LitStr(InternedString::new("little"), ast::CookedStr)); - contains(cx.cfg().as_slice(), meta) + contains(cx.cfg().as_slice(), &*meta) } // FIXME (10872): This is required to prevent an LLVM assert on Windows |
