@@ -4930,13 +4930,16 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
49304930 }
49314931
49324932 /// Given a function block's `NodeId`, return its `FnDecl` if it exists, or `None` otherwise.
4933- fn get_parent_fn_decl ( & self , blk_id : ast:: NodeId ) -> Option < ( hir:: FnDecl , ast:: Ident ) > {
4933+ fn get_parent_fn_decl ( & self , blk_id : ast:: NodeId ) -> Option < ( hir:: FnDecl < ' gcx > , ast:: Ident ) > {
49344934 let parent = self . tcx . hir ( ) . get ( self . tcx . hir ( ) . get_parent ( blk_id) ) ;
49354935 self . get_node_fn_decl ( parent) . map ( |( fn_decl, ident, _) | ( fn_decl, ident) )
49364936 }
49374937
49384938 /// Given a function `Node`, return its `FnDecl` if it exists, or `None` otherwise.
4939- fn get_node_fn_decl ( & self , node : Node ) -> Option < ( hir:: FnDecl , ast:: Ident , bool ) > {
4939+ fn get_node_fn_decl < ' hir > (
4940+ & self ,
4941+ node : Node < ' hir >
4942+ ) -> Option < ( hir:: FnDecl < ' hir > , ast:: Ident , bool ) > {
49404943 match node {
49414944 Node :: Item ( & hir:: Item {
49424945 ident, node : hir:: ItemKind :: Fn ( ref decl, ..) , ..
@@ -4962,7 +4965,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
49624965
49634966 /// Given a `NodeId`, return the `FnDecl` of the method it is enclosed by and whether a
49644967 /// suggestion can be made, `None` otherwise.
4965- pub fn get_fn_decl ( & self , blk_id : ast:: NodeId ) -> Option < ( hir:: FnDecl , bool ) > {
4968+ pub fn get_fn_decl ( & self , blk_id : ast:: NodeId ) -> Option < ( hir:: FnDecl < ' gcx > , bool ) > {
49664969 // Get enclosing Fn, if it is a function or a trait method, unless there's a `loop` or
49674970 // `while` before reaching it, as block tail returns are not available in them.
49684971 self . tcx . hir ( ) . get_return_block ( blk_id) . and_then ( |blk_id| {
0 commit comments