Skip to content

fix(nearest-derive): add Flat bounds to unbounded type params in emit impl#32

Merged
uael merged 2 commits intomainfrom
fix/emit-derive-outer-where
Mar 9, 2026
Merged

fix(nearest-derive): add Flat bounds to unbounded type params in emit impl#32
uael merged 2 commits intomainfrom
fix/emit-derive-outer-where

Conversation

@uael
Copy link
Copy Markdown
Owner

@uael uael commented Mar 9, 2026

Summary

  • The generated make() methods used split_for_impl() which only includes bounds explicitly written by the user
  • Type parameters without an explicit Flat bound were missing the required constraint on the impl block
  • Add outer_where_clause() that uses flat_bounded_param_names and combine_where to infer and add missing Flat bounds

Test plan

  • cargo test — all 183 tests pass
  • cargo xtask lint — clean

🤖 Generated with Claude Code

uael and others added 2 commits March 9, 2026 09:30
… impl

The generated `make()` methods were using `split_for_impl()` which only
includes bounds explicitly written by the user. Type parameters without
an explicit `Flat` bound (e.g. from a where clause) were missing the
required `Flat` constraint on the impl block, causing compilation errors
in downstream usage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@uael uael merged commit 8b06634 into main Mar 9, 2026
7 checks passed
@github-actions github-actions Bot mentioned this pull request Mar 9, 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.

1 participant