about summary refs log tree commit diff
path: root/src/libsyntax_ext/assert.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-08-15 12:35:03 +0000
committerbors <bors@rust-lang.org>2019-08-15 12:35:03 +0000
commitf7af19c279b8b7ea3d2c21fcbd67164af8d5d968 (patch)
tree97262d6fe68846bffd0ebdb303403b4da9ed4ee1 /src/libsyntax_ext/assert.rs
parent1cdcea920e56a5d0587307a4c9cf8fff5c77c4bc (diff)
parent6e8fabb4ac16b30c98968b768b860d2c2e1583d8 (diff)
downloadrust-f7af19c279b8b7ea3d2c21fcbd67164af8d5d968.tar.gz
rust-f7af19c279b8b7ea3d2c21fcbd67164af8d5d968.zip
Auto merge of #63592 - Centril:rollup-7c6dg3e, r=Centril
Rollup of 9 pull requests

Successful merges:

 - #63155 (Add UWP MSVC targets)
 - #63165 (Add builtin targets for mips64(el)-unknown-linux-muslabi64)
 - #63306 (Adapt AddRetag for shallow retagging)
 - #63467 (Add Catalyst (iOS apps running on macOS) target)
 - #63546 (Remove uses of `mem::uninitialized()` from cloudabi)
 - #63572 (remove unused Level::PhaseFatal)
 - #63577 (Test HRTB issue accepted by compiler)
 - #63582 (Fix ICE #63226)
 - #63586 (cleanup: Remove `Spanned` where possible)

Failed merges:

r? @ghost
Diffstat (limited to 'src/libsyntax_ext/assert.rs')
-rw-r--r--src/libsyntax_ext/assert.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libsyntax_ext/assert.rs b/src/libsyntax_ext/assert.rs
index e3ef39075e2..6301283460a 100644
--- a/src/libsyntax_ext/assert.rs
+++ b/src/libsyntax_ext/assert.rs
@@ -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,
     );