]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/needless_return.fixed
Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyup
[rust.git] / src / tools / clippy / tests / ui / needless_return.fixed
index d451be1f389a7b50a2b3c0201e8ace18d4f0668b..ab1c0e590bbc7ca317ea0568eebee557090b7623 100644 (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() {}