mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
test test test
This commit is contained in:
parent
a935826071
commit
9ff868c4ae
@ -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() {}
|
||||
|
@ -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() {}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user