Skip to content

fix: remove as_array call for which N cannot be deduced#180

Merged
TomAFrench merged 2 commits intomainfrom
ab/fix-cannot-deduce-generic-parameter
May 27, 2025
Merged

fix: remove as_array call for which N cannot be deduced#180
TomAFrench merged 2 commits intomainfrom
ab/fix-cannot-deduce-generic-parameter

Conversation

@asterite
Copy link
Copy Markdown
Contributor

Description

Problem

Towards noir-lang/noir#8686

Summary

I'm not sure how this compiled before noir-lang/noir#8686: the as_array call converted the slice to an array, then I think with implicit rules it was converted back to a slice. But... what's the size of that intermediate array? It can't be deduced. Removing the as_array call fixes this, as I think it was never needed (and I think the comment on top of the function saying we can't return slice might be outdated).

Additional Context

PR Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@TomAFrench TomAFrench enabled auto-merge (squash) May 27, 2025 09:34
@TomAFrench TomAFrench merged commit c7c7720 into main May 27, 2025
9 checks passed
@github-project-automation github-project-automation Bot moved this from 👀 To Triage to ✅ Done in Noir Libraries May 27, 2025
@github-actions github-actions Bot mentioned this pull request May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants