From 9651d94a56b93c0997294499ef4dd70e1dfbbb5b Mon Sep 17 00:00:00 2001 From: Eduard Burtescu Date: Tue, 8 Apr 2014 18:35:44 +0300 Subject: fourcc: fix fallout from using ptr::P. --- src/libfourcc/lib.rs | 7 +++---- 1 file 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, Option) { + tts: &[ast::TokenTree]) -> (P, Option) { 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 -- cgit 1.4.1-3-g733a5