Repository: lalrpop/lalrpop (language: rust)

Issue:
Document  `$attr`  in `lalrpop_mod!`

The rust doc for `lalrpop_mod!` does not show an example in which the `$attr` is used.

A relevant example might be something like

```rust
lalrpop_mod!(#[allow(clippy::vec_box)] pub calculator);
```

I do understand why this is left out of the tutorial, but more fully documenting `lalrpop_mod!` will help those who do run clippy on the tutorial.




Discussion / hints:

Fix patch:
diff --git a/lalrpop-util/src/lib.rs b/lalrpop-util/src/lib.rs
index 28c8500ca..648a5fe19 100644
--- a/lalrpop-util/src/lib.rs
+++ b/lalrpop-util/src/lib.rs
@@ -182,6 +182,9 @@ pub struct ErrorRecovery<L, T, E> {
 ///
 /// // define a public module
 /// lalrpop_mod!(pub parser);
+///
+/// // specify attributes for the generated module
+/// lalrpop_mod!(#[allow(clippy::ptr_arg)]#[rustfmt::skip] parser);
 /// ```
 
 #[macro_export]


Test patch: