---
source: crates/laburnum-syntax-macro/src/tests/error_tests.rs
expression: "use laburnum_syntax_macro::tests::error_tests::test_error_with_help_message"
snapshot_kind: text
---
Input: >
  #[laburnum_syntax(AST)]
  pub trait NotAStruct {
      fn method();
  }

Error: >
  Error(
      [
          "#[laburnum_syntax] can only be applied to structs",
          "help: This attribute is designed to work with struct definitions only",
          "hint: Try using: #[laburnum_syntax(AST)] pub struct MyStruct { ... }",
      ],
  )

Error Message: >
  #[laburnum_syntax] can only be applied to structs
