error: unneeded `return` statement --> $DIR/needless_return.rs:28:5 | LL | return true; | ^^^^^^^^^^^ | = note: `-D clippy::needless-return` implied by `-D warnings` = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:32:5 | LL | return true; | ^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:37:5 | LL | return true;;; | ^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:42:5 | LL | return true;; ; ; | ^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:47:9 | LL | return true; | ^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:49:9 | LL | return false; | ^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:55:17 | LL | true => return false, | ^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:57:13 | LL | return true; | ^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:64:9 | LL | return true; | ^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:66:16 | LL | let _ = || return true; | ^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:70:5 | LL | return the_answer!(); | ^^^^^^^^^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:73:21 | LL | fn test_void_fun() { | _____________________^ LL | | return; | |__________^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:78:11 | LL | if b { | ___________^ LL | | return; | |______________^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:80:13 | LL | } else { | _____________^ 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:96:24 | LL | let _ = 42; | ________________________^ LL | | return; | |__________________^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:99:14 | LL | _ => return, | ^^^^^^ | = help: replace `return` with a unit value error: unneeded `return` statement --> $DIR/needless_return.rs:112:9 | LL | return String::from("test"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:114:9 | LL | return String::new(); | ^^^^^^^^^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:136:32 | LL | bar.unwrap_or_else(|_| return) | ^^^^^^ | = help: replace `return` with an empty block error: unneeded `return` statement --> $DIR/needless_return.rs:140:21 | LL | let _ = || { | _____________________^ LL | | return; | |__________________^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:143:20 | LL | let _ = || return; | ^^^^^^ | = help: replace `return` with an empty block error: unneeded `return` statement --> $DIR/needless_return.rs:149:32 | LL | res.unwrap_or_else(|_| return Foo) | ^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:158:5 | LL | return true; | ^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:162:5 | LL | return true; | ^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:167:9 | LL | return true; | ^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:169:9 | LL | return false; | ^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:175:17 | LL | true => return false, | ^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:177:13 | LL | return true; | ^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:184:9 | LL | return true; | ^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:186:16 | LL | let _ = || return true; | ^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:190:5 | LL | return the_answer!(); | ^^^^^^^^^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:193:33 | LL | async fn async_test_void_fun() { | _________________________________^ LL | | return; | |__________^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:198:11 | LL | if b { | ___________^ LL | | return; | |______________^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:200:13 | LL | } else { | _____________^ LL | | return; | |______________^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:208:14 | LL | _ => return, | ^^^^^^ | = help: replace `return` with a unit value error: unneeded `return` statement --> $DIR/needless_return.rs:221:9 | LL | return String::from("test"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:223:9 | LL | return String::new(); | ^^^^^^^^^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:239:5 | LL | return format!("Hello {}", "world!"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:251:9 | LL | return true; | ^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:253:9 | LL | return false; | ^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:260:13 | LL | return 10; | ^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:263:13 | LL | return 100; | ^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:271:9 | LL | return 0; | ^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:278:13 | LL | return *(x as *const isize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:280:13 | LL | return !*(x as *const isize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:287:20 | LL | let _ = 42; | ____________________^ LL | | LL | | return; | |______________^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:294:20 | LL | let _ = 42; return; | ^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:306:9 | LL | return Ok(format!("ok!")); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:308:9 | LL | return Err(format!("err!")); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:314:9 | LL | return if true { 1 } else { 2 }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: remove `return` error: unneeded `return` statement --> $DIR/needless_return.rs:318:9 | LL | return if b1 { 0 } else { 1 } | if b2 { 2 } else { 3 } | if b3 { 4 } else { 5 }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: remove `return` and wrap the sequence with parentheses error: aborting due to 52 previous errors