Restore timing scopes for native show rules (#6616)

This commit is contained in:
Laurenz 2025-07-16 11:54:43 +02:00 committed by GitHub
parent 8e0e0f1a3b
commit 7897e86bcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -374,9 +374,11 @@ fn visit_show_rules<'a>(
}
// Apply a built-in show rule.
ShowStep::Builtin(rule) => rule
.apply(&output, s.engine, chained)
.map(|content| content.spanned(output.span())),
ShowStep::Builtin(rule) => {
let _scope = typst_timing::TimingScope::new(output.elem().name());
rule.apply(&output, s.engine, chained)
.map(|content| content.spanned(output.span()))
}
};
// Errors in show rules don't terminate compilation immediately. We just