Skip to content

DirStructureAsync: carry the struct's where clause over into the generated future enums - #3

Merged
dnbln merged 2 commits into
dnbln:trunkfrom
KiSetsuFu-PuLiN:fix/missing-where-clauses
Sep 23, 2026
Merged

dnbln merged 2 commits into
dnbln:trunkfrom
KiSetsuFu-PuLiN:fix/missing-where-clauses

Conversation

@KiSetsuFu-PuLiN

Copy link
Copy Markdown
Contributor

#[derive(DirStructureAsync)] inherits the derived struct's where clause in the generated trait impls, but not in the generated type Future enums — those are emitted with the per-field bounds only. When a struct's own where clause carries bounds that the generated code needs (e.g. bounds required by a custom Filter for a generic path type), compilation fails inside the derive expansion even though the bounds are written on the struct itself.

  • KiSetsuFu-PuLiN/dir-structure@2905a34 — compile-time regression test (derive_where_clause module): without the fix it fails with <Vfs as VfsCore>::Path: MyTrait is not satisfied.
  • KiSetsuFu-PuLiN/dir-structure@cf1f4f9 — merge the struct's where clause into the where clause of the generated future enums (future_impl_enum in dir_structure_async/{read_from_async.rs, write_to_async_ref.rs}), consistently with what the impl generation already does.

@KiSetsuFu-PuLiN
KiSetsuFu-PuLiN force-pushed the fix/missing-where-clauses branch from cf1f4f9 to e3f9f0a Compare September 21, 2026 07:47
@dnbln
dnbln merged commit ad8f282 into dnbln:trunk Sep 23, 2026
1 check passed
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