mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
dogfood test passed
This commit is contained in:
parent
73039f654e
commit
6f01273d5d
@ -87,15 +87,12 @@ fn suggest_non_zero_conversion(
|
||||
target_non_zero_type: &str,
|
||||
arg_snippet: &str,
|
||||
) {
|
||||
let suggestion = format!("{}::{}({})", target_non_zero_type, fn_name, arg_snippet);
|
||||
let suggestion = format!("{target_non_zero_type}::{fn_name}({arg_snippet})");
|
||||
span_lint_and_sugg(
|
||||
cx,
|
||||
NON_ZERO_SUGGESTIONS,
|
||||
expr.span,
|
||||
format!(
|
||||
"Consider using `{}::{}()` for more efficient and type-safe conversion",
|
||||
target_non_zero_type, fn_name
|
||||
),
|
||||
format!("Consider using `{target_non_zero_type}::{fn_name}()` for more efficient and type-safe conversion"),
|
||||
"Replace with",
|
||||
suggestion,
|
||||
Applicability::MachineApplicable,
|
||||
|
Loading…
Reference in New Issue
Block a user