Skip to content

Commit 9651d94

Browse files
committed
fourcc: fix fallout from using ptr::P.
1 parent 9295454 commit 9651d94

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/libfourcc/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,9 @@ use syntax::ext::base::{ExtCtxt, MacExpr};
6363
use syntax::ext::build::AstBuilder;
6464
use syntax::parse::token;
6565
use syntax::parse::token::InternedString;
66+
use syntax::ptr::P;
6667
use rustc::plugin::Registry;
6768

68-
use std::gc::Gc;
69-
7069
#[plugin_registrar]
7170
pub fn plugin_registrar(reg: &mut Registry) {
7271
reg.register_macro("fourcc", expand_syntax_ext);
@@ -135,7 +134,7 @@ struct Ident {
135134
}
136135

137136
fn parse_tts(cx: &ExtCtxt,
138-
tts: &[ast::TokenTree]) -> (Gc<ast::Expr>, Option<Ident>) {
137+
tts: &[ast::TokenTree]) -> (P<ast::Expr>, Option<Ident>) {
139138
let p = &mut cx.new_parser_from_tts(tts);
140139
let ex = p.parse_expr();
141140
let id = if p.token == token::EOF {
@@ -156,7 +155,7 @@ fn parse_tts(cx: &ExtCtxt,
156155
fn target_endian_little(cx: &ExtCtxt, sp: Span) -> bool {
157156
let meta = cx.meta_name_value(sp, InternedString::new("target_endian"),
158157
ast::LitStr(InternedString::new("little"), ast::CookedStr));
159-
contains(cx.cfg().as_slice(), meta)
158+
contains(cx.cfg().as_slice(), &*meta)
160159
}
161160

162161
// FIXME (10872): This is required to prevent an LLVM assert on Windows

0 commit comments

Comments
 (0)