From 2732947a45ee8827045cdc3d0aff2001fd270080 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Fri, 10 Jan 2025 20:10:57 +0000 Subject: [PATCH] feat!: disallow calling unconstrained functions outside of `unsafe` blocks and passing unconstrained functions in place of constrained functions (#6938) --- .../{.failures.jsonl => .failures.jsonl.does_not_compile} | 0 .../{.failures.jsonl => .failures.jsonl.does_not_compile} | 0 .../{.failures.jsonl => .failures.jsonl.does_not_compile} | 0 compiler/noirc_frontend/src/hir/type_check/errors.rs | 4 ++-- 4 files changed, 2 insertions(+), 2 deletions(-) rename .github/critical_libraries_status/noir-lang/noir-edwards/{.failures.jsonl => .failures.jsonl.does_not_compile} (100%) rename .github/critical_libraries_status/noir-lang/noir_json_parser/{.failures.jsonl => .failures.jsonl.does_not_compile} (100%) rename .github/critical_libraries_status/noir-lang/noir_sort/{.failures.jsonl => .failures.jsonl.does_not_compile} (100%) diff --git a/.github/critical_libraries_status/noir-lang/noir-edwards/.failures.jsonl b/.github/critical_libraries_status/noir-lang/noir-edwards/.failures.jsonl.does_not_compile similarity index 100% rename from .github/critical_libraries_status/noir-lang/noir-edwards/.failures.jsonl rename to .github/critical_libraries_status/noir-lang/noir-edwards/.failures.jsonl.does_not_compile diff --git a/.github/critical_libraries_status/noir-lang/noir_json_parser/.failures.jsonl b/.github/critical_libraries_status/noir-lang/noir_json_parser/.failures.jsonl.does_not_compile similarity index 100% rename from .github/critical_libraries_status/noir-lang/noir_json_parser/.failures.jsonl rename to .github/critical_libraries_status/noir-lang/noir_json_parser/.failures.jsonl.does_not_compile diff --git a/.github/critical_libraries_status/noir-lang/noir_sort/.failures.jsonl b/.github/critical_libraries_status/noir-lang/noir_sort/.failures.jsonl.does_not_compile similarity index 100% rename from .github/critical_libraries_status/noir-lang/noir_sort/.failures.jsonl rename to .github/critical_libraries_status/noir-lang/noir_sort/.failures.jsonl.does_not_compile diff --git a/compiler/noirc_frontend/src/hir/type_check/errors.rs b/compiler/noirc_frontend/src/hir/type_check/errors.rs index 16422e0ef8b..d29e1aa4339 100644 --- a/compiler/noirc_frontend/src/hir/type_check/errors.rs +++ b/compiler/noirc_frontend/src/hir/type_check/errors.rs @@ -496,10 +496,10 @@ impl<'a> From<&'a TypeCheckError> for Diagnostic { Diagnostic::simple_error(msg.to_string(), "".to_string(), *span) }, TypeCheckError::Unsafe { span } => { - Diagnostic::simple_warning(error.to_string(), String::new(), *span) + Diagnostic::simple_error(error.to_string(), String::new(), *span) } TypeCheckError::UnsafeFn { span } => { - Diagnostic::simple_warning(error.to_string(), String::new(), *span) + Diagnostic::simple_error(error.to_string(), String::new(), *span) } TypeCheckError::UnspecifiedType { span } => { Diagnostic::simple_error(error.to_string(), String::new(), *span)