@@ -214,7 +214,7 @@ pub trait AstBuilder {
214
214
215
215
fn arg ( & self , span : Span , name : Ident , ty : P < ast:: Ty > ) -> ast:: Arg ;
216
216
// FIXME unused self
217
- fn fn_decl ( & self , inputs : Vec < ast:: Arg > , output : P < ast:: Ty > ) -> P < ast:: FnDecl > ;
217
+ fn fn_decl ( & self , inputs : Vec < ast:: Arg > , output : ast:: FunctionRetTy ) -> P < ast:: FnDecl > ;
218
218
219
219
fn item_fn_poly ( & self ,
220
220
span : Span ,
@@ -924,7 +924,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
924
924
-> P < ast:: Expr > {
925
925
let fn_decl = self . fn_decl (
926
926
ids. iter ( ) . map ( |id| self . arg ( span, * id, self . ty_infer ( span) ) ) . collect ( ) ,
927
- self . ty_infer ( span) ) ;
927
+ ast :: FunctionRetTy :: Default ( span) ) ;
928
928
929
929
// FIXME -- We are using `span` as the span of the `|...|`
930
930
// part of the lambda, but it probably (maybe?) corresponds to
@@ -970,10 +970,10 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
970
970
}
971
971
972
972
// FIXME unused self
973
- fn fn_decl ( & self , inputs : Vec < ast:: Arg > , output : P < ast:: Ty > ) -> P < ast:: FnDecl > {
973
+ fn fn_decl ( & self , inputs : Vec < ast:: Arg > , output : ast:: FunctionRetTy ) -> P < ast:: FnDecl > {
974
974
P ( ast:: FnDecl {
975
975
inputs,
976
- output : ast :: FunctionRetTy :: Ty ( output ) ,
976
+ output,
977
977
variadic : false
978
978
} )
979
979
}
@@ -1003,7 +1003,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
1003
1003
self . item ( span,
1004
1004
name,
1005
1005
Vec :: new ( ) ,
1006
- ast:: ItemKind :: Fn ( self . fn_decl ( inputs, output) ,
1006
+ ast:: ItemKind :: Fn ( self . fn_decl ( inputs, ast :: FunctionRetTy :: Ty ( output) ) ,
1007
1007
ast:: Unsafety :: Normal ,
1008
1008
dummy_spanned ( ast:: Constness :: NotConst ) ,
1009
1009
Abi :: Rust ,
0 commit comments