/* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ struct X; fn foo(_: T) {} fn bar(_: T) {} fn main() { let x = X; let closure = |_| foo(x); //~ ERROR E0525 bar(closure); }