From 41ac3a4aa0ed1ca1883391629711a9585b145e11 Mon Sep 17 00:00:00 2001 From: Jake Fecher Date: Wed, 4 Sep 2024 14:24:30 -0500 Subject: [PATCH 1/2] Support debug comptime flag for attributes --- compiler/noirc_frontend/src/elaborator/comptime.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/noirc_frontend/src/elaborator/comptime.rs b/compiler/noirc_frontend/src/elaborator/comptime.rs index cfc2e34c520..b06f8a98893 100644 --- a/compiler/noirc_frontend/src/elaborator/comptime.rs +++ b/compiler/noirc_frontend/src/elaborator/comptime.rs @@ -175,6 +175,10 @@ impl<'context> Elaborator<'context> { .call_function(function, arguments, TypeBindings::new(), location) .map_err(|error| error.into_compilation_error_pair())?; + self.debug_comptime(location, |interner| { + value.display(interner).to_string() + }); + if value != Value::Unit { let items = value .into_top_level_items(location, self.interner) From 98b8c87774aa527e5dea129472ef72bb9885a5d9 Mon Sep 17 00:00:00 2001 From: Jake Fecher Date: Wed, 4 Sep 2024 14:24:57 -0500 Subject: [PATCH 2/2] Format --- compiler/noirc_frontend/src/elaborator/comptime.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/noirc_frontend/src/elaborator/comptime.rs b/compiler/noirc_frontend/src/elaborator/comptime.rs index b06f8a98893..33e8ca9ada6 100644 --- a/compiler/noirc_frontend/src/elaborator/comptime.rs +++ b/compiler/noirc_frontend/src/elaborator/comptime.rs @@ -175,9 +175,7 @@ impl<'context> Elaborator<'context> { .call_function(function, arguments, TypeBindings::new(), location) .map_err(|error| error.into_compilation_error_pair())?; - self.debug_comptime(location, |interner| { - value.display(interner).to_string() - }); + self.debug_comptime(location, |interner| value.display(interner).to_string()); if value != Value::Unit { let items = value