X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftools%2Fclippy%2Ftests%2Fui%2Fneedless_return.fixed;h=ab1c0e590bbc7ca317ea0568eebee557090b7623;hb=01c75848eb94e96210e74b8dd43a5a270464ac25;hp=4386aaec49e2437751803ac8f9ce216c17e79f07;hpb=0468a00ae3fd6ef1a6a0f9eaf637d7aa9e604acc;p=rust.git diff --git a/src/tools/clippy/tests/ui/needless_return.fixed b/src/tools/clippy/tests/ui/needless_return.fixed index 4386aaec49e..ab1c0e590bb 100644 --- a/src/tools/clippy/tests/ui/needless_return.fixed +++ b/src/tools/clippy/tests/ui/needless_return.fixed @@ -1,6 +1,7 @@ // run-rustfix #![feature(lint_reasons)] +#![feature(yeet_expr)] #![allow(unused)] #![allow( clippy::if_same_then_else, @@ -272,4 +273,18 @@ mod issue9416 { } } +fn issue9947() -> Result<(), String> { + do yeet "hello"; +} + +// without anyhow, but triggers the same bug I believe +#[expect(clippy::useless_format)] +fn issue10051() -> Result { + if true { + Ok(format!("ok!")) + } else { + Err(format!("err!")) + } +} + fn main() {}