Remove Spanned from ast::Mac
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
use errors::{Applicability, DiagnosticBuilder};
|
||||
|
||||
use syntax::ast::{self, *};
|
||||
use syntax::source_map::Spanned;
|
||||
use syntax::ext::base::*;
|
||||
use syntax::parse::token::{self, TokenKind};
|
||||
use syntax::parse::parser::Parser;
|
||||
@@ -25,7 +24,7 @@ pub fn expand_assert<'cx>(
|
||||
};
|
||||
|
||||
let sp = sp.apply_mark(cx.current_expansion.id);
|
||||
let panic_call = Mac_ {
|
||||
let panic_call = Mac {
|
||||
path: Path::from_ident(Ident::new(sym::panic, sp)),
|
||||
tts: custom_message.unwrap_or_else(|| {
|
||||
TokenStream::from(TokenTree::token(
|
||||
@@ -37,6 +36,7 @@ pub fn expand_assert<'cx>(
|
||||
))
|
||||
}).into(),
|
||||
delim: MacDelimiter::Parenthesis,
|
||||
span: sp,
|
||||
prior_type_ascription: None,
|
||||
};
|
||||
let if_expr = cx.expr_if(
|
||||
@@ -44,10 +44,7 @@ pub fn expand_assert<'cx>(
|
||||
cx.expr(sp, ExprKind::Unary(UnOp::Not, cond_expr)),
|
||||
cx.expr(
|
||||
sp,
|
||||
ExprKind::Mac(Spanned {
|
||||
span: sp,
|
||||
node: panic_call,
|
||||
}),
|
||||
ExprKind::Mac(panic_call),
|
||||
),
|
||||
None,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user