about summary refs log tree commit diff
path: root/tests/ui/traits/fn-pointer/suggest-wrap-parens.fixed
blob: 0bc8792b04e0681c2220f3f593738e3a6e3be332 (plain)
1
2
3
4
5
6
7
8
9
10
//@ run-rustfix

trait Foo {}

impl Foo for fn() {}

fn main() {
    let _x: &dyn Foo = &(main as fn());
    //~^ ERROR the trait bound
}