Skip to content

codegen: gate deprecated fields behind cfg(feature = "deprecated")#31

Open
elmarco wants to merge 1 commit into
arcnmx:mainfrom
elmarco:deprecated
Open

codegen: gate deprecated fields behind cfg(feature = "deprecated")#31
elmarco wants to merge 1 commit into
arcnmx:mainfrom
elmarco:deprecated

Conversation

@elmarco

@elmarco elmarco commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Emit #[cfg(feature = "deprecated")] alongside #[deprecated] on struct fields marked as deprecated in the QAPI schema. This allows downstream users to opt out of deprecated API surface entirely by not enabling the feature. Generated From/AsRef/Deref impls are also cfg-gated when they reference deprecated fields.

Emit #[cfg(feature = "deprecated")] alongside #[deprecated] on struct
fields marked as deprecated in the QAPI schema. This allows downstream
users to opt out of deprecated API surface entirely by not enabling the
feature. Generated From/AsRef/Deref impls are also cfg-gated when they
reference deprecated fields.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant