let expr = &body.value;
- let mut helper = CCHelper { cc: 1, returns: 0 };
+ let mut helper = CcHelper { cc: 1, returns: 0 };
helper.visit_expr(expr);
- let CCHelper { cc, returns } = helper;
+ let CcHelper { cc, returns } = helper;
let ret_ty = cx.typeck_results().node_type(expr.hir_id);
let ret_adjust = if is_type_diagnostic_item(cx, ret_ty, sym::result_type) {
returns
if rust_cc > self.limit.limit() {
let fn_span = match kind {
- FnKind::ItemFn(ident, _, _, _, _) | FnKind::Method(ident, _, _, _) => ident.span,
- FnKind::Closure(_) => {
+ FnKind::ItemFn(ident, _, _, _) | FnKind::Method(ident, _, _) => ident.span,
+ FnKind::Closure => {
let header_span = body_span.with_hi(decl.output.span().lo());
let pos = snippet_opt(cx, header_span).and_then(|snip| {
let low_offset = snip.find('|')?;
}
}
-struct CCHelper {
+struct CcHelper {
cc: u64,
returns: u64,
}
-impl<'tcx> Visitor<'tcx> for CCHelper {
+impl<'tcx> Visitor<'tcx> for CcHelper {
type Map = Map<'tcx>;
fn visit_expr(&mut self, e: &'tcx Expr<'_>) {