rustc/tests/ui/traits/fn-pointer/suggest-wrap-parens.fixed
2024-11-29 22:33:13 +01:00

11 lines
138 B
Plaintext

//@ run-rustfix
trait Foo {}
impl Foo for fn() {}
fn main() {
let _x: &dyn Foo = &(main as fn());
//~^ ERROR the trait bound
}