rust/tests/ui/needless_return.stderr
2022-12-23 01:14:07 +03:00

407 lines
8.6 KiB
Plaintext

error: unneeded `return` statement
--> $DIR/needless_return.rs:27:5
|
LL | return true;
| ^^^^^^^^^^^
|
= note: `-D clippy::needless-return` implied by `-D warnings`
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:31:5
|
LL | return true;
| ^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:36:9
|
LL | return true;
| ^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:38:9
|
LL | return false;
| ^^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:44:17
|
LL | true => return false,
| ^^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:46:13
|
LL | return true;
| ^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:53:9
|
LL | return true;
| ^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:55:16
|
LL | let _ = || return true;
| ^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:59:5
|
LL | return the_answer!();
| ^^^^^^^^^^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:62:21
|
LL | fn test_void_fun() {
| _____________________^
LL | | return;
| |__________^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:67:11
|
LL | if b {
| ___________^
LL | | return;
| |______________^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:69:13
|
LL | } else {
| _____________^
LL | | return;
| |______________^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:77:14
|
LL | _ => return,
| ^^^^^^
|
= help: replace `return` with a unit value
error: unneeded `return` statement
--> $DIR/needless_return.rs:85:24
|
LL | let _ = 42;
| ________________________^
LL | | return;
| |__________________^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:88:14
|
LL | _ => return,
| ^^^^^^
|
= help: replace `return` with a unit value
error: unneeded `return` statement
--> $DIR/needless_return.rs:101:9
|
LL | return String::from("test");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:103:9
|
LL | return String::new();
| ^^^^^^^^^^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:125:32
|
LL | bar.unwrap_or_else(|_| return)
| ^^^^^^
|
= help: replace `return` with an empty block
error: unneeded `return` statement
--> $DIR/needless_return.rs:129:21
|
LL | let _ = || {
| _____________________^
LL | | return;
| |__________________^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:132:20
|
LL | let _ = || return;
| ^^^^^^
|
= help: replace `return` with an empty block
error: unneeded `return` statement
--> $DIR/needless_return.rs:138:32
|
LL | res.unwrap_or_else(|_| return Foo)
| ^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:147:5
|
LL | return true;
| ^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:151:5
|
LL | return true;
| ^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:156:9
|
LL | return true;
| ^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:158:9
|
LL | return false;
| ^^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:164:17
|
LL | true => return false,
| ^^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:166:13
|
LL | return true;
| ^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:173:9
|
LL | return true;
| ^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:175:16
|
LL | let _ = || return true;
| ^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:179:5
|
LL | return the_answer!();
| ^^^^^^^^^^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:182:33
|
LL | async fn async_test_void_fun() {
| _________________________________^
LL | | return;
| |__________^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:187:11
|
LL | if b {
| ___________^
LL | | return;
| |______________^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:189:13
|
LL | } else {
| _____________^
LL | | return;
| |______________^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:197:14
|
LL | _ => return,
| ^^^^^^
|
= help: replace `return` with a unit value
error: unneeded `return` statement
--> $DIR/needless_return.rs:210:9
|
LL | return String::from("test");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:212:9
|
LL | return String::new();
| ^^^^^^^^^^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:228:5
|
LL | return format!("Hello {}", "world!");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:239:9
|
LL | return true;
| ^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:241:9
|
LL | return false;
| ^^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:248:13
|
LL | return 10;
| ^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:251:13
|
LL | return 100;
| ^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:259:9
|
LL | return 0;
| ^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:266:13
|
LL | return *(x as *const isize);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:268:13
|
LL | return !*(x as *const isize);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:275:20
|
LL | let _ = 42;
| ____________________^
LL | |
LL | | return;
| |______________^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:282:20
|
LL | let _ = 42; return;
| ^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:294:9
|
LL | return Ok(format!("ok!"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:296:9
|
LL | return Err(format!("err!"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: remove `return`
error: aborting due to 48 previous errors