-use crate::consts::{
+use clippy_utils::consts::{
constant, constant_simple, Constant,
Constant::{Int, F32, F64},
};
cx,
SUBOPTIMAL_FLOPS,
parent.span,
- "square can be computed more efficiently",
+ "multiply and add expressions can be calculated more efficiently and accurately",
"consider using",
format!(
"{}.mul_add({}, {})",
return;
}
}
-
- span_lint_and_sugg(
- cx,
- SUBOPTIMAL_FLOPS,
- expr.span,
- "square can be computed more efficiently",
- "consider using",
- format!("{} * {}", Sugg::hir(cx, &args[0], ".."), Sugg::hir(cx, &args[0], "..")),
- Applicability::MachineApplicable,
- );
}
}
}