From 11baba072d3df98dab49fbadc4ad0735b49e3f9d Mon Sep 17 00:00:00 2001 From: han0110 Date: Sun, 8 Feb 2026 14:16:19 +0000 Subject: [PATCH] feat: improve the docs of macro `export_cycle_scope_names` Co-authored-by: jsign --- crates/zkvm/zisk/platform/src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/zkvm/zisk/platform/src/lib.rs b/crates/zkvm/zisk/platform/src/lib.rs index 3f304a9..868a02b 100644 --- a/crates/zkvm/zisk/platform/src/lib.rs +++ b/crates/zkvm/zisk/platform/src/lib.rs @@ -199,11 +199,13 @@ pub fn check_cycle_scope_names(_names: &[&str]) { /// Exports cycle scope names as symbols for `ziskemu` to display human-readable names. /// -/// Names must be listed in the same order as they were first used via -/// [`Platform::cycle_scope_start`]. +/// The declared scope names must be declared in the order they are _executed_ +/// in your code. Not doing so can dangerously name a scope incorrectly. Be +/// careful if you have lambda functions or conditionals since it is easy to +/// confuse the right order. /// /// Enable feature `check-cycle-scope` to verify correctness at runtime -/// (panics on mismatch with expected output to copy-paste). +/// automatically (panics on mismatch with expected output to copy-paste). #[macro_export] macro_rules! export_cycle_scope_names { ($($name:ident),* $(,)?) => {{