Skip to content

Commit b5219b6

Browse files
committed
Support arbitrary self types
1 parent 8b683c9 commit b5219b6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/expand.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,14 @@ fn transform_block(context: Context, sig: &mut MethodSig, block: &mut Block, has
294294
};
295295
}
296296
},
297+
Some(FnArg::Captured(ArgCaptured {
298+
pat: Pat::Ident(arg),
299+
..
300+
})) => {
301+
if arg.ident == "self" {
302+
arg.ident = Ident::new("_self", arg.ident.span());
303+
}
304+
}
297305
_ => {}
298306
}
299307

0 commit comments

Comments
 (0)