Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support feature-gated rust attributes #2801

Closed
teh-cmc opened this issue Jul 24, 2023 · 0 comments · Fixed by #2813
Closed

Support feature-gated rust attributes #2801

teh-cmc opened this issue Jul 24, 2023 · 0 comments · Fixed by #2813
Labels

Comments

@teh-cmc
Copy link
Member

teh-cmc commented Jul 24, 2023

Consider e.g.:

"attr.rust.derive": "::serde::Serialize, ::serde::Deserialize",

This should only be active if the serde feature is enabled, i.e.

#[cfg_attr(feature = "serde", derive("::serde::Serialize, ::serde::Deserialize"))]

rather than merely

#[derive("::serde::Serialize, ::serde::Deserialize")]
Wumpf pushed a commit that referenced this issue Jul 26, 2023
Fixes #2801 by adding a `attr.rust.custom_clause`.

### What

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/2813) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/2813)
- [Docs
preview](https://rerun.io/preview/pr%3Acmc%2Fcodegen_feature_gates/docs)
- [Examples
preview](https://rerun.io/preview/pr%3Acmc%2Fcodegen_feature_gates/examples)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant