We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 671f4c9 commit 2226b0eCopy full SHA for 2226b0e
clippy_lints/src/default_box_assignments.rs
@@ -51,7 +51,7 @@ impl LateLintPass<'_> for DefaultBoxAssignments {
51
cx,
52
DEFAULT_BOX_ASSIGNMENTS,
53
expr.span,
54
- "assigning `Default::default()` to `Box<T>`",
+ "creating a new box with default content",
55
|diag| {
56
let mut app = Applicability::MachineApplicable;
57
let suggestion = format!(
@@ -61,7 +61,7 @@ impl LateLintPass<'_> for DefaultBoxAssignments {
61
62
diag.note("this creates a needless allocation").span_suggestion(
63
64
- "assign to the inner value",
+ "replace existing content with default instead",
65
suggestion,
66
app,
67
);
0 commit comments