From 967c0fa76da9384afe918a8b23eef60f12f29292 Mon Sep 17 00:00:00 2001 From: jfecher Date: Wed, 5 Jun 2024 11:58:42 +0100 Subject: [PATCH] fix(elaborator): Invert unconstrained check (#5176) # Description ## Problem\* A check from https://github.com/noir-lang/noir/pull/5165 was inverted leading to CI issues in https://github.com/noir-lang/noir/pull/5172 ## Summary\* Fixed an accidentally inverted check for checking if a function is unconstrained ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --- compiler/noirc_frontend/src/elaborator/lints.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/noirc_frontend/src/elaborator/lints.rs b/compiler/noirc_frontend/src/elaborator/lints.rs index da3e033cd4c..d228588d367 100644 --- a/compiler/noirc_frontend/src/elaborator/lints.rs +++ b/compiler/noirc_frontend/src/elaborator/lints.rs @@ -41,7 +41,7 @@ pub(super) fn deprecated_function(interner: &NodeInterner, expr: ExprId) -> Opti /// as all unconstrained functions are not inlined and so /// associated attributes are disallowed. pub(super) fn inlining_attributes(func: &NoirFunction) -> Option { - if !func.def.is_unconstrained { + if func.def.is_unconstrained { let attributes = func.attributes().clone(); if attributes.is_no_predicates() {