Skip to content

fix(document-metrics): Avoid error on cfg and instead treat like a feature. #4704

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

Merged

Conversation

tobias-wilfert
Copy link
Member

@tobias-wilfert tobias-wilfert commented May 2, 2025

While working on #4680 I found out that if you have a cfg like cfg(flag) this will cause cargo run -p document-metrics to error with Error: expected '='.

This is an attempt to avoid that and instead treat it like cfg(feature=flag).

NOTE: This might not be the best approach, we might want to ignore the enum variant instead if it is guarded by a cfg.

#skip-changelog

@tobias-wilfert tobias-wilfert self-assigned this May 2, 2025
@tobias-wilfert tobias-wilfert requested a review from a team as a code owner May 2, 2025 13:29
Copy link
Member

@Dav1dde Dav1dde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@tobias-wilfert tobias-wilfert merged commit 5730b55 into master May 5, 2025
27 of 28 checks passed
@tobias-wilfert tobias-wilfert deleted the tobias-wilfert/fix/stads-add-support-for-cfg branch May 5, 2025 13:17
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