trait Trait { fn f(&self); } impl bool> Trait for F { fn f(&self) { print!("1"); } } impl Trait for () { fn f(&self) { print!("2"); } } fn main() { let x = || { (return) || true; }; x().f(); let x = loop { (break) || true; }; x.f(); let x = || { return (|| true); }; x().f(); let x = loop { break (|| true); }; x.f(); let x = || { return || true; }; x().f(); let x = loop { break || true; }; x.f(); }