@@ -4930,13 +4930,16 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
4930
4930
}
4931
4931
4932
4932
/// 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 ) > {
4934
4934
let parent = self . tcx . hir ( ) . get ( self . tcx . hir ( ) . get_parent ( blk_id) ) ;
4935
4935
self . get_node_fn_decl ( parent) . map ( |( fn_decl, ident, _) | ( fn_decl, ident) )
4936
4936
}
4937
4937
4938
4938
/// 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 ) > {
4940
4943
match node {
4941
4944
Node :: Item ( & hir:: Item {
4942
4945
ident, node : hir:: ItemKind :: Fn ( ref decl, ..) , ..
@@ -4962,7 +4965,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
4962
4965
4963
4966
/// Given a `NodeId`, return the `FnDecl` of the method it is enclosed by and whether a
4964
4967
/// 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 ) > {
4966
4969
// Get enclosing Fn, if it is a function or a trait method, unless there's a `loop` or
4967
4970
// `while` before reaching it, as block tail returns are not available in them.
4968
4971
self . tcx . hir ( ) . get_return_block ( blk_id) . and_then ( |blk_id| {
0 commit comments