about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libsyntax/ext/tt/macro_rules.rs5
-rw-r--r--src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr2
-rw-r--r--src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr2
-rw-r--r--src/test/ui/macros/macro-in-expression-context-2.stderr2
4 files changed, 7 insertions, 4 deletions
diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs
index 9f3a80b1151..e731be578cd 100644
--- a/src/libsyntax/ext/tt/macro_rules.rs
+++ b/src/libsyntax/ext/tt/macro_rules.rs
@@ -59,7 +59,10 @@ impl<'a> ParserAnyMacro<'a> {
                 }
                 let msg = &e.message[0];
                 e.message[0] = (
-                    msg.0.replace(", found `<eof>`", ", found the end of the macro arm"),
+                    format!(
+                        "macro expansion ends with an incomplete expression: {}",
+                        msg.0.replace(", found `<eof>`", ""),
+                    ),
                     msg.1,
                 );
             }
diff --git a/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr b/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr
index 943183814f7..d0edc368ad5 100644
--- a/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr
+++ b/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr
@@ -22,7 +22,7 @@ error: no rules expected the token `async`
 LL |     r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async`
    |                                   ^^^^^ no rules expected this token in macro call
 
-error: expected one of `move`, `|`, or `||`, found the end of the macro arm
+error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||`
   --> <::edition_kw_macro_2015::passes_ident macros>:1:25
    |
 LL | ( $ i : ident ) => ( $ i )
diff --git a/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr b/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr
index e7379988892..c4e1e0257c5 100644
--- a/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr
+++ b/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr
@@ -22,7 +22,7 @@ error: no rules expected the token `async`
 LL |     r#async = consumes_async_raw!(async); //~ ERROR no rules expected the token `async`
    |                                   ^^^^^ no rules expected this token in macro call
 
-error: expected one of `move`, `|`, or `||`, found the end of the macro arm
+error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||`
   --> <::edition_kw_macro_2018::passes_ident macros>:1:25
    |
 LL | ( $ i : ident ) => ( $ i )
diff --git a/src/test/ui/macros/macro-in-expression-context-2.stderr b/src/test/ui/macros/macro-in-expression-context-2.stderr
index f6e6ecf112a..672871c49ca 100644
--- a/src/test/ui/macros/macro-in-expression-context-2.stderr
+++ b/src/test/ui/macros/macro-in-expression-context-2.stderr
@@ -1,4 +1,4 @@
-error: expected expression, found the end of the macro arm
+error: macro expansion ends with an incomplete expression: expected expression
   --> $DIR/macro-in-expression-context-2.rs:5:16
    |
 LL | macro_rules! empty { () => () }