@@ -157,7 +157,7 @@ trait ErrorReportingHelpers<'tcx> {
157157
158158 fn give_expl_lifetime_param ( & self ,
159159 decl : & ast:: FnDecl ,
160- fn_style : ast:: FnStyle ,
160+ unsafety : ast:: Unsafety ,
161161 ident : ast:: Ident ,
162162 opt_explicit_self : Option < & ast:: ExplicitSelf_ > ,
163163 generics : & ast:: Generics ,
@@ -828,7 +828,7 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
828828 ast:: MethodImplItem ( ref m) => {
829829 Some ( ( m. pe_fn_decl ( ) ,
830830 m. pe_generics ( ) ,
831- m. pe_fn_style ( ) ,
831+ m. pe_unsafety ( ) ,
832832 m. pe_ident ( ) ,
833833 Some ( & m. pe_explicit_self ( ) . node ) ,
834834 m. span ) )
@@ -841,7 +841,7 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
841841 ast:: ProvidedMethod ( ref m) => {
842842 Some ( ( m. pe_fn_decl ( ) ,
843843 m. pe_generics ( ) ,
844- m. pe_fn_style ( ) ,
844+ m. pe_unsafety ( ) ,
845845 m. pe_ident ( ) ,
846846 Some ( & m. pe_explicit_self ( ) . node ) ,
847847 m. span ) )
@@ -853,14 +853,14 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
853853 } ,
854854 None => None
855855 } ;
856- let ( fn_decl, generics, fn_style , ident, expl_self, span)
856+ let ( fn_decl, generics, unsafety , ident, expl_self, span)
857857 = node_inner. expect ( "expect item fn" ) ;
858858 let taken = lifetimes_in_scope ( self . tcx , scope_id) ;
859859 let life_giver = LifeGiver :: with_taken ( taken. as_slice ( ) ) ;
860860 let rebuilder = Rebuilder :: new ( self . tcx , fn_decl, expl_self,
861861 generics, same_regions, & life_giver) ;
862862 let ( fn_decl, expl_self, generics) = rebuilder. rebuild ( ) ;
863- self . give_expl_lifetime_param ( & fn_decl, fn_style , ident,
863+ self . give_expl_lifetime_param ( & fn_decl, unsafety , ident,
864864 expl_self. as_ref ( ) , & generics, span) ;
865865 }
866866}
@@ -1407,12 +1407,12 @@ impl<'a, 'tcx> Rebuilder<'a, 'tcx> {
14071407impl < ' a , ' tcx > ErrorReportingHelpers < ' tcx > for InferCtxt < ' a , ' tcx > {
14081408 fn give_expl_lifetime_param ( & self ,
14091409 decl : & ast:: FnDecl ,
1410- fn_style : ast:: FnStyle ,
1410+ unsafety : ast:: Unsafety ,
14111411 ident : ast:: Ident ,
14121412 opt_explicit_self : Option < & ast:: ExplicitSelf_ > ,
14131413 generics : & ast:: Generics ,
14141414 span : codemap:: Span ) {
1415- let suggested_fn = pprust:: fun_to_string ( decl, fn_style , ident,
1415+ let suggested_fn = pprust:: fun_to_string ( decl, unsafety , ident,
14161416 opt_explicit_self, generics) ;
14171417 let msg = format ! ( "consider using an explicit lifetime \
14181418 parameter as shown: {}", suggested_fn) ;
0 commit comments