//@ run-rustfix trait Foo {} impl Foo for fn() {} trait Bar { fn do_stuff(&self) where Self: Foo {} } impl Bar for T {} fn main() { (main as fn()).do_stuff(); //~^ ERROR the trait bound }