Skip to content

fix: variable used in fmtstr inside lambda wasn't tracked as captured#8487

Merged
jfecher merged 1 commit intomasterfrom
ab/fmtstr-captured-variable
May 13, 2025
Merged

fix: variable used in fmtstr inside lambda wasn't tracked as captured#8487
jfecher merged 1 commit intomasterfrom
ab/fmtstr-captured-variable

Conversation

@asterite
Copy link
Copy Markdown
Collaborator

Description

Problem

Resolves #8166

Summary

We were missing a similar treatment to what we do with local variables, but when elaborating format string interpolated identifiers.

I didn't know what name to use for the extracted logic, I went with handle_hir_ident but happy to give it a better name.

Additional Context

Documentation

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist

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

@asterite asterite requested a review from a team May 13, 2025 15:36
@jfecher jfecher added this pull request to the merge queue May 13, 2025
Merged via the queue into master with commit ef7d21d May 13, 2025
118 checks passed
@jfecher jfecher deleted the ab/fmtstr-captured-variable branch May 13, 2025 16:08
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request May 14, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: pass Field to ToBits intrinsic in remove_bit_shifts optimization
(noir-lang/noir#8493)
fix: don't produce `index Field` in value merger
(noir-lang/noir#8492)
fix: allowing accessing associated constants via `Self::...`
(noir-lang/noir#8403)
fix: remove unused generic in static_assert
(noir-lang/noir#8488)
fix: disallow generics on entry points
(noir-lang/noir#8490)
chore(test): Replicate comptime stack overflow in a test
(noir-lang/noir#8473)
feat: `#[test(only_fail_with = "...")]`
(noir-lang/noir#8460)
fix: variable used in fmtstr inside lambda wasn't tracked as captured
(noir-lang/noir#8487)
chore(test): Add more tests for defunctionalization
(noir-lang/noir#8481)
END_COMMIT_OVERRIDE

Co-authored-by: AztecBot <tech@aztecprotocol.com>
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.

TypeDefinition::name() complains about not being comptime

2 participants