From 758a905fc740971c995151bfb5f997bcc080397c Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Fri, 28 Jun 2024 14:50:32 +0100 Subject: [PATCH] fix: address compiler warnings coming from stdlib (#5351) # Description ## Problem\* Resolves ## Summary\* This PR turns back on the test that the stdlib shouldn't produce compiler warnings. ## 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_driver/tests/stdlib_warnings.rs | 1 - noir_stdlib/src/lib.nr | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/noirc_driver/tests/stdlib_warnings.rs b/compiler/noirc_driver/tests/stdlib_warnings.rs index 9b2aeaecd94..47ce893d202 100644 --- a/compiler/noirc_driver/tests/stdlib_warnings.rs +++ b/compiler/noirc_driver/tests/stdlib_warnings.rs @@ -3,7 +3,6 @@ use std::path::Path; use noirc_driver::{file_manager_with_stdlib, prepare_crate, ErrorsAndWarnings}; use noirc_frontend::hir::{def_map::parse_file, Context}; -#[ignore = "Temporarily ignoring the test until the stdlib is updated to use explicit numeric generics"] #[test] fn stdlib_does_not_produce_constant_warnings() -> Result<(), ErrorsAndWarnings> { // We use a minimal source file so that if stdlib produces warnings then we can expect these warnings to _always_ diff --git a/noir_stdlib/src/lib.nr b/noir_stdlib/src/lib.nr index c5c184fa825..65da7e6e9ab 100644 --- a/noir_stdlib/src/lib.nr +++ b/noir_stdlib/src/lib.nr @@ -51,7 +51,7 @@ pub fn assert_constant(x: T) {} // Asserts that the given value is both true and known at compile-time #[builtin(static_assert)] -pub fn static_assert(predicate: bool, message: str) {} +pub fn static_assert(predicate: bool, message: str) {} // from_field and as_field are private since they are not valid for every type. // `as` should be the default for users to cast between primitive types, and in the future