From 020998a96bee108bd5a9bb1fcca1deaf5a266b8e Mon Sep 17 00:00:00 2001 From: dswij Date: Tue, 28 Dec 2021 18:00:05 +0800 Subject: [PATCH] Change `unit type` suggestion to `unit value` --- clippy_lints/src/returns.rs | 2 +- tests/ui/needless_return.stderr | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clippy_lints/src/returns.rs b/clippy_lints/src/returns.rs index 45e4ec964dc1..112ccdcdd420 100644 --- a/clippy_lints/src/returns.rs +++ b/clippy_lints/src/returns.rs @@ -266,7 +266,7 @@ fn emit_return_lint(cx: &LateContext<'_>, ret_span: Span, inner_span: Option $DIR/needless_return.rs:74:14 | LL | _ => return, - | ^^^^^^ help: replace `return` with a unit type: `()` + | ^^^^^^ help: replace `return` with a unit value: `()` error: unneeded `return` statement --> $DIR/needless_return.rs:83:13 @@ -82,7 +82,7 @@ error: unneeded `return` statement --> $DIR/needless_return.rs:85:14 | LL | _ => return, - | ^^^^^^ help: replace `return` with a unit type: `()` + | ^^^^^^ help: replace `return` with a unit value: `()` error: unneeded `return` statement --> $DIR/needless_return.rs:100:9 @@ -190,7 +190,7 @@ error: unneeded `return` statement --> $DIR/needless_return.rs:196:14 | LL | _ => return, - | ^^^^^^ help: replace `return` with a unit type: `()` + | ^^^^^^ help: replace `return` with a unit value: `()` error: unneeded `return` statement --> $DIR/needless_return.rs:211:9