13 //~^ ERROR no method named `bar`
14 //~| HELP use parentheses to call this function
17 //~^ ERROR no field `i`
18 //~| HELP use parentheses to call this function
20 let callable = Box::new(|| Foo { i: 1 }) as Box<dyn Fn() -> Foo>;
23 //~^ ERROR no method named `bar`
24 //~| HELP use parentheses to call this trait object
27 //~^ ERROR no field `i`
28 //~| HELP use parentheses to call this trait object
31 fn type_param<T: Fn() -> Foo>(t: T) {
33 //~^ ERROR no method named `bar`
34 //~| HELP use parentheses to call this type parameter
37 //~^ ERROR no field `i`
38 //~| HELP use parentheses to call this type parameter