fix limit_stderr_length error

This commit is contained in:
Takayuki 2021-04-12 21:58:34 +09:00
parent 0218a3b12f
commit e6c67ad2bf
3 changed files with 3 additions and 81 deletions

View File

@ -203,35 +203,8 @@ async fn async_borrows_but_not_last(value: bool) -> String {
}
async fn async_test_return_in_macro() {
// This will return and the macro below won't be executed. Removing the `return` from the macro
// will change semantics.
needed_return!(10);
needed_return!(0);
}
mod async_issue6501 {
async fn foo(bar: Result<(), ()>) {
bar.unwrap_or_else(|_| {})
}
async fn async_test_closure() {
let _ = || {
};
let _ = || {};
}
struct Foo;
#[allow(clippy::unnecessary_lazy_evaluations)]
async fn bar(res: Result<Foo, u8>) -> Foo {
res.unwrap_or_else(|_| Foo)
}
}
fn main() {
let _ = test_end_of_fn();
let _ = test_no_semicolon();
let _ = test_if_block();
let _ = test_match(true);
test_closure();
}
fn main() {}

View File

@ -203,35 +203,8 @@ async fn async_borrows_but_not_last(value: bool) -> String {
}
async fn async_test_return_in_macro() {
// This will return and the macro below won't be executed. Removing the `return` from the macro
// will change semantics.
needed_return!(10);
needed_return!(0);
}
mod async_issue6501 {
async fn foo(bar: Result<(), ()>) {
bar.unwrap_or_else(|_| return)
}
async fn async_test_closure() {
let _ = || {
return;
};
let _ = || return;
}
struct Foo;
#[allow(clippy::unnecessary_lazy_evaluations)]
async fn bar(res: Result<Foo, u8>) -> Foo {
res.unwrap_or_else(|_| return Foo)
}
}
fn main() {
let _ = test_end_of_fn();
let _ = test_no_semicolon();
let _ = test_if_block();
let _ = test_match(true);
test_closure();
}
fn main() {}

View File

@ -192,29 +192,5 @@ error: unneeded `return` statement
LL | return String::new();
| ^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `String::new()`
error: unneeded `return` statement
--> $DIR/needless_return.rs:214:32
|
LL | bar.unwrap_or_else(|_| return)
| ^^^^^^ help: replace `return` with an empty block: `{}`
error: unneeded `return` statement
--> $DIR/needless_return.rs:219:13
|
LL | return;
| ^^^^^^^ help: remove `return`
error: unneeded `return` statement
--> $DIR/needless_return.rs:221:20
|
LL | let _ = || return;
| ^^^^^^ help: replace `return` with an empty block: `{}`
error: unneeded `return` statement
--> $DIR/needless_return.rs:227:32
|
LL | res.unwrap_or_else(|_| return Foo)
| ^^^^^^^^^^ help: remove `return`: `Foo`
error: aborting due to 36 previous errors
error: aborting due to 32 previous errors