rust/tests/ui/traits/fn-pointer/suggest-wrap-parens.fixed

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
138 B
Rust
Raw Normal View History

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