about summary refs log tree commit diff
path: root/tests/ui/traits/fn-pointer/suggest-wrap-parens-method.rs
blob: 89c1295613cc0e9dadb5376ac7873ae50bd12f13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ run-rustfix

trait Foo {}

impl Foo for fn() {}

trait Bar {
    fn do_stuff(&self) where Self: Foo {}
}
impl<T> Bar for T {}

fn main() {
    main.do_stuff();
    //~^ ERROR the trait bound
}