Skip to content

fix: remove shadowing in BoundedVec::any causing returning false unconditionally#9478

Merged
TomAFrench merged 3 commits intonoir-lang:masterfrom
GarmashAlex:fix/stdlib-bounded_vec-any-shadowing
Aug 13, 2025
Merged

fix: remove shadowing in BoundedVec::any causing returning false unconditionally#9478
TomAFrench merged 3 commits intonoir-lang:masterfrom
GarmashAlex:fix/stdlib-bounded_vec-any-shadowing

Conversation

@GarmashAlex
Copy link
Contributor

@GarmashAlex GarmashAlex commented Aug 13, 2025

Remove the shadowed ret inside the constrained branch of BoundedVec::any, using the outer accumulator instead.
This bug caused any to always return false when is_unconstrained() was false, even if the predicate matched an element.

@github-actions
Copy link
Contributor

Thank you for your contribution to the Noir language.

Please do not force push to this branch after the Noir team have started review of this PR. Doing so will only delay us merging your PR as we will need to start the review process from scratch.

Thanks for your understanding.

@TomAFrench TomAFrench self-requested a review August 13, 2025 10:45
@TomAFrench TomAFrench changed the title Fix BoundedVec::any returning false in constrained mode (ret shadowing) fix: remove shadowing in BoundedVec::any causing returning false unconditionally Aug 13, 2025
Copy link
Member

@TomAFrench TomAFrench left a comment

Choose a reason for hiding this comment

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

Thanks for flagging this up! LGTM

@TomAFrench TomAFrench added this pull request to the merge queue Aug 13, 2025
Merged via the queue into noir-lang:master with commit b51b616 Aug 13, 2025
119 of 120 checks passed
AztecBot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 15, 2025
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore: restore noir libs in CI (noir-lang/noir#9499)
feat!: new semantic for bit-shifts  (noir-lang/noir#9373)
fix(ssa): Replace side effects with defaults when disabled (noir-lang/noir#9462)
fix(ssa): Replace pop from 0-length slice with constraint and defaults (noir-lang/noir#9489)
fix: assert types are not mutated in constant folding (noir-lang/noir#9481)
fix: remove shadowing in `BoundedVec::any` causing returning  false unconditionally (noir-lang/noir#9478)
END_COMMIT_OVERRIDE
AztecBot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 15, 2025
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore: restore noir libs in CI (noir-lang/noir#9499)
feat!: new semantic for bit-shifts  (noir-lang/noir#9373)
fix(ssa): Replace side effects with defaults when disabled (noir-lang/noir#9462)
fix(ssa): Replace pop from 0-length slice with constraint and defaults (noir-lang/noir#9489)
fix: assert types are not mutated in constant folding (noir-lang/noir#9481)
fix: remove shadowing in `BoundedVec::any` causing returning  false unconditionally (noir-lang/noir#9478)
END_COMMIT_OVERRIDE
github-merge-queue bot pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Aug 15, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore: restore noir libs in CI
(noir-lang/noir#9499)
feat!: new semantic for bit-shifts
(noir-lang/noir#9373)
fix(ssa): Replace side effects with defaults when disabled
(noir-lang/noir#9462)
fix(ssa): Replace pop from 0-length slice with constraint and defaults
(noir-lang/noir#9489)
fix: assert types are not mutated in constant folding
(noir-lang/noir#9481)
fix: remove shadowing in `BoundedVec::any` causing returning false
unconditionally (noir-lang/noir#9478)
END_COMMIT_OVERRIDE
mralj pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Oct 13, 2025
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore: restore noir libs in CI (noir-lang/noir#9499)
feat!: new semantic for bit-shifts  (noir-lang/noir#9373)
fix(ssa): Replace side effects with defaults when disabled (noir-lang/noir#9462)
fix(ssa): Replace pop from 0-length slice with constraint and defaults (noir-lang/noir#9489)
fix: assert types are not mutated in constant folding (noir-lang/noir#9481)
fix: remove shadowing in `BoundedVec::any` causing returning  false unconditionally (noir-lang/noir#9478)
END_COMMIT_OVERRIDE
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