about summary refs log tree commit diff
path: root/src/test/ui/proc-macro
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2019-12-16 15:56:47 +0200
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2020-02-06 21:46:38 +0200
commit4c7eb59e8161fd7bd2da89fc8c8d73c32bcd789b (patch)
tree128245179245a4e0941830062fab2978c1ba7876 /src/test/ui/proc-macro
parentab080973cb3bfa96f71b7d29fc5c3e34893cf896 (diff)
downloadrust-4c7eb59e8161fd7bd2da89fc8c8d73c32bcd789b.tar.gz
rust-4c7eb59e8161fd7bd2da89fc8c8d73c32bcd789b.zip
rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.
Diffstat (limited to 'src/test/ui/proc-macro')
-rw-r--r--src/test/ui/proc-macro/derive-bad.stderr2
-rw-r--r--src/test/ui/proc-macro/derive-helper-shadowing.stderr4
-rw-r--r--src/test/ui/proc-macro/dollar-crate.stderr3
-rw-r--r--src/test/ui/proc-macro/expand-to-unstable-2.stderr1
-rw-r--r--src/test/ui/proc-macro/expand-to-unstable.stderr1
-rw-r--r--src/test/ui/proc-macro/gen-macro-rules-hygiene.stderr4
-rw-r--r--src/test/ui/proc-macro/generate-mod.stderr4
-rw-r--r--src/test/ui/proc-macro/invalid-punct-ident-4.stderr2
-rw-r--r--src/test/ui/proc-macro/issue-38586.stderr2
-rw-r--r--src/test/ui/proc-macro/issue-50493.stderr4
-rw-r--r--src/test/ui/proc-macro/issue-59191-replace-root-with-fn.stderr2
-rw-r--r--src/test/ui/proc-macro/lints_in_proc_macros.stderr2
-rw-r--r--src/test/ui/proc-macro/mixed-site-span.stderr5
-rw-r--r--src/test/ui/proc-macro/multispan.stderr7
-rw-r--r--src/test/ui/proc-macro/parent-source-spans.stderr18
-rw-r--r--src/test/ui/proc-macro/subspan.stderr8
-rw-r--r--src/test/ui/proc-macro/three-equals.stderr1
17 files changed, 69 insertions, 1 deletions
diff --git a/src/test/ui/proc-macro/derive-bad.stderr b/src/test/ui/proc-macro/derive-bad.stderr
index 93908150b6c..8667396c989 100644
--- a/src/test/ui/proc-macro/derive-bad.stderr
+++ b/src/test/ui/proc-macro/derive-bad.stderr
@@ -3,6 +3,8 @@ error: expected `:`, found `}`
    |
 LL |     A
    |     ^ expected `:`
+   |
+   = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: proc-macro derive produced unparseable tokens
   --> $DIR/derive-bad.rs:7:5
diff --git a/src/test/ui/proc-macro/derive-helper-shadowing.stderr b/src/test/ui/proc-macro/derive-helper-shadowing.stderr
index 76434860a49..f82f49aa775 100644
--- a/src/test/ui/proc-macro/derive-helper-shadowing.stderr
+++ b/src/test/ui/proc-macro/derive-helper-shadowing.stderr
@@ -15,6 +15,8 @@ error: cannot find attribute `empty_helper` in this scope
    |
 LL |             #[derive(GenHelperUse)]
    |                      ^^^^^^^^^^^^
+   |
+   = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: cannot find attribute `empty_helper` in this scope
   --> $DIR/derive-helper-shadowing.rs:14:11
@@ -24,6 +26,8 @@ LL |         #[empty_helper]
 ...
 LL |             gen_helper_use!();
    |             ------------------ in this macro invocation
+   |
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0659]: `empty_helper` is ambiguous (name vs any other name during import resolution)
   --> $DIR/derive-helper-shadowing.rs:24:13
diff --git a/src/test/ui/proc-macro/dollar-crate.stderr b/src/test/ui/proc-macro/dollar-crate.stderr
index b9d9f9842bc..465f242580d 100644
--- a/src/test/ui/proc-macro/dollar-crate.stderr
+++ b/src/test/ui/proc-macro/dollar-crate.stderr
@@ -11,6 +11,7 @@ LL |     local!();
    |     --------- in this macro invocation
    |
    = note: `D` must be defined only once in the type namespace of this module
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0428]: the name `D` is defined multiple times
   --> $DIR/dollar-crate.rs:36:5
@@ -22,7 +23,7 @@ LL |     dollar_crate_external::external!();
    |     previous definition of the type `D` here
    |
    = note: `D` must be defined only once in the type namespace of this module
