Allow attributes in formal function parameters

This commit is contained in:
Caio
2019-06-09 07:58:40 -03:00
parent 5c45343f11
commit 1eaaf440d5
28 changed files with 1115 additions and 74 deletions

View File

@@ -928,7 +928,7 @@ impl<'a> MethodDef<'a> {
let args = {
let self_args = explicit_self.map(|explicit_self| {
let ident = Ident::with_empty_ctxt(kw::SelfLower).with_span_pos(trait_.span);
ast::Arg::from_self(explicit_self, ident)
ast::Arg::from_self(ThinVec::default(), explicit_self, ident)
});
let nonself_args = arg_types.into_iter()
.map(|(name, ty)| cx.arg(trait_.span, name, ty));