Skip to content

Commit 01b7294

Browse files
committed
Change the error message to be shorter
1 parent 7a56edf commit 01b7294

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/unnecessary_box_returns.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ fn check_fn_decl(cx: &LateContext<'_>, decl: &FnDecl<'_>) {
5555
cx,
5656
UNNECESSARY_BOX_RETURNS,
5757
return_ty_hir.span,
58-
format!("function returns `Box<{boxed_ty}>` when `{boxed_ty}` implements `Sized`").as_str(),
59-
"change the return type to",
58+
format!("boxed return of the sized type `{boxed_ty}`").as_str(),
59+
"try",
6060
boxed_ty.to_string(),
6161
// the return value and function callers also needs to be changed, so this can't be MachineApplicable
6262
Applicability::Unspecified,

0 commit comments

Comments
 (0)