Skip to content

Fix remaining derive hygiene edge cases - #138

Open
ya7010 wants to merge 4 commits into
mainfrom
ya7010/fix-followup-derive-edge-cases
Open

Fix remaining derive hygiene edge cases#138
ya7010 wants to merge 4 commits into
mainfrom
ya7010/fix-followup-derive-edge-cases

Conversation

@ya7010

@ya7010 ya7010 commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • propagate deprecated enumerate warnings from named and tuple enum fields
  • run enum-level custom validation for unit variants
  • isolate generated bindings from user fields and statics, including raw identifiers
  • make autoderef helper method names field-specific to avoid collisions with user-defined inherent methods
  • add regression coverage for every reproduced failure

Red-to-green verification

Before the implementation changes, the new tests reproduced all four problems:

  • the autoderef regression test silently bypassed min_length validation
  • the unit enum regression test returned Ok(()) instead of the custom validation error
  • both enum warning expansion tests lacked the expected deprecation tokens
  • generated bindings failed to compile with E0530 and captured a user error_params static

The same tests pass after the fixes.

Verification

  • cargo nextest run (331 passed)
  • cargo nextest run --all-features (342 passed)
  • cargo test --all-features
  • cargo test --no-default-features
  • cargo clippy -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

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