rust/tests/ui/fn/fn-recover-return-sign.fixed
Esteban Küber 692bc344d5 Make parse error suggestions verbose and fix spans
Go over all structured parser suggestions and make them verbose style.

When suggesting to add or remove delimiters, turn them into multiple suggestion parts.
2024-07-12 03:02:57 +00:00

29 lines
588 B
Rust

//@ run-rustfix
#![allow(unused)]
fn a() -> usize { 0 }
//~^ ERROR return types are denoted using `->`
fn b() -> usize { 0 }
//~^ ERROR return types are denoted using `->`
fn bar(_: u32) {}
fn baz() -> *const dyn Fn(u32) { unimplemented!() }
fn foo() {
match () {
_ if baz() == &bar as &dyn Fn(u32) => (),
() => (),
}
}
fn main() {
let foo = |a: bool| -> bool { a };
//~^ ERROR return types are denoted using `->`
dbg!(foo(false));
let bar = |a: bool| -> bool { a };
//~^ ERROR return types are denoted using `->`
dbg!(bar(false));
}