From 34f21c0eadfc8a03f5177d72de7958903de8ac98 Mon Sep 17 00:00:00 2001 From: jfecher Date: Wed, 4 Sep 2024 14:38:06 -0500 Subject: [PATCH] fix: Support debug comptime flag for attributes (#5929) # Description ## Problem\* Resolves https://github.com/noir-lang/noir/issues/5915 ## Summary\* We were just missing a quick check after running attributes. Now their output will be shown when the `--debug-comptime-in-file` flag is used ## 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/comptime.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/noirc_frontend/src/elaborator/comptime.rs b/compiler/noirc_frontend/src/elaborator/comptime.rs index e8dbf2ec775..cf6679af8e9 100644 --- a/compiler/noirc_frontend/src/elaborator/comptime.rs +++ b/compiler/noirc_frontend/src/elaborator/comptime.rs @@ -175,6 +175,8 @@ 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)