Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit a1a1a4b

Browse files
committed
Use multiple span_suggestions instead of multipart_suggestion
multipart suggestions aren't autofixable by rustfix yet
1 parent 380d941 commit a1a1a4b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

clippy_lints/src/types.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -812,14 +812,14 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnitArg {
812812
),
813813
applicability,
814814
);
815-
db.multipart_suggestion(
816-
"...and use unit literals instead",
817-
args_to_recover
818-
.iter()
819-
.map(|arg| (arg.span, "()".to_string()))
820-
.collect::<Vec<_>>(),
821-
applicability,
822-
);
815+
for arg in args_to_recover {
816+
db.span_suggestion(
817+
arg.span,
818+
"...and use unit literals instead",
819+
"()".to_string(),
820+
applicability,
821+
);
822+
}
823823
});
824824
}
825825
},

0 commit comments

Comments
 (0)