@@ -1009,7 +1009,7 @@ impl Rewrite for ast::Ty {
1009
1009
})
1010
1010
}
1011
1011
}
1012
- ast::TyKind::BareFn (ref bare_fn ) => rewrite_bare_fn(bare_fn , self.span, context, shape),
1012
+ ast::TyKind::FnPtr (ref fn_ptr ) => rewrite_fn_ptr(fn_ptr , self.span, context, shape),
1013
1013
ast::TyKind::Never => Ok(String::from("!")),
1014
1014
ast::TyKind::MacCall(ref mac) => {
1015
1015
rewrite_macro(mac, context, shape, MacroPosition::Expression)
@@ -1105,8 +1105,8 @@ impl Rewrite for ast::TyPat {
1105
1105
}
1106
1106
}
1107
1107
1108
- fn rewrite_bare_fn (
1109
- bare_fn : &ast::BareFnTy ,
1108
+ fn rewrite_fn_ptr (
1109
+ fn_ptr : &ast::FnPtrTy ,
1110
1110
span: Span,
1111
1111
context: &RewriteContext<'_>,
1112
1112
shape: Shape,
@@ -1115,7 +1115,7 @@ fn rewrite_bare_fn(
1115
1115
1116
1116
let mut result = String::with_capacity(128);
1117
1117
1118
- if let Some(ref lifetime_str) = rewrite_bound_params(context, shape, &bare_fn .generic_params) {
1118
+ if let Some(ref lifetime_str) = rewrite_bound_params(context, shape, &fn_ptr .generic_params) {
1119
1119
result.push_str("for<");
1120
1120
// 6 = "for<> ".len(), 4 = "for<".
1121
1121
// This doesn't work out so nicely for multiline situation with lots of
@@ -1124,10 +1124,10 @@ fn rewrite_bare_fn(
1124
1124
result.push_str("> ");
1125
1125
}
1126
1126
1127
- result.push_str(crate::utils::format_safety(bare_fn .safety));
1127
+ result.push_str(crate::utils::format_safety(fn_ptr .safety));
1128
1128
1129
1129
result.push_str(&format_extern(
1130
- bare_fn .ext,
1130
+ fn_ptr .ext,
1131
1131
context.config.force_explicit_abi(),
1132
1132
));
1133
1133
@@ -1145,9 +1145,9 @@ fn rewrite_bare_fn(
1145
1145
};
1146
1146
1147
1147
let rewrite = format_function_type(
1148
- bare_fn .decl.inputs.iter(),
1149
- &bare_fn .decl.output,
1150
- bare_fn .decl.c_variadic(),
1148
+ fn_ptr .decl.inputs.iter(),
1149
+ &fn_ptr .decl.output,
1150
+ fn_ptr .decl.c_variadic(),
1151
1151
span,
1152
1152
context,
1153
1153
func_ty_shape,
0 commit comments