diff options
-rw-r--r-- | askama_derive/src/generator.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs index 76b775b..6f561f8 100644 --- a/askama_derive/src/generator.rs +++ b/askama_derive/src/generator.rs @@ -952,7 +952,7 @@ impl<'a> Generator<'a> { // If `expr` is already a form of variable then // don't reintroduce a new variable. This is // to avoid moving non-copyable values. - Expr::Var(name) => { + &Expr::Var(name) if name != "self" => { let var = self.locals.resolve_or_self(name); self.locals.insert(arg, LocalMeta::with_ref(var)); } |