rust/tests/ui/traits/fn-pointer/suggest-wrap-parens-method.rs
2024-09-26 18:17:52 -07:00

16 lines
197 B
Rust

//@ 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
}