//@ check-pass //@ compile-flags:-Zpolymorphize=on pub struct OnDrop(pub F); impl Drop for OnDrop { fn drop(&mut self) { } } fn bar(f: F) { let _ = OnDrop(|| ()); f() } fn foo( _: R, _: S, ) { let bar = || { bar(|| {}) }; bar(); } fn main() { foo(3u32, || {}); }