Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_def/src/macro_expansion_tests/mbe.rs')
| -rw-r--r-- | crates/hir_def/src/macro_expansion_tests/mbe.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/crates/hir_def/src/macro_expansion_tests/mbe.rs b/crates/hir_def/src/macro_expansion_tests/mbe.rs index 1da0110fe2..7a866135b3 100644 --- a/crates/hir_def/src/macro_expansion_tests/mbe.rs +++ b/crates/hir_def/src/macro_expansion_tests/mbe.rs @@ -1446,3 +1446,25 @@ fn f() { "#]], ) } + +#[test] +fn mbe_are_not_attributes() { + check( + r#" +macro_rules! error { + () => {struct Bar} +} + +#[error] +struct Foo; +"#, + expect![[r##" +macro_rules! error { + () => {struct Bar} +} + +#[error] +struct Foo; +"##]], + ) +} |