-   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/proc-macro/expand-to-unstable-2.stderr b/src/test/ui/proc-macro/expand-to-unstable-2.stderr
index 5b6184afacd..ac75367d7ff 100644
--- a/src/test/ui/proc-macro/expand-to-unstable-2.stderr
+++ b/src/test/ui/proc-macro/expand-to-unstable-2.stderr
@@ -6,6 +6,7 @@ LL | #[derive(Unstable)]
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/29642
    = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
+   = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/proc-macro/expand-to-unstable.stderr b/src/test/ui/proc-macro/expand-to-unstable.stderr
index 6df00765866..fdbf80f9b33 100644
--- a/src/test/ui/proc-macro/expand-to-unstable.stderr
+++ b/src/test/ui/proc-macro/expand-to-unstable.stderr
@@ -5,6 +5,7 @@ LL | #[derive(Unstable)]
    |          ^^^^^^^^
    |
    = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable
+   = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/proc-macro/gen-macro-rules-hygiene.stderr b/src/test/ui/proc-macro/gen-macro-rules-hygiene.stderr
index ecebdfa9656..b65fc739e09 100644
--- a/src/test/ui/proc-macro/gen-macro-rules-hygiene.stderr
+++ b/src/test/ui/proc-macro/gen-macro-rules-hygiene.stderr
@@ -6,6 +6,8 @@ LL | gen_macro_rules!();
 ...
 LL |         generated!();
    |         ------------- in this macro invocation
+   |
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `local_use` in this scope
   --> $DIR/gen-macro-rules-hygiene.rs:12:1
@@ -15,6 +17,8 @@ LL | gen_macro_rules!();
 ...
 LL |         generated!();
    |         ------------- in this macro invocation
+   |
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `local_def` in this scope
   --> $DIR/gen-macro-rules-hygiene.rs:21:9
diff --git a/src/test/ui/proc-macro/generate-mod.stderr b/src/test/ui/proc-macro/generate-mod.stderr
index 496bd86e988..d2390972634 100644
--- a/src/test/ui/proc-macro/generate-mod.stderr
+++ b/src/test/ui/proc-macro/generate-mod.stderr
@@ -6,6 +6,7 @@ LL | generate_mod::check!();
    |
    = note: possible candidate is found in another module, you can import it into scope:
            FromOutside
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0412]: cannot find type `Outer` in this scope
   --> $DIR/generate-mod.rs:9:1
@@ -15,6 +16,7 @@ LL | generate_mod::check!();
    |
    = note: possible candidate is found in another module, you can import it into scope:
            Outer
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0412]: cannot find type `FromOutside` in this scope
   --> $DIR/generate-mod.rs:12:1
@@ -24,6 +26,7 @@ LL | #[generate_mod::check_attr]
    |
    = note: possible candidate is found in another module, you can import it into scope:
            FromOutside
+   = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0412]: cannot find type `OuterAttr` in this scope
   --> $DIR/generate-mod.rs:12:1
@@ -33,6 +36,7 @@ LL | #[generate_mod::check_attr]
    |
    = note: possible candidate is found in another module, you can import it into scope:
            OuterAttr
+   = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 warning: cannot find type `FromOutside` in this scope
   --> $DIR/generate-mod.rs:16:10
diff --git a/src/test/ui/proc-macro/invalid-punct-ident-4.stderr b/src/test/ui/proc-macro/invalid-punct-ident-4.stderr
index cf85974316a..fe3e55b31be 100644
--- a/src/test/ui/proc-macro/invalid-punct-ident-4.stderr
+++ b/src/test/ui/proc-macro/invalid-punct-ident-4.stderr
@@ -3,6 +3,8 @@ error: unexpected closing delimiter: `)`
    |
 LL | lexer_failure!();
    | ^^^^^^^^^^^^^^^^^ unexpected closing delimiter
+   |
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: proc macro panicked
   --> $DIR/invalid-punct-ident-4.rs:6:1
diff --git a/src/test/ui/proc-macro/issue-38586.stderr b/src/test/ui/proc-macro/issue-38586.stderr
index 2584e0c62ee..4cdca5c8e01 100644
--- a/src/test/ui/proc-macro/issue-38586.stderr
+++ b/src/test/ui/proc-macro/issue-38586.stderr
@@ -3,6 +3,8 @@ error[E0425]: cannot find value `foo` in this scope
    |
 LL | #[derive(A)]
    |          ^ not found in this scope
