aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--askama_shared/src/generator.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
index e135c13..a37b51f 100644
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -442,10 +442,10 @@ impl<'a> Generator<'a> {
self.prepare_ws(&def.ws1);
for (i, arg) in def.args.iter().enumerate() {
self.write(&format!("let {} = &", arg));
- self.locals.insert(arg);
self.visit_expr(args.get(i)
.expect(&format!("macro '{}' takes more than {} arguments", name, i)));
self.writeln(";");
+ self.locals.insert(arg);
}
self.handle(state, &def.nodes, AstLevel::Nested);
self.flush_ws(&def.ws2);