summaryrefslogtreecommitdiff
path: root/ops/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ops/lib.rs')
-rw-r--r--ops/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ops/lib.rs b/ops/lib.rs
index d295ec9bd..4d0c89bd2 100644
--- a/ops/lib.rs
+++ b/ops/lib.rs
@@ -47,8 +47,6 @@ struct Op {
impl Op {
fn new(mut item: ItemFn, attrs: Attributes) -> Self {
- add_scope_lifetime(&mut item);
-
// Preserve the original function. Change the name to `call`.
//
// impl op_foo {
@@ -58,6 +56,8 @@ impl Op {
let mut orig = item.clone();
orig.sig.ident = Ident::new("call", Span::call_site());
+ add_scope_lifetime(&mut item);
+
let is_async = item.sig.asyncness.is_some() || is_future(&item.sig.output);
let type_params = exclude_lifetime_params(&item.sig.generics.params);
let core = deno::import();