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

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

11 lines
128 B
Rust
Raw Normal View History

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