Inline trait methods in derive-generated code
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 179
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 29
Description
## Status
- [x] #341
- [ ] Deny `clippy::missing_inline_in_public_items` in derive-generated code
## zerocopy-derive
We don't care about inline attributes for zerocopy-derive itself, but we _do_ care for code _emitted_ by zerocopy-derive. We need to figure out a way to either modify zerocopy-derive's output or modify our zerocopy-derive tests so that, when running zerocopy-derive tests, missing `#[inline]` attributes generate warnings or errors. It might be possible to use the `clippy::missing_inline_in_public_items` lint for this, but I'm not sure.
## zerocopy
~~Many zerocopy trait methods contain very little logic or no logic at all, but are currently not marked with any `inline` attribute, and so cannot be inlined across a crate boundary. We should change this.~~
`#[inline]` attributes are now enforced by Clippy as of #341.
## Mentoring instructions
*Interested in contributing? See our [contributing guide](https://github.com/google/zerocopy/discussions/1318).*
Figure out how we can ensure that the `clippy::missing_inline_in_public_items` lint is enforced (at least during testing) in code emitted by zerocopy-derive.
Contributor guide
Assessment
This issue has not been assessed yet.