diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2021-02-13 14:52:25 -0500 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2021-05-12 19:03:06 -0400 |
| commit | 0dd9f118d973bb077c6ff0e2a57421ca2eecb81c (patch) | |
| tree | 02a54f3e5aceaf032fbc32486fd122f47dd40553 /src/test/ui/const-generics | |
| parent | 70e52caed91a43fc01867921e67fcd3478056edd (diff) | |
| download | rust-0dd9f118d973bb077c6ff0e2a57421ca2eecb81c.tar.gz rust-0dd9f118d973bb077c6ff0e2a57421ca2eecb81c.zip | |
Show macro name in 'this error originates in macro' message
When there are multiple macros in use, it can be difficult to tell which one was responsible for producing an error.
Diffstat (limited to 'src/test/ui/const-generics')
| -rw-r--r-- | src/test/ui/const-generics/macro_rules-braces.full.stderr | 8 | ||||
| -rw-r--r-- | src/test/ui/const-generics/min_const_generics/macro-fail.stderr | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/test/ui/const-generics/macro_rules-braces.full.stderr b/src/test/ui/const-generics/macro_rules-braces.full.stderr index 1883f454e60..ef6e857838a 100644 --- a/src/test/ui/const-generics/macro_rules-braces.full.stderr +++ b/src/test/ui/const-generics/macro_rules-braces.full.stderr @@ -30,7 +30,7 @@ LL | let _: foo!({{ N }}); | ------------- in this macro invocation | = note: this may fail depending on what value the parameter takes - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) error: constant expression depends on a generic parameter --> $DIR/macro_rules-braces.rs:20:13 @@ -42,7 +42,7 @@ LL | let _: bar!({ N }); | ----------- in this macro invocation | = note: this may fail depending on what value the parameter takes - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `bar` (in Nightly builds, run with -Z macro-backtrace for more info) error: constant expression depends on a generic parameter --> $DIR/macro_rules-braces.rs:25:13 @@ -54,7 +54,7 @@ LL | let _: baz!({{ N }}); | ------------- in this macro invocation | = note: this may fail depending on what value the parameter takes - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `baz` (in Nightly builds, run with -Z macro-backtrace for more info) error: constant expression depends on a generic parameter --> $DIR/macro_rules-braces.rs:30:13 @@ -66,7 +66,7 @@ LL | let _: biz!({ N }); | ----------- in this macro invocation | = note: this may fail depending on what value the parameter takes - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `biz` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 6 previous errors diff --git a/src/test/ui/const-generics/min_const_generics/macro-fail.stderr b/src/test/ui/const-generics/min_const_generics/macro-fail.stderr index 22930a352a8..d5dd70d9b48 100644 --- a/src/test/ui/const-generics/min_const_generics/macro-fail.stderr +++ b/src/test/ui/const-generics/min_const_generics/macro-fail.stderr @@ -10,7 +10,7 @@ LL | fn make_marker() -> impl Marker<gimme_a_const!(marker)> { LL | ($rusty: ident) => {{ let $rusty = 3; *&$rusty }} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type | - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `gimme_a_const` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected type, found `{` --> $DIR/macro-fail.rs:29:27 @@ -24,7 +24,7 @@ LL | Example::<gimme_a_const!(marker)> LL | ($rusty: ident) => {{ let $rusty = 3; *&$rusty }} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type | - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `gimme_a_const` (in Nightly builds, run with -Z macro-backtrace for more info) error: expected type, found `{` --> $DIR/macro-fail.rs:4:10 @@ -43,7 +43,7 @@ LL | let _fail = Example::<external_macro!()>; | this macro call doesn't expand to a type | in this macro invocation | - = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) + = note: this error originates in the macro `external_macro` (in Nightly builds, run with -Z macro-backtrace for more info) error: unexpected end of macro invocation --> $DIR/macro-fail.rs:39:25 |
