about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr4
-rw-r--r--src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr6
-rw-r--r--src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr4
-rw-r--r--src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr6
-rw-r--r--src/test/ui/macro_backtrace/main.-Zmacro-backtrace.stderr104
-rw-r--r--src/test/ui/macros/unknown-builtin.stderr10
-rw-r--r--src/test/ui/methods/method-on-ambiguous-numeric-type.stderr7
-rw-r--r--src/test/ui/proc-macro/mixed-site-span.stderr19
-rw-r--r--src/test/ui/proc-macro/multispan.stderr133
-rw-r--r--src/test/ui/proc-macro/three-equals.stderr19
10 files changed, 112 insertions, 200 deletions
diff --git a/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr b/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr
index f44f81fce71..46db5dbc8b3 100644
--- a/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr
+++ b/src/test/ui/editions/edition-keywords-2015-2018-expansion.stderr
@@ -7,8 +7,8 @@ LL |     produces_async! {}
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 help: you can escape reserved keywords to use them as identifiers
    |
-LL | () => (pub fn r#async () { })
-   |               ^^^^^^^
+LL | r#async
+   |
 
 error: aborting due to previous error
 
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 22a7495ca23..e12d1a48463 100644
--- a/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr
+++ b/src/test/ui/editions/edition-keywords-2018-2015-parsing.stderr
@@ -33,10 +33,10 @@ LL |     r#async = consumes_async_raw!(async);
    |                                   ^^^^^ no rules expected this token in macro call
 
 error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||`
-  --> <::edition_kw_macro_2015::passes_ident macros>:1:22
+  --> $DIR/auxiliary/edition-kw-macro-2015.rs:27:23
    |
-LL | ($ i : ident) => ($ i)
-   |                      ^ expected one of `move`, `|`, or `||`
+LL |     ($i: ident) => ($i)
+   |                       ^ expected one of `move`, `|`, or `||`
    | 
   ::: $DIR/edition-keywords-2018-2015-parsing.rs:16:8
    |
diff --git a/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr b/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr
index a8fc58fc0cb..2de383d0bca 100644
--- a/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr
+++ b/src/test/ui/editions/edition-keywords-2018-2018-expansion.stderr
@@ -7,8 +7,8 @@ LL |     produces_async! {}
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 help: you can escape reserved keywords to use them as identifiers
    |
-LL | () => (pub fn r#async () { })
-   |               ^^^^^^^
+LL | r#async
+   |
 
 error: aborting due to previous error
 
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 7488fcc2e58..110165fc077 100644
--- a/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr
+++ b/src/test/ui/editions/edition-keywords-2018-2018-parsing.stderr
@@ -33,10 +33,10 @@ LL |     r#async = consumes_async_raw!(async);
    |                                   ^^^^^ no rules expected this token in macro call
 
 error: macro expansion ends with an incomplete expression: expected one of `move`, `|`, or `||`
-  --> <::edition_kw_macro_2018::passes_ident macros>:1:22
+  --> $DIR/auxiliary/edition-kw-macro-2018.rs:27:23
    |
-LL | ($ i : ident) => ($ i)
-   |                      ^ expected one of `move`, `|`, or `||`
+LL |     ($i: ident) => ($i)
+   |                       ^ expected one of `move`, `|`, or `||`
    | 
   ::: $DIR/edition-keywords-2018-2018-parsing.rs:16:8
    |
diff --git a/src/test/ui/macro_backtrace/main.-Zmacro-backtrace.stderr b/src/test/ui/macro_backtrace/main.-Zmacro-backtrace.stderr
index 41ed545cf16..2f3d48bf039 100644
--- a/src/test/ui/macro_backtrace/main.-Zmacro-backtrace.stderr
+++ b/src/test/ui/macro_backtrace/main.-Zmacro-backtrace.stderr
@@ -13,66 +13,70 @@ LL |       pong!();
 error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
   --> $DIR/main.rs:10:20
    |
-LL | / macro_rules! pong {
-LL | |     () => { syntax error };
-   | |                    ^^^^^ expected one of 8 possible tokens
-LL | | }
-   | |_- in this expansion of `pong!`
+LL | /  macro_rules! pong {
+LL | |      () => { syntax error };
+   | |                     ^^^^^ expected one of 8 possible tokens
+LL | |  }
+   | |__- in this expansion of `pong!`
 ...
-LL |       ping!();
-   |       -------- in this macro invocation
+LL |        ping!();
+   |        -------- in this macro invocation
    | 
-  ::: <::ping::ping macros>:1:1
+  ::: $DIR/auxiliary/ping.rs:5:1
    |
-LL |   () => { pong ! () ; }
-   |   ---------------------
-   |   |       |
-   |   |       in this macro invocation
-   |   in this expansion of `ping!`
+LL |  / macro_rules! ping {
+LL |  |     () => {
+LL |  |         pong!();
+   |  |         -------- in this macro invocation
+LL |  |     }
+LL |  | }
+   |  |_- in this expansion of `ping!`
 
 error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
   --> $DIR/main.rs:10:20
    |
-LL | / macro_rules! pong {
-LL | |     () => { syntax error };
-   | |                    ^^^^^ expected one of 8 possible tokens
-LL | | }
-   | |_- in this expansion of `pong!` (#5)
+LL | /  macro_rules! pong {
+LL | |      () => { syntax error };
+   | |                     ^^^^^ expected one of 8 possible tokens
+LL | |  }
+   | |__- in this expansion of `pong!` (#5)
 ...
-LL |       deep!();
-   |       -------- in this macro invocation (#1)
+LL |        deep!();
+   |        -------- in this macro invocation (#1)
    | 
-  ::: <::ping::deep macros>:1:1
+  ::: $DIR/auxiliary/ping.rs:5:1
    |
-LL |   () => { foo ! () ; }
-   |   --------------------
-   |   |       |
-   |   |       in this macro invocation (#2)
-   |   in this expansion of `deep!` (#1)
-   | 
-  ::: <::ping::foo macros>:1:1
-   |
-LL |   () => { bar ! () ; }
-   |   --------------------
-   |   |       |
-   |   |       in this macro invocation (#3)
-   |   in this expansion of `foo!` (#2)
-   | 
-  ::: <::ping::bar macros>:1:1
-   |
-LL |   () => { ping ! () ; }
-   |   ---------------------
-   |   |       |
-   |   |       in this macro invocation (#4)
-   |   in this expansion of `bar!` (#3)
-   | 
-  ::: <::ping::ping macros>:1:1
-   |
-LL |   () => { pong ! () ; }
-   |   ---------------------
-   |   |       |
-   |   |       in this macro invocation (#5)
-   |   in this expansion of `ping!` (#4)
+LL |  / macro_rules! ping {
+LL |  |     () => {
+LL |  |         pong!();
+   |  |         -------- in this macro invocation (#5)
+LL |  |     }
+LL |  | }
+   |  |_- in this expansion of `ping!` (#4)
+...
+LL | /  macro_rules! deep {
+LL | |      () => {
+LL | |          foo!();
+   | |          ------- in this macro invocation (#2)
+LL | |      }
+LL | |  }
+   | |__- in this expansion of `deep!` (#1)
+...
+LL | /  macro_rules! foo {
+LL | |      () => {
+LL | |          bar!();
+   | |          ------- in this macro invocation (#3)
+LL | |      }
+LL | |  }
+   | |__- in this expansion of `foo!` (#2)
+...
+LL | /  macro_rules! bar {
+LL | |      () => {
+LL | |          ping!();
+   | |          -------- in this macro invocation (#4)
+LL | |      }
+LL | |  }
+   | |__- in this expansion of `bar!` (#3)
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/macros/unknown-builtin.stderr b/src/test/ui/macros/unknown-builtin.stderr
index f1e828a46d8..665e92f2424 100644
--- a/src/test/ui/macros/unknown-builtin.stderr
+++ b/src/test/ui/macros/unknown-builtin.stderr
@@ -5,10 +5,14 @@ LL | macro_rules! unknown { () => () }
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: cannot find a built-in macro with name `line`
-  --> <::core::macros::builtin::line macros>:1:1
+  --> $SRC_DIR/libcore/macros/mod.rs:LL:COL
    |
-LL | () => { } ;
-   | ^^^^^^^^^^^
+LL | /     macro_rules! line {
+LL | |         () => {
+LL | |             /* compiler built-in */
+LL | |         };
+LL | |     }
+   | |_____^
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr b/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr
index 10950834ad3..c6dde67cfeb 100644
--- a/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr
+++ b/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr
@@ -42,10 +42,13 @@ LL |     ($ident:ident) => { let $ident: i32 = 42; }
 error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}`
   --> $DIR/method-on-ambiguous-numeric-type.rs:30:9
    |
-LL |     mac!(bar);
-   |     ---------- you must specify a type for this binding, like `i32`
 LL |     bar.pow(2);
    |         ^^^
+   |
+help: you must specify a type for this binding, like `i32`
+   |
+LL |     ($ident:ident) => { let $ident: i32 = 42; }
+   |                             ^^^^^^^^^^^
 
 error: aborting due to 5 previous errors
 
diff --git a/src/test/ui/proc-macro/mixed-site-span.stderr b/src/test/ui/proc-macro/mixed-site-span.stderr
index c344147ed93..30a4cd7c116 100644
--- a/src/test/ui/proc-macro/mixed-site-span.stderr
+++ b/src/test/ui/proc-macro/mixed-site-span.stderr
@@ -21,21 +21,10 @@ LL |         local_def;
    |         ^^^^^^^^^ not found in this scope
 
 error[E0412]: cannot find type `ItemUse` in crate `$crate`
-  --> $DIR/auxiliary/mixed-site-span.rs:14:1
-   |
-LL | / pub fn proc_macro_rules(input: TokenStream) -> TokenStream {
-LL | |     if input.is_empty() {
-LL | |         let id = |s| TokenTree::from(Ident::new(s, Span::mixed_site()));
-LL | |         let item_def = id("ItemDef");
-...  |
-LL | |     }
-LL | | }
-   | |_^ not found in `$crate`
-   | 
-  ::: $DIR/mixed-site-span.rs:26:1
-   |
-LL |   pass_dollar_crate!();
-   |   --------------------- in this macro invocation
+  --> $DIR/mixed-site-span.rs:26:1
+   |
+LL | pass_dollar_crate!();
+   | ^^^^^^^^^^^^^^^^^^^^^ not found in `$crate`
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 help: possible candidate is found in another module, you can import it into scope
diff --git a/src/test/ui/proc-macro/multispan.stderr b/src/test/ui/proc-macro/multispan.stderr
index c9390a04b9e..4405278528e 100644
--- a/src/test/ui/proc-macro/multispan.stderr
+++ b/src/test/ui/proc-macro/multispan.stderr
@@ -1,19 +1,8 @@
 error: hello to you, too!
-  --> $DIR/auxiliary/multispan.rs:31:1
-   |
-LL | / pub fn hello(input: TokenStream) -> TokenStream {
-LL | |     if let Err(diag) = parse(input) {
-LL | |         diag.emit();
-LL | |     }
-LL | |
-LL | |     TokenStream::new()
-LL | | }
-   | |_^
-   | 
-  ::: $DIR/multispan.rs:14:5
-   |
-LL |       hello!(hi);
-   |       ----------- in this macro invocation
+  --> $DIR/multispan.rs:14:5
+   |
+LL |     hello!(hi);
+   |     ^^^^^^^^^^^
    |
 note: found these 'hi's
   --> $DIR/multispan.rs:14:12
@@ -23,21 +12,10 @@ LL |     hello!(hi);
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: hello to you, too!
-  --> $DIR/auxiliary/multispan.rs:31:1
-   |
-LL | / pub fn hello(input: TokenStream) -> TokenStream {
-LL | |     if let Err(diag) = parse(input) {
-LL | |         diag.emit();
-LL | |     }
-LL | |
-LL | |     TokenStream::new()
-LL | | }
-   | |_^
-   | 
-  ::: $DIR/multispan.rs:17:5
-   |
-LL |       hello!(hi hi);
-   |       -------------- in this macro invocation
+  --> $DIR/multispan.rs:17:5
+   |
+LL |     hello!(hi hi);
+   |     ^^^^^^^^^^^^^^
    |
 note: found these 'hi's
   --> $DIR/multispan.rs:17:12
@@ -47,21 +25,10 @@ LL |     hello!(hi hi);
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: hello to you, too!
-  --> $DIR/auxiliary/multispan.rs:31:1
-   |
-LL | / pub fn hello(input: TokenStream) -> TokenStream {
-LL | |     if let Err(diag) = parse(input) {
-LL | |         diag.emit();
-LL | |     }
-LL | |
-LL | |     TokenStream::new()
-LL | | }
-   | |_^
-   | 
-  ::: $DIR/multispan.rs:20:5
-   |
-LL |       hello!(hi hi hi);
-   |       ----------------- in this macro invocation
+  --> $DIR/multispan.rs:20:5
+   |
+LL |     hello!(hi hi hi);
+   |     ^^^^^^^^^^^^^^^^^
    |
 note: found these 'hi's
   --> $DIR/multispan.rs:20:12
@@ -71,21 +38,10 @@ LL |     hello!(hi hi hi);
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: hello to you, too!
-  --> $DIR/auxiliary/multispan.rs:31:1
-   |
-LL | / pub fn hello(input: TokenStream) -> TokenStream {
-LL | |     if let Err(diag) = parse(input) {
-LL | |         diag.emit();
-LL | |     }
-LL | |
-LL | |     TokenStream::new()
-LL | | }
-   | |_^
-   | 
-  ::: $DIR/multispan.rs:23:5
-   |
-LL |       hello!(hi hey hi yo hi beep beep hi hi);
-   |       ---------------------------------------- in this macro invocation
+  --> $DIR/multispan.rs:23:5
+   |
+LL |     hello!(hi hey hi yo hi beep beep hi hi);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: found these 'hi's
   --> $DIR/multispan.rs:23:12
@@ -95,21 +51,10 @@ LL |     hello!(hi hey hi yo hi beep beep hi hi);
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: hello to you, too!
-  --> $DIR/auxiliary/multispan.rs:31:1
-   |
-LL | / pub fn hello(input: TokenStream) -> TokenStream {
-LL | |     if let Err(diag) = parse(input) {
-LL | |         diag.emit();
-LL | |     }
-LL | |
-LL | |     TokenStream::new()
-LL | | }
-   | |_^
-   | 
-  ::: $DIR/multispan.rs:24:5
-   |
-LL |       hello!(hi there, hi how are you? hi... hi.);
-   |       -------------------------------------------- in this macro invocation
+  --> $DIR/multispan.rs:24:5
+   |
+LL |     hello!(hi there, hi how are you? hi... hi.);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: found these 'hi's
   --> $DIR/multispan.rs:24:12
@@ -119,21 +64,10 @@ LL |     hello!(hi there, hi how are you? hi... hi.);
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: hello to you, too!
-  --> $DIR/auxiliary/multispan.rs:31:1
-   |
-LL | / pub fn hello(input: TokenStream) -> TokenStream {
-LL | |     if let Err(diag) = parse(input) {
-LL | |         diag.emit();
-LL | |     }
-LL | |
-LL | |     TokenStream::new()
-LL | | }
-   | |_^
-   | 
-  ::: $DIR/multispan.rs:25:5
-   |
-LL |       hello!(whoah. hi di hi di ho);
-   |       ------------------------------ in this macro invocation
+  --> $DIR/multispan.rs:25:5
+   |
+LL |     hello!(whoah. hi di hi di ho);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: found these 'hi's
   --> $DIR/multispan.rs:25:19
@@ -143,21 +77,10 @@ LL |     hello!(whoah. hi di hi di ho);
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: hello to you, too!
-  --> $DIR/auxiliary/multispan.rs:31:1
-   |
-LL | / pub fn hello(input: TokenStream) -> TokenStream {
-LL | |     if let Err(diag) = parse(input) {
-LL | |         diag.emit();
-LL | |     }
-LL | |
-LL | |     TokenStream::new()
-LL | | }
-   | |_^
-   | 
-  ::: $DIR/multispan.rs:26:5
-   |
-LL |       hello!(hi good hi and good bye);
-   |       -------------------------------- in this macro invocation
+  --> $DIR/multispan.rs:26:5
+   |
+LL |     hello!(hi good hi and good bye);
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: found these 'hi's
   --> $DIR/multispan.rs:26:12
diff --git a/src/test/ui/proc-macro/three-equals.stderr b/src/test/ui/proc-macro/three-equals.stderr
index 82c4167262f..ca82a345345 100644
--- a/src/test/ui/proc-macro/three-equals.stderr
+++ b/src/test/ui/proc-macro/three-equals.stderr
@@ -1,19 +1,8 @@
 error: found 2 equal signs, need exactly 3
-  --> $DIR/auxiliary/three-equals.rs:42:1
-   |
-LL | / pub fn three_equals(input: TokenStream) -> TokenStream {
-LL | |     if let Err(diag) = parse(input) {
-LL | |         diag.emit();
-LL | |         return TokenStream::new();
-...  |
-LL | |     "3".parse().unwrap()
-LL | | }
-   | |_^
-   | 
-  ::: $DIR/three-equals.rs:15:5
-   |
-LL |       three_equals!(==);
-   |       ------------------ in this macro invocation
+  --> $DIR/three-equals.rs:15:5
+   |
+LL |     three_equals!(==);
+   |     ^^^^^^^^^^^^^^^^^^
    |
    = help: input must be: `===`
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)