1
Fork 0

Use FunctionRetTy::Default rather than an explicit TyKind::Infer for lambda-building

This prevents explicit `-> _` return type annotations for closures generated by `lambda`.
This commit is contained in:
varkor 2018-03-22 15:55:57 +00:00
parent 75af15ee6c
commit 0d278ca6a8
4 changed files with 8 additions and 8 deletions

View file

@ -962,7 +962,7 @@ impl<'a> MethodDef<'a> {
let ret_type = self.get_ret_ty(cx, trait_, generics, type_ident);
let method_ident = cx.ident_of(self.name);
let fn_decl = cx.fn_decl(args, ret_type);
let fn_decl = cx.fn_decl(args, ast::FunctionRetTy::Ty(ret_type));
let body_block = cx.block_expr(body);
let unsafety = if self.is_unsafe {