mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-19 18:34:08 +00:00
fourcc: fix fallout from using ptr::P.
This commit is contained in:
parent
9295454ff5
commit
9651d94a56
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user