mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
fix rebase fallout due to #69497.
This commit is contained in:
parent
d07103508a
commit
c415f12582
@ -1,6 +1,6 @@
|
||||
// compile-flags: -Z trace-macros
|
||||
|
||||
#![recursion_limit="4"]
|
||||
#![recursion_limit = "4"]
|
||||
|
||||
macro_rules! my_faulty_macro {
|
||||
() => {
|
||||
@ -24,9 +24,7 @@ macro_rules! my_recursive_macro {
|
||||
}
|
||||
|
||||
macro_rules! my_macro {
|
||||
() => {
|
||||
|
||||
};
|
||||
() => {};
|
||||
}
|
||||
|
||||
fn main() {
|
||||
@ -39,7 +37,7 @@ fn main() {
|
||||
}
|
||||
|
||||
#[my_macro]
|
||||
fn use_bang_macro_as_attr(){}
|
||||
fn use_bang_macro_as_attr() {}
|
||||
|
||||
#[derive(Debug)]
|
||||
fn use_derive_macro_as_attr(){}
|
||||
#[derive(Debug)] //~ ERROR `derive` may only be applied to structs
|
||||
fn use_derive_macro_as_attr() {}
|
||||
|
@ -13,7 +13,7 @@ LL | my_faulty_macro!();
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
note: trace_macro
|
||||
--> $DIR/trace_faulty_macros.rs:33:5
|
||||
--> $DIR/trace_faulty_macros.rs:31:5
|
||||
|
|
||||
LL | my_faulty_macro!();
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
@ -35,7 +35,7 @@ LL | my_recursive_macro!();
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
note: trace_macro
|
||||
--> $DIR/trace_faulty_macros.rs:34:5
|
||||
--> $DIR/trace_faulty_macros.rs:32:5
|
||||
|
|
||||
LL | my_recursive_macro!();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -60,5 +60,22 @@ LL | let a = pat_macro!();
|
||||
|
|
||||
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: `derive` may only be applied to structs, enums and unions
|
||||
--> $DIR/trace_faulty_macros.rs:42:1
|
||||
|
|
||||
LL | #[derive(Debug)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
||||
note: trace_macro
|
||||
--> $DIR/trace_faulty_macros.rs:36:13
|
||||
|
|
||||
LL | let a = pat_macro!();
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= note: expanding `pat_macro! { }`
|
||||
= note: to `pat_macro ! (A { a : a, b : 0, c : _, .. }) ;`
|
||||
= note: expanding `pat_macro! { A { a : a, b : 0, c : _, .. } }`
|
||||
= note: to `A { a: a, b: 0, c: _, .. }`
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user