test test test

This commit is contained in:
Niki4tap 2022-12-23 01:14:07 +03:00
parent a935826071
commit 9ff868c4ae
3 changed files with 37 additions and 1 deletions

View File

@ -277,4 +277,14 @@ fn issue9947() -> Result<(), String> {
do yeet "hello";
}
// without anyhow, but triggers the same bug I believe
#[expect(clippy::useless_format)]
fn issue10051() -> Result<String, String> {
if true {
Ok(format!("ok!"))
} else {
Err(format!("err!"))
}
}
fn main() {}

View File

@ -287,4 +287,14 @@ fn issue9947() -> Result<(), String> {
do yeet "hello";
}
// without anyhow, but triggers the same bug I believe
#[expect(clippy::useless_format)]
fn issue10051() -> Result<String, String> {
if true {
return Ok(format!("ok!"));
} else {
return Err(format!("err!"));
}
}
fn main() {}

View File

@ -386,5 +386,21 @@ LL | let _ = 42; return;
|
= help: remove `return`
error: aborting due to 46 previous errors
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