rust-lang/rust — pull request #19113 by nikomatsakis (2014-11-19 17:48:26+00:00)
Title: Permit the `||` syntax to be used for both boxed and unboxed closures

Use the expected type to infer the argument/return types of unboxed closures. Also, in `||` expressions, use the expected type to decide if the result should be a boxed or unboxed closure (and if an unboxed closure, what kind).

This supercedes PR #19089, which was already reviewed by @pcwalton.