@@ -165,10 +165,10 @@ pub(crate) struct FnSig<'a> {
165165 decl : & ' a ast:: FnDecl ,
166166 generics : & ' a ast:: Generics ,
167167 ext : ast:: Extern ,
168- is_async : Cow < ' a , ast:: IsAsync > ,
169- constness : ast:: Constness ,
168+ is_async : Cow < ' a , ast:: Async > ,
169+ constness : ast:: Const ,
170170 defaultness : ast:: Defaultness ,
171- unsafety : ast:: Unsafety ,
171+ unsafety : ast:: Unsafe ,
172172 visibility : ast:: Visibility ,
173173}
174174
@@ -182,10 +182,10 @@ impl<'a> FnSig<'a> {
182182 decl,
183183 generics,
184184 ext : ast:: Extern :: None ,
185- is_async : Cow :: Owned ( ast:: IsAsync :: NotAsync ) ,
186- constness : ast:: Constness :: NotConst ,
185+ is_async : Cow :: Owned ( ast:: Async :: No ) ,
186+ constness : ast:: Const :: No ,
187187 defaultness : ast:: Defaultness :: Final ,
188- unsafety : ast:: Unsafety :: Normal ,
188+ unsafety : ast:: Unsafe :: No ,
189189 visibility : vis,
190190 }
191191 }
@@ -196,8 +196,8 @@ impl<'a> FnSig<'a> {
196196 ) -> FnSig < ' a > {
197197 FnSig {
198198 unsafety : method_sig. header . unsafety ,
199- is_async : Cow :: Borrowed ( & method_sig. header . asyncness . node ) ,
200- constness : method_sig. header . constness . node ,
199+ is_async : Cow :: Borrowed ( & method_sig. header . asyncness ) ,
200+ constness : method_sig. header . constness ,
201201 defaultness : ast:: Defaultness :: Final ,
202202 ext : method_sig. header . ext ,
203203 decl : & * method_sig. decl ,
@@ -224,8 +224,8 @@ impl<'a> FnSig<'a> {
224224 decl,
225225 generics,
226226 ext : fn_sig. header . ext ,
227- constness : fn_sig. header . constness . node ,
228- is_async : Cow :: Borrowed ( & fn_sig. header . asyncness . node ) ,
227+ constness : fn_sig. header . constness ,
228+ is_async : Cow :: Borrowed ( & fn_sig. header . asyncness ) ,
229229 defaultness,
230230 unsafety : fn_sig. header . unsafety ,
231231 visibility : vis. clone ( ) ,
@@ -1908,11 +1908,11 @@ pub(crate) fn rewrite_associated_impl_type(
19081908 }
19091909}
19101910
1911- impl Rewrite for ast:: FunctionRetTy {
1911+ impl Rewrite for ast:: FnRetTy {
19121912 fn rewrite ( & self , context : & RewriteContext < ' _ > , shape : Shape ) -> Option < String > {
19131913 match * self {
1914- ast:: FunctionRetTy :: Default ( _) => Some ( String :: new ( ) ) ,
1915- ast:: FunctionRetTy :: Ty ( ref ty) => {
1914+ ast:: FnRetTy :: Default ( _) => Some ( String :: new ( ) ) ,
1915+ ast:: FnRetTy :: Ty ( ref ty) => {
19161916 if context. config . version ( ) == Version :: One
19171917 || context. config . indent_style ( ) == IndentStyle :: Visual
19181918 {
@@ -2290,7 +2290,7 @@ fn rewrite_fn_base(
22902290 }
22912291
22922292 // Return type.
2293- if let ast:: FunctionRetTy :: Ty ( ..) = fd. output {
2293+ if let ast:: FnRetTy :: Ty ( ..) = fd. output {
22942294 let ret_should_indent = match context. config . indent_style ( ) {
22952295 // If our params are block layout then we surely must have space.
22962296 IndentStyle :: Block if put_params_in_block || fd. inputs . is_empty ( ) => false ,
@@ -2396,8 +2396,8 @@ fn rewrite_fn_base(
23962396 }
23972397
23982398 let pos_before_where = match fd. output {
2399- ast:: FunctionRetTy :: Default ( ..) => params_span. hi ( ) ,
2400- ast:: FunctionRetTy :: Ty ( ref ty) => ty. span . hi ( ) ,
2399+ ast:: FnRetTy :: Default ( ..) => params_span. hi ( ) ,
2400+ ast:: FnRetTy :: Ty ( ref ty) => ty. span . hi ( ) ,
24012401 } ;
24022402
24032403 let is_params_multi_lined = param_str. contains ( '\n' ) ;
@@ -2425,7 +2425,7 @@ fn rewrite_fn_base(
24252425 // If there are neither where-clause nor return type, we may be missing comments between
24262426 // params and `{`.
24272427 if where_clause_str. is_empty ( ) {
2428- if let ast:: FunctionRetTy :: Default ( ret_span) = fd. output {
2428+ if let ast:: FnRetTy :: Default ( ret_span) = fd. output {
24292429 match recover_missing_comment_in_span (
24302430 mk_sp ( params_span. hi ( ) , ret_span. hi ( ) ) ,
24312431 shape,
0 commit comments