Merge commit 'ac0e10aa68' into clippyup
This commit is contained in:
parent
da16cc1da9
commit
d75b25faab
617 changed files with 10259 additions and 4400 deletions
|
|
@ -90,7 +90,7 @@ impl<'tcx> LateLintPass<'tcx> for InconsistentStructConstructor {
|
|||
let mut fields_snippet = String::new();
|
||||
let (last_ident, idents) = ordered_fields.split_last().unwrap();
|
||||
for ident in idents {
|
||||
let _ = write!(fields_snippet, "{}, ", ident);
|
||||
let _ = write!(fields_snippet, "{ident}, ");
|
||||
}
|
||||
fields_snippet.push_str(&last_ident.to_string());
|
||||
|
||||
|
|
@ -100,10 +100,8 @@ impl<'tcx> LateLintPass<'tcx> for InconsistentStructConstructor {
|
|||
String::new()
|
||||
};
|
||||
|
||||
let sugg = format!("{} {{ {}{} }}",
|
||||
let sugg = format!("{} {{ {fields_snippet}{base_snippet} }}",
|
||||
snippet(cx, qpath.span(), ".."),
|
||||
fields_snippet,
|
||||
base_snippet,
|
||||
);
|
||||
|
||||
span_lint_and_sugg(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue