Skip to content

fix: specify generic argument N of several structs#14967

Merged
asterite merged 5 commits intonextfrom
ab/call-interface-stubs-specify-n
Jun 12, 2025
Merged

fix: specify generic argument N of several structs#14967
asterite merged 5 commits intonextfrom
ab/call-interface-stubs-specify-n

Conversation

@asterite
Copy link
Contributor

@asterite asterite commented Jun 11, 2025

For noir-lang/noir#8686

When returning dep::aztec::context::call_interfaces::PrivateStaticCallInterface (and others) from some functions, the generic N argument wasn't specified. This will soon cause a compile error (like in Rust).

I assumed the N argument is the size of the return type (I tried with zero first and it said it didn't find a Deserialize<0> impl for some types, so I figured the size in fields of the type was needed), but let me know if that's not how it should be done.

Given that size_in_fields is now used in a couple of places, I decided to move it to its own file/module.

@asterite asterite requested review from nventuro and sklppy88 June 11, 2025 12:46
Copy link
Contributor

@nventuro nventuro left a comment

Choose a reason for hiding this comment

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

Thanks!

@asterite asterite added this pull request to the merge queue Jun 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 12, 2025
@asterite asterite added this pull request to the merge queue Jun 12, 2025
Merged via the queue into next with commit f880f14 Jun 12, 2025
4 checks passed
@asterite asterite deleted the ab/call-interface-stubs-specify-n branch June 12, 2025 14:33
danielntmd pushed a commit to danielntmd/aztec-packages that referenced this pull request Jul 16, 2025
For noir-lang/noir#8686

When returning
`dep::aztec::context::call_interfaces::PrivateStaticCallInterface` (and
others) from some functions, the generic `N` argument wasn't specified.
This will soon cause a compile error (like in Rust).

I assumed the `N` argument is the size of the return type (I tried with
zero first and it said it didn't find a `Deserialize<0>` impl for some
types, so I figured the size in fields of the type was needed), but let
me know if that's not how it should be done.

Given that `size_in_fields` is now used in a couple of places, I decided
to move it to its own file/module.
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