Skip to content

Make Record::to_builder available without the kv feature - #750

Closed
patrick-immometrica wants to merge 1 commit into
rust-lang:mainfrom
patrick-immometrica:record-to-builder
Closed

patrick-immometrica wants to merge 1 commit into
rust-lang:mainfrom
patrick-immometrica:record-to-builder

Conversation

@patrick-immometrica

Copy link
Copy Markdown

Record::to_builder has #[cfg(feature = "kv")] on the whole method, so it only exists when kv is enabled, although nothing in it needs kv apart from copying the key_values field.

I don't think that was intended: when the method was added in #324 its body also had a #[cfg(not(feature = "kv_unstable"))] branch, which could never be compiled because of the attribute on the method.

This moves the cfg to the field and adds a test that runs without any features.

The cfg is only needed for the key_values field. On the method it
meant to_builder didn't exist unless kv was enabled.
@patrick-immometrica
patrick-immometrica marked this pull request as ready for review November 15, 2026 18:49
@KodrAus KodrAus closed this Nov 15, 2026
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.

2 participants