about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_resolve/macros.rs2
-rw-r--r--src/libsyntax/parse/parser.rs1
-rw-r--r--src/test/compile-fail/auxiliary/depends.rs (renamed from src/test/ui/panic-runtime/auxiliary/depends.rs)0
-rw-r--r--src/test/compile-fail/auxiliary/needs-panic-runtime.rs (renamed from src/test/ui/panic-runtime/auxiliary/needs-panic-runtime.rs)0
-rw-r--r--src/test/compile-fail/runtime-depend-on-needs-runtime.rs (renamed from src/test/ui/panic-runtime/runtime-depend-on-needs-runtime.rs)0
-rw-r--r--src/test/compile-fail/runtime-depend-on-needs-runtime.stderr (renamed from src/test/ui/panic-runtime/runtime-depend-on-needs-runtime.stderr)0
-rw-r--r--src/test/ui/issues/issue-6596-1.rs1
-rw-r--r--src/test/ui/issues/issue-6596-1.stderr12
-rw-r--r--src/test/ui/issues/issue-6596-2.rs1
-rw-r--r--src/test/ui/issues/issue-6596-2.stderr12
-rw-r--r--src/test/ui/macros/macro-comma-behavior.core.stderr5
-rw-r--r--src/test/ui/macros/macro-comma-behavior.rs2
-rw-r--r--src/test/ui/macros/macro-comma-behavior.std.stderr1
13 files changed, 7 insertions, 30 deletions
diff --git a/src/librustc_resolve/macros.rs b/src/librustc_resolve/macros.rs
index 9c0c8a6016f..182dcfe4098 100644
--- a/src/librustc_resolve/macros.rs
+++ b/src/librustc_resolve/macros.rs
@@ -186,7 +186,7 @@ impl<'a> base::Resolver for Resolver<'a> {
             Ok((def, ext)) => (def, ext),
             Err(Determinacy::Determined) if kind == MacroKind::Attr => {
                 // Replace unresolved attributes with used inert attributes for better recovery.
-                return Ok(Some(self.get_macro(Def::NonMacroAttr(NonMacroAttrKind::Tool))));
+                return Ok(Some(Lrc::new(SyntaxExtension::NonMacroAttr { mark_used: true })));
             }
             Err(determinacy) => return Err(determinacy),
         };
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 11d570072cd..52da8a072c7 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2871,6 +2871,7 @@ impl<'a> Parser<'a> {
                 let mut err = self.fatal(&format!("unknown macro variable `{}`", name));
                 err.span_label(self.span, "unknown macro variable");
                 err.emit();
+                self.bump();
                 return
             }
             token::Interpolated(ref nt) => {
diff --git a/src/test/ui/panic-runtime/auxiliary/depends.rs b/src/test/compile-fail/auxiliary/depends.rs
index e9bc2f4893e..e9bc2f4893e 100644
--- a/src/test/ui/panic-runtime/auxiliary/depends.rs
+++ b/src/test/compile-fail/auxiliary/depends.rs
diff --git a/src/test/ui/panic-runtime/auxiliary/needs-panic-runtime.rs b/src/test/compile-fail/auxiliary/needs-panic-runtime.rs
index 3f030c169f6..3f030c169f6 100644
--- a/src/test/ui/panic-runtime/auxiliary/needs-panic-runtime.rs
+++ b/src/test/compile-fail/auxiliary/needs-panic-runtime.rs
diff --git a/src/test/ui/panic-runtime/runtime-depend-on-needs-runtime.rs b/src/test/compile-fail/runtime-depend-on-needs-runtime.rs
index 866c5b2e34b..866c5b2e34b 100644
--- a/src/test/ui/panic-runtime/runtime-depend-on-needs-runtime.rs
+++ b/src/test/compile-fail/runtime-depend-on-needs-runtime.rs
diff --git a/src/test/ui/panic-runtime/runtime-depend-on-needs-runtime.stderr b/src/test/compile-fail/runtime-depend-on-needs-runtime.stderr
index 27e27dda5ef..27e27dda5ef 100644
--- a/src/test/ui/panic-runtime/runtime-depend-on-needs-runtime.stderr
+++ b/src/test/compile-fail/runtime-depend-on-needs-runtime.stderr
diff --git a/src/test/ui/issues/issue-6596-1.rs b/src/test/ui/issues/issue-6596-1.rs
index 6a5986c355e..5da54451346 100644
--- a/src/test/ui/issues/issue-6596-1.rs
+++ b/src/test/ui/issues/issue-6596-1.rs
@@ -2,7 +2,6 @@ macro_rules! e {
     ($inp:ident) => (
         $nonexistent
         //~^ ERROR unknown macro variable `nonexistent`
-        //~| ERROR cannot find value `nonexistent` in this scope
     );
 }
 
diff --git a/src/test/ui/issues/issue-6596-1.stderr b/src/test/ui/issues/issue-6596-1.stderr
index face8725914..2a4ece2f242 100644
--- a/src/test/ui/issues/issue-6596-1.stderr
+++ b/src/test/ui/issues/issue-6596-1.stderr
@@ -7,15 +7,5 @@ LL |         $nonexistent
 LL |     e!(foo);
    |     -------- in this macro invocation
 
-error[E0425]: cannot find value `nonexistent` in this scope
-  --> $DIR/issue-6596-1.rs:14:9
-   |
-LL |         $nonexistent
-   |         ^^^^^^^^^^^^ not found in this scope
-...
-LL |     e!(foo);
-   |     -------- in this macro invocation
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0425`.
diff --git a/src/test/ui/issues/issue-6596-2.rs b/src/test/ui/issues/issue-6596-2.rs
index 4ff7cfe3865..b19700efe5a 100644
--- a/src/test/ui/issues/issue-6596-2.rs
+++ b/src/test/ui/issues/issue-6596-2.rs
@@ -4,7 +4,6 @@ macro_rules! g {
     ($inp:ident) => (
         { $inp $nonexistent }
         //~^ ERROR unknown macro variable `nonexistent`
-        //~| ERROR expected one of
     );
 }
 
diff --git a/src/test/ui/issues/issue-6596-2.stderr b/src/test/ui/issues/issue-6596-2.stderr
index 99decd177ef..3e707ba6fff 100644
--- a/src/test/ui/issues/issue-6596-2.stderr
+++ b/src/test/ui/issues/issue-6596-2.stderr
@@ -7,14 +7,4 @@ LL |         { $inp $nonexistent }
 LL |     g!(foo);
    |     -------- in this macro invocation
 
-error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `nonexistent`
-  --> $DIR/issue-6596-2.rs:5:16
-   |
-LL |         { $inp $nonexistent }
-   |                ^^^^^^^^^^^^ expected one of 8 possible tokens here
-...
-LL |     g!(foo);
-   |     -------- in this macro invocation
-
-error: aborting due to 2 previous errors
-
+error: aborting due to previous error
diff --git a/src/test/ui/macros/macro-comma-behavior.core.stderr b/src/test/ui/macros/macro-comma-behavior.core.stderr
index 7a4b9278e0a..cd752352aef 100644
--- a/src/test/ui/macros/macro-comma-behavior.core.stderr
+++ b/src/test/ui/macros/macro-comma-behavior.core.stderr
@@ -44,7 +44,4 @@ error: `#[panic_handler]` function required, but not found
 
 error: language item required, but not found: `eh_personality`
 
-error: language item required, but not found: `eh_unwind_resume`
-
-error: aborting due to 10 previous errors
-
+error: aborting due to 9 previous errors
diff --git a/src/test/ui/macros/macro-comma-behavior.rs b/src/test/ui/macros/macro-comma-behavior.rs
index 7bd4cb0d2e7..46b93edca3a 100644
--- a/src/test/ui/macros/macro-comma-behavior.rs
+++ b/src/test/ui/macros/macro-comma-behavior.rs
@@ -3,10 +3,12 @@
 // compile-flags: -C debug_assertions=yes
 // revisions: std core
 
+#![feature(lang_items)]
 #![cfg_attr(core, no_std)]
 
 #[cfg(std)] use std::fmt;
 #[cfg(core)] use core::fmt;
+#[cfg(core)] #[lang = "eh_unwind_resume"] fn eh_unwind_resume() {}
 
 // (see documentation of the similarly-named test in run-pass)
 fn to_format_or_not_to_format() {
diff --git a/src/test/ui/macros/macro-comma-behavior.std.stderr b/src/test/ui/macros/macro-comma-behavior.std.stderr
index 8759d4efae6..e56ed40e024 100644
--- a/src/test/ui/macros/macro-comma-behavior.std.stderr
+++ b/src/test/ui/macros/macro-comma-behavior.std.stderr
@@ -59,4 +59,3 @@ LL |             write!(f, "{}",)?;
    |                        ^^
 
 error: aborting due to 10 previous errors
-