New stack macro implementation triggers clippy::toplevel_ref_arg warning
- Dominant language
- Rust
- Stars
- 4.8k
- Forks
- 565
- PR merge metrics
- No merged PRs in 30d
Description
[This](https://github.com/dimforge/nalgebra/blob/48c8f6a5053fac48e305f5e5e0004a332811d092/nalgebra-macros/src/stack_impl.rs#L29) line triggers the `clippy::toplevel_ref_arg` warning for users of `stack!`.
Example warning:
```
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
--> src/main.rs:35:15
|
35 | let rhs = stack![ bp.cross(&bv) - ap.cross(&av);
| _______________^
36 | | cp.cross(&cv) - ap.cross(&av) ];
| |_____________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
= note: `#[warn(clippy::toplevel_ref_arg)]` on by default
= note: this warning originates in the macro `stack` (in Nightly builds, run with -Z macro-backtrace for more info)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.