+   |
+   = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/proc-macro/issue-50493.stderr b/src/test/ui/proc-macro/issue-50493.stderr
index 56c78001021..7997786b50b 100644
--- a/src/test/ui/proc-macro/issue-50493.stderr
+++ b/src/test/ui/proc-macro/issue-50493.stderr
@@ -9,12 +9,16 @@ error[E0616]: field `field` of struct `Restricted` is private
    |
 LL | #[derive(Derive)]
    |          ^^^^^^
+   |
+   = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0616]: field `field` of struct `Restricted` is private
   --> $DIR/issue-50493.rs:6:10
    |
 LL | #[derive(Derive)]
    |          ^^^^^^
+   |
+   = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/proc-macro/issue-59191-replace-root-with-fn.stderr b/src/test/ui/proc-macro/issue-59191-replace-root-with-fn.stderr
index e0a3caef9db..5995a4891f3 100644
--- a/src/test/ui/proc-macro/issue-59191-replace-root-with-fn.stderr
+++ b/src/test/ui/proc-macro/issue-59191-replace-root-with-fn.stderr
@@ -3,6 +3,8 @@ error: expected crate top-level item to be a module after macro expansion, found
    |
 LL | #![issue_59191::no_main]
    | ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0601]: `main` function not found in crate `issue_59191_replace_root_with_fn`
   --> $DIR/issue-59191-replace-root-with-fn.rs:5:1
diff --git a/src/test/ui/proc-macro/lints_in_proc_macros.stderr b/src/test/ui/proc-macro/lints_in_proc_macros.stderr
index 2d97cd700be..df9d7e1efe3 100644
--- a/src/test/ui/proc-macro/lints_in_proc_macros.stderr
+++ b/src/test/ui/proc-macro/lints_in_proc_macros.stderr
@@ -3,6 +3,8 @@ error[E0425]: cannot find value `foobar2` in this scope
    |
 LL |     bang_proc_macro2!();
    |     ^^^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `foobar`
+   |
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/proc-macro/mixed-site-span.stderr b/src/test/ui/proc-macro/mixed-site-span.stderr
index b5ca6cb9b29..c344147ed93 100644
--- a/src/test/ui/proc-macro/mixed-site-span.stderr
+++ b/src/test/ui/proc-macro/mixed-site-span.stderr
@@ -3,12 +3,16 @@ error[E0426]: use of undeclared label `'label_use`
    |
 LL |         proc_macro_rules!();
    |         ^^^^^^^^^^^^^^^^^^^^ undeclared label `'label_use`
+   |
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `local_use` in this scope
   --> $DIR/mixed-site-span.rs:15:9
    |
 LL |         proc_macro_rules!();
    |         ^^^^^^^^^^^^^^^^^^^^ not found in this scope
+   |
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `local_def` in this scope
   --> $DIR/mixed-site-span.rs:19:9
@@ -33,6 +37,7 @@ LL | | }
 LL |   pass_dollar_crate!();
    |   --------------------- in this macro invocation
    |
+   = 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
    |
 LL | use ItemUse;
diff --git a/src/test/ui/proc-macro/multispan.stderr b/src/test/ui/proc-macro/multispan.stderr
index e7f705c7feb..c9390a04b9e 100644
--- a/src/test/ui/proc-macro/multispan.stderr
+++ b/src/test/ui/proc-macro/multispan.stderr
@@ -20,6 +20,7 @@ note: found these 'hi's
    |
 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
@@ -43,6 +44,7 @@ note: found these 'hi's
    |
 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
@@ -66,6 +68,7 @@ note: found these 'hi's
    |
 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
@@ -89,6 +92,7 @@ note: found these 'hi's
    |
 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
@@ -112,6 +116,7 @@ note: found these 'hi's
    |
 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
@@ -135,6 +140,7 @@ note: found these 'hi's
    |
 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
@@ -158,6 +164,7 @@ note: found these 'hi's
    |
 LL |     hello!(hi good hi and good bye);
    |            ^^      ^^
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 7 previous errors
 
diff --git a/src/test/ui/proc-macro/parent-source-spans.stderr b/src/test/ui/proc-macro/parent-source-spans.stderr
index 9f0fefcfe6c..254f87751fd 100644
--- a/src/test/ui/proc-macro/parent-source-spans.stderr
+++ b/src/test/ui/proc-macro/parent-source-spans.stderr
@@ -6,6 +6,8 @@ LL |     three!($a, $b);
 ...
 LL |     one!("hello", "world");
    |     ----------------------- in this macro invocation
+   |
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: second final: "world"
   --> $DIR/parent-source-spans.rs:19:16
@@ -15,6 +17,8 @@ LL |     three!($a, $b);
 ...
 LL |     one!("hello", "world");
    |     ----------------------- in this macro invocation
+   |
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: first parent: "hello"
   --> $DIR/parent-source-spans.rs:13:5
@@ -24,6 +28,8 @@ LL |     two!($a, $b);
 ...
 LL |     one!("hello", "world");
    |     ----------------------- in this macro invocation
+   |
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: second parent: "world"
   --> $DIR/parent-source-spans.rs:13:5
@@ -33,6 +39,8 @@ LL |     two!($a, $b);
 ...
 LL |     one!("hello", "world");
    |     ----------------------- in this macro invocation
+   |
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: first grandparent: "hello"
   --> $DIR/parent-source-spans.rs:39:5
@@ -66,6 +74,8 @@ LL |     three!($a, $b);
 ...
 LL |     two!("yay", "rust");
    |     -------------------- in this macro invocation
+   |
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: second final: "rust"
   --> $DIR/parent-source-spans.rs:19:16
@@ -75,6 +85,8 @@ LL |     three!($a, $b);
 ...
 LL |     two!("yay", "rust");
    |     -------------------- in this macro invocation
+   |
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: first parent: "yay"
   --> $DIR/parent-source-spans.rs:45:5
@@ -137,6 +149,8 @@ LL |     one!("hello", "world");
    |
 LL |     Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
    |     --------------------------------------------------- similarly named tuple variant `Ok` defined here
+   |
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `ok` in this scope
   --> $DIR/parent-source-spans.rs:32:5
@@ -151,6 +165,8 @@ LL |     two!("yay", "rust");
    |
 LL |     Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
    |     --------------------------------------------------- similarly named tuple variant `Ok` defined here
+   |
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `ok` in this scope
   --> $DIR/parent-source-spans.rs:32:5
@@ -165,6 +181,8 @@ LL |     three!("hip", "hop");
    |
 LL |     Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
    |     --------------------------------------------------- similarly named tuple variant `Ok` defined here
+   |
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 21 previous errors
 
diff --git a/src/test/ui/proc-macro/subspan.stderr b/src/test/ui/proc-macro/subspan.stderr
index 5117dd6d32d..c82c2dee676 100644
--- a/src/test/ui/proc-macro/subspan.stderr
+++ b/src/test/ui/proc-macro/subspan.stderr
@@ -9,6 +9,7 @@ note: here
    |
 LL | subspan!("hi");
    |           ^^
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: found 'hi's
   --> $DIR/subspan.rs:14:1
@@ -21,6 +22,7 @@ note: here
    |
 LL | subspan!("hihi");
    |           ^^^^
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: found 'hi's
   --> $DIR/subspan.rs:17:1
@@ -33,6 +35,7 @@ note: here
    |
 LL | subspan!("hihihi");
    |           ^^^^^^
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: found 'hi's
   --> $DIR/subspan.rs:20:1
@@ -45,6 +48,7 @@ note: here
    |
 LL | subspan!("why I hide? hi!");
    |                 ^^    ^^
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: found 'hi's
   --> $DIR/subspan.rs:21:1
@@ -57,6 +61,7 @@ note: here
    |
 LL | subspan!("hey, hi, hidy, hidy, hi hi");
    |                ^^  ^^    ^^    ^^ ^^
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: found 'hi's
   --> $DIR/subspan.rs:22:1
@@ -69,6 +74,7 @@ note: here
    |
 LL | subspan!("this is a hi, and this is another hi");
    |            ^^       ^^       ^^             ^^
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: found 'hi's
   --> $DIR/subspan.rs:23:1
@@ -81,6 +87,7 @@ note: here
    |
 LL | subspan!("how are you this evening");
    |                        ^^
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: found 'hi's
   --> $DIR/subspan.rs:24:1
@@ -93,6 +100,7 @@ note: here
    |
 LL | subspan!("this is highly eradic");
    |            ^^     ^^
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 8 previous errors
 
diff --git a/src/test/ui/proc-macro/three-equals.stderr b/src/test/ui/proc-macro/three-equals.stderr
index 0698b0f4754..82c4167262f 100644
--- a/src/test/ui/proc-macro/three-equals.stderr
+++ b/src/test/ui/proc-macro/three-equals.stderr
@@ -16,6 +16,7 @@ LL |       three_equals!(==);
    |       ------------------ in this macro invocation
    |
    = help: input must be: `===`
+   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: expected EOF, found `=`.
   --> $DIR/three-equals.rs:18:21